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

com.pulumi.azure.siterecovery.ProtectionContainerMapping Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Microsoft Azure cloud resources, based on the Terraform azurerm provider. We recommend using the [Azure Native provider](https://github.com/pulumi/pulumi-azure-native) to provision Azure infrastructure. Azure Native provides complete coverage of Azure resources and same-day access to new resources and resource updates.

There is a newer version: 6.10.0-alpha.1731737215
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.azure.siterecovery;

import com.pulumi.azure.Utilities;
import com.pulumi.azure.siterecovery.ProtectionContainerMappingArgs;
import com.pulumi.azure.siterecovery.inputs.ProtectionContainerMappingState;
import com.pulumi.azure.siterecovery.outputs.ProtectionContainerMappingAutomaticUpdate;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.String;
import javax.annotation.Nullable;

/**
 * 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
 * 
 * <!--Start PulumiCodeChooser -->
 * 
 * {@code
 * 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 primary = new ResourceGroup("primary", ResourceGroupArgs.builder()
 *             .name("tfex-network-mapping-primary")
 *             .location("West US")
 *             .build());
 * 
 *         var secondary = new ResourceGroup("secondary", ResourceGroupArgs.builder()
 *             .name("tfex-network-mapping-secondary")
 *             .location("East US")
 *             .build());
 * 
 *         var vault = new Vault("vault", VaultArgs.builder()
 *             .name("example-recovery-vault")
 *             .location(secondary.location())
 *             .resourceGroupName(secondary.name())
 *             .sku("Standard")
 *             .build());
 * 
 *         var primaryFabric = new Fabric("primaryFabric", FabricArgs.builder()
 *             .name("primary-fabric")
 *             .resourceGroupName(secondary.name())
 *             .recoveryVaultName(vault.name())
 *             .location(primary.location())
 *             .build());
 * 
 *         var secondaryFabric = new Fabric("secondaryFabric", FabricArgs.builder()
 *             .name("secondary-fabric")
 *             .resourceGroupName(secondary.name())
 *             .recoveryVaultName(vault.name())
 *             .location(secondary.location())
 *             .build());
 * 
 *         var primaryProtectionContainer = new ProtectionContainer("primaryProtectionContainer", ProtectionContainerArgs.builder()
 *             .name("primary-protection-container")
 *             .resourceGroupName(secondary.name())
 *             .recoveryVaultName(vault.name())
 *             .recoveryFabricName(primaryFabric.name())
 *             .build());
 * 
 *         var secondaryProtectionContainer = new ProtectionContainer("secondaryProtectionContainer", ProtectionContainerArgs.builder()
 *             .name("secondary-protection-container")
 *             .resourceGroupName(secondary.name())
 *             .recoveryVaultName(vault.name())
 *             .recoveryFabricName(secondaryFabric.name())
 *             .build());
 * 
 *         var policy = new ReplicationPolicy("policy", ReplicationPolicyArgs.builder()
 *             .name("policy")
 *             .resourceGroupName(secondary.name())
 *             .recoveryVaultName(vault.name())
 *             .recoveryPointRetentionInMinutes(24 * 60)
 *             .applicationConsistentSnapshotFrequencyInMinutes(4 * 60)
 *             .build());
 * 
 *         var container_mapping = new ProtectionContainerMapping("container-mapping", ProtectionContainerMappingArgs.builder()
 *             .name("container-mapping")
 *             .resourceGroupName(secondary.name())
 *             .recoveryVaultName(vault.name())
 *             .recoveryFabricName(primaryFabric.name())
 *             .recoverySourceProtectionContainerName(primaryProtectionContainer.name())
 *             .recoveryTargetProtectionContainerId(secondaryProtectionContainer.id())
 *             .recoveryReplicationPolicyId(policy.id())
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * Site Recovery Protection Container Mappings can be imported using the `resource id`, e.g. * * ```sh * $ 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 * ``` * */ @ResourceType(type="azure:siterecovery/protectionContainerMapping:ProtectionContainerMapping") public class ProtectionContainerMapping extends com.pulumi.resources.CustomResource { /** * a `automatic_update` block defined as below. * */ @Export(name="automaticUpdate", refs={ProtectionContainerMappingAutomaticUpdate.class}, tree="[0]") private Output automaticUpdate; /** * @return a `automatic_update` block defined as below. * */ public Output automaticUpdate() { return this.automaticUpdate; } /** * The name of the protection container mapping. Changing this forces a new resource to be created. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return The name of the protection container mapping. Changing this forces a new resource to be created. * */ public Output name() { return this.name; } /** * Name of fabric that should contains the protection container to map. Changing this forces a new resource to be created. * */ @Export(name="recoveryFabricName", refs={String.class}, tree="[0]") private Output recoveryFabricName; /** * @return Name of fabric that should contains the protection container to map. Changing this forces a new resource to be created. * */ public Output recoveryFabricName() { return this.recoveryFabricName; } /** * Id of the policy to use for this mapping. Changing this forces a new resource to be created. * */ @Export(name="recoveryReplicationPolicyId", refs={String.class}, tree="[0]") private Output recoveryReplicationPolicyId; /** * @return Id of the policy to use for this mapping. Changing this forces a new resource to be created. * */ public Output recoveryReplicationPolicyId() { return this.recoveryReplicationPolicyId; } /** * Name of the source protection container to map. Changing this forces a new resource to be created. * */ @Export(name="recoverySourceProtectionContainerName", refs={String.class}, tree="[0]") private Output recoverySourceProtectionContainerName; /** * @return Name of the source protection container to map. Changing this forces a new resource to be created. * */ public Output recoverySourceProtectionContainerName() { return this.recoverySourceProtectionContainerName; } /** * Id of target protection container to map to. Changing this forces a new resource to be created. * */ @Export(name="recoveryTargetProtectionContainerId", refs={String.class}, tree="[0]") private Output recoveryTargetProtectionContainerId; /** * @return Id of target protection container to map to. Changing this forces a new resource to be created. * */ public Output recoveryTargetProtectionContainerId() { return this.recoveryTargetProtectionContainerId; } /** * The name of the vault that should be updated. Changing this forces a new resource to be created. * */ @Export(name="recoveryVaultName", refs={String.class}, tree="[0]") private Output recoveryVaultName; /** * @return The name of the vault that should be updated. Changing this forces a new resource to be created. * */ public Output recoveryVaultName() { return this.recoveryVaultName; } /** * Name of the resource group where the vault that should be updated is located. Changing this forces a new resource to be created. * */ @Export(name="resourceGroupName", refs={String.class}, tree="[0]") private Output resourceGroupName; /** * @return Name of the resource group where the vault that should be updated is located. Changing this forces a new resource to be created. * */ public Output resourceGroupName() { return this.resourceGroupName; } /** * * @param name The _unique_ name of the resulting resource. */ public ProtectionContainerMapping(java.lang.String name) { this(name, ProtectionContainerMappingArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public ProtectionContainerMapping(java.lang.String name, ProtectionContainerMappingArgs args) { this(name, args, null); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ public ProtectionContainerMapping(java.lang.String name, ProtectionContainerMappingArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:siterecovery/protectionContainerMapping:ProtectionContainerMapping", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private ProtectionContainerMapping(java.lang.String name, Output id, @Nullable ProtectionContainerMappingState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:siterecovery/protectionContainerMapping:ProtectionContainerMapping", name, state, makeResourceOptions(options, id), false); } private static ProtectionContainerMappingArgs makeArgs(ProtectionContainerMappingArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? ProtectionContainerMappingArgs.Empty : args; } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .build(); return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); } /** * Get an existing Host resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state * @param options Optional settings to control the behavior of the CustomResource. */ public static ProtectionContainerMapping get(java.lang.String name, Output id, @Nullable ProtectionContainerMappingState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new ProtectionContainerMapping(name, id, state, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy