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

gcp.backupdisasterrecovery.getBackupVault

Explore with Pulumi AI

gcp logo
Google Cloud v8.15.0 published on Wednesday, Jan 22, 2025 by Pulumi

    A Backup and DRBackupVault.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const my-backup-vault = gcp.backupdisasterrecovery.getBackupVault({
        location: "us-central1",
        backupVaultId: "bv-1",
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    my_backup_vault = gcp.backupdisasterrecovery.get_backup_vault(location="us-central1",
        backup_vault_id="bv-1")
    
    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.LookupBackupVault(ctx, &backupdisasterrecovery.LookupBackupVaultArgs{
    			Location:      "us-central1",
    			BackupVaultId: "bv-1",
    		}, 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 my_backup_vault = Gcp.BackupDisasterRecovery.GetBackupVault.Invoke(new()
        {
            Location = "us-central1",
            BackupVaultId = "bv-1",
        });
    
    });
    
    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.GetBackupVaultArgs;
    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 my-backup-vault = BackupdisasterrecoveryFunctions.getBackupVault(GetBackupVaultArgs.builder()
                .location("us-central1")
                .backupVaultId("bv-1")
                .build());
    
        }
    }
    
    variables:
      my-backup-vault:
        fn::invoke:
          function: gcp:backupdisasterrecovery:getBackupVault
          arguments:
            location: us-central1
            backupVaultId: bv-1
    

    Using getBackupVault

    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 getBackupVault(args: GetBackupVaultArgs, opts?: InvokeOptions): Promise<GetBackupVaultResult>
    function getBackupVaultOutput(args: GetBackupVaultOutputArgs, opts?: InvokeOptions): Output<GetBackupVaultResult>
    def get_backup_vault(backup_vault_id: Optional[str] = None,
                         location: Optional[str] = None,
                         project: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetBackupVaultResult
    def get_backup_vault_output(backup_vault_id: Optional[pulumi.Input[str]] = None,
                         location: Optional[pulumi.Input[str]] = None,
                         project: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetBackupVaultResult]
    func LookupBackupVault(ctx *Context, args *LookupBackupVaultArgs, opts ...InvokeOption) (*LookupBackupVaultResult, error)
    func LookupBackupVaultOutput(ctx *Context, args *LookupBackupVaultOutputArgs, opts ...InvokeOption) LookupBackupVaultResultOutput

    > Note: This function is named LookupBackupVault in the Go SDK.

    public static class GetBackupVault 
    {
        public static Task<GetBackupVaultResult> InvokeAsync(GetBackupVaultArgs args, InvokeOptions? opts = null)
        public static Output<GetBackupVaultResult> Invoke(GetBackupVaultInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetBackupVaultResult> getBackupVault(GetBackupVaultArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: gcp:backupdisasterrecovery/getBackupVault:getBackupVault
      arguments:
        # arguments dictionary

    The following arguments are supported:

    BackupVaultId string
    The id of Backup Vault resource.


    Location string
    The location in which the Backup Vault resource belongs.
    Project string
    The project in which the resource belongs. If it is not provided, the provider project is used.
    BackupVaultId string
    The id of Backup Vault resource.


    Location string
    The location in which the Backup Vault resource belongs.
    Project string
    The project in which the resource belongs. If it is not provided, the provider project is used.
    backupVaultId String
    The id of Backup Vault resource.


    location String
    The location in which the Backup Vault resource belongs.
    project String
    The project in which the resource belongs. If it is not provided, the provider project is used.
    backupVaultId string
    The id of Backup Vault resource.


    location string
    The location in which the Backup Vault resource belongs.
    project string
    The project in which the resource belongs. If it is not provided, the provider project is used.
    backup_vault_id str
    The id of Backup Vault resource.


    location str
    The location in which the Backup Vault resource belongs.
    project str
    The project in which the resource belongs. If it is not provided, the provider project is used.
    backupVaultId String
    The id of Backup Vault resource.


    location String
    The location in which the Backup Vault resource belongs.
    project String
    The project in which the resource belongs. If it is not provided, the provider project is used.

    getBackupVault Result

    The following output properties are available:

    AccessRestriction string
    AllowMissing bool
    Annotations Dictionary<string, string>
    BackupCount string
    BackupMinimumEnforcedRetentionDuration string
    BackupVaultId string
    CreateTime string
    Deletable bool
    Description string
    EffectiveAnnotations Dictionary<string, string>
    EffectiveLabels Dictionary<string, string>
    EffectiveTime string
    Etag string
    ForceDelete bool
    ForceUpdate bool
    Id string
    The provider-assigned unique ID for this managed resource.
    IgnoreBackupPlanReferences bool
    IgnoreInactiveDatasources bool
    Labels Dictionary<string, string>
    Location string
    Name string
    PulumiLabels Dictionary<string, string>
    ServiceAccount string
    State string
    TotalStoredBytes string
    Uid string
    UpdateTime string
    Project string
    AccessRestriction string
    AllowMissing bool
    Annotations map[string]string
    BackupCount string
    BackupMinimumEnforcedRetentionDuration string
    BackupVaultId string
    CreateTime string
    Deletable bool
    Description string
    EffectiveAnnotations map[string]string
    EffectiveLabels map[string]string
    EffectiveTime string
    Etag string
    ForceDelete bool
    ForceUpdate bool
    Id string
    The provider-assigned unique ID for this managed resource.
    IgnoreBackupPlanReferences bool
    IgnoreInactiveDatasources bool
    Labels map[string]string
    Location string
    Name string
    PulumiLabels map[string]string
    ServiceAccount string
    State string
    TotalStoredBytes string
    Uid string
    UpdateTime string
    Project string
    accessRestriction String
    allowMissing Boolean
    annotations Map<String,String>
    backupCount String
    backupMinimumEnforcedRetentionDuration String
    backupVaultId String
    createTime String
    deletable Boolean
    description String
    effectiveAnnotations Map<String,String>
    effectiveLabels Map<String,String>
    effectiveTime String
    etag String
    forceDelete Boolean
    forceUpdate Boolean
    id String
    The provider-assigned unique ID for this managed resource.
    ignoreBackupPlanReferences Boolean
    ignoreInactiveDatasources Boolean
    labels Map<String,String>
    location String
    name String
    pulumiLabels Map<String,String>
    serviceAccount String
    state String
    totalStoredBytes String
    uid String
    updateTime String
    project String
    accessRestriction string
    allowMissing boolean
    annotations {[key: string]: string}
    backupCount string
    backupMinimumEnforcedRetentionDuration string
    backupVaultId string
    createTime string
    deletable boolean
    description string
    effectiveAnnotations {[key: string]: string}
    effectiveLabels {[key: string]: string}
    effectiveTime string
    etag string
    forceDelete boolean
    forceUpdate boolean
    id string
    The provider-assigned unique ID for this managed resource.
    ignoreBackupPlanReferences boolean
    ignoreInactiveDatasources boolean
    labels {[key: string]: string}
    location string
    name string
    pulumiLabels {[key: string]: string}
    serviceAccount string
    state string
    totalStoredBytes string
    uid string
    updateTime string
    project string
    access_restriction str
    allow_missing bool
    annotations Mapping[str, str]
    backup_count str
    backup_minimum_enforced_retention_duration str
    backup_vault_id str
    create_time str
    deletable bool
    description str
    effective_annotations Mapping[str, str]
    effective_labels Mapping[str, str]
    effective_time str
    etag str
    force_delete bool
    force_update bool
    id str
    The provider-assigned unique ID for this managed resource.
    ignore_backup_plan_references bool
    ignore_inactive_datasources bool
    labels Mapping[str, str]
    location str
    name str
    pulumi_labels Mapping[str, str]
    service_account str
    state str
    total_stored_bytes str
    uid str
    update_time str
    project str
    accessRestriction String
    allowMissing Boolean
    annotations Map<String>
    backupCount String
    backupMinimumEnforcedRetentionDuration String
    backupVaultId String
    createTime String
    deletable Boolean
    description String
    effectiveAnnotations Map<String>
    effectiveLabels Map<String>
    effectiveTime String
    etag String
    forceDelete Boolean
    forceUpdate Boolean
    id String
    The provider-assigned unique ID for this managed resource.
    ignoreBackupPlanReferences Boolean
    ignoreInactiveDatasources Boolean
    labels Map<String>
    location String
    name String
    pulumiLabels Map<String>
    serviceAccount String
    state String
    totalStoredBytes String
    uid String
    updateTime String
    project String

    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.15.0 published on Wednesday, Jan 22, 2025 by Pulumi