Skip to main content

plan_executions

Creates, updates, deletes, gets or lists a plan_executions resource.

Overview

Nameplan_executions
TypeResource
Idaws.arc_region_switch.plan_executions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringThe name of a step in a workflow.
end_timestring (date-time)The timestamp when a step endeded execution.
start_timestring (date-time)The timestamp when a step started execution.
statusstringThe status of a step in a workflow. For example, a status might be Completed or Pending Approval. (notStarted, running, failed, completed, canceled, skipped, pendingApproval)
step_modestringThe mode for a step execution. The mode can be Graceful or Ungraceful. (graceful, ungraceful)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_plan_executionselectregionRetrieves detailed information about a specific plan execution. You must specify the plan ARN and execution ID.
list_plan_executionsselectregionLists the executions of a Region switch plan. This operation returns information about both current and historical executions.
update_plan_execution_stepupdateregion, planArn, executionId, comment, stepName, actionToTakeUpdates a specific step in an in-progress plan execution. This operation allows you to modify the step's comment or action.
update_plan_executionupdateregion, planArn, executionId, actionUpdates an in-progress plan execution. This operation allows you to modify certain aspects of the execution, such as adding a comment or changing the action.
approve_plan_execution_stepexecregion, planArn, executionId, stepName, approvalApproves a step in a plan execution that requires manual approval. When you create a plan, you can include approval steps that require manual intervention before the execution can proceed. This operation allows you to provide that approval. You must specify the plan ARN, execution ID, step name, and approval status. You can also provide an optional comment explaining the approval decision.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Retrieves detailed information about a specific plan execution. You must specify the plan ARN and execution ID.

SELECT
name,
end_time,
start_time,
status,
step_mode
FROM aws.arc_region_switch.plan_executions
WHERE region = '{{ region }}' -- required
;

UPDATE examples

Updates a specific step in an in-progress plan execution. This operation allows you to modify the step's comment or action.

UPDATE aws.arc_region_switch.plan_executions
SET
planArn = '{{ planArn }}',
executionId = '{{ executionId }}',
comment = '{{ comment }}',
stepName = '{{ stepName }}',
actionToTake = '{{ actionToTake }}'
WHERE
region = '{{ region }}' --required
AND planArn = '{{ planArn }}' --required
AND executionId = '{{ executionId }}' --required
AND comment = '{{ comment }}' --required
AND stepName = '{{ stepName }}' --required
AND actionToTake = '{{ actionToTake }}' --required;

Lifecycle Methods

Approves a step in a plan execution that requires manual approval. When you create a plan, you can include approval steps that require manual intervention before the execution can proceed. This operation allows you to provide that approval. You must specify the plan ARN, execution ID, step name, and approval status. You can also provide an optional comment explaining the approval decision.

EXEC aws.arc_region_switch.plan_executions.approve_plan_execution_step
@region='{{ region }}' --required
@@json=
'{
"planArn": "{{ planArn }}",
"executionId": "{{ executionId }}",
"stepName": "{{ stepName }}",
"approval": "{{ approval }}",
"comment": "{{ comment }}"
}'
;