All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azure.recoveryservices.kotlin.VaultArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 6.21.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.recoveryservices.kotlin

import com.pulumi.azure.recoveryservices.VaultArgs.builder
import com.pulumi.azure.recoveryservices.kotlin.inputs.VaultEncryptionArgs
import com.pulumi.azure.recoveryservices.kotlin.inputs.VaultEncryptionArgsBuilder
import com.pulumi.azure.recoveryservices.kotlin.inputs.VaultIdentityArgs
import com.pulumi.azure.recoveryservices.kotlin.inputs.VaultIdentityArgsBuilder
import com.pulumi.azure.recoveryservices.kotlin.inputs.VaultMonitoringArgs
import com.pulumi.azure.recoveryservices.kotlin.inputs.VaultMonitoringArgsBuilder
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.Boolean
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Manages a Recovery Services Vault.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "tfex-recovery_vault",
 *     location: "West Europe",
 * });
 * const vault = new azure.recoveryservices.Vault("vault", {
 *     name: "example-recovery-vault",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     sku: "Standard",
 *     softDeleteEnabled: true,
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="tfex-recovery_vault",
 *     location="West Europe")
 * vault = azure.recoveryservices.Vault("vault",
 *     name="example-recovery-vault",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     sku="Standard",
 *     soft_delete_enabled=True)
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Azure = Pulumi.Azure;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Azure.Core.ResourceGroup("example", new()
 *     {
 *         Name = "tfex-recovery_vault",
 *         Location = "West Europe",
 *     });
 *     var vault = new Azure.RecoveryServices.Vault("vault", new()
 *     {
 *         Name = "example-recovery-vault",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         Sku = "Standard",
 *         SoftDeleteEnabled = true,
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/recoveryservices"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
 * 			Name:     pulumi.String("tfex-recovery_vault"),
 * 			Location: pulumi.String("West Europe"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = recoveryservices.NewVault(ctx, "vault", &recoveryservices.VaultArgs{
 * 			Name:              pulumi.String("example-recovery-vault"),
 * 			Location:          example.Location,
 * 			ResourceGroupName: example.Name,
 * 			Sku:               pulumi.String("Standard"),
 * 			SoftDeleteEnabled: pulumi.Bool(true),
 * 		})
 * 		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.azure.core.ResourceGroup;
 * import com.pulumi.azure.core.ResourceGroupArgs;
 * import com.pulumi.azure.recoveryservices.Vault;
 * import com.pulumi.azure.recoveryservices.VaultArgs;
 * 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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
 *             .name("tfex-recovery_vault")
 *             .location("West Europe")
 *             .build());
 *         var vault = new Vault("vault", VaultArgs.builder()
 *             .name("example-recovery-vault")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .sku("Standard")
 *             .softDeleteEnabled(true)
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: tfex-recovery_vault
 *       location: West Europe
 *   vault:
 *     type: azure:recoveryservices:Vault
 *     properties:
 *       name: example-recovery-vault
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       sku: Standard
 *       softDeleteEnabled: true
 * ```
 * 
 * ## Import
 * Recovery Services Vaults can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:recoveryservices/vault:Vault vault1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.RecoveryServices/vaults/vault1
 * ```
 * @property classicVmwareReplicationEnabled Whether to enable the Classic experience for VMware replication. If set to `false` VMware machines will be protected using the new stateless ASR replication appliance. Changing this forces a new resource to be created.
 * @property crossRegionRestoreEnabled Is cross region restore enabled for this Vault? Only can be `true`, when `storage_mode_type` is `GeoRedundant`. Defaults to `false`.
 * > **Note:** Once `cross_region_restore_enabled` is set to `true`, changing it back to `false` forces a new Recovery Service Vault to be created.
 * @property encryption An `encryption` block as defined below. Required with `identity`.
 * !> **Note:** Once Encryption with your own key has been Enabled it's not possible to Disable it.
 * @property identity An `identity` block as defined below.
 * @property immutability Immutability Settings of vault, possible values include: `Locked`, `Unlocked` and `Disabled`.
 * > **Note:** Once `immutability` is set to `Locked`, changing it to other values forces a new Recovery Services Vault to be created.
 * @property location Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
 * @property monitoring A `monitoring` block as defined below.
 * @property name Specifies the name of the Recovery Services Vault. Recovery Service Vault name must be 2 - 50 characters long, start with a letter, contain only letters, numbers and hyphens. Changing this forces a new resource to be created.
 * @property publicNetworkAccessEnabled Is it enabled to access the vault from public networks. Defaults to `true`.
 * @property resourceGroupName The name of the resource group in which to create the Recovery Services Vault. Changing this forces a new resource to be created.
 * @property sku Sets the vault's SKU. Possible values include: `Standard`, `RS0`.
 * @property softDeleteEnabled Is soft delete enable for this Vault? Defaults to `true`.
 * @property storageModeType The storage type of the Recovery Services Vault. Possible values are `GeoRedundant`, `LocallyRedundant` and `ZoneRedundant`. Defaults to `GeoRedundant`.
 * @property tags A mapping of tags to assign to the resource.
 */
public data class VaultArgs(
    public val classicVmwareReplicationEnabled: Output? = null,
    public val crossRegionRestoreEnabled: Output? = null,
    public val encryption: Output? = null,
    public val identity: Output? = null,
    public val immutability: Output? = null,
    public val location: Output? = null,
    public val monitoring: Output? = null,
    public val name: Output? = null,
    public val publicNetworkAccessEnabled: Output? = null,
    public val resourceGroupName: Output? = null,
    public val sku: Output? = null,
    public val softDeleteEnabled: Output? = null,
    public val storageModeType: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.recoveryservices.VaultArgs =
        com.pulumi.azure.recoveryservices.VaultArgs.builder()
            .classicVmwareReplicationEnabled(classicVmwareReplicationEnabled?.applyValue({ args0 -> args0 }))
            .crossRegionRestoreEnabled(crossRegionRestoreEnabled?.applyValue({ args0 -> args0 }))
            .encryption(encryption?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .identity(identity?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .immutability(immutability?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .monitoring(monitoring?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .name(name?.applyValue({ args0 -> args0 }))
            .publicNetworkAccessEnabled(publicNetworkAccessEnabled?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .sku(sku?.applyValue({ args0 -> args0 }))
            .softDeleteEnabled(softDeleteEnabled?.applyValue({ args0 -> args0 }))
            .storageModeType(storageModeType?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [VaultArgs].
 */
@PulumiTagMarker
public class VaultArgsBuilder internal constructor() {
    private var classicVmwareReplicationEnabled: Output? = null

    private var crossRegionRestoreEnabled: Output? = null

    private var encryption: Output? = null

    private var identity: Output? = null

    private var immutability: Output? = null

    private var location: Output? = null

    private var monitoring: Output? = null

    private var name: Output? = null

    private var publicNetworkAccessEnabled: Output? = null

    private var resourceGroupName: Output? = null

    private var sku: Output? = null

    private var softDeleteEnabled: Output? = null

    private var storageModeType: Output? = null

    private var tags: Output>? = null

    /**
     * @param value Whether to enable the Classic experience for VMware replication. If set to `false` VMware machines will be protected using the new stateless ASR replication appliance. Changing this forces a new resource to be created.
     */
    @JvmName("crtcdgqdolqiiuhy")
    public suspend fun classicVmwareReplicationEnabled(`value`: Output) {
        this.classicVmwareReplicationEnabled = value
    }

    /**
     * @param value Is cross region restore enabled for this Vault? Only can be `true`, when `storage_mode_type` is `GeoRedundant`. Defaults to `false`.
     * > **Note:** Once `cross_region_restore_enabled` is set to `true`, changing it back to `false` forces a new Recovery Service Vault to be created.
     */
    @JvmName("knleiycxcdekxegg")
    public suspend fun crossRegionRestoreEnabled(`value`: Output) {
        this.crossRegionRestoreEnabled = value
    }

    /**
     * @param value An `encryption` block as defined below. Required with `identity`.
     * !> **Note:** Once Encryption with your own key has been Enabled it's not possible to Disable it.
     */
    @JvmName("hbtogpiqqnxbfsvh")
    public suspend fun encryption(`value`: Output) {
        this.encryption = value
    }

    /**
     * @param value An `identity` block as defined below.
     */
    @JvmName("axqsewmcxmjudwll")
    public suspend fun identity(`value`: Output) {
        this.identity = value
    }

    /**
     * @param value Immutability Settings of vault, possible values include: `Locked`, `Unlocked` and `Disabled`.
     * > **Note:** Once `immutability` is set to `Locked`, changing it to other values forces a new Recovery Services Vault to be created.
     */
    @JvmName("mjeltlvgwecgiiaf")
    public suspend fun immutability(`value`: Output) {
        this.immutability = value
    }

    /**
     * @param value Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
     */
    @JvmName("omqvqijxeunwwyua")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value A `monitoring` block as defined below.
     */
    @JvmName("jddncnadpcxqamef")
    public suspend fun monitoring(`value`: Output) {
        this.monitoring = value
    }

    /**
     * @param value Specifies the name of the Recovery Services Vault. Recovery Service Vault name must be 2 - 50 characters long, start with a letter, contain only letters, numbers and hyphens. Changing this forces a new resource to be created.
     */
    @JvmName("qmcwyxvfvgblfyfq")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Is it enabled to access the vault from public networks. Defaults to `true`.
     */
    @JvmName("ljtbueksrkkhqaws")
    public suspend fun publicNetworkAccessEnabled(`value`: Output) {
        this.publicNetworkAccessEnabled = value
    }

    /**
     * @param value The name of the resource group in which to create the Recovery Services Vault. Changing this forces a new resource to be created.
     */
    @JvmName("gcxxtvensyccobbe")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value Sets the vault's SKU. Possible values include: `Standard`, `RS0`.
     */
    @JvmName("trudjvvmlrdoqiky")
    public suspend fun sku(`value`: Output) {
        this.sku = value
    }

    /**
     * @param value Is soft delete enable for this Vault? Defaults to `true`.
     */
    @JvmName("vjeauitesefhddip")
    public suspend fun softDeleteEnabled(`value`: Output) {
        this.softDeleteEnabled = value
    }

    /**
     * @param value The storage type of the Recovery Services Vault. Possible values are `GeoRedundant`, `LocallyRedundant` and `ZoneRedundant`. Defaults to `GeoRedundant`.
     */
    @JvmName("atpqdxiykuwxprsv")
    public suspend fun storageModeType(`value`: Output) {
        this.storageModeType = value
    }

    /**
     * @param value A mapping of tags to assign to the resource.
     */
    @JvmName("fgfyghusqdyofbms")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value Whether to enable the Classic experience for VMware replication. If set to `false` VMware machines will be protected using the new stateless ASR replication appliance. Changing this forces a new resource to be created.
     */
    @JvmName("dydufoqqnxsrowhx")
    public suspend fun classicVmwareReplicationEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.classicVmwareReplicationEnabled = mapped
    }

    /**
     * @param value Is cross region restore enabled for this Vault? Only can be `true`, when `storage_mode_type` is `GeoRedundant`. Defaults to `false`.
     * > **Note:** Once `cross_region_restore_enabled` is set to `true`, changing it back to `false` forces a new Recovery Service Vault to be created.
     */
    @JvmName("mpyxqblmabwtqldx")
    public suspend fun crossRegionRestoreEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.crossRegionRestoreEnabled = mapped
    }

    /**
     * @param value An `encryption` block as defined below. Required with `identity`.
     * !> **Note:** Once Encryption with your own key has been Enabled it's not possible to Disable it.
     */
    @JvmName("iomtpfuhglsxwarq")
    public suspend fun encryption(`value`: VaultEncryptionArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.encryption = mapped
    }

    /**
     * @param argument An `encryption` block as defined below. Required with `identity`.
     * !> **Note:** Once Encryption with your own key has been Enabled it's not possible to Disable it.
     */
    @JvmName("rtfrqwnupgwiksdh")
    public suspend fun encryption(argument: suspend VaultEncryptionArgsBuilder.() -> Unit) {
        val toBeMapped = VaultEncryptionArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.encryption = mapped
    }

    /**
     * @param value An `identity` block as defined below.
     */
    @JvmName("umeiijumxbqxccmk")
    public suspend fun identity(`value`: VaultIdentityArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.identity = mapped
    }

    /**
     * @param argument An `identity` block as defined below.
     */
    @JvmName("lchedlqdgaxijodl")
    public suspend fun identity(argument: suspend VaultIdentityArgsBuilder.() -> Unit) {
        val toBeMapped = VaultIdentityArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.identity = mapped
    }

    /**
     * @param value Immutability Settings of vault, possible values include: `Locked`, `Unlocked` and `Disabled`.
     * > **Note:** Once `immutability` is set to `Locked`, changing it to other values forces a new Recovery Services Vault to be created.
     */
    @JvmName("dvubrgtnkvhlkkko")
    public suspend fun immutability(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.immutability = mapped
    }

    /**
     * @param value Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
     */
    @JvmName("qxjucmmdgcfuxlxk")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value A `monitoring` block as defined below.
     */
    @JvmName("bmltgqstjyvctmnv")
    public suspend fun monitoring(`value`: VaultMonitoringArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.monitoring = mapped
    }

    /**
     * @param argument A `monitoring` block as defined below.
     */
    @JvmName("tlecqqlnsekkmdsn")
    public suspend fun monitoring(argument: suspend VaultMonitoringArgsBuilder.() -> Unit) {
        val toBeMapped = VaultMonitoringArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.monitoring = mapped
    }

    /**
     * @param value Specifies the name of the Recovery Services Vault. Recovery Service Vault name must be 2 - 50 characters long, start with a letter, contain only letters, numbers and hyphens. Changing this forces a new resource to be created.
     */
    @JvmName("nyriunsnrutrwlhf")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Is it enabled to access the vault from public networks. Defaults to `true`.
     */
    @JvmName("sammqvqenherajnr")
    public suspend fun publicNetworkAccessEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.publicNetworkAccessEnabled = mapped
    }

    /**
     * @param value The name of the resource group in which to create the Recovery Services Vault. Changing this forces a new resource to be created.
     */
    @JvmName("bhruusijrvulttxs")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value Sets the vault's SKU. Possible values include: `Standard`, `RS0`.
     */
    @JvmName("fmmycqpkyytiudbs")
    public suspend fun sku(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sku = mapped
    }

    /**
     * @param value Is soft delete enable for this Vault? Defaults to `true`.
     */
    @JvmName("tmikjsobhfakeuqc")
    public suspend fun softDeleteEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.softDeleteEnabled = mapped
    }

    /**
     * @param value The storage type of the Recovery Services Vault. Possible values are `GeoRedundant`, `LocallyRedundant` and `ZoneRedundant`. Defaults to `GeoRedundant`.
     */
    @JvmName("gsrnacovglorqivq")
    public suspend fun storageModeType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.storageModeType = mapped
    }

    /**
     * @param value A mapping of tags to assign to the resource.
     */
    @JvmName("xengywfrdhkywjxp")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values A mapping of tags to assign to the resource.
     */
    @JvmName("utsuetvnntdvjlys")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): VaultArgs = VaultArgs(
        classicVmwareReplicationEnabled = classicVmwareReplicationEnabled,
        crossRegionRestoreEnabled = crossRegionRestoreEnabled,
        encryption = encryption,
        identity = identity,
        immutability = immutability,
        location = location,
        monitoring = monitoring,
        name = name,
        publicNetworkAccessEnabled = publicNetworkAccessEnabled,
        resourceGroupName = resourceGroupName,
        sku = sku,
        softDeleteEnabled = softDeleteEnabled,
        storageModeType = storageModeType,
        tags = tags,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy