automation_executions
Creates, updates, deletes, gets or lists an automation_executions resource.
Overview
| Name | automation_executions |
| Type | Resource |
| Id | aws.ssm.automation_executions |
Fields
The following fields are returned by SELECT queries:
- get_automation_execution
- describe_automation_executions
| Name | Datatype | Description |
|---|---|---|
alarm_configuration | object | The details for the CloudWatch alarm you want to apply to an automation or command. |
association_id | string | The ID of a State Manager association used in the Automation operation. |
automation_execution_id | string | The execution ID. |
automation_execution_status | string | The execution status of the Automation. (Pending, InProgress, Waiting, Success, TimedOut, Cancelling, Cancelled, Failed, PendingApproval, Approved, Rejected, Scheduled, RunbookInProgress, PendingChangeCalendarOverride, ChangeCalendarOverrideApproved, ChangeCalendarOverrideRejected, CompletedWithSuccess, CompletedWithFailure, Exited) |
automation_subtype | string | The subtype of the Automation operation. Currently, the only supported value is ChangeRequest. (ChangeRequest, AccessRequest) |
change_request_name | string | The name of the Change Manager change request. |
current_action | string | The action of the step that is currently running. |
current_step_name | string | The name of the step that is currently running. |
document_name | string | The name of the Automation runbook used during the execution. (pattern: <code>^[a-zA-Z0-9_-.]{3,128}$</code>) |
document_version | string | The version of the document to use during execution. (pattern: <code>([$]LATEST|[$]DEFAULT|^[1-9][0-9]*$)</code>) |
executed_by | string | The Amazon Resource Name (ARN) of the user who ran the automation. |
execution_end_time | string (date-time) | The time the execution finished. |
execution_start_time | string (date-time) | The time the execution started. |
failure_message | string | A message describing why an execution has failed, if the status is set to Failed. |
max_concurrency | string | The MaxConcurrency value specified by the user when the execution started. (pattern: <code>^([1-9][0-9]*|[1-9][0-9]%|[1-9]%|100%)$</code>) |
max_errors | string | The MaxErrors value specified by the user when the execution started. (pattern: <code>^([1-9][0-9]*|[0]|[1-9][0-9]%|[0-9]%|100%)$</code>) |
mode | string | The automation execution mode. (Auto, Interactive) |
ops_item_id | string | The ID of an OpsItem that is created to represent a Change Manager change request. |
outputs | object | The list of execution outputs as defined in the Automation runbook. |
parameters | object | The key-value map of execution parameters, which were supplied when calling StartAutomationExecution. |
parent_automation_execution_id | string | The AutomationExecutionId of the parent automation. |
progress_counters | object | An aggregate of step execution statuses displayed in the Amazon Web Services Systems Manager console for a multi-Region and multi-account Automation execution. |
resolved_targets | object | A list of resolved targets in the rate control execution. |
runbooks | array | Information about the Automation runbooks that are run as part of a runbook workflow. The Automation runbooks specified for the runbook workflow can't run until all required approvals for the change request have been received. |
scheduled_time | string (date-time) | The date and time the Automation operation is scheduled to start. |
step_executions | array | A list of details about the current state of all steps that comprise an execution. An Automation runbook contains a list of steps that are run in order. |
step_executions_truncated | boolean | A boolean value that indicates if the response contains the full list of the Automation step executions. If true, use the DescribeAutomationStepExecutions API operation to get the full list of step executions. |
target | string | The target of the execution. |
target_locations | array | The combination of Amazon Web Services Regions and/or Amazon Web Services accounts where you want to run the Automation. |
target_locations_url | string | A publicly accessible URL for a file that contains the TargetLocations body. Currently, only files in presigned Amazon S3 buckets are supported (pattern: <code>^https://[-a-zA-Z0-9@:%._+~#=]{1,253}.s3(.[a-z\d-]{9,16})?.amazonaws.com/.{1,2000}</code>) |
target_maps | array | The specified key-value mapping of document parameters to target resources. |
target_parameter_name | string | The parameter name. |
targets | array | The specified targets. |
triggered_alarms | array | The CloudWatch alarm that was invoked by the automation. |
variables | object | Variables defined for the automation. |
warning_message | string | A message that describes a non-critical issue that occurred during the automation execution. |
| Name | Datatype | Description |
|---|---|---|
alarm_configuration | object | The details for the CloudWatch alarm you want to apply to an automation or command. |
association_id | string | The ID of a State Manager association used in the Automation operation. |
automation_execution_id | string | The execution ID. |
automation_execution_status | string | The status of the execution. (Pending, InProgress, Waiting, Success, TimedOut, Cancelling, Cancelled, Failed, PendingApproval, Approved, Rejected, Scheduled, RunbookInProgress, PendingChangeCalendarOverride, ChangeCalendarOverrideApproved, ChangeCalendarOverrideRejected, CompletedWithSuccess, CompletedWithFailure, Exited) |
automation_subtype | string | The subtype of the Automation operation. Currently, the only supported value is ChangeRequest. (ChangeRequest, AccessRequest) |
automation_type | string | Use this filter with DescribeAutomationExecutions. Specify either Local or CrossAccount. CrossAccount is an Automation that runs in multiple Amazon Web Services Regions and Amazon Web Services accounts. For more information, see Running automations in multiple Amazon Web Services Regions and accounts in the Amazon Web Services Systems Manager User Guide. (CrossAccount, Local) |
change_request_name | string | The name of the Change Manager change request. |
current_action | string | The action of the step that is currently running. |
current_step_name | string | The name of the step that is currently running. |
document_name | string | The name of the Automation runbook used during execution. (pattern: <code>^[a-zA-Z0-9_-.]{3,128}$</code>) |
document_version | string | The document version used during the execution. (pattern: <code>([$]LATEST|[$]DEFAULT|^[1-9][0-9]*$)</code>) |
executed_by | string | The IAM role ARN of the user who ran the automation. |
execution_end_time | string (date-time) | The time the execution finished. This isn't populated if the execution is still in progress. |
execution_start_time | string (date-time) | The time the execution started. |
failure_message | string | A message that describes a failure that occurred during the automation execution. |
log_file | string | An S3 bucket where execution information is stored. |
max_concurrency | string | The MaxConcurrency value specified by the user when starting the automation. (pattern: <code>^([1-9][0-9]*|[1-9][0-9]%|[1-9]%|100%)$</code>) |
max_errors | string | The MaxErrors value specified by the user when starting the automation. (pattern: <code>^([1-9][0-9]*|[0]|[1-9][0-9]%|[0-9]%|100%)$</code>) |
mode | string | The Automation execution mode. (Auto, Interactive) |
ops_item_id | string | The ID of an OpsItem that is created to represent a Change Manager change request. |
outputs | object | The list of execution outputs as defined in the Automation runbook. |
parent_automation_execution_id | string | The execution ID of the parent automation. |
resolved_targets | object | A list of targets that resolved during the execution. |
runbooks | array | Information about the Automation runbooks that are run during a runbook workflow in Change Manager. The Automation runbooks specified for the runbook workflow can't run until all required approvals for the change request have been received. |
scheduled_time | string (date-time) | The date and time the Automation operation is scheduled to start. |
target | string | The list of execution outputs as defined in the Automation runbook. |
target_locations_url | string | A publicly accessible URL for a file that contains the TargetLocations body. Currently, only files in presigned Amazon S3 buckets are supported (pattern: <code>^https://[-a-zA-Z0-9@:%._+~#=]{1,253}.s3(.[a-z\d-]{9,16})?.amazonaws.com/.{1,2000}</code>) |
target_maps | array | The specified key-value mapping of document parameters to target resources. |
target_parameter_name | string | The list of execution outputs as defined in the Automation runbook. |
targets | array | The targets defined by the user when starting the automation. |
triggered_alarms | array | The CloudWatch alarm that was invoked by the automation. |
warning_message | string | A message that describes a non-critical issue that occurred during the automation execution. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_automation_execution | select | region | Get detailed information about a particular Automation execution. | |
describe_automation_executions | select | region | Provides details about all active and terminated Automation executions. | |
send_automation_signal | exec | region, AutomationExecutionId, SignalType | Sends a signal to an Automation execution to change the current behavior or status of the execution. |
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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_automation_execution
- describe_automation_executions
Get detailed information about a particular Automation execution.
SELECT
alarm_configuration,
association_id,
automation_execution_id,
automation_execution_status,
automation_subtype,
change_request_name,
current_action,
current_step_name,
document_name,
document_version,
executed_by,
execution_end_time,
execution_start_time,
failure_message,
max_concurrency,
max_errors,
mode,
ops_item_id,
outputs,
parameters,
parent_automation_execution_id,
progress_counters,
resolved_targets,
runbooks,
scheduled_time,
step_executions,
step_executions_truncated,
target,
target_locations,
target_locations_url,
target_maps,
target_parameter_name,
targets,
triggered_alarms,
variables,
warning_message
FROM aws.ssm.automation_executions
WHERE region = '{{ region }}' -- required
;
Provides details about all active and terminated Automation executions.
SELECT
alarm_configuration,
association_id,
automation_execution_id,
automation_execution_status,
automation_subtype,
automation_type,
change_request_name,
current_action,
current_step_name,
document_name,
document_version,
executed_by,
execution_end_time,
execution_start_time,
failure_message,
log_file,
max_concurrency,
max_errors,
mode,
ops_item_id,
outputs,
parent_automation_execution_id,
resolved_targets,
runbooks,
scheduled_time,
target,
target_locations_url,
target_maps,
target_parameter_name,
targets,
triggered_alarms,
warning_message
FROM aws.ssm.automation_executions
WHERE region = '{{ region }}' -- required
;
Lifecycle Methods
- send_automation_signal
Sends a signal to an Automation execution to change the current behavior or status of the execution.
EXEC aws.ssm.automation_executions.send_automation_signal
@region='{{ region }}' --required
@@json=
'{
"AutomationExecutionId": "{{ AutomationExecutionId }}",
"SignalType": "{{ SignalType }}",
"Payload": "{{ Payload }}"
}'
;