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

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

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.recoveryservices.kotlin

import com.pulumi.azure.recoveryservices.VaultResourceGuardAssociationArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Deprecated
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * Manages an association of a Resource Guard and 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: "example-resources",
 *     location: "West Europe",
 * });
 * const exampleResourceGuard = new azure.dataprotection.ResourceGuard("example", {
 *     name: "example-resourceguard",
 *     resourceGroupName: example.name,
 *     location: example.location,
 * });
 * const vault = new azure.recoveryservices.Vault("vault", {
 *     name: "example-recovery-vault",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     sku: "Standard",
 *     softDeleteEnabled: true,
 * });
 * const test = new azure.recoveryservices.VaultResourceGuardAssociation("test", {
 *     name: "VaultProxy",
 *     vaultId: testAzurermRecoveryServicesVault.id,
 *     resourceGuardId: testAzurermDataProtectionResourceGuard.id,
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="example-resources",
 *     location="West Europe")
 * example_resource_guard = azure.dataprotection.ResourceGuard("example",
 *     name="example-resourceguard",
 *     resource_group_name=example.name,
 *     location=example.location)
 * vault = azure.recoveryservices.Vault("vault",
 *     name="example-recovery-vault",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     sku="Standard",
 *     soft_delete_enabled=True)
 * test = azure.recoveryservices.VaultResourceGuardAssociation("test",
 *     name="VaultProxy",
 *     vault_id=test_azurerm_recovery_services_vault["id"],
 *     resource_guard_id=test_azurerm_data_protection_resource_guard["id"])
 * ```
 * ```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 = "example-resources",
 *         Location = "West Europe",
 *     });
 *     var exampleResourceGuard = new Azure.DataProtection.ResourceGuard("example", new()
 *     {
 *         Name = "example-resourceguard",
 *         ResourceGroupName = example.Name,
 *         Location = example.Location,
 *     });
 *     var vault = new Azure.RecoveryServices.Vault("vault", new()
 *     {
 *         Name = "example-recovery-vault",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         Sku = "Standard",
 *         SoftDeleteEnabled = true,
 *     });
 *     var test = new Azure.RecoveryServices.VaultResourceGuardAssociation("test", new()
 *     {
 *         Name = "VaultProxy",
 *         VaultId = testAzurermRecoveryServicesVault.Id,
 *         ResourceGuardId = testAzurermDataProtectionResourceGuard.Id,
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/dataprotection"
 * 	"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("example-resources"),
 * 			Location: pulumi.String("West Europe"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = dataprotection.NewResourceGuard(ctx, "example", &dataprotection.ResourceGuardArgs{
 * 			Name:              pulumi.String("example-resourceguard"),
 * 			ResourceGroupName: example.Name,
 * 			Location:          example.Location,
 * 		})
 * 		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
 * 		}
 * 		_, err = recoveryservices.NewVaultResourceGuardAssociation(ctx, "test", &recoveryservices.VaultResourceGuardAssociationArgs{
 * 			Name:            pulumi.String("VaultProxy"),
 * 			VaultId:         pulumi.Any(testAzurermRecoveryServicesVault.Id),
 * 			ResourceGuardId: pulumi.Any(testAzurermDataProtectionResourceGuard.Id),
 * 		})
 * 		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.dataprotection.ResourceGuard;
 * import com.pulumi.azure.dataprotection.ResourceGuardArgs;
 * import com.pulumi.azure.recoveryservices.Vault;
 * import com.pulumi.azure.recoveryservices.VaultArgs;
 * import com.pulumi.azure.recoveryservices.VaultResourceGuardAssociation;
 * import com.pulumi.azure.recoveryservices.VaultResourceGuardAssociationArgs;
 * 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("example-resources")
 *             .location("West Europe")
 *             .build());
 *         var exampleResourceGuard = new ResourceGuard("exampleResourceGuard", ResourceGuardArgs.builder()
 *             .name("example-resourceguard")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .build());
 *         var vault = new Vault("vault", VaultArgs.builder()
 *             .name("example-recovery-vault")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .sku("Standard")
 *             .softDeleteEnabled(true)
 *             .build());
 *         var test = new VaultResourceGuardAssociation("test", VaultResourceGuardAssociationArgs.builder()
 *             .name("VaultProxy")
 *             .vaultId(testAzurermRecoveryServicesVault.id())
 *             .resourceGuardId(testAzurermDataProtectionResourceGuard.id())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example-resources
 *       location: West Europe
 *   exampleResourceGuard:
 *     type: azure:dataprotection:ResourceGuard
 *     name: example
 *     properties:
 *       name: example-resourceguard
 *       resourceGroupName: ${example.name}
 *       location: ${example.location}
 *   vault:
 *     type: azure:recoveryservices:Vault
 *     properties:
 *       name: example-recovery-vault
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       sku: Standard
 *       softDeleteEnabled: true
 *   test:
 *     type: azure:recoveryservices:VaultResourceGuardAssociation
 *     properties:
 *       name: VaultProxy
 *       vaultId: ${testAzurermRecoveryServicesVault.id}
 *       resourceGuardId: ${testAzurermDataProtectionResourceGuard.id}
 * ```
 * 
 * ## Import
 * Resource Guards can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:recoveryservices/vaultResourceGuardAssociation:VaultResourceGuardAssociation example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.RecoveryServices/vaults/vault1/backupResourceGuardProxies/proxy1
 * ```
 * @property name Specifies the name of the Recovery Services Vault Resource Guard Association. Changing this forces a new resource to be created. Defaults to `VaultProxy`.
 * > **NOTE:** `name` has been deprecated and will be removed in version 4.0 of the provider.
 * @property resourceGuardId ID of the Resource Guard which should be associated with. Changing this forces a new resource to be created.
 * @property vaultId ID of the Recovery Services Vault which should be associated with. Changing this forces a new resource to be created.
 */
public data class VaultResourceGuardAssociationArgs(
    @Deprecated(
        message = """
  The `name` field will be removed in v4.0 of the AzureRM Provider.
  """,
    )
    public val name: Output? = null,
    public val resourceGuardId: Output? = null,
    public val vaultId: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.recoveryservices.VaultResourceGuardAssociationArgs =
        com.pulumi.azure.recoveryservices.VaultResourceGuardAssociationArgs.builder()
            .name(name?.applyValue({ args0 -> args0 }))
            .resourceGuardId(resourceGuardId?.applyValue({ args0 -> args0 }))
            .vaultId(vaultId?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [VaultResourceGuardAssociationArgs].
 */
@PulumiTagMarker
public class VaultResourceGuardAssociationArgsBuilder internal constructor() {
    private var name: Output? = null

    private var resourceGuardId: Output? = null

    private var vaultId: Output? = null

    /**
     * @param value Specifies the name of the Recovery Services Vault Resource Guard Association. Changing this forces a new resource to be created. Defaults to `VaultProxy`.
     * > **NOTE:** `name` has been deprecated and will be removed in version 4.0 of the provider.
     */
    @Deprecated(
        message = """
  The `name` field will be removed in v4.0 of the AzureRM Provider.
  """,
    )
    @JvmName("elnqkldsbweaygsh")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value ID of the Resource Guard which should be associated with. Changing this forces a new resource to be created.
     */
    @JvmName("jdqbddmqxrmriifv")
    public suspend fun resourceGuardId(`value`: Output) {
        this.resourceGuardId = value
    }

    /**
     * @param value ID of the Recovery Services Vault which should be associated with. Changing this forces a new resource to be created.
     */
    @JvmName("exxnkjvcuosjfmhj")
    public suspend fun vaultId(`value`: Output) {
        this.vaultId = value
    }

    /**
     * @param value Specifies the name of the Recovery Services Vault Resource Guard Association. Changing this forces a new resource to be created. Defaults to `VaultProxy`.
     * > **NOTE:** `name` has been deprecated and will be removed in version 4.0 of the provider.
     */
    @Deprecated(
        message = """
  The `name` field will be removed in v4.0 of the AzureRM Provider.
  """,
    )
    @JvmName("tknydjxeuliugwva")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value ID of the Resource Guard which should be associated with. Changing this forces a new resource to be created.
     */
    @JvmName("duwaekfxiiwikdyk")
    public suspend fun resourceGuardId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGuardId = mapped
    }

    /**
     * @param value ID of the Recovery Services Vault which should be associated with. Changing this forces a new resource to be created.
     */
    @JvmName("owvylupspttsrufm")
    public suspend fun vaultId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.vaultId = mapped
    }

    internal fun build(): VaultResourceGuardAssociationArgs = VaultResourceGuardAssociationArgs(
        name = name,
        resourceGuardId = resourceGuardId,
        vaultId = vaultId,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy