We recommend using Azure Native.
azure.dataprotection.getBackupVault
Explore with Pulumi AI
Use this data source to access information about an existing Backup Vault.
Example Usage
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"] = data.Azurerm_vpn_gateway.Example.Id,
["azurermDataProtectionBackupVaultPrincipalId"] = example.Apply(getBackupVaultResult => getBackupVaultResult.Identities[0]?.PrincipalId),
};
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v5/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", data.Azurerm_vpn_gateway.Example.Id)
ctx.Export("azurermDataProtectionBackupVaultPrincipalId", example.Identities[0].PrincipalId)
return nil
})
}
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", data.azurerm_vpn_gateway().example().id());
ctx.export("azurermDataProtectionBackupVaultPrincipalId", example.applyValue(getBackupVaultResult -> getBackupVaultResult.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", data["azurerm_vpn_gateway"]["example"]["id"])
pulumi.export("azurermDataProtectionBackupVaultPrincipalId", example.identities[0].principal_id)
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 = data.azurerm_vpn_gateway.example.id;
export const azurermDataProtectionBackupVaultPrincipalId = example.then(example => example.identities?.[0]?.principalId);
variables:
example:
fn::invoke:
Function: azure:dataprotection:getBackupVault
Arguments:
name: existing-backup-vault
resourceGroupName: existing-resource-group
outputs:
azurermDataProtectionBackupVaultId: ${data.azurerm_vpn_gateway.example.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.
- Resource
Group stringName The name of the Resource Group where the Backup Vault exists.
- Name string
Specifies the name of the Backup Vault.
- Resource
Group stringName The name of the Resource Group where the Backup Vault exists.
- name String
Specifies the name of the Backup Vault.
- resource
Group StringName The name of the Resource Group where the Backup Vault exists.
- name string
Specifies the name of the Backup Vault.
- resource
Group stringName The name of the Resource Group where the Backup Vault exists.
- name str
Specifies the name of the Backup Vault.
- resource_
group_ strname The name of the Resource Group where the Backup Vault exists.
- name String
Specifies the name of the Backup Vault.
- resource
Group StringName The name of the Resource Group where the Backup Vault exists.
getBackupVault Result
The following output properties are available:
- Datastore
Type string Specifies the type of the data store.
- Id string
The provider-assigned unique ID for this managed resource.
- Identities
List<Get
Backup Vault Identity> 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.
- Resource
Group stringName - Dictionary<string, string>
A mapping of tags which are assigned to the Backup Vault.
- Datastore
Type string Specifies the type of the data store.
- Id string
The provider-assigned unique ID for this managed resource.
- Identities
[]Get
Backup Vault Identity 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.
- Resource
Group stringName - map[string]string
A mapping of tags which are assigned to the Backup Vault.
- datastore
Type String Specifies the type of the data store.
- id String
The provider-assigned unique ID for this managed resource.
- identities
List<Get
Backup Vault Identity> 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.
- resource
Group StringName - Map<String,String>
A mapping of tags which are assigned to the Backup Vault.
- datastore
Type string Specifies the type of the data store.
- id string
The provider-assigned unique ID for this managed resource.
- identities
Get
Backup Vault Identity[] 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.
- resource
Group stringName - {[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[Get
Backup Vault Identity] 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_ strname - Mapping[str, str]
A mapping of tags which are assigned to the Backup Vault.
- datastore
Type 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.
- resource
Group StringName - Map<String>
A mapping of tags which are assigned to the Backup Vault.
Supporting Types
GetBackupVaultIdentity
- Principal
Id string The Principal ID of the System Assigned Managed Service Identity that is configured on this Backup Vault.
- Tenant
Id 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 string The Principal ID of the System Assigned Managed Service Identity that is configured on this Backup Vault.
- Tenant
Id 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 String The Principal ID of the System Assigned Managed Service Identity that is configured on this Backup Vault.
- tenant
Id 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 string The Principal ID of the System Assigned Managed Service Identity that is configured on this Backup Vault.
- tenant
Id 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.
- principal
Id String The Principal ID of the System Assigned Managed Service Identity that is configured on this Backup Vault.
- tenant
Id 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.