java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, ITaggableV2, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.113.0 (build fc68b25)", date="2025-08-12T14:44:10.537Z") @Stability(Stable) public class CfnPlan extends CfnResource implements IInspectable, ITaggableV2
Represents a Region switch plan.

A plan defines the steps required to shift traffic from one AWS Region to another.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.arcregionswitch.*;
 StepProperty stepProperty_;
 CfnPlan cfnPlan = CfnPlan.Builder.create(this, "MyCfnPlan")
         .executionRole("executionRole")
         .name("name")
         .recoveryApproach("recoveryApproach")
         .regions(List.of("regions"))
         .workflows(List.of(WorkflowProperty.builder()
                 .workflowTargetAction("workflowTargetAction")
                 // the properties below are optional
                 .steps(List.of(StepProperty.builder()
                         .executionBlockConfiguration(ExecutionBlockConfigurationProperty.builder()
                                 .arcRoutingControlConfig(ArcRoutingControlConfigurationProperty.builder()
                                         .regionAndRoutingControls(Map.of(
                                                 "regionAndRoutingControlsKey", List.of(ArcRoutingControlStateProperty.builder()
                                                         .routingControlArn("routingControlArn")
                                                         .state("state")
                                                         .build())))
                                         // the properties below are optional
                                         .crossAccountRole("crossAccountRole")
                                         .externalId("externalId")
                                         .timeoutMinutes(123)
                                         .build())
                                 .customActionLambdaConfig(CustomActionLambdaConfigurationProperty.builder()
                                         .lambdas(List.of(LambdasProperty.builder()
                                                 .arn("arn")
                                                 .crossAccountRole("crossAccountRole")
                                                 .externalId("externalId")
                                                 .build()))
                                         .regionToRun("regionToRun")
                                         .retryIntervalMinutes(123)
                                         // the properties below are optional
                                         .timeoutMinutes(123)
                                         .ungraceful(LambdaUngracefulProperty.builder()
                                                 .behavior("behavior")
                                                 .build())
                                         .build())
                                 .ec2AsgCapacityIncreaseConfig(Ec2AsgCapacityIncreaseConfigurationProperty.builder()
                                         .asgs(List.of(AsgProperty.builder()
                                                 .arn("arn")
                                                 .crossAccountRole("crossAccountRole")
                                                 .externalId("externalId")
                                                 .build()))
                                         // the properties below are optional
                                         .capacityMonitoringApproach("capacityMonitoringApproach")
                                         .targetPercent(123)
                                         .timeoutMinutes(123)
                                         .ungraceful(Ec2UngracefulProperty.builder()
                                                 .minimumSuccessPercentage(123)
                                                 .build())
                                         .build())
                                 .ecsCapacityIncreaseConfig(EcsCapacityIncreaseConfigurationProperty.builder()
                                         .services(List.of(ServiceProperty.builder()
                                                 .clusterArn("clusterArn")
                                                 .crossAccountRole("crossAccountRole")
                                                 .externalId("externalId")
                                                 .serviceArn("serviceArn")
                                                 .build()))
                                         // the properties below are optional
                                         .capacityMonitoringApproach("capacityMonitoringApproach")
                                         .targetPercent(123)
                                         .timeoutMinutes(123)
                                         .ungraceful(EcsUngracefulProperty.builder()
                                                 .minimumSuccessPercentage(123)
                                                 .build())
                                         .build())
                                 .eksResourceScalingConfig(EksResourceScalingConfigurationProperty.builder()
                                         .kubernetesResourceType(KubernetesResourceTypeProperty.builder()
                                                 .apiVersion("apiVersion")
                                                 .kind("kind")
                                                 .build())
                                         // the properties below are optional
                                         .capacityMonitoringApproach("capacityMonitoringApproach")
                                         .eksClusters(List.of(EksClusterProperty.builder()
                                                 .clusterArn("clusterArn")
                                                 // the properties below are optional
                                                 .crossAccountRole("crossAccountRole")
                                                 .externalId("externalId")
                                                 .build()))
                                         .scalingResources(List.of(Map.of(
                                                 "scalingResourcesKey", Map.of(
                                                         "scalingResourcesKey", KubernetesScalingResourceProperty.builder()
                                                                 .name("name")
                                                                 .namespace("namespace")
                                                                 // the properties below are optional
                                                                 .hpaName("hpaName")
                                                                 .build()))))
                                         .targetPercent(123)
                                         .timeoutMinutes(123)
                                         .ungraceful(EksResourceScalingUngracefulProperty.builder()
                                                 .minimumSuccessPercentage(123)
                                                 .build())
                                         .build())
                                 .executionApprovalConfig(ExecutionApprovalConfigurationProperty.builder()
                                         .approvalRole("approvalRole")
                                         // the properties below are optional
                                         .timeoutMinutes(123)
                                         .build())
                                 .globalAuroraConfig(GlobalAuroraConfigurationProperty.builder()
                                         .behavior("behavior")
                                         .databaseClusterArns(List.of("databaseClusterArns"))
                                         .globalClusterIdentifier("globalClusterIdentifier")
                                         // the properties below are optional
                                         .crossAccountRole("crossAccountRole")
                                         .externalId("externalId")
                                         .timeoutMinutes(123)
                                         .ungraceful(GlobalAuroraUngracefulProperty.builder()
                                                 .ungraceful("ungraceful")
                                                 .build())
                                         .build())
                                 .parallelConfig(ParallelExecutionBlockConfigurationProperty.builder()
                                         .steps(List.of(stepProperty_))
                                         .build())
                                 .regionSwitchPlanConfig(RegionSwitchPlanConfigurationProperty.builder()
                                         .arn("arn")
                                         // the properties below are optional
                                         .crossAccountRole("crossAccountRole")
                                         .externalId("externalId")
                                         .build())
                                 .route53HealthCheckConfig(Route53HealthCheckConfigurationProperty.builder()
                                         .hostedZoneId("hostedZoneId")
                                         .recordName("recordName")
                                         // the properties below are optional
                                         .crossAccountRole("crossAccountRole")
                                         .externalId("externalId")
                                         .recordSets(List.of(Route53ResourceRecordSetProperty.builder()
                                                 .recordSetIdentifier("recordSetIdentifier")
                                                 .region("region")
                                                 .build()))
                                         .timeoutMinutes(123)
                                         .build())
                                 .build())
                         .executionBlockType("executionBlockType")
                         .name("name")
                         // the properties below are optional
                         .description("description")
                         .build()))
                 .workflowDescription("workflowDescription")
                 .workflowTargetRegion("workflowTargetRegion")
                 .build()))
         // the properties below are optional
         .associatedAlarms(Map.of(
                 "associatedAlarmsKey", AssociatedAlarmProperty.builder()
                         .alarmType("alarmType")
                         .resourceIdentifier("resourceIdentifier")
                         // the properties below are optional
                         .crossAccountRole("crossAccountRole")
                         .externalId("externalId")
                         .build()))
         .description("description")
         .primaryRegion("primaryRegion")
         .recoveryTimeObjectiveMinutes(123)
         .tags(Map.of(
                 "tagsKey", "tags"))
         .triggers(List.of(TriggerProperty.builder()
                 .action("action")
                 .conditions(List.of(TriggerConditionProperty.builder()
                         .associatedAlarmName("associatedAlarmName")
                         .condition("condition")
                         .build()))
                 .minDelayMinutesBetweenExecutions(123)
                 .targetRegion("targetRegion")
                 // the properties below are optional
                 .description("description")
                 .build()))
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnPlan

      protected CfnPlan(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnPlan

      protected CfnPlan(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnPlan

      @Stability(Stable) public CfnPlan(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnPlanProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      The Amazon Resource Name (ARN) of the plan.
    • getAttrHealthChecksForPlan

      @Stability(Stable) @NotNull public IResolvable getAttrHealthChecksForPlan()
      Represents a Region switch plan.

      A plan defines the steps required to shift traffic from one AWS Region to another.

    • getAttrOwner

      @Stability(Stable) @NotNull public String getAttrOwner()
      The owner of a plan.
    • getAttrVersion

      @Stability(Stable) @NotNull public String getAttrVersion()
      The version for the plan.
    • getCdkTagManager

      @Stability(Stable) @NotNull public TagManager getCdkTagManager()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getCdkTagManager in interface ITaggableV2
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getExecutionRole

      @Stability(Stable) @NotNull public String getExecutionRole()
      The execution role for a plan.
    • setExecutionRole

      @Stability(Stable) public void setExecutionRole(@NotNull String value)
      The execution role for a plan.
    • getName

      @Stability(Stable) @NotNull public String getName()
      The name for a plan.
    • setName

      @Stability(Stable) public void setName(@NotNull String value)
      The name for a plan.
    • getRecoveryApproach

      @Stability(Stable) @NotNull public String getRecoveryApproach()
      The recovery approach for a Region switch plan, which can be active/active (activeActive) or active/passive (activePassive).
    • setRecoveryApproach

      @Stability(Stable) public void setRecoveryApproach(@NotNull String value)
      The recovery approach for a Region switch plan, which can be active/active (activeActive) or active/passive (activePassive).
    • getRegions

      @Stability(Stable) @NotNull public List<String> getRegions()
      The AWS Regions for a plan.
    • setRegions

      @Stability(Stable) public void setRegions(@NotNull List<String> value)
      The AWS Regions for a plan.
    • getWorkflows

      @Stability(Stable) @NotNull public Object getWorkflows()
      The workflows for a plan.
    • setWorkflows

      @Stability(Stable) public void setWorkflows(@NotNull IResolvable value)
      The workflows for a plan.
    • setWorkflows

      @Stability(Stable) public void setWorkflows(@NotNull List<Object> value)
      The workflows for a plan.
    • getAssociatedAlarms

      @Stability(Stable) @Nullable public Object getAssociatedAlarms()
      The associated application health alarms for a plan.
    • setAssociatedAlarms

      @Stability(Stable) public void setAssociatedAlarms(@Nullable IResolvable value)
      The associated application health alarms for a plan.
    • setAssociatedAlarms

      @Stability(Stable) public void setAssociatedAlarms(@Nullable Map<String,Object> value)
      The associated application health alarms for a plan.
    • getDescription

      @Stability(Stable) @Nullable public String getDescription()
      The description for a plan.
    • setDescription

      @Stability(Stable) public void setDescription(@Nullable String value)
      The description for a plan.
    • getPrimaryRegion

      @Stability(Stable) @Nullable public String getPrimaryRegion()
      The primary Region for a plan.
    • setPrimaryRegion

      @Stability(Stable) public void setPrimaryRegion(@Nullable String value)
      The primary Region for a plan.
    • getRecoveryTimeObjectiveMinutes

      @Stability(Stable) @Nullable public Number getRecoveryTimeObjectiveMinutes()
      The recovery time objective for a plan.
    • setRecoveryTimeObjectiveMinutes

      @Stability(Stable) public void setRecoveryTimeObjectiveMinutes(@Nullable Number value)
      The recovery time objective for a plan.
    • getTags

      @Stability(Stable) @Nullable public Map<String,String> getTags()
    • setTags

      @Stability(Stable) public void setTags(@Nullable Map<String,String> value)
    • getTriggers

      @Stability(Stable) @Nullable public Object getTriggers()
      The triggers for a plan.
    • setTriggers

      @Stability(Stable) public void setTriggers(@Nullable IResolvable value)
      The triggers for a plan.
    • setTriggers

      @Stability(Stable) public void setTriggers(@Nullable List<Object> value)
      The triggers for a plan.