plans
Creates, updates, deletes or gets a plan resource or lists plans in a region
Overview
| Name | plans |
| Type | Resource |
| Description | Represents a plan that specifies Regions, IAM roles, and workflows of logic required to perform the desired change to your multi-Region application |
| Id | awscc.arcregionswitch.plans |
Fields
| Name | Datatype | Description |
|---|---|---|
arn | string | |
associated_alarms | object | |
description | string | |
execution_role | string | |
name | string | |
owner | string | |
primary_region | string | |
recovery_approach | string | |
recovery_time_objective_minutes | number | |
regions | array | |
tags | object | |
triggers | array | |
version | string | |
workflows | array | |
health_checks_for_plan | object | |
route53_health_checks | object | |
region | string | AWS region. |
For more information, see AWS::ARCRegionSwitch::Plan.
Methods
| Name | Accessible by | Required Params |
|---|---|---|
create_resource | INSERT | ExecutionRole, Name, RecoveryApproach, Regions, Workflows, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT examples
Gets all properties from an individual plan.
SELECT
region,
arn,
associated_alarms,
description,
execution_role,
name,
owner,
primary_region,
recovery_approach,
recovery_time_objective_minutes,
regions,
tags,
triggers,
version,
workflows,
health_checks_for_plan,
route53_health_checks
FROM awscc.arcregionswitch.plans
WHERE region = 'us-east-1' AND data__Identifier = '<Arn>';
INSERT example
Use the following StackQL query and manifest file to create a new plan resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.arcregionswitch.plans (
ExecutionRole,
Name,
RecoveryApproach,
Regions,
Workflows,
region
)
SELECT
'{{ ExecutionRole }}',
'{{ Name }}',
'{{ RecoveryApproach }}',
'{{ Regions }}',
'{{ Workflows }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.arcregionswitch.plans (
AssociatedAlarms,
Description,
ExecutionRole,
Name,
PrimaryRegion,
RecoveryApproach,
RecoveryTimeObjectiveMinutes,
Regions,
Tags,
Triggers,
Workflows,
region
)
SELECT
'{{ AssociatedAlarms }}',
'{{ Description }}',
'{{ ExecutionRole }}',
'{{ Name }}',
'{{ PrimaryRegion }}',
'{{ RecoveryApproach }}',
'{{ RecoveryTimeObjectiveMinutes }}',
'{{ Regions }}',
'{{ Tags }}',
'{{ Triggers }}',
'{{ Workflows }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: plan
props:
- name: AssociatedAlarms
value: {}
- name: Description
value: '{{ Description }}'
- name: ExecutionRole
value: '{{ ExecutionRole }}'
- name: Name
value: '{{ Name }}'
- name: PrimaryRegion
value: '{{ PrimaryRegion }}'
- name: RecoveryApproach
value: '{{ RecoveryApproach }}'
- name: RecoveryTimeObjectiveMinutes
value: null
- name: Regions
value:
- '{{ Regions[0] }}'
- name: Tags
value: {}
- name: Triggers
value:
- Description: '{{ Description }}'
TargetRegion: '{{ TargetRegion }}'
Action: '{{ Action }}'
Conditions:
- AssociatedAlarmName: '{{ AssociatedAlarmName }}'
Condition: '{{ Condition }}'
MinDelayMinutesBetweenExecutions: null
- name: Workflows
value:
- Steps:
- Name: '{{ Name }}'
Description: '{{ Description }}'
ExecutionBlockConfiguration: null
ExecutionBlockType: '{{ ExecutionBlockType }}'
WorkflowTargetAction: null
WorkflowTargetRegion: '{{ WorkflowTargetRegion }}'
WorkflowDescription: '{{ WorkflowDescription }}'
DELETE example
/*+ delete */
DELETE FROM awscc.arcregionswitch.plans
WHERE data__Identifier = '<Arn>'
AND region = 'us-east-1';
Permissions
To operate on the plans resource, the following permissions are required:
Create
arc-region-switch:CreatePlan,
arc-region-switch:GetPlan,
arc-region-switch:ListRoute53HealthChecks,
arc-region-switch:ListTagsForResource,
arc-region-switch:TagResource,
iam:PassRole
Read
arc-region-switch:GetPlan,
arc-region-switch:ListRoute53HealthChecks,
arc-region-switch:ListTagsForResource
Update
arc-region-switch:GetPlan,
arc-region-switch:ListRoute53HealthChecks,
arc-region-switch:ListTagsForResource,
arc-region-switch:TagResource,
arc-region-switch:UntagResource,
arc-region-switch:UpdatePlan,
iam:PassRole
Delete
arc-region-switch:DeletePlan,
arc-region-switch:GetPlan
List
arc-region-switch:ListPlans