ProtectionContainerMappingArgs

data class ProtectionContainerMappingArgs(val automaticUpdate: Output<ProtectionContainerMappingAutomaticUpdateArgs>? = null, val name: Output<String>? = null, val recoveryFabricName: Output<String>? = null, val recoveryReplicationPolicyId: Output<String>? = null, val recoverySourceProtectionContainerName: Output<String>? = null, val recoveryTargetProtectionContainerId: Output<String>? = null, val recoveryVaultName: Output<String>? = null, val resourceGroupName: Output<String>? = null) : ConvertibleToJava<ProtectionContainerMappingArgs>

Manages a Azure recovery vault protection container mapping. A protection container mapping decides how to translate the protection container when a VM is migrated from one region to another.

Example Usage

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.Fabric;
import com.pulumi.azure.siterecovery.FabricArgs;
import com.pulumi.azure.siterecovery.ProtectionContainer;
import com.pulumi.azure.siterecovery.ProtectionContainerArgs;
import com.pulumi.azure.siterecovery.ReplicationPolicy;
import com.pulumi.azure.siterecovery.ReplicationPolicyArgs;
import com.pulumi.azure.siterecovery.ProtectionContainerMapping;
import com.pulumi.azure.siterecovery.ProtectionContainerMappingArgs;
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 primaryResourceGroup = new ResourceGroup("primaryResourceGroup", ResourceGroupArgs.builder()
.location("West US")
.build());
var secondaryResourceGroup = new ResourceGroup("secondaryResourceGroup", ResourceGroupArgs.builder()
.location("East US")
.build());
var vault = new Vault("vault", VaultArgs.builder()
.location(secondaryResourceGroup.location())
.resourceGroupName(secondaryResourceGroup.name())
.sku("Standard")
.build());
var primaryFabric = new Fabric("primaryFabric", FabricArgs.builder()
.resourceGroupName(secondaryResourceGroup.name())
.recoveryVaultName(vault.name())
.location(primaryResourceGroup.location())
.build());
var secondaryFabric = new Fabric("secondaryFabric", FabricArgs.builder()
.resourceGroupName(secondaryResourceGroup.name())
.recoveryVaultName(vault.name())
.location(secondaryResourceGroup.location())
.build());
var primaryProtectionContainer = new ProtectionContainer("primaryProtectionContainer", ProtectionContainerArgs.builder()
.resourceGroupName(secondaryResourceGroup.name())
.recoveryVaultName(vault.name())
.recoveryFabricName(primaryFabric.name())
.build());
var secondaryProtectionContainer = new ProtectionContainer("secondaryProtectionContainer", ProtectionContainerArgs.builder()
.resourceGroupName(secondaryResourceGroup.name())
.recoveryVaultName(vault.name())
.recoveryFabricName(secondaryFabric.name())
.build());
var policy = new ReplicationPolicy("policy", ReplicationPolicyArgs.builder()
.resourceGroupName(secondaryResourceGroup.name())
.recoveryVaultName(vault.name())
.recoveryPointRetentionInMinutes(24 * 60)
.applicationConsistentSnapshotFrequencyInMinutes(4 * 60)
.build());
var container_mapping = new ProtectionContainerMapping("container-mapping", ProtectionContainerMappingArgs.builder()
.resourceGroupName(secondaryResourceGroup.name())
.recoveryVaultName(vault.name())
.recoveryFabricName(primaryFabric.name())
.recoverySourceProtectionContainerName(primaryProtectionContainer.name())
.recoveryTargetProtectionContainerId(secondaryProtectionContainer.id())
.recoveryReplicationPolicyId(policy.id())
.build());
}
}

Import

Site Recovery Protection Container Mappings can be imported using the resource id, e.g.

$ pulumi import azure:siterecovery/protectionContainerMapping:ProtectionContainerMapping mymapping /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resource-group-name/providers/Microsoft.RecoveryServices/vaults/recovery-vault-name/replicationFabrics/fabric1/replicationProtectionContainers/container1/replicationProtectionContainerMappings/mapping1

Constructors

Link copied to clipboard
fun ProtectionContainerMappingArgs(automaticUpdate: Output<ProtectionContainerMappingAutomaticUpdateArgs>? = null, name: Output<String>? = null, recoveryFabricName: Output<String>? = null, recoveryReplicationPolicyId: Output<String>? = null, recoverySourceProtectionContainerName: Output<String>? = null, recoveryTargetProtectionContainerId: Output<String>? = null, recoveryVaultName: Output<String>? = null, resourceGroupName: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): ProtectionContainerMappingArgs

Properties

Link copied to clipboard

a automatic_update block defined as below.

Link copied to clipboard
val name: Output<String>? = null

The name of the protection container mapping. Changing this forces a new resource to be created.

Link copied to clipboard
val recoveryFabricName: Output<String>? = null

Name of fabric that should contains the protection container to map. Changing this forces a new resource to be created.

Link copied to clipboard
val recoveryReplicationPolicyId: Output<String>? = null

Id of the policy to use for this mapping. Changing this forces a new resource to be created.

Link copied to clipboard

Name of the source protection container to map. Changing this forces a new resource to be created.

Link copied to clipboard

Id of target protection container to map to. Changing this forces a new resource to be created.

Link copied to clipboard
val recoveryVaultName: Output<String>? = null

The name of the vault that should be updated. Changing this forces a new resource to be created.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

Name of the resource group where the vault that should be updated is located. Changing this forces a new resource to be created.