Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.azurenative.dataprotection.kotlin.BackupVaultArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.dataprotection.kotlin
import com.pulumi.azurenative.dataprotection.BackupVaultArgs.builder
import com.pulumi.azurenative.dataprotection.kotlin.inputs.DppIdentityDetailsArgs
import com.pulumi.azurenative.dataprotection.kotlin.inputs.DppIdentityDetailsArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Backup Vault Resource
* Azure REST API version: 2023-01-01. Prior API version in Azure Native 1.x: 2021-01-01.
* Other available API versions: 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.
* ## Example Usage
* ### Create BackupVault
* ```csharp
* 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,
* },
* },
* StorageSettings = new[]
* {
* new AzureNative.DataProtection.Inputs.StorageSettingArgs
* {
* DatastoreType = AzureNative.DataProtection.StorageSettingStoreTypes.VaultStore,
* Type = AzureNative.DataProtection.StorageSettingTypes.LocallyRedundant,
* },
* },
* },
* ResourceGroupName = "SampleResourceGroup",
* Tags =
* {
* { "key1", "val1" },
* },
* VaultName = "swaggerExample",
* });
* });
* ```
* ```go
* 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),
* },
* },
* 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
* })
* }
* ```
* ```java
* 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 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())
* .storageSettings(StorageSettingArgs.builder()
* .datastoreType("VaultStore")
* .type("LocallyRedundant")
* .build())
* .build())
* .resourceGroupName("SampleResourceGroup")
* .tags(Map.of("key1", "val1"))
* .vaultName("swaggerExample")
* .build());
* }
* }
* ```
* ### Create BackupVault With MSI
* ```csharp
* 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
* {
* MonitoringSettings = new AzureNative.DataProtection.Inputs.MonitoringSettingsArgs
* {
* AzureMonitorAlertSettings = new AzureNative.DataProtection.Inputs.AzureMonitorAlertSettingsArgs
* {
* AlertsForAllJobFailures = AzureNative.DataProtection.AlertsState.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",
* });
* });
* ```
* ```go
* 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{
* MonitoringSettings: &dataprotection.MonitoringSettingsArgs{
* AzureMonitorAlertSettings: &dataprotection.AzureMonitorAlertSettingsArgs{
* AlertsForAllJobFailures: pulumi.String(dataprotection.AlertsStateEnabled),
* },
* },
* 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
* })
* }
* ```
* ```java
* 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 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()
* .monitoringSettings(MonitoringSettingsArgs.builder()
* .azureMonitorAlertSettings(AzureMonitorAlertSettingsArgs.builder()
* .alertsForAllJobFailures("Enabled")
* .build())
* .build())
* .storageSettings(StorageSettingArgs.builder()
* .datastoreType("VaultStore")
* .type("LocallyRedundant")
* .build())
* .build())
* .resourceGroupName("SampleResourceGroup")
* .tags(Map.of("key1", "val1"))
* .vaultName("swaggerExample")
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:dataprotection:BackupVault swaggerExample /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}
* ```
* @property eTag Optional ETag.
* @property identity Input Managed Identity Details
* @property location Resource location.
* @property properties BackupVaultResource properties
* @property resourceGroupName The name of the resource group. The name is case insensitive.
* @property tags Resource tags.
* @property vaultName The name of the backup vault.
*/
public data class BackupVaultArgs(
public val eTag: Output? = null,
public val identity: Output? = null,
public val location: Output? = null,
public val properties: Output? = null,
public val resourceGroupName: Output? = null,
public val tags: Output>? = null,
public val vaultName: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.dataprotection.BackupVaultArgs =
com.pulumi.azurenative.dataprotection.BackupVaultArgs.builder()
.eTag(eTag?.applyValue({ args0 -> args0 }))
.identity(identity?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.location(location?.applyValue({ args0 -> args0 }))
.properties(properties?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
.vaultName(vaultName?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [BackupVaultArgs].
*/
@PulumiTagMarker
public class BackupVaultArgsBuilder internal constructor() {
private var eTag: Output? = null
private var identity: Output? = null
private var location: Output? = null
private var properties:
Output? = null
private var resourceGroupName: Output? = null
private var tags: Output>? = null
private var vaultName: Output? = null
/**
* @param value Optional ETag.
*/
@JvmName("ysdideosprqfhkyk")
public suspend fun eTag(`value`: Output) {
this.eTag = value
}
/**
* @param value Input Managed Identity Details
*/
@JvmName("fwgxhtahnfqnntvh")
public suspend fun identity(`value`: Output) {
this.identity = value
}
/**
* @param value Resource location.
*/
@JvmName("hnqkcryihtnqlxxs")
public suspend fun location(`value`: Output) {
this.location = value
}
/**
* @param value BackupVaultResource properties
*/
@JvmName("tjkuuwqabkdkluew")
public suspend fun properties(`value`: Output) {
this.properties = value
}
/**
* @param value The name of the resource group. The name is case insensitive.
*/
@JvmName("obcivnjgftapxlfb")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value Resource tags.
*/
@JvmName("nbglvkordcdvslsy")
public suspend fun tags(`value`: Output>) {
this.tags = value
}
/**
* @param value The name of the backup vault.
*/
@JvmName("ulwyabsnligordkd")
public suspend fun vaultName(`value`: Output) {
this.vaultName = value
}
/**
* @param value Optional ETag.
*/
@JvmName("vphonijgpcbgpqii")
public suspend fun eTag(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.eTag = mapped
}
/**
* @param value Input Managed Identity Details
*/
@JvmName("rpyldbsgjracnvjj")
public suspend fun identity(`value`: DppIdentityDetailsArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.identity = mapped
}
/**
* @param argument Input Managed Identity Details
*/
@JvmName("nxjffkvukowwjwhh")
public suspend fun identity(argument: suspend DppIdentityDetailsArgsBuilder.() -> Unit) {
val toBeMapped = DppIdentityDetailsArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.identity = mapped
}
/**
* @param value Resource location.
*/
@JvmName("ylwdetvnmbqbuacp")
public suspend fun location(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.location = mapped
}
/**
* @param value BackupVaultResource properties
*/
@JvmName("uoenrmkdkpadgkrp")
public suspend fun properties(`value`: com.pulumi.azurenative.dataprotection.kotlin.inputs.BackupVaultArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.properties = mapped
}
/**
* @param argument BackupVaultResource properties
*/
@JvmName("yfoqcfrxphkmpbhh")
public suspend fun properties(argument: suspend com.pulumi.azurenative.dataprotection.kotlin.inputs.BackupVaultArgsBuilder.() -> Unit) {
val toBeMapped =
com.pulumi.azurenative.dataprotection.kotlin.inputs.BackupVaultArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.properties = mapped
}
/**
* @param value The name of the resource group. The name is case insensitive.
*/
@JvmName("ubohvjecsthfxoiu")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value Resource tags.
*/
@JvmName("dwikaqmcxvprkrps")
public suspend fun tags(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param values Resource tags.
*/
@JvmName("novigiinpnfkrrcg")
public fun tags(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param value The name of the backup vault.
*/
@JvmName("qbinuggsmmppqrai")
public suspend fun vaultName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.vaultName = mapped
}
internal fun build(): BackupVaultArgs = BackupVaultArgs(
eTag = eTag,
identity = identity,
location = location,
properties = properties,
resourceGroupName = resourceGroupName,
tags = tags,
vaultName = vaultName,
)
}