1. Packages
  2. Azure Classic
  3. API Docs
  4. dataprotection
  5. getBackupVault

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

azure.dataprotection.getBackupVault

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

    Use this data source to access information about an existing Backup Vault.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = azure.dataprotection.getBackupVault({
        name: "existing-backup-vault",
        resourceGroupName: "existing-resource-group",
    });
    export const azurermDataProtectionBackupVaultId = exampleAzurermVpnGateway.id;
    export const azurermDataProtectionBackupVaultPrincipalId = example.then(example => example.identities?.[0]?.principalId);
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.dataprotection.get_backup_vault(name="existing-backup-vault",
        resource_group_name="existing-resource-group")
    pulumi.export("azurermDataProtectionBackupVaultId", example_azurerm_vpn_gateway["id"])
    pulumi.export("azurermDataProtectionBackupVaultPrincipalId", example.identities[0].principal_id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/dataprotection"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := dataprotection.LookupBackupVault(ctx, &dataprotection.LookupBackupVaultArgs{
    			Name:              "existing-backup-vault",
    			ResourceGroupName: "existing-resource-group",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("azurermDataProtectionBackupVaultId", exampleAzurermVpnGateway.Id)
    		ctx.Export("azurermDataProtectionBackupVaultPrincipalId", example.Identities[0].PrincipalId)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Azure.DataProtection.GetBackupVault.Invoke(new()
        {
            Name = "existing-backup-vault",
            ResourceGroupName = "existing-resource-group",
        });
    
        return new Dictionary<string, object?>
        {
            ["azurermDataProtectionBackupVaultId"] = exampleAzurermVpnGateway.Id,
            ["azurermDataProtectionBackupVaultPrincipalId"] = example.Apply(getBackupVaultResult => getBackupVaultResult.Identities[0]?.PrincipalId),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.dataprotection.DataprotectionFunctions;
    import com.pulumi.azure.dataprotection.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 example = DataprotectionFunctions.getBackupVault(GetBackupVaultArgs.builder()
                .name("existing-backup-vault")
                .resourceGroupName("existing-resource-group")
                .build());
    
            ctx.export("azurermDataProtectionBackupVaultId", exampleAzurermVpnGateway.id());
            ctx.export("azurermDataProtectionBackupVaultPrincipalId", example.applyValue(getBackupVaultResult -> getBackupVaultResult.identities()[0].principalId()));
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: azure:dataprotection:getBackupVault
          Arguments:
            name: existing-backup-vault
            resourceGroupName: existing-resource-group
    outputs:
      azurermDataProtectionBackupVaultId: ${exampleAzurermVpnGateway.id}
      azurermDataProtectionBackupVaultPrincipalId: ${example.identities[0].principalId}
    

    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(name: Optional[str] = None,
                         resource_group_name: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetBackupVaultResult
    def get_backup_vault_output(name: Optional[pulumi.Input[str]] = None,
                         resource_group_name: 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: azure:dataprotection/getBackupVault:getBackupVault
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    Specifies the name of the Backup Vault.
    ResourceGroupName string
    The name of the Resource Group where the Backup Vault exists.
    Name string
    Specifies the name of the Backup Vault.
    ResourceGroupName string
    The name of the Resource Group where the Backup Vault exists.
    name String
    Specifies the name of the Backup Vault.
    resourceGroupName String
    The name of the Resource Group where the Backup Vault exists.
    name string
    Specifies the name of the Backup Vault.
    resourceGroupName string
    The name of the Resource Group where the Backup Vault exists.
    name str
    Specifies the name of the Backup Vault.
    resource_group_name str
    The name of the Resource Group where the Backup Vault exists.
    name String
    Specifies the name of the Backup Vault.
    resourceGroupName String
    The name of the Resource Group where the Backup Vault exists.

    getBackupVault Result

    The following output properties are available:

    DatastoreType string
    Specifies the type of the data store.
    Id string
    The provider-assigned unique ID for this managed resource.
    Identities List<GetBackupVaultIdentity>
    A identity block as defined below.
    Location string
    The Azure Region where the Backup Vault exists.
    Name string
    Redundancy string
    Specifies the backup storage redundancy.
    ResourceGroupName string
    Tags Dictionary<string, string>
    A mapping of tags which are assigned to the Backup Vault.
    DatastoreType string
    Specifies the type of the data store.
    Id string
    The provider-assigned unique ID for this managed resource.
    Identities []GetBackupVaultIdentity
    A identity block as defined below.
    Location string
    The Azure Region where the Backup Vault exists.
    Name string
    Redundancy string
    Specifies the backup storage redundancy.
    ResourceGroupName string
    Tags map[string]string
    A mapping of tags which are assigned to the Backup Vault.
    datastoreType String
    Specifies the type of the data store.
    id String
    The provider-assigned unique ID for this managed resource.
    identities List<GetBackupVaultIdentity>
    A identity block as defined below.
    location String
    The Azure Region where the Backup Vault exists.
    name String
    redundancy String
    Specifies the backup storage redundancy.
    resourceGroupName String
    tags Map<String,String>
    A mapping of tags which are assigned to the Backup Vault.
    datastoreType string
    Specifies the type of the data store.
    id string
    The provider-assigned unique ID for this managed resource.
    identities GetBackupVaultIdentity[]
    A identity block as defined below.
    location string
    The Azure Region where the Backup Vault exists.
    name string
    redundancy string
    Specifies the backup storage redundancy.
    resourceGroupName string
    tags {[key: string]: string}
    A mapping of tags which are assigned to the Backup Vault.
    datastore_type str
    Specifies the type of the data store.
    id str
    The provider-assigned unique ID for this managed resource.
    identities Sequence[GetBackupVaultIdentity]
    A identity block as defined below.
    location str
    The Azure Region where the Backup Vault exists.
    name str
    redundancy str
    Specifies the backup storage redundancy.
    resource_group_name str
    tags Mapping[str, str]
    A mapping of tags which are assigned to the Backup Vault.
    datastoreType String
    Specifies the type of the data store.
    id String
    The provider-assigned unique ID for this managed resource.
    identities List<Property Map>
    A identity block as defined below.
    location String
    The Azure Region where the Backup Vault exists.
    name String
    redundancy String
    Specifies the backup storage redundancy.
    resourceGroupName String
    tags Map<String>
    A mapping of tags which are assigned to the Backup Vault.

    Supporting Types

    GetBackupVaultIdentity

    PrincipalId string
    The Principal ID of the System Assigned Managed Service Identity that is configured on this Backup Vault.
    TenantId string
    The Tenant ID of the System Assigned Managed Service Identity that is configured on this Backup Vault.
    Type string
    The type of Managed Service Identity that is configured on this Backup Vault.
    PrincipalId string
    The Principal ID of the System Assigned Managed Service Identity that is configured on this Backup Vault.
    TenantId string
    The Tenant ID of the System Assigned Managed Service Identity that is configured on this Backup Vault.
    Type string
    The type of Managed Service Identity that is configured on this Backup Vault.
    principalId String
    The Principal ID of the System Assigned Managed Service Identity that is configured on this Backup Vault.
    tenantId String
    The Tenant ID of the System Assigned Managed Service Identity that is configured on this Backup Vault.
    type String
    The type of Managed Service Identity that is configured on this Backup Vault.
    principalId string
    The Principal ID of the System Assigned Managed Service Identity that is configured on this Backup Vault.
    tenantId string
    The Tenant ID of the System Assigned Managed Service Identity that is configured on this Backup Vault.
    type string
    The type of Managed Service Identity that is configured on this Backup Vault.
    principal_id str
    The Principal ID of the System Assigned Managed Service Identity that is configured on this Backup Vault.
    tenant_id str
    The Tenant ID of the System Assigned Managed Service Identity that is configured on this Backup Vault.
    type str
    The type of Managed Service Identity that is configured on this Backup Vault.
    principalId String
    The Principal ID of the System Assigned Managed Service Identity that is configured on this Backup Vault.
    tenantId String
    The Tenant ID of the System Assigned Managed Service Identity that is configured on this Backup Vault.
    type String
    The type of Managed Service Identity that is configured on this Backup Vault.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi