1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. backupdisasterrecovery
  5. getDataSource
Google Cloud v8.23.0 published on Monday, Mar 24, 2025 by Pulumi

gcp.backupdisasterrecovery.getDataSource

Explore with Pulumi AI

Google Cloud v8.23.0 published on Monday, Mar 24, 2025 by Pulumi

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",
});
Copy
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")
Copy
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
	})
}
Copy
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",
    });

});
Copy
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());

    }
}
Copy
variables:
  foo:
    fn::invoke:
      function: gcp:backupdisasterrecovery:getDataSource
      arguments:
        location: us-central1
        project: project-test
        dataSourceId: ds-test
        backupVaultId: bv-test
Copy

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>
Copy
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]
Copy
func GetDataSource(ctx *Context, args *GetDataSourceArgs, opts ...InvokeOption) (*GetDataSourceResult, error)
func GetDataSourceOutput(ctx *Context, args *GetDataSourceOutputArgs, opts ...InvokeOption) GetDataSourceResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetDataSourceResult> getDataSource(GetDataSourceArgs args, InvokeOptions options)
public static Output<GetDataSourceResult> getDataSource(GetDataSourceArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: gcp:backupdisasterrecovery/getDataSource:getDataSource
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

BackupVaultId This property is required. string
The ID of the Backup Vault in which the Data Source belongs.
DataSourceId This property is required. string
The ID of the Data Source.
Location This property is required. string
The location in which the Data Source belongs.
Project This property is required. string
The Google Cloud Project in which the Data Source belongs.
BackupVaultId This property is required. string
The ID of the Backup Vault in which the Data Source belongs.
DataSourceId This property is required. string
The ID of the Data Source.
Location This property is required. string
The location in which the Data Source belongs.
Project This property is required. string
The Google Cloud Project in which the Data Source belongs.
backupVaultId This property is required. String
The ID of the Backup Vault in which the Data Source belongs.
dataSourceId This property is required. String
The ID of the Data Source.
location This property is required. String
The location in which the Data Source belongs.
project This property is required. String
The Google Cloud Project in which the Data Source belongs.
backupVaultId This property is required. string
The ID of the Backup Vault in which the Data Source belongs.
dataSourceId This property is required. string
The ID of the Data Source.
location This property is required. string
The location in which the Data Source belongs.
project This property is required. string
The Google Cloud Project in which the Data Source belongs.
backup_vault_id This property is required. str
The ID of the Backup Vault in which the Data Source belongs.
data_source_id This property is required. str
The ID of the Data Source.
location This property is required. str
The location in which the Data Source belongs.
project This property is required. str
The Google Cloud Project in which the Data Source belongs.
backupVaultId This property is required. String
The ID of the Backup Vault in which the Data Source belongs.
dataSourceId This property is required. String
The ID of the Data Source.
location This property is required. String
The location in which the Data Source belongs.
project This property is required. String
The Google Cloud Project in which the Data Source belongs.

getDataSource Result

The following output properties are available:

Supporting Types

GetDataSourceBackupConfigInfo

BackupApplianceBackupConfigs This property is required. List<GetDataSourceBackupConfigInfoBackupApplianceBackupConfig>
Configuration for an application backed up by a Backup Appliance.
GcpBackupConfigs This property is required. List<GetDataSourceBackupConfigInfoGcpBackupConfig>
Configuration for a Google Cloud resource.
LastBackupError This property is required. Dictionary<string, string>
If the last backup failed, this field has the error message.
LastBackupState This property is required. string
LastBackupstate tracks whether the last backup was not yet started, successful, failed, or could not be run because of the lack of permissions.
LastSuccessfulBackupConsistencyTime This property is required. string
If the last backup were successful, this field has the consistency date.
BackupApplianceBackupConfigs This property is required. []GetDataSourceBackupConfigInfoBackupApplianceBackupConfig
Configuration for an application backed up by a Backup Appliance.
GcpBackupConfigs This property is required. []GetDataSourceBackupConfigInfoGcpBackupConfig
Configuration for a Google Cloud resource.
LastBackupError This property is required. map[string]string
If the last backup failed, this field has the error message.
LastBackupState This property is required. string
LastBackupstate tracks whether the last backup was not yet started, successful, failed, or could not be run because of the lack of permissions.
LastSuccessfulBackupConsistencyTime This property is required. string
If the last backup were successful, this field has the consistency date.
backupApplianceBackupConfigs This property is required. List<GetDataSourceBackupConfigInfoBackupApplianceBackupConfig>
Configuration for an application backed up by a Backup Appliance.
gcpBackupConfigs This property is required. List<GetDataSourceBackupConfigInfoGcpBackupConfig>
Configuration for a Google Cloud resource.
lastBackupError This property is required. Map<String,String>
If the last backup failed, this field has the error message.
lastBackupState This property is required. String
LastBackupstate tracks whether the last backup was not yet started, successful, failed, or could not be run because of the lack of permissions.
lastSuccessfulBackupConsistencyTime This property is required. String
If the last backup were successful, this field has the consistency date.
backupApplianceBackupConfigs This property is required. GetDataSourceBackupConfigInfoBackupApplianceBackupConfig[]
Configuration for an application backed up by a Backup Appliance.
gcpBackupConfigs This property is required. GetDataSourceBackupConfigInfoGcpBackupConfig[]
Configuration for a Google Cloud resource.
lastBackupError This property is required. {[key: string]: string}
If the last backup failed, this field has the error message.
lastBackupState This property is required. string
LastBackupstate tracks whether the last backup was not yet started, successful, failed, or could not be run because of the lack of permissions.
lastSuccessfulBackupConsistencyTime This property is required. string
If the last backup were successful, this field has the consistency date.
backup_appliance_backup_configs This property is required. Sequence[GetDataSourceBackupConfigInfoBackupApplianceBackupConfig]
Configuration for an application backed up by a Backup Appliance.
gcp_backup_configs This property is required. Sequence[GetDataSourceBackupConfigInfoGcpBackupConfig]
Configuration for a Google Cloud resource.
last_backup_error This property is required. Mapping[str, str]
If the last backup failed, this field has the error message.
last_backup_state This property is required. str
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_backup_consistency_time This property is required. str
If the last backup were successful, this field has the consistency date.
backupApplianceBackupConfigs This property is required. List<Property Map>
Configuration for an application backed up by a Backup Appliance.
gcpBackupConfigs This property is required. List<Property Map>
Configuration for a Google Cloud resource.
lastBackupError This property is required. Map<String>
If the last backup failed, this field has the error message.
lastBackupState This property is required. String
LastBackupstate tracks whether the last backup was not yet started, successful, failed, or could not be run because of the lack of permissions.
lastSuccessfulBackupConsistencyTime This property is required. String
If the last backup were successful, this field has the consistency date.

GetDataSourceBackupConfigInfoBackupApplianceBackupConfig

ApplicationName This property is required. string
The name of the application.
BackupApplianceId This property is required. string
The ID of the backup appliance.
BackupApplianceName This property is required. string
The name of the backup appliance.
HostName This property is required. string
The name of the host where the application is running.
SlaId This property is required. string
The ID of the SLA of this application.
SlpName This property is required. string
The name of the SLP associated with the application.
SltName This property is required. string
The name of the SLT associated with the application.
ApplicationName This property is required. string
The name of the application.
BackupApplianceId This property is required. string
The ID of the backup appliance.
BackupApplianceName This property is required. string
The name of the backup appliance.
HostName This property is required. string
The name of the host where the application is running.
SlaId This property is required. string
The ID of the SLA of this application.
SlpName This property is required. string
The name of the SLP associated with the application.
SltName This property is required. string
The name of the SLT associated with the application.
applicationName This property is required. String
The name of the application.
backupApplianceId This property is required. String
The ID of the backup appliance.
backupApplianceName This property is required. String
The name of the backup appliance.
hostName This property is required. String
The name of the host where the application is running.
slaId This property is required. String
The ID of the SLA of this application.
slpName This property is required. String
The name of the SLP associated with the application.
sltName This property is required. String
The name of the SLT associated with the application.
applicationName This property is required. string
The name of the application.
backupApplianceId This property is required. string
The ID of the backup appliance.
backupApplianceName This property is required. string
The name of the backup appliance.
hostName This property is required. string
The name of the host where the application is running.
slaId This property is required. string
The ID of the SLA of this application.
slpName This property is required. string
The name of the SLP associated with the application.
sltName This property is required. string
The name of the SLT associated with the application.
application_name This property is required. str
The name of the application.
backup_appliance_id This property is required. str
The ID of the backup appliance.
backup_appliance_name This property is required. str
The name of the backup appliance.
host_name This property is required. str
The name of the host where the application is running.
sla_id This property is required. str
The ID of the SLA of this application.
slp_name This property is required. str
The name of the SLP associated with the application.
slt_name This property is required. str
The name of the SLT associated with the application.
applicationName This property is required. String
The name of the application.
backupApplianceId This property is required. String
The ID of the backup appliance.
backupApplianceName This property is required. String
The name of the backup appliance.
hostName This property is required. String
The name of the host where the application is running.
slaId This property is required. String
The ID of the SLA of this application.
slpName This property is required. String
The name of the SLP associated with the application.
sltName This property is required. String
The name of the SLT associated with the application.

GetDataSourceBackupConfigInfoGcpBackupConfig

BackupPlan This property is required. string
The name of the backup plan.
BackupPlanAssociation This property is required. string
The name of the backup plan association.
BackupPlanDescription This property is required. string
The description of the backup plan.
BackupPlanRules This property is required. List<string>
The names of the backup plan rules which point to this backupvault
BackupPlan This property is required. string
The name of the backup plan.
BackupPlanAssociation This property is required. string
The name of the backup plan association.
BackupPlanDescription This property is required. string
The description of the backup plan.
BackupPlanRules This property is required. []string
The names of the backup plan rules which point to this backupvault
backupPlan This property is required. String
The name of the backup plan.
backupPlanAssociation This property is required. String
The name of the backup plan association.
backupPlanDescription This property is required. String
The description of the backup plan.
backupPlanRules This property is required. List<String>
The names of the backup plan rules which point to this backupvault
backupPlan This property is required. string
The name of the backup plan.
backupPlanAssociation This property is required. string
The name of the backup plan association.
backupPlanDescription This property is required. string
The description of the backup plan.
backupPlanRules This property is required. string[]
The names of the backup plan rules which point to this backupvault
backup_plan This property is required. str
The name of the backup plan.
backup_plan_association This property is required. str
The name of the backup plan association.
backup_plan_description This property is required. str
The description of the backup plan.
backup_plan_rules This property is required. Sequence[str]
The names of the backup plan rules which point to this backupvault
backupPlan This property is required. String
The name of the backup plan.
backupPlanAssociation This property is required. String
The name of the backup plan association.
backupPlanDescription This property is required. String
The description of the backup plan.
backupPlanRules This property is required. List<String>
The names of the backup plan rules which point to this backupvault

GetDataSourceDataSourceBackupApplianceApplication

ApplianceId This property is required. string
Appliance Id of the Backup Appliance.
ApplicationId This property is required. string
The appid field of the application within the Backup Appliance.
ApplicationName This property is required. string
The name of the Application as known to the Backup Appliance.
BackupAppliance This property is required. string
Appliance name.
HostId This property is required. string
Hostid of the application host.
Hostname This property is required. string
Hostname of the host where the application is running.
Type This property is required. string
The type of the application. e.g. VMBackup
ApplianceId This property is required. string
Appliance Id of the Backup Appliance.
ApplicationId This property is required. string
The appid field of the application within the Backup Appliance.
ApplicationName This property is required. string
The name of the Application as known to the Backup Appliance.
BackupAppliance This property is required. string
Appliance name.
HostId This property is required. string
Hostid of the application host.
Hostname This property is required. string
Hostname of the host where the application is running.
Type This property is required. string
The type of the application. e.g. VMBackup
applianceId This property is required. String
Appliance Id of the Backup Appliance.
applicationId This property is required. String
The appid field of the application within the Backup Appliance.
applicationName This property is required. String
The name of the Application as known to the Backup Appliance.
backupAppliance This property is required. String
Appliance name.
hostId This property is required. String
Hostid of the application host.
hostname This property is required. String
Hostname of the host where the application is running.
type This property is required. String
The type of the application. e.g. VMBackup
applianceId This property is required. string
Appliance Id of the Backup Appliance.
applicationId This property is required. string
The appid field of the application within the Backup Appliance.
applicationName This property is required. string
The name of the Application as known to the Backup Appliance.
backupAppliance This property is required. string
Appliance name.
hostId This property is required. string
Hostid of the application host.
hostname This property is required. string
Hostname of the host where the application is running.
type This property is required. string
The type of the application. e.g. VMBackup
appliance_id This property is required. str
Appliance Id of the Backup Appliance.
application_id This property is required. str
The appid field of the application within the Backup Appliance.
application_name This property is required. str
The name of the Application as known to the Backup Appliance.
backup_appliance This property is required. str
Appliance name.
host_id This property is required. str
Hostid of the application host.
hostname This property is required. str
Hostname of the host where the application is running.
type This property is required. str
The type of the application. e.g. VMBackup
applianceId This property is required. String
Appliance Id of the Backup Appliance.
applicationId This property is required. String
The appid field of the application within the Backup Appliance.
applicationName This property is required. String
The name of the Application as known to the Backup Appliance.
backupAppliance This property is required. String
Appliance name.
hostId This property is required. String
Hostid of the application host.
hostname This property is required. String
Hostname of the host where the application is running.
type This property is required. String
The type of the application. e.g. VMBackup

GetDataSourceDataSourceGcpResource

ComputeInstanceDataSourceProperties This property is required. List<GetDataSourceDataSourceGcpResourceComputeInstanceDataSourceProperty>
ComputeInstanceDataSourceProperties has a subset of Compute Instance properties that are useful at the Datasource level.
GcpResourcename This property is required. string
Full resource pathname URL of the source Google Cloud resource.
Location This property is required. string
The location in which the Data Source belongs.
Type This property is required. string
The type of the Google Cloud resource. Use the Unified Resource Type, eg. compute.googleapis.com/Instance.
ComputeInstanceDataSourceProperties This property is required. []GetDataSourceDataSourceGcpResourceComputeInstanceDataSourceProperty
ComputeInstanceDataSourceProperties has a subset of Compute Instance properties that are useful at the Datasource level.
GcpResourcename This property is required. string
Full resource pathname URL of the source Google Cloud resource.
Location This property is required. string
The location in which the Data Source belongs.
Type This property is required. string
The type of the Google Cloud resource. Use the Unified Resource Type, eg. compute.googleapis.com/Instance.
computeInstanceDataSourceProperties This property is required. List<GetDataSourceDataSourceGcpResourceComputeInstanceDataSourceProperty>
ComputeInstanceDataSourceProperties has a subset of Compute Instance properties that are useful at the Datasource level.
gcpResourcename This property is required. String
Full resource pathname URL of the source Google Cloud resource.
location This property is required. String
The location in which the Data Source belongs.
type This property is required. String
The type of the Google Cloud resource. Use the Unified Resource Type, eg. compute.googleapis.com/Instance.
computeInstanceDataSourceProperties This property is required. GetDataSourceDataSourceGcpResourceComputeInstanceDataSourceProperty[]
ComputeInstanceDataSourceProperties has a subset of Compute Instance properties that are useful at the Datasource level.
gcpResourcename This property is required. string
Full resource pathname URL of the source Google Cloud resource.
location This property is required. string
The location in which the Data Source belongs.
type This property is required. string
The type of the Google Cloud resource. Use the Unified Resource Type, eg. compute.googleapis.com/Instance.
compute_instance_data_source_properties This property is required. Sequence[GetDataSourceDataSourceGcpResourceComputeInstanceDataSourceProperty]
ComputeInstanceDataSourceProperties has a subset of Compute Instance properties that are useful at the Datasource level.
gcp_resourcename This property is required. str
Full resource pathname URL of the source Google Cloud resource.
location This property is required. str
The location in which the Data Source belongs.
type This property is required. str
The type of the Google Cloud resource. Use the Unified Resource Type, eg. compute.googleapis.com/Instance.
computeInstanceDataSourceProperties This property is required. List<Property Map>
ComputeInstanceDataSourceProperties has a subset of Compute Instance properties that are useful at the Datasource level.
gcpResourcename This property is required. String
Full resource pathname URL of the source Google Cloud resource.
location This property is required. String
The location in which the Data Source belongs.
type This property is required. String
The type of the Google Cloud resource. Use the Unified Resource Type, eg. compute.googleapis.com/Instance.

GetDataSourceDataSourceGcpResourceComputeInstanceDataSourceProperty

Description This property is required. string
The description of the Compute Engine instance.
MachineType This property is required. string
The machine type of the instance.
Name This property is required. string
Name of the compute instance backed up by the datasource.
TotalDiskCount This property is required. string
The total number of disks attached to the Instance.
TotalDiskSizeGb This property is required. string
The sum of all the disk sizes.
Description This property is required. string
The description of the Compute Engine instance.
MachineType This property is required. string
The machine type of the instance.
Name This property is required. string
Name of the compute instance backed up by the datasource.
TotalDiskCount This property is required. string
The total number of disks attached to the Instance.
TotalDiskSizeGb This property is required. string
The sum of all the disk sizes.
description This property is required. String
The description of the Compute Engine instance.
machineType This property is required. String
The machine type of the instance.
name This property is required. String
Name of the compute instance backed up by the datasource.
totalDiskCount This property is required. String
The total number of disks attached to the Instance.
totalDiskSizeGb This property is required. String
The sum of all the disk sizes.
description This property is required. string
The description of the Compute Engine instance.
machineType This property is required. string
The machine type of the instance.
name This property is required. string
Name of the compute instance backed up by the datasource.
totalDiskCount This property is required. string
The total number of disks attached to the Instance.
totalDiskSizeGb This property is required. string
The sum of all the disk sizes.
description This property is required. str
The description of the Compute Engine instance.
machine_type This property is required. str
The machine type of the instance.
name This property is required. str
Name of the compute instance backed up by the datasource.
total_disk_count This property is required. str
The total number of disks attached to the Instance.
total_disk_size_gb This property is required. str
The sum of all the disk sizes.
description This property is required. String
The description of the Compute Engine instance.
machineType This property is required. String
The machine type of the instance.
name This property is required. String
Name of the compute instance backed up by the datasource.
totalDiskCount This property is required. String
The total number of disks attached to the Instance.
totalDiskSizeGb This property is required. String
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-beta Terraform Provider.
Google Cloud v8.23.0 published on Monday, Mar 24, 2025 by Pulumi