Show / Hide Table of Contents

Class ProtectionContainerMapping

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

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
public MyStack()
{
    var primaryResourceGroup = new Azure.Core.ResourceGroup("primaryResourceGroup", new Azure.Core.ResourceGroupArgs
    {
        Location = "West US",
    });
    var secondaryResourceGroup = new Azure.Core.ResourceGroup("secondaryResourceGroup", new Azure.Core.ResourceGroupArgs
    {
        Location = "East US",
    });
    var vault = new Azure.RecoveryServices.Vault("vault", new Azure.RecoveryServices.VaultArgs
    {
        Location = secondaryResourceGroup.Location,
        ResourceGroupName = secondaryResourceGroup.Name,
        Sku = "Standard",
    });
    var primaryFabric = new Azure.SiteRecovery.Fabric("primaryFabric", new Azure.SiteRecovery.FabricArgs
    {
        ResourceGroupName = secondaryResourceGroup.Name,
        RecoveryVaultName = vault.Name,
        Location = primaryResourceGroup.Location,
    });
    var secondaryFabric = new Azure.SiteRecovery.Fabric("secondaryFabric", new Azure.SiteRecovery.FabricArgs
    {
        ResourceGroupName = secondaryResourceGroup.Name,
        RecoveryVaultName = vault.Name,
        Location = secondaryResourceGroup.Location,
    });
    var primaryProtectionContainer = new Azure.SiteRecovery.ProtectionContainer("primaryProtectionContainer", new Azure.SiteRecovery.ProtectionContainerArgs
    {
        ResourceGroupName = secondaryResourceGroup.Name,
        RecoveryVaultName = vault.Name,
        RecoveryFabricName = primaryFabric.Name,
    });
    var secondaryProtectionContainer = new Azure.SiteRecovery.ProtectionContainer("secondaryProtectionContainer", new Azure.SiteRecovery.ProtectionContainerArgs
    {
        ResourceGroupName = secondaryResourceGroup.Name,
        RecoveryVaultName = vault.Name,
        RecoveryFabricName = secondaryFabric.Name,
    });
    var policy = new Azure.SiteRecovery.ReplicationPolicy("policy", new Azure.SiteRecovery.ReplicationPolicyArgs
    {
        ResourceGroupName = secondaryResourceGroup.Name,
        RecoveryVaultName = vault.Name,
        RecoveryPointRetentionInMinutes = 24 * 60,
        ApplicationConsistentSnapshotFrequencyInMinutes = 4 * 60,
    });
    var container_mapping = new Azure.SiteRecovery.ProtectionContainerMapping("container-mapping", new Azure.SiteRecovery.ProtectionContainerMappingArgs
    {
        ResourceGroupName = secondaryResourceGroup.Name,
        RecoveryVaultName = vault.Name,
        RecoveryFabricName = primaryFabric.Name,
        RecoverySourceProtectionContainerName = primaryProtectionContainer.Name,
        RecoveryTargetProtectionContainerId = secondaryProtectionContainer.Id,
        RecoveryReplicationPolicyId = policy.Id,
    });
}

}
Inheritance
System.Object
Resource
CustomResource
ProtectionContainerMapping
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Azure.SiteRecovery
Assembly: Pulumi.Azure.dll
Syntax
public class ProtectionContainerMapping : CustomResource

Constructors

View Source

ProtectionContainerMapping(String, ProtectionContainerMappingArgs, CustomResourceOptions)

Create a ProtectionContainerMapping resource with the given unique name, arguments, and options.

Declaration
public ProtectionContainerMapping(string name, ProtectionContainerMappingArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

ProtectionContainerMappingArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

Name

The name of the network mapping.

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

RecoveryFabricName

Name of fabric that should contains the protection container to map.

Declaration
public Output<string> RecoveryFabricName { get; }
Property Value
Type Description
Output<System.String>
View Source

RecoveryReplicationPolicyId

Id of the policy to use for this mapping.

Declaration
public Output<string> RecoveryReplicationPolicyId { get; }
Property Value
Type Description
Output<System.String>
View Source

RecoverySourceProtectionContainerName

Name of the source protection container to map.

Declaration
public Output<string> RecoverySourceProtectionContainerName { get; }
Property Value
Type Description
Output<System.String>
View Source

RecoveryTargetProtectionContainerId

Id of target protection container to map to.

Declaration
public Output<string> RecoveryTargetProtectionContainerId { get; }
Property Value
Type Description
Output<System.String>
View Source

RecoveryVaultName

The name of the vault that should be updated.

Declaration
public Output<string> RecoveryVaultName { get; }
Property Value
Type Description
Output<System.String>
View Source

ResourceGroupName

Name of the resource group where the vault that should be updated is located.

Declaration
public Output<string> ResourceGroupName { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, ProtectionContainerMappingState, CustomResourceOptions)

Get an existing ProtectionContainerMapping resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static ProtectionContainerMapping Get(string name, Input<string> id, ProtectionContainerMappingState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

ProtectionContainerMappingState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
ProtectionContainerMapping
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.