import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Resource for managing an Amazon ARC Region Switch plan. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.iam.Role("example", { * name: "arc-region-switch-role", * assumeRolePolicy: JSON.stringify({ * Version: "2012-10-17", * Statement: [{ * Action: "sts:AssumeRole", * Effect: "Allow", * Principal: { * Service: "arc-region-switch.amazonaws.com", * }, * }], * }), * }); * const examplePlan = new aws.arcregionswitch.Plan("example", { * workflows: [ * { * steps: [{ * executionApprovalConfigs: [{ * approvalRole: example.arn, * timeoutMinutes: 60, * }], * name: "manual-approval", * executionBlockType: "ManualApproval", * }], * workflowTargetAction: "activate", * workflowTargetRegion: "us-west-2", * }, * { * steps: [{ * executionApprovalConfigs: [{ * approvalRole: example.arn, * timeoutMinutes: 60, * }], * name: "manual-approval", * executionBlockType: "ManualApproval", * }], * workflowTargetAction: "deactivate", * workflowTargetRegion: "us-east-1", * }, * ], * name: "example-plan", * executionRole: example.arn, * recoveryApproach: "activePassive", * regions: [ * "us-east-1", * "us-west-2", * ], * primaryRegion: "us-east-1", * }); * ``` * * ### Complex Usage with Multiple Step Types * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const complex = new aws.arcregionswitch.Plan("complex", { * associatedAlarms: [{ * name: "application-health-alarm", * alarmType: "applicationHealth", * resourceIdentifier: "arn:aws:cloudwatch:us-east-1:123456789012:alarm:MyAlarm", * }], * triggers: [{ * conditions: [{ * associatedAlarmName: "application-health-alarm", * condition: "red", * }], * action: "activate", * targetRegion: "us-west-2", * minDelayMinutesBetweenExecutions: 30, * }], * workflows: [ * { * steps: [ * { * customActionLambdaConfigs: [{ * lambdas: [{ * arn: example.arn, * }], * regionToRun: "activatingRegion", * retryIntervalMinutes: 5, * timeoutMinutes: 30, * }], * name: "lambda-step", * executionBlockType: "CustomActionLambda", * }, * { * parallelConfigs: [{ * steps: [ * { * ec2AsgCapacityIncreaseConfigs: [{ * asgs: [{ * arn: exampleAwsAutoscalingGroup.arn, * }], * targetPercent: 150, * }], * name: "asg-scaling", * executionBlockType: "EC2AutoScaling", * }, * { * ecsCapacityIncreaseConfigs: [{ * services: [{ * clusterArn: exampleAwsEcsCluster.arn, * serviceArn: exampleAwsEcsService.arn, * }], * targetPercent: 200, * }], * name: "ecs-scaling", * executionBlockType: "ECSServiceScaling", * }, * ], * }], * name: "parallel-step", * executionBlockType: "Parallel", * }, * ], * workflowTargetAction: "activate", * workflowTargetRegion: "us-west-2", * }, * { * steps: [{ * route53HealthCheckConfigs: [{ * hostedZoneId: exampleAwsRoute53Zone.zoneId, * recordName: "api.example.com", * }], * name: "route53-health-check", * executionBlockType: "Route53HealthCheck", * }], * workflowTargetAction: "deactivate", * workflowTargetRegion: "us-east-1", * }, * ], * name: "complex-plan", * executionRole: exampleAwsIamRole.arn, * recoveryApproach: "activeActive", * regions: [ * "us-east-1", * "us-west-2", * ], * description: "Complex plan with multiple execution block types", * recoveryTimeObjectiveMinutes: 60, * tags: { * Environment: "production", * }, * }); * ``` * * ## Import * * ### Identity Schema * * #### Required * * - `arn` (String) ARN of the ARC Region Switch Plan. * * Using `pulumi import`, import Application Recovery Controller Region Switch Plan using the `arn`. For example: * * ```sh * $ pulumi import aws:arcregionswitch/plan:Plan example arn:aws:arcregionswitch:us-east-1:123456789012:plan/example-plan * ``` */ export declare class Plan extends pulumi.CustomResource { /** * Get an existing Plan 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 Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: PlanState, opts?: pulumi.CustomResourceOptions): Plan; /** * Returns true if the given object is an instance of Plan. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Plan; /** * ARN of the plan. */ readonly arn: pulumi.Output; /** * CloudWatch alarms associated with the plan. See `associatedAlarms` Block for details. */ readonly associatedAlarms: pulumi.Output; /** * Description of the plan. */ readonly description: pulumi.Output; /** * ARN of the IAM role that ARC Region Switch will assume to execute the plan. */ readonly executionRole: pulumi.Output; /** * Name of the plan. Must be unique within the account. */ readonly name: pulumi.Output; /** * Primary region for the plan. */ readonly primaryRegion: pulumi.Output; /** * Recovery approach for the plan. Valid values: `activeActive`, `activePassive`. */ readonly recoveryApproach: pulumi.Output; /** * Recovery time objective in minutes. */ readonly recoveryTimeObjectiveMinutes: pulumi.Output; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. * * @deprecated This attribute will be removed in a future version of the provider. */ readonly region: pulumi.Output; /** * List of AWS regions involved in the plan. Must contain at least 2 regions. */ readonly regions: pulumi.Output; /** * Configuration for automated execution reports. See `reportConfiguration` Block for details. */ readonly reportConfigurations: pulumi.Output; /** * Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ readonly tagsAll: pulumi.Output<{ [key: string]: string; }>; readonly timeouts: pulumi.Output; /** * Triggers that can initiate the plan execution. See `triggers` Block for details. */ readonly triggers: pulumi.Output; /** * Workflows that define the steps to execute. See `workflow` Block for details. * * The following arguments are optional: */ readonly workflows: pulumi.Output; /** * Create a Plan resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: PlanArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Plan resources. */ export interface PlanState { /** * ARN of the plan. */ arn?: pulumi.Input; /** * CloudWatch alarms associated with the plan. See `associatedAlarms` Block for details. */ associatedAlarms?: pulumi.Input[] | undefined>; /** * Description of the plan. */ description?: pulumi.Input; /** * ARN of the IAM role that ARC Region Switch will assume to execute the plan. */ executionRole?: pulumi.Input; /** * Name of the plan. Must be unique within the account. */ name?: pulumi.Input; /** * Primary region for the plan. */ primaryRegion?: pulumi.Input; /** * Recovery approach for the plan. Valid values: `activeActive`, `activePassive`. */ recoveryApproach?: pulumi.Input; /** * Recovery time objective in minutes. */ recoveryTimeObjectiveMinutes?: pulumi.Input; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. * * @deprecated This attribute will be removed in a future version of the provider. */ region?: pulumi.Input; /** * List of AWS regions involved in the plan. Must contain at least 2 regions. */ regions?: pulumi.Input[] | undefined>; /** * Configuration for automated execution reports. See `reportConfiguration` Block for details. */ reportConfigurations?: pulumi.Input[] | undefined>; /** * Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ tagsAll?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; timeouts?: pulumi.Input; /** * Triggers that can initiate the plan execution. See `triggers` Block for details. */ triggers?: pulumi.Input[] | undefined>; /** * Workflows that define the steps to execute. See `workflow` Block for details. * * The following arguments are optional: */ workflows?: pulumi.Input[] | undefined>; } /** * The set of arguments for constructing a Plan resource. */ export interface PlanArgs { /** * CloudWatch alarms associated with the plan. See `associatedAlarms` Block for details. */ associatedAlarms?: pulumi.Input[] | undefined>; /** * Description of the plan. */ description?: pulumi.Input; /** * ARN of the IAM role that ARC Region Switch will assume to execute the plan. */ executionRole: pulumi.Input; /** * Name of the plan. Must be unique within the account. */ name?: pulumi.Input; /** * Primary region for the plan. */ primaryRegion?: pulumi.Input; /** * Recovery approach for the plan. Valid values: `activeActive`, `activePassive`. */ recoveryApproach: pulumi.Input; /** * Recovery time objective in minutes. */ recoveryTimeObjectiveMinutes?: pulumi.Input; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. * * @deprecated This attribute will be removed in a future version of the provider. */ region?: pulumi.Input; /** * List of AWS regions involved in the plan. Must contain at least 2 regions. */ regions: pulumi.Input[]>; /** * Configuration for automated execution reports. See `reportConfiguration` Block for details. */ reportConfigurations?: pulumi.Input[] | undefined>; /** * Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; timeouts?: pulumi.Input; /** * Triggers that can initiate the plan execution. See `triggers` Block for details. */ triggers?: pulumi.Input[] | undefined>; /** * Workflows that define the steps to execute. See `workflow` Block for details. * * The following arguments are optional: */ workflows?: pulumi.Input[] | undefined>; } //# sourceMappingURL=plan.d.ts.map