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

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

azure.dataprotection.getBackupVault

Explore with Pulumi AI

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 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);
Copy
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)
Copy
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
	})
}
Copy
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),
    };
});
Copy
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()));
    }
}
Copy
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}
Copy

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>
Copy
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]
Copy
func LookupBackupVault(ctx *Context, args *LookupBackupVaultArgs, opts ...InvokeOption) (*LookupBackupVaultResult, error)
func LookupBackupVaultOutput(ctx *Context, args *LookupBackupVaultOutputArgs, opts ...InvokeOption) LookupBackupVaultResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetBackupVaultResult> getBackupVault(GetBackupVaultArgs args, InvokeOptions options)
public static Output<GetBackupVaultResult> getBackupVault(GetBackupVaultArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: azure:dataprotection/getBackupVault:getBackupVault
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Name This property is required. string
Specifies the name of the Backup Vault.
ResourceGroupName This property is required. string
The name of the Resource Group where the Backup Vault exists.
Name This property is required. string
Specifies the name of the Backup Vault.
ResourceGroupName This property is required. string
The name of the Resource Group where the Backup Vault exists.
name This property is required. String
Specifies the name of the Backup Vault.
resourceGroupName This property is required. String
The name of the Resource Group where the Backup Vault exists.
name This property is required. string
Specifies the name of the Backup Vault.
resourceGroupName This property is required. string
The name of the Resource Group where the Backup Vault exists.
name This property is required. str
Specifies the name of the Backup Vault.
resource_group_name This property is required. str
The name of the Resource Group where the Backup Vault exists.
name This property is required. String
Specifies the name of the Backup Vault.
resourceGroupName This property is required. 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 This property is required. string
The Principal ID of the System Assigned Managed Service Identity that is configured on this Backup Vault.
TenantId This property is required. string
The Tenant ID of the System Assigned Managed Service Identity that is configured on this Backup Vault.
Type This property is required. string
The type of Managed Service Identity that is configured on this Backup Vault.
PrincipalId This property is required. string
The Principal ID of the System Assigned Managed Service Identity that is configured on this Backup Vault.
TenantId This property is required. string
The Tenant ID of the System Assigned Managed Service Identity that is configured on this Backup Vault.
Type This property is required. string
The type of Managed Service Identity that is configured on this Backup Vault.
principalId This property is required. String
The Principal ID of the System Assigned Managed Service Identity that is configured on this Backup Vault.
tenantId This property is required. String
The Tenant ID of the System Assigned Managed Service Identity that is configured on this Backup Vault.
type This property is required. String
The type of Managed Service Identity that is configured on this Backup Vault.
principalId This property is required. string
The Principal ID of the System Assigned Managed Service Identity that is configured on this Backup Vault.
tenantId This property is required. string
The Tenant ID of the System Assigned Managed Service Identity that is configured on this Backup Vault.
type This property is required. string
The type of Managed Service Identity that is configured on this Backup Vault.
principal_id This property is required. str
The Principal ID of the System Assigned Managed Service Identity that is configured on this Backup Vault.
tenant_id This property is required. str
The Tenant ID of the System Assigned Managed Service Identity that is configured on this Backup Vault.
type This property is required. str
The type of Managed Service Identity that is configured on this Backup Vault.
principalId This property is required. String
The Principal ID of the System Assigned Managed Service Identity that is configured on this Backup Vault.
tenantId This property is required. String
The Tenant ID of the System Assigned Managed Service Identity that is configured on this Backup Vault.
type This property is required. 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.

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi