Google Cloud v8.21.0 published on Wednesday, Mar 5, 2025 by Pulumi
gcp.backupdisasterrecovery.getDataSource
Explore with Pulumi AI
A Backup and DR Data Source.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const foo = gcp.backupdisasterrecovery.getDataSource({
    location: "us-central1",
    project: "project-test",
    dataSourceId: "ds-test",
    backupVaultId: "bv-test",
});
import pulumi
import pulumi_gcp as gcp
foo = gcp.backupdisasterrecovery.get_data_source(location="us-central1",
    project="project-test",
    data_source_id="ds-test",
    backup_vault_id="bv-test")
package main
import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/backupdisasterrecovery"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := backupdisasterrecovery.GetDataSource(ctx, &backupdisasterrecovery.GetDataSourceArgs{
			Location:      "us-central1",
			Project:       "project-test",
			DataSourceId:  "ds-test",
			BackupVaultId: "bv-test",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() => 
{
    var foo = Gcp.BackupDisasterRecovery.GetDataSource.Invoke(new()
    {
        Location = "us-central1",
        Project = "project-test",
        DataSourceId = "ds-test",
        BackupVaultId = "bv-test",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.backupdisasterrecovery.BackupdisasterrecoveryFunctions;
import com.pulumi.gcp.backupdisasterrecovery.inputs.GetDataSourceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        final var foo = BackupdisasterrecoveryFunctions.getDataSource(GetDataSourceArgs.builder()
            .location("us-central1")
            .project("project-test")
            .dataSourceId("ds-test")
            .backupVaultId("bv-test")
            .build());
    }
}
variables:
  foo:
    fn::invoke:
      function: gcp:backupdisasterrecovery:getDataSource
      arguments:
        location: us-central1
        project: project-test
        dataSourceId: ds-test
        backupVaultId: bv-test
Using getDataSource
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getDataSource(args: GetDataSourceArgs, opts?: InvokeOptions): Promise<GetDataSourceResult>
function getDataSourceOutput(args: GetDataSourceOutputArgs, opts?: InvokeOptions): Output<GetDataSourceResult>def get_data_source(backup_vault_id: Optional[str] = None,
                    data_source_id: Optional[str] = None,
                    location: Optional[str] = None,
                    project: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetDataSourceResult
def get_data_source_output(backup_vault_id: Optional[pulumi.Input[str]] = None,
                    data_source_id: Optional[pulumi.Input[str]] = None,
                    location: Optional[pulumi.Input[str]] = None,
                    project: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetDataSourceResult]func GetDataSource(ctx *Context, args *GetDataSourceArgs, opts ...InvokeOption) (*GetDataSourceResult, error)
func GetDataSourceOutput(ctx *Context, args *GetDataSourceOutputArgs, opts ...InvokeOption) GetDataSourceResultOutput> Note: This function is named GetDataSource in the Go SDK.
public static class GetDataSource 
{
    public static Task<GetDataSourceResult> InvokeAsync(GetDataSourceArgs args, InvokeOptions? opts = null)
    public static Output<GetDataSourceResult> Invoke(GetDataSourceInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetDataSourceResult> getDataSource(GetDataSourceArgs args, InvokeOptions options)
public static Output<GetDataSourceResult> getDataSource(GetDataSourceArgs args, InvokeOptions options)
fn::invoke:
  function: gcp:backupdisasterrecovery/getDataSource:getDataSource
  arguments:
    # arguments dictionaryThe following arguments are supported:
- BackupVault stringId 
- The ID of the Backup Vault in which the Data Source belongs.
- DataSource stringId 
- The ID of the Data Source.
- Location string
- The location in which the Data Source belongs.
- Project string
- The Google Cloud Project in which the Data Source belongs.
- BackupVault stringId 
- The ID of the Backup Vault in which the Data Source belongs.
- DataSource stringId 
- The ID of the Data Source.
- Location string
- The location in which the Data Source belongs.
- Project string
- The Google Cloud Project in which the Data Source belongs.
- backupVault StringId 
- The ID of the Backup Vault in which the Data Source belongs.
- dataSource StringId 
- The ID of the Data Source.
- location String
- The location in which the Data Source belongs.
- project String
- The Google Cloud Project in which the Data Source belongs.
- backupVault stringId 
- The ID of the Backup Vault in which the Data Source belongs.
- dataSource stringId 
- The ID of the Data Source.
- location string
- The location in which the Data Source belongs.
- project string
- The Google Cloud Project in which the Data Source belongs.
- backup_vault_ strid 
- The ID of the Backup Vault in which the Data Source belongs.
- data_source_ strid 
- The ID of the Data Source.
- location str
- The location in which the Data Source belongs.
- project str
- The Google Cloud Project in which the Data Source belongs.
- backupVault StringId 
- The ID of the Backup Vault in which the Data Source belongs.
- dataSource StringId 
- The ID of the Data Source.
- location String
- The location in which the Data Source belongs.
- project String
- The Google Cloud Project in which the Data Source belongs.
getDataSource Result
The following output properties are available:
- BackupConfig List<GetInfos Data Source Backup Config Info> 
- BackupCount string
- BackupVault stringId 
- ConfigState string
- CreateTime string
- DataSource List<GetBackup Appliance Applications Data Source Data Source Backup Appliance Application> 
- DataSource List<GetGcp Resources Data Source Data Source Gcp Resource> 
- DataSource stringId 
- Etag string
- Id string
- The provider-assigned unique ID for this managed resource.
- Labels Dictionary<string, string>
- Location string
- Name string
- Project string
- State string
- TotalStored stringBytes 
- UpdateTime string
- BackupConfig []GetInfos Data Source Backup Config Info 
- BackupCount string
- BackupVault stringId 
- ConfigState string
- CreateTime string
- DataSource []GetBackup Appliance Applications Data Source Data Source Backup Appliance Application 
- DataSource []GetGcp Resources Data Source Data Source Gcp Resource 
- DataSource stringId 
- Etag string
- Id string
- The provider-assigned unique ID for this managed resource.
- Labels map[string]string
- Location string
- Name string
- Project string
- State string
- TotalStored stringBytes 
- UpdateTime string
- backupConfig List<GetInfos Data Source Backup Config Info> 
- backupCount String
- backupVault StringId 
- configState String
- createTime String
- dataSource List<GetBackup Appliance Applications Data Source Data Source Backup Appliance Application> 
- dataSource List<GetGcp Resources Data Source Data Source Gcp Resource> 
- dataSource StringId 
- etag String
- id String
- The provider-assigned unique ID for this managed resource.
- labels Map<String,String>
- location String
- name String
- project String
- state String
- totalStored StringBytes 
- updateTime String
- backupConfig GetInfos Data Source Backup Config Info[] 
- backupCount string
- backupVault stringId 
- configState string
- createTime string
- dataSource GetBackup Appliance Applications Data Source Data Source Backup Appliance Application[] 
- dataSource GetGcp Resources Data Source Data Source Gcp Resource[] 
- dataSource stringId 
- etag string
- id string
- The provider-assigned unique ID for this managed resource.
- labels {[key: string]: string}
- location string
- name string
- project string
- state string
- totalStored stringBytes 
- updateTime string
- backup_config_ Sequence[Getinfos Data Source Backup Config Info] 
- backup_count str
- backup_vault_ strid 
- config_state str
- create_time str
- data_source_ Sequence[Getbackup_ appliance_ applications Data Source Data Source Backup Appliance Application] 
- data_source_ Sequence[Getgcp_ resources Data Source Data Source Gcp Resource] 
- data_source_ strid 
- etag str
- id str
- The provider-assigned unique ID for this managed resource.
- labels Mapping[str, str]
- location str
- name str
- project str
- state str
- total_stored_ strbytes 
- update_time str
- backupConfig List<Property Map>Infos 
- backupCount String
- backupVault StringId 
- configState String
- createTime String
- dataSource List<Property Map>Backup Appliance Applications 
- dataSource List<Property Map>Gcp Resources 
- dataSource StringId 
- etag String
- id String
- The provider-assigned unique ID for this managed resource.
- labels Map<String>
- location String
- name String
- project String
- state String
- totalStored StringBytes 
- updateTime String
Supporting Types
GetDataSourceBackupConfigInfo     
- BackupAppliance List<GetBackup Configs Data Source Backup Config Info Backup Appliance Backup Config> 
- Configuration for an application backed up by a Backup Appliance.
- GcpBackup List<GetConfigs Data Source Backup Config Info Gcp Backup Config> 
- Configuration for a Google Cloud resource.
- LastBackup Dictionary<string, string>Error 
- If the last backup failed, this field has the error message.
- LastBackup stringState 
- LastBackupstate tracks whether the last backup was not yet started, successful, failed, or could not be run because of the lack of permissions.
- LastSuccessful stringBackup Consistency Time 
- If the last backup were successful, this field has the consistency date.
- BackupAppliance []GetBackup Configs Data Source Backup Config Info Backup Appliance Backup Config 
- Configuration for an application backed up by a Backup Appliance.
- GcpBackup []GetConfigs Data Source Backup Config Info Gcp Backup Config 
- Configuration for a Google Cloud resource.
- LastBackup map[string]stringError 
- If the last backup failed, this field has the error message.
- LastBackup stringState 
- LastBackupstate tracks whether the last backup was not yet started, successful, failed, or could not be run because of the lack of permissions.
- LastSuccessful stringBackup Consistency Time 
- If the last backup were successful, this field has the consistency date.
- backupAppliance List<GetBackup Configs Data Source Backup Config Info Backup Appliance Backup Config> 
- Configuration for an application backed up by a Backup Appliance.
- gcpBackup List<GetConfigs Data Source Backup Config Info Gcp Backup Config> 
- Configuration for a Google Cloud resource.
- lastBackup Map<String,String>Error 
- If the last backup failed, this field has the error message.
- lastBackup StringState 
- LastBackupstate tracks whether the last backup was not yet started, successful, failed, or could not be run because of the lack of permissions.
- lastSuccessful StringBackup Consistency Time 
- If the last backup were successful, this field has the consistency date.
- backupAppliance GetBackup Configs Data Source Backup Config Info Backup Appliance Backup Config[] 
- Configuration for an application backed up by a Backup Appliance.
- gcpBackup GetConfigs Data Source Backup Config Info Gcp Backup Config[] 
- Configuration for a Google Cloud resource.
- lastBackup {[key: string]: string}Error 
- If the last backup failed, this field has the error message.
- lastBackup stringState 
- LastBackupstate tracks whether the last backup was not yet started, successful, failed, or could not be run because of the lack of permissions.
- lastSuccessful stringBackup Consistency Time 
- If the last backup were successful, this field has the consistency date.
- backup_appliance_ Sequence[Getbackup_ configs Data Source Backup Config Info Backup Appliance Backup Config] 
- Configuration for an application backed up by a Backup Appliance.
- gcp_backup_ Sequence[Getconfigs Data Source Backup Config Info Gcp Backup Config] 
- Configuration for a Google Cloud resource.
- last_backup_ Mapping[str, str]error 
- If the last backup failed, this field has the error message.
- last_backup_ strstate 
- LastBackupstate tracks whether the last backup was not yet started, successful, failed, or could not be run because of the lack of permissions.
- last_successful_ strbackup_ consistency_ time 
- If the last backup were successful, this field has the consistency date.
- backupAppliance List<Property Map>Backup Configs 
- Configuration for an application backed up by a Backup Appliance.
- gcpBackup List<Property Map>Configs 
- Configuration for a Google Cloud resource.
- lastBackup Map<String>Error 
- If the last backup failed, this field has the error message.
- lastBackup StringState 
- LastBackupstate tracks whether the last backup was not yet started, successful, failed, or could not be run because of the lack of permissions.
- lastSuccessful StringBackup Consistency Time 
- If the last backup were successful, this field has the consistency date.
GetDataSourceBackupConfigInfoBackupApplianceBackupConfig         
- ApplicationName string
- The name of the application.
- BackupAppliance stringId 
- The ID of the backup appliance.
- BackupAppliance stringName 
- The name of the backup appliance.
- HostName string
- The name of the host where the application is running.
- SlaId string
- The ID of the SLA of this application.
- SlpName string
- The name of the SLP associated with the application.
- SltName string
- The name of the SLT associated with the application.
- ApplicationName string
- The name of the application.
- BackupAppliance stringId 
- The ID of the backup appliance.
- BackupAppliance stringName 
- The name of the backup appliance.
- HostName string
- The name of the host where the application is running.
- SlaId string
- The ID of the SLA of this application.
- SlpName string
- The name of the SLP associated with the application.
- SltName string
- The name of the SLT associated with the application.
- applicationName String
- The name of the application.
- backupAppliance StringId 
- The ID of the backup appliance.
- backupAppliance StringName 
- The name of the backup appliance.
- hostName String
- The name of the host where the application is running.
- slaId String
- The ID of the SLA of this application.
- slpName String
- The name of the SLP associated with the application.
- sltName String
- The name of the SLT associated with the application.
- applicationName string
- The name of the application.
- backupAppliance stringId 
- The ID of the backup appliance.
- backupAppliance stringName 
- The name of the backup appliance.
- hostName string
- The name of the host where the application is running.
- slaId string
- The ID of the SLA of this application.
- slpName string
- The name of the SLP associated with the application.
- sltName string
- The name of the SLT associated with the application.
- application_name str
- The name of the application.
- backup_appliance_ strid 
- The ID of the backup appliance.
- backup_appliance_ strname 
- The name of the backup appliance.
- host_name str
- The name of the host where the application is running.
- sla_id str
- The ID of the SLA of this application.
- slp_name str
- The name of the SLP associated with the application.
- slt_name str
- The name of the SLT associated with the application.
- applicationName String
- The name of the application.
- backupAppliance StringId 
- The ID of the backup appliance.
- backupAppliance StringName 
- The name of the backup appliance.
- hostName String
- The name of the host where the application is running.
- slaId String
- The ID of the SLA of this application.
- slpName String
- The name of the SLP associated with the application.
- sltName String
- The name of the SLT associated with the application.
GetDataSourceBackupConfigInfoGcpBackupConfig        
- BackupPlan string
- The name of the backup plan.
- BackupPlan stringAssociation 
- The name of the backup plan association.
- BackupPlan stringDescription 
- The description of the backup plan.
- BackupPlan List<string>Rules 
- The names of the backup plan rules which point to this backupvault
- BackupPlan string
- The name of the backup plan.
- BackupPlan stringAssociation 
- The name of the backup plan association.
- BackupPlan stringDescription 
- The description of the backup plan.
- BackupPlan []stringRules 
- The names of the backup plan rules which point to this backupvault
- backupPlan String
- The name of the backup plan.
- backupPlan StringAssociation 
- The name of the backup plan association.
- backupPlan StringDescription 
- The description of the backup plan.
- backupPlan List<String>Rules 
- The names of the backup plan rules which point to this backupvault
- backupPlan string
- The name of the backup plan.
- backupPlan stringAssociation 
- The name of the backup plan association.
- backupPlan stringDescription 
- The description of the backup plan.
- backupPlan string[]Rules 
- The names of the backup plan rules which point to this backupvault
- backup_plan str
- The name of the backup plan.
- backup_plan_ strassociation 
- The name of the backup plan association.
- backup_plan_ strdescription 
- The description of the backup plan.
- backup_plan_ Sequence[str]rules 
- The names of the backup plan rules which point to this backupvault
- backupPlan String
- The name of the backup plan.
- backupPlan StringAssociation 
- The name of the backup plan association.
- backupPlan StringDescription 
- The description of the backup plan.
- backupPlan List<String>Rules 
- The names of the backup plan rules which point to this backupvault
GetDataSourceDataSourceBackupApplianceApplication       
- ApplianceId string
- Appliance Id of the Backup Appliance.
- ApplicationId string
- The appid field of the application within the Backup Appliance.
- ApplicationName string
- The name of the Application as known to the Backup Appliance.
- BackupAppliance string
- Appliance name.
- HostId string
- Hostid of the application host.
- Hostname string
- Hostname of the host where the application is running.
- Type string
- The type of the application. e.g. VMBackup
- ApplianceId string
- Appliance Id of the Backup Appliance.
- ApplicationId string
- The appid field of the application within the Backup Appliance.
- ApplicationName string
- The name of the Application as known to the Backup Appliance.
- BackupAppliance string
- Appliance name.
- HostId string
- Hostid of the application host.
- Hostname string
- Hostname of the host where the application is running.
- Type string
- The type of the application. e.g. VMBackup
- applianceId String
- Appliance Id of the Backup Appliance.
- applicationId String
- The appid field of the application within the Backup Appliance.
- applicationName String
- The name of the Application as known to the Backup Appliance.
- backupAppliance String
- Appliance name.
- hostId String
- Hostid of the application host.
- hostname String
- Hostname of the host where the application is running.
- type String
- The type of the application. e.g. VMBackup
- applianceId string
- Appliance Id of the Backup Appliance.
- applicationId string
- The appid field of the application within the Backup Appliance.
- applicationName string
- The name of the Application as known to the Backup Appliance.
- backupAppliance string
- Appliance name.
- hostId string
- Hostid of the application host.
- hostname string
- Hostname of the host where the application is running.
- type string
- The type of the application. e.g. VMBackup
- appliance_id str
- Appliance Id of the Backup Appliance.
- application_id str
- The appid field of the application within the Backup Appliance.
- application_name str
- The name of the Application as known to the Backup Appliance.
- backup_appliance str
- Appliance name.
- host_id str
- Hostid of the application host.
- hostname str
- Hostname of the host where the application is running.
- type str
- The type of the application. e.g. VMBackup
- applianceId String
- Appliance Id of the Backup Appliance.
- applicationId String
- The appid field of the application within the Backup Appliance.
- applicationName String
- The name of the Application as known to the Backup Appliance.
- backupAppliance String
- Appliance name.
- hostId String
- Hostid of the application host.
- hostname String
- Hostname of the host where the application is running.
- type String
- The type of the application. e.g. VMBackup
GetDataSourceDataSourceGcpResource      
- ComputeInstance List<GetData Source Properties Data Source Data Source Gcp Resource Compute Instance Data Source Property> 
- ComputeInstanceDataSourceProperties has a subset of Compute Instance properties that are useful at the Datasource level.
- GcpResourcename string
- Full resource pathname URL of the source Google Cloud resource.
- Location string
- The location in which the Data Source belongs.
- Type string
- The type of the Google Cloud resource. Use the Unified Resource Type, eg. compute.googleapis.com/Instance.
- ComputeInstance []GetData Source Properties Data Source Data Source Gcp Resource Compute Instance Data Source Property 
- ComputeInstanceDataSourceProperties has a subset of Compute Instance properties that are useful at the Datasource level.
- GcpResourcename string
- Full resource pathname URL of the source Google Cloud resource.
- Location string
- The location in which the Data Source belongs.
- Type string
- The type of the Google Cloud resource. Use the Unified Resource Type, eg. compute.googleapis.com/Instance.
- computeInstance List<GetData Source Properties Data Source Data Source Gcp Resource Compute Instance Data Source Property> 
- ComputeInstanceDataSourceProperties has a subset of Compute Instance properties that are useful at the Datasource level.
- gcpResourcename String
- Full resource pathname URL of the source Google Cloud resource.
- location String
- The location in which the Data Source belongs.
- type String
- The type of the Google Cloud resource. Use the Unified Resource Type, eg. compute.googleapis.com/Instance.
- computeInstance GetData Source Properties Data Source Data Source Gcp Resource Compute Instance Data Source Property[] 
- ComputeInstanceDataSourceProperties has a subset of Compute Instance properties that are useful at the Datasource level.
- gcpResourcename string
- Full resource pathname URL of the source Google Cloud resource.
- location string
- The location in which the Data Source belongs.
- type string
- The type of the Google Cloud resource. Use the Unified Resource Type, eg. compute.googleapis.com/Instance.
- compute_instance_ Sequence[Getdata_ source_ properties Data Source Data Source Gcp Resource Compute Instance Data Source Property] 
- ComputeInstanceDataSourceProperties has a subset of Compute Instance properties that are useful at the Datasource level.
- gcp_resourcename str
- Full resource pathname URL of the source Google Cloud resource.
- location str
- The location in which the Data Source belongs.
- type str
- The type of the Google Cloud resource. Use the Unified Resource Type, eg. compute.googleapis.com/Instance.
- computeInstance List<Property Map>Data Source Properties 
- ComputeInstanceDataSourceProperties has a subset of Compute Instance properties that are useful at the Datasource level.
- gcpResourcename String
- Full resource pathname URL of the source Google Cloud resource.
- location String
- The location in which the Data Source belongs.
- type String
- The type of the Google Cloud resource. Use the Unified Resource Type, eg. compute.googleapis.com/Instance.
GetDataSourceDataSourceGcpResourceComputeInstanceDataSourceProperty           
- Description string
- The description of the Compute Engine instance.
- MachineType string
- The machine type of the instance.
- Name string
- Name of the compute instance backed up by the datasource.
- TotalDisk stringCount 
- The total number of disks attached to the Instance.
- TotalDisk stringSize Gb 
- The sum of all the disk sizes.
- Description string
- The description of the Compute Engine instance.
- MachineType string
- The machine type of the instance.
- Name string
- Name of the compute instance backed up by the datasource.
- TotalDisk stringCount 
- The total number of disks attached to the Instance.
- TotalDisk stringSize Gb 
- The sum of all the disk sizes.
- description String
- The description of the Compute Engine instance.
- machineType String
- The machine type of the instance.
- name String
- Name of the compute instance backed up by the datasource.
- totalDisk StringCount 
- The total number of disks attached to the Instance.
- totalDisk StringSize Gb 
- The sum of all the disk sizes.
- description string
- The description of the Compute Engine instance.
- machineType string
- The machine type of the instance.
- name string
- Name of the compute instance backed up by the datasource.
- totalDisk stringCount 
- The total number of disks attached to the Instance.
- totalDisk stringSize Gb 
- The sum of all the disk sizes.
- description str
- The description of the Compute Engine instance.
- machine_type str
- The machine type of the instance.
- name str
- Name of the compute instance backed up by the datasource.
- total_disk_ strcount 
- The total number of disks attached to the Instance.
- total_disk_ strsize_ gb 
- The sum of all the disk sizes.
- description String
- The description of the Compute Engine instance.
- machineType String
- The machine type of the instance.
- name String
- Name of the compute instance backed up by the datasource.
- totalDisk StringCount 
- The total number of disks attached to the Instance.
- totalDisk StringSize Gb 
- The sum of all the disk sizes.
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the google-betaTerraform Provider.