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

com.pulumi.azurenative.recoveryservices.ReplicationRecoveryPlan Maven / Gradle / Ivy

There is a newer version: 2.82.0
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.azurenative.recoveryservices;

import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.recoveryservices.ReplicationRecoveryPlanArgs;
import com.pulumi.azurenative.recoveryservices.outputs.RecoveryPlanPropertiesResponse;
import com.pulumi.core.Alias;
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 java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Recovery plan details.
 * Azure REST API version: 2023-04-01. Prior API version in Azure Native 1.x: 2018-07-10.
 * 
 * Other available API versions: 2023-06-01, 2023-08-01, 2024-01-01, 2024-02-01, 2024-04-01.
 * 
 * ## Example Usage
 * ### Creates a recovery plan with the given details.
 * 
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.recoveryservices.ReplicationRecoveryPlan;
 * import com.pulumi.azurenative.recoveryservices.ReplicationRecoveryPlanArgs;
 * import com.pulumi.azurenative.recoveryservices.inputs.CreateRecoveryPlanInputPropertiesArgs;
 * 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 replicationRecoveryPlan = new ReplicationRecoveryPlan("replicationRecoveryPlan", ReplicationRecoveryPlanArgs.builder()
 *             .properties(CreateRecoveryPlanInputPropertiesArgs.builder()
 *                 .failoverDeploymentModel("ResourceManager")
 *                 .groups(RecoveryPlanGroupArgs.builder()
 *                     .endGroupActions()
 *                     .groupType("Boot")
 *                     .replicationProtectedItems(RecoveryPlanProtectedItemArgs.builder()
 *                         .id("/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/resourceGroupPS1/providers/Microsoft.RecoveryServices/vaults/vault1/replicationFabrics/cloud1/replicationProtectionContainers/cloud_6d224fc6-f326-5d35-96de-fbf51efb3179/replicationProtectedItems/f8491e4f-817a-40dd-a90c-af773978c75b")
 *                         .virtualMachineId("f8491e4f-817a-40dd-a90c-af773978c75b")
 *                         .build())
 *                     .startGroupActions()
 *                     .build())
 *                 .primaryFabricId("/Subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/resourceGroupPS1/providers/Microsoft.RecoveryServices/vaults/vault1/replicationFabrics/cloud1")
 *                 .recoveryFabricId("Microsoft Azure")
 *                 .build())
 *             .recoveryPlanName("RPtest1")
 *             .resourceGroupName("resourceGroupPS1")
 *             .resourceName("vault1")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* * ## Import * * An existing resource can be imported using its type token, name, and identifier, e.g. * * ```sh * $ pulumi import azure-native:recoveryservices:ReplicationRecoveryPlan RPtest1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName} * ``` * */ @ResourceType(type="azure-native:recoveryservices:ReplicationRecoveryPlan") public class ReplicationRecoveryPlan extends com.pulumi.resources.CustomResource { /** * Resource Location * */ @Export(name="location", refs={String.class}, tree="[0]") private Output location; /** * @return Resource Location * */ public Output> location() { return Codegen.optional(this.location); } /** * Resource Name * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return Resource Name * */ public Output name() { return this.name; } /** * The custom details. * */ @Export(name="properties", refs={RecoveryPlanPropertiesResponse.class}, tree="[0]") private Output properties; /** * @return The custom details. * */ public Output properties() { return this.properties; } /** * Resource Type * */ @Export(name="type", refs={String.class}, tree="[0]") private Output type; /** * @return Resource Type * */ public Output type() { return this.type; } /** * * @param name The _unique_ name of the resulting resource. */ public ReplicationRecoveryPlan(java.lang.String name) { this(name, ReplicationRecoveryPlanArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public ReplicationRecoveryPlan(java.lang.String name, ReplicationRecoveryPlanArgs 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 ReplicationRecoveryPlan(java.lang.String name, ReplicationRecoveryPlanArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:recoveryservices:ReplicationRecoveryPlan", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private ReplicationRecoveryPlan(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:recoveryservices:ReplicationRecoveryPlan", name, null, makeResourceOptions(options, id), false); } private static ReplicationRecoveryPlanArgs makeArgs(ReplicationRecoveryPlanArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? ReplicationRecoveryPlanArgs.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()) .aliases(List.of( Output.of(Alias.builder().type("azure-native:recoveryservices/v20160810:ReplicationRecoveryPlan").build()), Output.of(Alias.builder().type("azure-native:recoveryservices/v20180110:ReplicationRecoveryPlan").build()), Output.of(Alias.builder().type("azure-native:recoveryservices/v20180710:ReplicationRecoveryPlan").build()), Output.of(Alias.builder().type("azure-native:recoveryservices/v20210210:ReplicationRecoveryPlan").build()), Output.of(Alias.builder().type("azure-native:recoveryservices/v20210301:ReplicationRecoveryPlan").build()), Output.of(Alias.builder().type("azure-native:recoveryservices/v20210401:ReplicationRecoveryPlan").build()), Output.of(Alias.builder().type("azure-native:recoveryservices/v20210601:ReplicationRecoveryPlan").build()), Output.of(Alias.builder().type("azure-native:recoveryservices/v20210701:ReplicationRecoveryPlan").build()), Output.of(Alias.builder().type("azure-native:recoveryservices/v20210801:ReplicationRecoveryPlan").build()), Output.of(Alias.builder().type("azure-native:recoveryservices/v20211001:ReplicationRecoveryPlan").build()), Output.of(Alias.builder().type("azure-native:recoveryservices/v20211101:ReplicationRecoveryPlan").build()), Output.of(Alias.builder().type("azure-native:recoveryservices/v20211201:ReplicationRecoveryPlan").build()), Output.of(Alias.builder().type("azure-native:recoveryservices/v20220101:ReplicationRecoveryPlan").build()), Output.of(Alias.builder().type("azure-native:recoveryservices/v20220201:ReplicationRecoveryPlan").build()), Output.of(Alias.builder().type("azure-native:recoveryservices/v20220301:ReplicationRecoveryPlan").build()), Output.of(Alias.builder().type("azure-native:recoveryservices/v20220401:ReplicationRecoveryPlan").build()), Output.of(Alias.builder().type("azure-native:recoveryservices/v20220501:ReplicationRecoveryPlan").build()), Output.of(Alias.builder().type("azure-native:recoveryservices/v20220801:ReplicationRecoveryPlan").build()), Output.of(Alias.builder().type("azure-native:recoveryservices/v20220910:ReplicationRecoveryPlan").build()), Output.of(Alias.builder().type("azure-native:recoveryservices/v20221001:ReplicationRecoveryPlan").build()), Output.of(Alias.builder().type("azure-native:recoveryservices/v20230101:ReplicationRecoveryPlan").build()), Output.of(Alias.builder().type("azure-native:recoveryservices/v20230201:ReplicationRecoveryPlan").build()), Output.of(Alias.builder().type("azure-native:recoveryservices/v20230401:ReplicationRecoveryPlan").build()), Output.of(Alias.builder().type("azure-native:recoveryservices/v20230601:ReplicationRecoveryPlan").build()), Output.of(Alias.builder().type("azure-native:recoveryservices/v20230801:ReplicationRecoveryPlan").build()), Output.of(Alias.builder().type("azure-native:recoveryservices/v20240101:ReplicationRecoveryPlan").build()), Output.of(Alias.builder().type("azure-native:recoveryservices/v20240201:ReplicationRecoveryPlan").build()), Output.of(Alias.builder().type("azure-native:recoveryservices/v20240401:ReplicationRecoveryPlan").build()) )) .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 options Optional settings to control the behavior of the CustomResource. */ public static ReplicationRecoveryPlan get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new ReplicationRecoveryPlan(name, id, options); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy