Backup Vault Args
data class BackupVaultArgs(val eTag: Output<String>? = null, val identity: Output<DppIdentityDetailsArgs>? = null, val location: Output<String>? = null, val properties: Output<BackupVaultArgs>? = null, val resourceGroupName: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val vaultName: Output<String>? = null) : ConvertibleToJava<BackupVaultArgs>
Backup Vault Resource Uses Azure REST API version 2025-01-01. In version 2.x of the Azure Native provider, it used API version 2023-01-01. Other available API versions: 2023-01-01, 2023-04-01-preview, 2023-05-01, 2023-06-01-preview, 2023-08-01-preview, 2023-11-01, 2023-12-01, 2024-02-01-preview, 2024-03-01, 2024-04-01, 2025-02-01. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native dataprotection [ApiVersion]
. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.
Example Usage
Create BackupVault
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var backupVault = new AzureNative.DataProtection.BackupVault("backupVault", new()
{
Identity = new AzureNative.DataProtection.Inputs.DppIdentityDetailsArgs
{
Type = "None",
},
Location = "WestUS",
Properties = new AzureNative.DataProtection.Inputs.BackupVaultArgs
{
FeatureSettings = new AzureNative.DataProtection.Inputs.FeatureSettingsArgs
{
CrossRegionRestoreSettings = new AzureNative.DataProtection.Inputs.CrossRegionRestoreSettingsArgs
{
State = AzureNative.DataProtection.CrossRegionRestoreState.Enabled,
},
},
MonitoringSettings = new AzureNative.DataProtection.Inputs.MonitoringSettingsArgs
{
AzureMonitorAlertSettings = new AzureNative.DataProtection.Inputs.AzureMonitorAlertSettingsArgs
{
AlertsForAllJobFailures = AzureNative.DataProtection.AlertsState.Enabled,
},
},
SecuritySettings = new AzureNative.DataProtection.Inputs.SecuritySettingsArgs
{
SoftDeleteSettings = new AzureNative.DataProtection.Inputs.SoftDeleteSettingsArgs
{
RetentionDurationInDays = 14,
State = "Enabled",
},
},
StorageSettings = new[]
{
new AzureNative.DataProtection.Inputs.StorageSettingArgs
{
DatastoreType = AzureNative.DataProtection.StorageSettingStoreTypes.VaultStore,
Type = AzureNative.DataProtection.StorageSettingTypes.LocallyRedundant,
},
},
},
ResourceGroupName = "SampleResourceGroup",
Tags =
{
{ "key1", "val1" },
},
VaultName = "swaggerExample",
});
});
Content copied to clipboard
package main
import (
dataprotection "github.com/pulumi/pulumi-azure-native-sdk/dataprotection/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := dataprotection.NewBackupVault(ctx, "backupVault", &dataprotection.BackupVaultArgs{
Identity: &dataprotection.DppIdentityDetailsArgs{
Type: pulumi.String("None"),
},
Location: pulumi.String("WestUS"),
Properties: &dataprotection.BackupVaultTypeArgs{
FeatureSettings: &dataprotection.FeatureSettingsArgs{
CrossRegionRestoreSettings: &dataprotection.CrossRegionRestoreSettingsArgs{
State: pulumi.String(dataprotection.CrossRegionRestoreStateEnabled),
},
},
MonitoringSettings: &dataprotection.MonitoringSettingsArgs{
AzureMonitorAlertSettings: &dataprotection.AzureMonitorAlertSettingsArgs{
AlertsForAllJobFailures: pulumi.String(dataprotection.AlertsStateEnabled),
},
},
SecuritySettings: &dataprotection.SecuritySettingsArgs{
SoftDeleteSettings: &dataprotection.SoftDeleteSettingsArgs{
RetentionDurationInDays: pulumi.Float64(14),
State: pulumi.String("Enabled"),
},
},
StorageSettings: dataprotection.StorageSettingArray{
&dataprotection.StorageSettingArgs{
DatastoreType: pulumi.String(dataprotection.StorageSettingStoreTypesVaultStore),
Type: pulumi.String(dataprotection.StorageSettingTypesLocallyRedundant),
},
},
},
ResourceGroupName: pulumi.String("SampleResourceGroup"),
Tags: pulumi.StringMap{
"key1": pulumi.String("val1"),
},
VaultName: pulumi.String("swaggerExample"),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.dataprotection.BackupVault;
import com.pulumi.azurenative.dataprotection.BackupVaultArgs;
import com.pulumi.azurenative.dataprotection.inputs.DppIdentityDetailsArgs;
import com.pulumi.azurenative.dataprotection.inputs.BackupVaultArgs;
import com.pulumi.azurenative.dataprotection.inputs.FeatureSettingsArgs;
import com.pulumi.azurenative.dataprotection.inputs.CrossRegionRestoreSettingsArgs;
import com.pulumi.azurenative.dataprotection.inputs.MonitoringSettingsArgs;
import com.pulumi.azurenative.dataprotection.inputs.AzureMonitorAlertSettingsArgs;
import com.pulumi.azurenative.dataprotection.inputs.SecuritySettingsArgs;
import com.pulumi.azurenative.dataprotection.inputs.SoftDeleteSettingsArgs;
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) {
var backupVault = new BackupVault("backupVault", BackupVaultArgs.builder()
.identity(DppIdentityDetailsArgs.builder()
.type("None")
.build())
.location("WestUS")
.properties(BackupVaultArgs.builder()
.featureSettings(FeatureSettingsArgs.builder()
.crossRegionRestoreSettings(CrossRegionRestoreSettingsArgs.builder()
.state("Enabled")
.build())
.build())
.monitoringSettings(MonitoringSettingsArgs.builder()
.azureMonitorAlertSettings(AzureMonitorAlertSettingsArgs.builder()
.alertsForAllJobFailures("Enabled")
.build())
.build())
.securitySettings(SecuritySettingsArgs.builder()
.softDeleteSettings(SoftDeleteSettingsArgs.builder()
.retentionDurationInDays(14)
.state("Enabled")
.build())
.build())
.storageSettings(StorageSettingArgs.builder()
.datastoreType("VaultStore")
.type("LocallyRedundant")
.build())
.build())
.resourceGroupName("SampleResourceGroup")
.tags(Map.of("key1", "val1"))
.vaultName("swaggerExample")
.build());
}
}
Content copied to clipboard
Create BackupVault With CMK
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var backupVault = new AzureNative.DataProtection.BackupVault("backupVault", new()
{
Identity = new AzureNative.DataProtection.Inputs.DppIdentityDetailsArgs
{
Type = "None",
},
Location = "WestUS",
Properties = new AzureNative.DataProtection.Inputs.BackupVaultArgs
{
MonitoringSettings = new AzureNative.DataProtection.Inputs.MonitoringSettingsArgs
{
AzureMonitorAlertSettings = new AzureNative.DataProtection.Inputs.AzureMonitorAlertSettingsArgs
{
AlertsForAllJobFailures = AzureNative.DataProtection.AlertsState.Enabled,
},
},
SecuritySettings = new AzureNative.DataProtection.Inputs.SecuritySettingsArgs
{
EncryptionSettings = new AzureNative.DataProtection.Inputs.EncryptionSettingsArgs
{
InfrastructureEncryption = AzureNative.DataProtection.InfrastructureEncryptionState.Enabled,
KekIdentity = new AzureNative.DataProtection.Inputs.CmkKekIdentityArgs
{
IdentityId = "/subscriptions/85bf5e8c-3084-4f42-add2-746ebb7e97b2/resourcegroups/defaultrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplemsi",
IdentityType = AzureNative.DataProtection.IdentityType.UserAssigned,
},
KeyVaultProperties = new AzureNative.DataProtection.Inputs.CmkKeyVaultPropertiesArgs
{
KeyUri = "https://cmk2xkv.vault.azure.net/keys/Key1/0767b348bb1a4c07baa6c4ec0055d2b3",
},
State = AzureNative.DataProtection.EncryptionState.Enabled,
},
ImmutabilitySettings = new AzureNative.DataProtection.Inputs.ImmutabilitySettingsArgs
{
State = AzureNative.DataProtection.ImmutabilityState.Disabled,
},
SoftDeleteSettings = new AzureNative.DataProtection.Inputs.SoftDeleteSettingsArgs
{
RetentionDurationInDays = 0,
State = AzureNative.DataProtection.SoftDeleteState.Off,
},
},
StorageSettings = new[]
{
new AzureNative.DataProtection.Inputs.StorageSettingArgs
{
DatastoreType = AzureNative.DataProtection.StorageSettingStoreTypes.VaultStore,
Type = AzureNative.DataProtection.StorageSettingTypes.LocallyRedundant,
},
},
},
ResourceGroupName = "SampleResourceGroup",
Tags =
{
{ "key1", "val1" },
},
VaultName = "swaggerExample",
});
});
Content copied to clipboard
package main
import (
dataprotection "github.com/pulumi/pulumi-azure-native-sdk/dataprotection/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := dataprotection.NewBackupVault(ctx, "backupVault", &dataprotection.BackupVaultArgs{
Identity: &dataprotection.DppIdentityDetailsArgs{
Type: pulumi.String("None"),
},
Location: pulumi.String("WestUS"),
Properties: &dataprotection.BackupVaultTypeArgs{
MonitoringSettings: &dataprotection.MonitoringSettingsArgs{
AzureMonitorAlertSettings: &dataprotection.AzureMonitorAlertSettingsArgs{
AlertsForAllJobFailures: pulumi.String(dataprotection.AlertsStateEnabled),
},
},
SecuritySettings: &dataprotection.SecuritySettingsArgs{
EncryptionSettings: &dataprotection.EncryptionSettingsArgs{
InfrastructureEncryption: pulumi.String(dataprotection.InfrastructureEncryptionStateEnabled),
KekIdentity: &dataprotection.CmkKekIdentityArgs{
IdentityId: pulumi.String("/subscriptions/85bf5e8c-3084-4f42-add2-746ebb7e97b2/resourcegroups/defaultrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplemsi"),
IdentityType: pulumi.String(dataprotection.IdentityTypeUserAssigned),
},
KeyVaultProperties: &dataprotection.CmkKeyVaultPropertiesArgs{
KeyUri: pulumi.String("https://cmk2xkv.vault.azure.net/keys/Key1/0767b348bb1a4c07baa6c4ec0055d2b3"),
},
State: pulumi.String(dataprotection.EncryptionStateEnabled),
},
ImmutabilitySettings: &dataprotection.ImmutabilitySettingsArgs{
State: pulumi.String(dataprotection.ImmutabilityStateDisabled),
},
SoftDeleteSettings: &dataprotection.SoftDeleteSettingsArgs{
RetentionDurationInDays: pulumi.Float64(0),
State: pulumi.String(dataprotection.SoftDeleteStateOff),
},
},
StorageSettings: dataprotection.StorageSettingArray{
&dataprotection.StorageSettingArgs{
DatastoreType: pulumi.String(dataprotection.StorageSettingStoreTypesVaultStore),
Type: pulumi.String(dataprotection.StorageSettingTypesLocallyRedundant),
},
},
},
ResourceGroupName: pulumi.String("SampleResourceGroup"),
Tags: pulumi.StringMap{
"key1": pulumi.String("val1"),
},
VaultName: pulumi.String("swaggerExample"),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.dataprotection.BackupVault;
import com.pulumi.azurenative.dataprotection.BackupVaultArgs;
import com.pulumi.azurenative.dataprotection.inputs.DppIdentityDetailsArgs;
import com.pulumi.azurenative.dataprotection.inputs.BackupVaultArgs;
import com.pulumi.azurenative.dataprotection.inputs.MonitoringSettingsArgs;
import com.pulumi.azurenative.dataprotection.inputs.AzureMonitorAlertSettingsArgs;
import com.pulumi.azurenative.dataprotection.inputs.SecuritySettingsArgs;
import com.pulumi.azurenative.dataprotection.inputs.EncryptionSettingsArgs;
import com.pulumi.azurenative.dataprotection.inputs.CmkKekIdentityArgs;
import com.pulumi.azurenative.dataprotection.inputs.CmkKeyVaultPropertiesArgs;
import com.pulumi.azurenative.dataprotection.inputs.ImmutabilitySettingsArgs;
import com.pulumi.azurenative.dataprotection.inputs.SoftDeleteSettingsArgs;
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) {
var backupVault = new BackupVault("backupVault", BackupVaultArgs.builder()
.identity(DppIdentityDetailsArgs.builder()
.type("None")
.build())
.location("WestUS")
.properties(BackupVaultArgs.builder()
.monitoringSettings(MonitoringSettingsArgs.builder()
.azureMonitorAlertSettings(AzureMonitorAlertSettingsArgs.builder()
.alertsForAllJobFailures("Enabled")
.build())
.build())
.securitySettings(SecuritySettingsArgs.builder()
.encryptionSettings(EncryptionSettingsArgs.builder()
.infrastructureEncryption("Enabled")
.kekIdentity(CmkKekIdentityArgs.builder()
.identityId("/subscriptions/85bf5e8c-3084-4f42-add2-746ebb7e97b2/resourcegroups/defaultrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplemsi")
.identityType("UserAssigned")
.build())
.keyVaultProperties(CmkKeyVaultPropertiesArgs.builder()
.keyUri("https://cmk2xkv.vault.azure.net/keys/Key1/0767b348bb1a4c07baa6c4ec0055d2b3")
.build())
.state("Enabled")
.build())
.immutabilitySettings(ImmutabilitySettingsArgs.builder()
.state("Disabled")
.build())
.softDeleteSettings(SoftDeleteSettingsArgs.builder()
.retentionDurationInDays(0)
.state("Off")
.build())
.build())
.storageSettings(StorageSettingArgs.builder()
.datastoreType("VaultStore")
.type("LocallyRedundant")
.build())
.build())
.resourceGroupName("SampleResourceGroup")
.tags(Map.of("key1", "val1"))
.vaultName("swaggerExample")
.build());
}
}
Content copied to clipboard
Create BackupVault With MSI
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var backupVault = new AzureNative.DataProtection.BackupVault("backupVault", new()
{
Identity = new AzureNative.DataProtection.Inputs.DppIdentityDetailsArgs
{
Type = "systemAssigned",
},
Location = "WestUS",
Properties = new AzureNative.DataProtection.Inputs.BackupVaultArgs
{
FeatureSettings = new AzureNative.DataProtection.Inputs.FeatureSettingsArgs
{
CrossRegionRestoreSettings = new AzureNative.DataProtection.Inputs.CrossRegionRestoreSettingsArgs
{
State = AzureNative.DataProtection.CrossRegionRestoreState.Enabled,
},
},
MonitoringSettings = new AzureNative.DataProtection.Inputs.MonitoringSettingsArgs
{
AzureMonitorAlertSettings = new AzureNative.DataProtection.Inputs.AzureMonitorAlertSettingsArgs
{
AlertsForAllJobFailures = AzureNative.DataProtection.AlertsState.Enabled,
},
},
SecuritySettings = new AzureNative.DataProtection.Inputs.SecuritySettingsArgs
{
SoftDeleteSettings = new AzureNative.DataProtection.Inputs.SoftDeleteSettingsArgs
{
RetentionDurationInDays = 14,
State = "Enabled",
},
},
StorageSettings = new[]
{
new AzureNative.DataProtection.Inputs.StorageSettingArgs
{
DatastoreType = AzureNative.DataProtection.StorageSettingStoreTypes.VaultStore,
Type = AzureNative.DataProtection.StorageSettingTypes.LocallyRedundant,
},
},
},
ResourceGroupName = "SampleResourceGroup",
Tags =
{
{ "key1", "val1" },
},
VaultName = "swaggerExample",
});
});
Content copied to clipboard
package main
import (
dataprotection "github.com/pulumi/pulumi-azure-native-sdk/dataprotection/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := dataprotection.NewBackupVault(ctx, "backupVault", &dataprotection.BackupVaultArgs{
Identity: &dataprotection.DppIdentityDetailsArgs{
Type: pulumi.String("systemAssigned"),
},
Location: pulumi.String("WestUS"),
Properties: &dataprotection.BackupVaultTypeArgs{
FeatureSettings: &dataprotection.FeatureSettingsArgs{
CrossRegionRestoreSettings: &dataprotection.CrossRegionRestoreSettingsArgs{
State: pulumi.String(dataprotection.CrossRegionRestoreStateEnabled),
},
},
MonitoringSettings: &dataprotection.MonitoringSettingsArgs{
AzureMonitorAlertSettings: &dataprotection.AzureMonitorAlertSettingsArgs{
AlertsForAllJobFailures: pulumi.String(dataprotection.AlertsStateEnabled),
},
},
SecuritySettings: &dataprotection.SecuritySettingsArgs{
SoftDeleteSettings: &dataprotection.SoftDeleteSettingsArgs{
RetentionDurationInDays: pulumi.Float64(14),
State: pulumi.String("Enabled"),
},
},
StorageSettings: dataprotection.StorageSettingArray{
&dataprotection.StorageSettingArgs{
DatastoreType: pulumi.String(dataprotection.StorageSettingStoreTypesVaultStore),
Type: pulumi.String(dataprotection.StorageSettingTypesLocallyRedundant),
},
},
},
ResourceGroupName: pulumi.String("SampleResourceGroup"),
Tags: pulumi.StringMap{
"key1": pulumi.String("val1"),
},
VaultName: pulumi.String("swaggerExample"),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.dataprotection.BackupVault;
import com.pulumi.azurenative.dataprotection.BackupVaultArgs;
import com.pulumi.azurenative.dataprotection.inputs.DppIdentityDetailsArgs;
import com.pulumi.azurenative.dataprotection.inputs.BackupVaultArgs;
import com.pulumi.azurenative.dataprotection.inputs.FeatureSettingsArgs;
import com.pulumi.azurenative.dataprotection.inputs.CrossRegionRestoreSettingsArgs;
import com.pulumi.azurenative.dataprotection.inputs.MonitoringSettingsArgs;
import com.pulumi.azurenative.dataprotection.inputs.AzureMonitorAlertSettingsArgs;
import com.pulumi.azurenative.dataprotection.inputs.SecuritySettingsArgs;
import com.pulumi.azurenative.dataprotection.inputs.SoftDeleteSettingsArgs;
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) {
var backupVault = new BackupVault("backupVault", BackupVaultArgs.builder()
.identity(DppIdentityDetailsArgs.builder()
.type("systemAssigned")
.build())
.location("WestUS")
.properties(BackupVaultArgs.builder()
.featureSettings(FeatureSettingsArgs.builder()
.crossRegionRestoreSettings(CrossRegionRestoreSettingsArgs.builder()
.state("Enabled")
.build())
.build())
.monitoringSettings(MonitoringSettingsArgs.builder()
.azureMonitorAlertSettings(AzureMonitorAlertSettingsArgs.builder()
.alertsForAllJobFailures("Enabled")
.build())
.build())
.securitySettings(SecuritySettingsArgs.builder()
.softDeleteSettings(SoftDeleteSettingsArgs.builder()
.retentionDurationInDays(14)
.state("Enabled")
.build())
.build())
.storageSettings(StorageSettingArgs.builder()
.datastoreType("VaultStore")
.type("LocallyRedundant")
.build())
.build())
.resourceGroupName("SampleResourceGroup")
.tags(Map.of("key1", "val1"))
.vaultName("swaggerExample")
.build());
}
}
Content copied to clipboard
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:dataprotection:BackupVault swaggerExample /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}
Content copied to clipboard
Constructors
Link copied to clipboard
constructor(eTag: Output<String>? = null, identity: Output<DppIdentityDetailsArgs>? = null, location: Output<String>? = null, properties: Output<BackupVaultArgs>? = null, resourceGroupName: Output<String>? = null, tags: Output<Map<String, String>>? = null, vaultName: Output<String>? = null)