Google Cloud v8.21.0 published on Wednesday, Mar 5, 2025 by Pulumi
gcp.backupdisasterrecovery.getBackup
Explore with Pulumi AI
A Backup and DR Backup.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const foo = gcp.backupdisasterrecovery.getBackup({
    location: "us-central1",
    project: "project-test",
    dataSourceId: "ds-test",
    backupVaultId: "bv-test",
});
import pulumi
import pulumi_gcp as gcp
foo = gcp.backupdisasterrecovery.get_backup(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.GetBackup(ctx, &backupdisasterrecovery.GetBackupArgs{
			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.GetBackup.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.GetBackupArgs;
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.getBackup(GetBackupArgs.builder()
            .location("us-central1")
            .project("project-test")
            .dataSourceId("ds-test")
            .backupVaultId("bv-test")
            .build());
    }
}
variables:
  foo:
    fn::invoke:
      function: gcp:backupdisasterrecovery:getBackup
      arguments:
        location: us-central1
        project: project-test
        dataSourceId: ds-test
        backupVaultId: bv-test
Using getBackup
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 getBackup(args: GetBackupArgs, opts?: InvokeOptions): Promise<GetBackupResult>
function getBackupOutput(args: GetBackupOutputArgs, opts?: InvokeOptions): Output<GetBackupResult>def get_backup(backup_vault_id: Optional[str] = None,
               data_source_id: Optional[str] = None,
               location: Optional[str] = None,
               project: Optional[str] = None,
               opts: Optional[InvokeOptions] = None) -> GetBackupResult
def get_backup_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[GetBackupResult]func GetBackup(ctx *Context, args *GetBackupArgs, opts ...InvokeOption) (*GetBackupResult, error)
func GetBackupOutput(ctx *Context, args *GetBackupOutputArgs, opts ...InvokeOption) GetBackupResultOutput> Note: This function is named GetBackup in the Go SDK.
public static class GetBackup 
{
    public static Task<GetBackupResult> InvokeAsync(GetBackupArgs args, InvokeOptions? opts = null)
    public static Output<GetBackupResult> Invoke(GetBackupInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetBackupResult> getBackup(GetBackupArgs args, InvokeOptions options)
public static Output<GetBackupResult> getBackup(GetBackupArgs args, InvokeOptions options)
fn::invoke:
  function: gcp:backupdisasterrecovery/getBackup:getBackup
  arguments:
    # arguments dictionaryThe following arguments are supported:
- BackupVault stringId 
- The ID of the Backup Vault of the Data Source in which the Backup belongs.
- DataSource stringId 
- The ID of the Data Source in which the Backup belongs.
- Location string
- The location in which the Backup belongs.
- Project string
- The Google Cloud Project in which the Backup belongs.
- BackupVault stringId 
- The ID of the Backup Vault of the Data Source in which the Backup belongs.
- DataSource stringId 
- The ID of the Data Source in which the Backup belongs.
- Location string
- The location in which the Backup belongs.
- Project string
- The Google Cloud Project in which the Backup belongs.
- backupVault StringId 
- The ID of the Backup Vault of the Data Source in which the Backup belongs.
- dataSource StringId 
- The ID of the Data Source in which the Backup belongs.
- location String
- The location in which the Backup belongs.
- project String
- The Google Cloud Project in which the Backup belongs.
- backupVault stringId 
- The ID of the Backup Vault of the Data Source in which the Backup belongs.
- dataSource stringId 
- The ID of the Data Source in which the Backup belongs.
- location string
- The location in which the Backup belongs.
- project string
- The Google Cloud Project in which the Backup belongs.
- backup_vault_ strid 
- The ID of the Backup Vault of the Data Source in which the Backup belongs.
- data_source_ strid 
- The ID of the Data Source in which the Backup belongs.
- location str
- The location in which the Backup belongs.
- project str
- The Google Cloud Project in which the Backup belongs.
- backupVault StringId 
- The ID of the Backup Vault of the Data Source in which the Backup belongs.
- dataSource StringId 
- The ID of the Data Source in which the Backup belongs.
- location String
- The location in which the Backup belongs.
- project String
- The Google Cloud Project in which the Backup belongs.
getBackup Result
The following output properties are available:
- BackupVault stringId 
- Backups
List<GetBackup Backup> 
- DataSource stringId 
- Id string
- The provider-assigned unique ID for this managed resource.
- Location string
- Name string
- Project string
- BackupVault stringId 
- Backups
[]GetBackup Backup 
- DataSource stringId 
- Id string
- The provider-assigned unique ID for this managed resource.
- Location string
- Name string
- Project string
- backupVault StringId 
- backups
List<GetBackup Backup> 
- dataSource StringId 
- id String
- The provider-assigned unique ID for this managed resource.
- location String
- name String
- project String
- backupVault stringId 
- backups
GetBackup Backup[] 
- dataSource stringId 
- id string
- The provider-assigned unique ID for this managed resource.
- location string
- name string
- project string
- backup_vault_ strid 
- backups
Sequence[GetBackup Backup] 
- data_source_ strid 
- id str
- The provider-assigned unique ID for this managed resource.
- location str
- name str
- project str
- backupVault StringId 
- backups List<Property Map>
- dataSource StringId 
- id String
- The provider-assigned unique ID for this managed resource.
- location String
- name String
- project String
Supporting Types
GetBackupBackup  
- BackupId string
- Id of the requesting object, Backup.
- BackupVault stringId 
- The ID of the Backup Vault of the Data Source in which the Backup belongs.
- DataSource stringId 
- The ID of the Data Source in which the Backup belongs.
- Location string
- The location in which the Backup belongs.
- Name string
- Name of the resource.
- BackupId string
- Id of the requesting object, Backup.
- BackupVault stringId 
- The ID of the Backup Vault of the Data Source in which the Backup belongs.
- DataSource stringId 
- The ID of the Data Source in which the Backup belongs.
- Location string
- The location in which the Backup belongs.
- Name string
- Name of the resource.
- backupId String
- Id of the requesting object, Backup.
- backupVault StringId 
- The ID of the Backup Vault of the Data Source in which the Backup belongs.
- dataSource StringId 
- The ID of the Data Source in which the Backup belongs.
- location String
- The location in which the Backup belongs.
- name String
- Name of the resource.
- backupId string
- Id of the requesting object, Backup.
- backupVault stringId 
- The ID of the Backup Vault of the Data Source in which the Backup belongs.
- dataSource stringId 
- The ID of the Data Source in which the Backup belongs.
- location string
- The location in which the Backup belongs.
- name string
- Name of the resource.
- backup_id str
- Id of the requesting object, Backup.
- backup_vault_ strid 
- The ID of the Backup Vault of the Data Source in which the Backup belongs.
- data_source_ strid 
- The ID of the Data Source in which the Backup belongs.
- location str
- The location in which the Backup belongs.
- name str
- Name of the resource.
- backupId String
- Id of the requesting object, Backup.
- backupVault StringId 
- The ID of the Backup Vault of the Data Source in which the Backup belongs.
- dataSource StringId 
- The ID of the Data Source in which the Backup belongs.
- location String
- The location in which the Backup belongs.
- name String
- Name of the resource.
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.