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

com.pulumi.azure.siterecovery.kotlin.VmwareReplicationPolicyAssociationArgs.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.15.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.siterecovery.kotlin

import com.pulumi.azure.siterecovery.VmwareReplicationPolicyAssociationArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * Manages an Azure Site Recovery replication policy for VMWare within a Recovery 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-rg",
 *     location: "East US",
 * });
 * const exampleVault = new azure.recoveryservices.Vault("example", {
 *     name: "example-recovery-vault",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     sku: "Standard",
 * });
 * const exampleVMWareReplicationPolicy = new azure.siterecovery.VMWareReplicationPolicy("example", {
 *     name: "example-policy",
 *     recoveryVaultId: exampleVault.id,
 *     recoveryPointRetentionInMinutes: 1440,
 *     applicationConsistentSnapshotFrequencyInMinutes: 240,
 * });
 * const exampleVmwareReplicationPolicyAssociation = new azure.siterecovery.VmwareReplicationPolicyAssociation("example", {
 *     name: "example-association",
 *     recoveryVaultId: exampleVault.id,
 *     policyId: exampleVMWareReplicationPolicy.id,
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="example-rg",
 *     location="East US")
 * example_vault = azure.recoveryservices.Vault("example",
 *     name="example-recovery-vault",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     sku="Standard")
 * example_vm_ware_replication_policy = azure.siterecovery.VMWareReplicationPolicy("example",
 *     name="example-policy",
 *     recovery_vault_id=example_vault.id,
 *     recovery_point_retention_in_minutes=1440,
 *     application_consistent_snapshot_frequency_in_minutes=240)
 * example_vmware_replication_policy_association = azure.siterecovery.VmwareReplicationPolicyAssociation("example",
 *     name="example-association",
 *     recovery_vault_id=example_vault.id,
 *     policy_id=example_vm_ware_replication_policy.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-rg",
 *         Location = "East US",
 *     });
 *     var exampleVault = new Azure.RecoveryServices.Vault("example", new()
 *     {
 *         Name = "example-recovery-vault",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         Sku = "Standard",
 *     });
 *     var exampleVMWareReplicationPolicy = new Azure.SiteRecovery.VMWareReplicationPolicy("example", new()
 *     {
 *         Name = "example-policy",
 *         RecoveryVaultId = exampleVault.Id,
 *         RecoveryPointRetentionInMinutes = 1440,
 *         ApplicationConsistentSnapshotFrequencyInMinutes = 240,
 *     });
 *     var exampleVmwareReplicationPolicyAssociation = new Azure.SiteRecovery.VmwareReplicationPolicyAssociation("example", new()
 *     {
 *         Name = "example-association",
 *         RecoveryVaultId = exampleVault.Id,
 *         PolicyId = exampleVMWareReplicationPolicy.Id,
 *     });
 * });
 * ```
 * ```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-azure/sdk/v5/go/azure/siterecovery"
 * 	"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-rg"),
 * 			Location: pulumi.String("East US"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleVault, err := recoveryservices.NewVault(ctx, "example", &recoveryservices.VaultArgs{
 * 			Name:              pulumi.String("example-recovery-vault"),
 * 			Location:          example.Location,
 * 			ResourceGroupName: example.Name,
 * 			Sku:               pulumi.String("Standard"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleVMWareReplicationPolicy, err := siterecovery.NewVMWareReplicationPolicy(ctx, "example", &siterecovery.VMWareReplicationPolicyArgs{
 * 			Name:                            pulumi.String("example-policy"),
 * 			RecoveryVaultId:                 exampleVault.ID(),
 * 			RecoveryPointRetentionInMinutes: pulumi.Int(1440),
 * 			ApplicationConsistentSnapshotFrequencyInMinutes: pulumi.Int(240),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = siterecovery.NewVmwareReplicationPolicyAssociation(ctx, "example", &siterecovery.VmwareReplicationPolicyAssociationArgs{
 * 			Name:            pulumi.String("example-association"),
 * 			RecoveryVaultId: exampleVault.ID(),
 * 			PolicyId:        exampleVMWareReplicationPolicy.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.recoveryservices.Vault;
 * import com.pulumi.azure.recoveryservices.VaultArgs;
 * import com.pulumi.azure.siterecovery.VMWareReplicationPolicy;
 * import com.pulumi.azure.siterecovery.VMWareReplicationPolicyArgs;
 * import com.pulumi.azure.siterecovery.VmwareReplicationPolicyAssociation;
 * import com.pulumi.azure.siterecovery.VmwareReplicationPolicyAssociationArgs;
 * 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-rg")
 *             .location("East US")
 *             .build());
 *         var exampleVault = new Vault("exampleVault", VaultArgs.builder()
 *             .name("example-recovery-vault")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .sku("Standard")
 *             .build());
 *         var exampleVMWareReplicationPolicy = new VMWareReplicationPolicy("exampleVMWareReplicationPolicy", VMWareReplicationPolicyArgs.builder()
 *             .name("example-policy")
 *             .recoveryVaultId(exampleVault.id())
 *             .recoveryPointRetentionInMinutes(1440)
 *             .applicationConsistentSnapshotFrequencyInMinutes(240)
 *             .build());
 *         var exampleVmwareReplicationPolicyAssociation = new VmwareReplicationPolicyAssociation("exampleVmwareReplicationPolicyAssociation", VmwareReplicationPolicyAssociationArgs.builder()
 *             .name("example-association")
 *             .recoveryVaultId(exampleVault.id())
 *             .policyId(exampleVMWareReplicationPolicy.id())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example-rg
 *       location: East US
 *   exampleVault:
 *     type: azure:recoveryservices:Vault
 *     name: example
 *     properties:
 *       name: example-recovery-vault
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       sku: Standard
 *   exampleVMWareReplicationPolicy:
 *     type: azure:siterecovery:VMWareReplicationPolicy
 *     name: example
 *     properties:
 *       name: example-policy
 *       recoveryVaultId: ${exampleVault.id}
 *       recoveryPointRetentionInMinutes: 1440
 *       applicationConsistentSnapshotFrequencyInMinutes: 240
 *   exampleVmwareReplicationPolicyAssociation:
 *     type: azure:siterecovery:VmwareReplicationPolicyAssociation
 *     name: example
 *     properties:
 *       name: example-association
 *       recoveryVaultId: ${exampleVault.id}
 *       policyId: ${exampleVMWareReplicationPolicy.id}
 * ```
 * 
 * ## Import
 * Site Recovery Replication Policies can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:siterecovery/vmwareReplicationPolicyAssociation:VmwareReplicationPolicyAssociation mypolicy /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resource-group-name/providers/Microsoft.RecoveryServices/vaults/recovery-vault-name/replicationFabrics/site-name/replicationProtectionContainers/container-name/replicationProtectionContainerMappings/mapping-name
 * ```
 * @property name The name of the replication policy association. Changing this forces a new association to be created.
 * @property policyId The ID of the VMWare replication policy which to be associated. Changing this forces a new association to be created.
 * @property recoveryVaultId The ID of the Recovery Service Vault to which the policy should be associated.
 * Changing this forces a new association to be created.
 */
public data class VmwareReplicationPolicyAssociationArgs(
    public val name: Output? = null,
    public val policyId: Output? = null,
    public val recoveryVaultId: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.siterecovery.VmwareReplicationPolicyAssociationArgs =
        com.pulumi.azure.siterecovery.VmwareReplicationPolicyAssociationArgs.builder()
            .name(name?.applyValue({ args0 -> args0 }))
            .policyId(policyId?.applyValue({ args0 -> args0 }))
            .recoveryVaultId(recoveryVaultId?.applyValue({ args0 -> args0 })).build()
}

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

    private var policyId: Output? = null

    private var recoveryVaultId: Output? = null

    /**
     * @param value The name of the replication policy association. Changing this forces a new association to be created.
     */
    @JvmName("axbchgakkaplsher")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The ID of the VMWare replication policy which to be associated. Changing this forces a new association to be created.
     */
    @JvmName("lqawskxogelwjkwp")
    public suspend fun policyId(`value`: Output) {
        this.policyId = value
    }

    /**
     * @param value The ID of the Recovery Service Vault to which the policy should be associated.
     * Changing this forces a new association to be created.
     */
    @JvmName("kfghlqfkdldjvotx")
    public suspend fun recoveryVaultId(`value`: Output) {
        this.recoveryVaultId = value
    }

    /**
     * @param value The name of the replication policy association. Changing this forces a new association to be created.
     */
    @JvmName("vytgineaclxnirac")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The ID of the VMWare replication policy which to be associated. Changing this forces a new association to be created.
     */
    @JvmName("kjikayvobjdkejjw")
    public suspend fun policyId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.policyId = mapped
    }

    /**
     * @param value The ID of the Recovery Service Vault to which the policy should be associated.
     * Changing this forces a new association to be created.
     */
    @JvmName("nbyfoyevjwfigryu")
    public suspend fun recoveryVaultId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.recoveryVaultId = mapped
    }

    internal fun build(): VmwareReplicationPolicyAssociationArgs =
        VmwareReplicationPolicyAssociationArgs(
            name = name,
            policyId = policyId,
            recoveryVaultId = recoveryVaultId,
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy