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 = '{{ region }}' 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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.arcregionswitch.plans
WHERE
Identifier = '{{ arn }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

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