1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. backupdisasterrecovery
  5. getBackup
Google Cloud v8.14.0 published on Wednesday, Jan 15, 2025 by Pulumi

gcp.backupdisasterrecovery.getBackup

Explore with Pulumi AI

gcp logo
Google Cloud v8.14.0 published on Wednesday, Jan 15, 2025 by Pulumi

    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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: gcp:backupdisasterrecovery/getBackup:getBackup
      arguments:
        # arguments dictionary

    The following arguments are supported:

    BackupVaultId string
    The ID of the Backup Vault of the Data Source in which the Backup belongs.
    DataSourceId string
    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.
    BackupVaultId string
    The ID of the Backup Vault of the Data Source in which the Backup belongs.
    DataSourceId string
    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.
    backupVaultId String
    The ID of the Backup Vault of the Data Source in which the Backup belongs.
    dataSourceId String
    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.
    backupVaultId string
    The ID of the Backup Vault of the Data Source in which the Backup belongs.
    dataSourceId string
    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_id str
    The ID of the Backup Vault of the Data Source in which the Backup belongs.
    data_source_id str
    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.
    backupVaultId String
    The ID of the Backup Vault of the Data Source in which the Backup belongs.
    dataSourceId String
    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:

    BackupVaultId string
    Backups List<GetBackupBackup>
    DataSourceId string
    Id string
    The provider-assigned unique ID for this managed resource.
    Location string
    Name string
    Project string
    BackupVaultId string
    Backups []GetBackupBackup
    DataSourceId string
    Id string
    The provider-assigned unique ID for this managed resource.
    Location string
    Name string
    Project string
    backupVaultId String
    backups List<GetBackupBackup>
    dataSourceId String
    id String
    The provider-assigned unique ID for this managed resource.
    location String
    name String
    project String
    backupVaultId string
    backups GetBackupBackup[]
    dataSourceId string
    id string
    The provider-assigned unique ID for this managed resource.
    location string
    name string
    project string
    backup_vault_id str
    backups Sequence[GetBackupBackup]
    data_source_id str
    id str
    The provider-assigned unique ID for this managed resource.
    location str
    name str
    project str
    backupVaultId String
    backups List<Property Map>
    dataSourceId String
    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.
    BackupVaultId string
    The ID of the Backup Vault of the Data Source in which the Backup belongs.
    DataSourceId string
    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.
    BackupVaultId string
    The ID of the Backup Vault of the Data Source in which the Backup belongs.
    DataSourceId string
    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.
    backupVaultId String
    The ID of the Backup Vault of the Data Source in which the Backup belongs.
    dataSourceId String
    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.
    backupVaultId string
    The ID of the Backup Vault of the Data Source in which the Backup belongs.
    dataSourceId string
    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_id str
    The ID of the Backup Vault of the Data Source in which the Backup belongs.
    data_source_id str
    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.
    backupVaultId String
    The ID of the Backup Vault of the Data Source in which the Backup belongs.
    dataSourceId String
    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-beta Terraform Provider.
    gcp logo
    Google Cloud v8.14.0 published on Wednesday, Jan 15, 2025 by Pulumi