Skip to main content

plans

Creates, updates, deletes or gets a plan resource or lists plans in a region

Overview

Nameplans
TypeResource
DescriptionRepresents a plan that specifies Regions, IAM roles, and workflows of logic required to perform the desired change to your multi-Region application
Idawscc.arcregionswitch.plans

Fields

NameDatatypeDescription
arnstring
associated_alarmsobject
descriptionstring
execution_rolestring
namestring
ownerstring
primary_regionstring
recovery_approachstring
recovery_time_objective_minutesnumber
regionsarray
tagsobject
triggersarray
versionstring
workflowsarray
health_checks_for_planobject
route53_health_checksobject
regionstringAWS region.

For more information, see AWS::ARCRegionSwitch::Plan.

Methods

NameResourceAccessible byRequired Params
create_resourceplansINSERTExecutionRole, Name, RecoveryApproach, Regions, Workflows, region
delete_resourceplansDELETEIdentifier, region
update_resourceplansUPDATEIdentifier, PatchDocument, region
list_resourcesplans_list_onlySELECTregion
get_resourceplansSELECTIdentifier, 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
Identifier = '{{ arn }}';

INSERT example

Use the following StackQL query and manifest file to create a new plan resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.arcregionswitch.plans (
ExecutionRole,
Name,
RecoveryApproach,
Regions,
Workflows,
region
)
SELECT
'{{ execution_role }}',
'{{ name }}',
'{{ recovery_approach }}',
'{{ regions }}',
'{{ workflows }}',
'{{ region }}';

UPDATE example

Use the following StackQL query and manifest file to update a plan resource, using stack-deploy.

/*+ update */
UPDATE awscc.arcregionswitch.plans
SET PatchDocument = string('{{ {
"AssociatedAlarms": associated_alarms,
"Description": description,
"ExecutionRole": execution_role,
"RecoveryTimeObjectiveMinutes": recovery_time_objective_minutes,
"Tags": tags,
"Triggers": triggers,
"Workflows": workflows
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}';

DELETE example

/*+ delete */
DELETE FROM awscc.arcregionswitch.plans
WHERE
Identifier = '{{ arn }}' AND
region = 'us-east-1';

Permissions

To operate on the plans resource, the following permissions are required:

arc-region-switch:CreatePlan,
arc-region-switch:GetPlan,
arc-region-switch:ListRoute53HealthChecks,
arc-region-switch:ListTagsForResource,
arc-region-switch:TagResource,
iam:PassRole