GetAutomationExecution - AWS Systems Manager
AWS services or capabilities described in AWS documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with AWS services in China.

GetAutomationExecution

Get detailed information about a particular Automation execution.

Request Syntax

{ "AutomationExecutionId": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

AutomationExecutionId

The unique identifier for an existing automation execution to examine. The execution ID is returned by StartAutomationExecution when the execution of an Automation document is initiated.

Type: String

Length Constraints: Fixed length of 36.

Required: Yes

Response Syntax

{ "AutomationExecution": { "AutomationExecutionId": "string", "AutomationExecutionStatus": "string", "CurrentAction": "string", "CurrentStepName": "string", "DocumentName": "string", "DocumentVersion": "string", "ExecutedBy": "string", "ExecutionEndTime": number, "ExecutionStartTime": number, "FailureMessage": "string", "MaxConcurrency": "string", "MaxErrors": "string", "Mode": "string", "Outputs": { "string" : [ "string" ] }, "Parameters": { "string" : [ "string" ] }, "ParentAutomationExecutionId": "string", "ProgressCounters": { "CancelledSteps": number, "FailedSteps": number, "SuccessSteps": number, "TimedOutSteps": number, "TotalSteps": number }, "ResolvedTargets": { "ParameterValues": [ "string" ], "Truncated": boolean }, "StepExecutions": [ { "Action": "string", "ExecutionEndTime": number, "ExecutionStartTime": number, "FailureDetails": { "Details": { "string" : [ "string" ] }, "FailureStage": "string", "FailureType": "string" }, "FailureMessage": "string", "Inputs": { "string" : "string" }, "IsCritical": boolean, "IsEnd": boolean, "MaxAttempts": number, "NextStep": "string", "OnFailure": "string", "Outputs": { "string" : [ "string" ] }, "OverriddenParameters": { "string" : [ "string" ] }, "Response": "string", "ResponseCode": "string", "StepExecutionId": "string", "StepName": "string", "StepStatus": "string", "TargetLocation": { "Accounts": [ "string" ], "ExecutionRoleName": "string", "Regions": [ "string" ], "TargetLocationMaxConcurrency": "string", "TargetLocationMaxErrors": "string" }, "Targets": [ { "Key": "string", "Values": [ "string" ] } ], "TimeoutSeconds": number, "ValidNextSteps": [ "string" ] } ], "StepExecutionsTruncated": boolean, "Target": "string", "TargetLocations": [ { "Accounts": [ "string" ], "ExecutionRoleName": "string", "Regions": [ "string" ], "TargetLocationMaxConcurrency": "string", "TargetLocationMaxErrors": "string" } ], "TargetMaps": [ { "string" : [ "string" ] } ], "TargetParameterName": "string", "Targets": [ { "Key": "string", "Values": [ "string" ] } ] } }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

AutomationExecution

Detailed information about the current state of an automation execution.

Type: AutomationExecution object

Errors

For information about the errors that are common to all actions, see Common Errors.

AutomationExecutionNotFoundException

There is no automation execution information for the requested automation execution ID.

HTTP Status Code: 400

InternalServerError

An error occurred on the server side.

HTTP Status Code: 500

Example

Sample Request

POST / HTTP/1.1 Host: ssm.us-east-2.amazonaws.com Accept-Encoding: identity X-Amz-Target: AmazonSSM.GetAutomationExecution Content-Type: application/x-amz-json-1.1 User-Agent: aws-cli/1.17.12 Python/3.6.8 Darwin/18.7.0 botocore/1.14.12 X-Amz-Date: 20200324T185532Z Authorization: AWS4-HMAC-SHA256 Credential=AKIAIOSFODNN7EXAMPLE/20200324/us-east-2/ssm/aws4_request, SignedHeaders=content-type;host;x-amz-date;x-amz-target, Signature=39c3b3042cd2aEXAMPLE Content-Length: 65 { "AutomationExecutionId":"8a5f5be8-5d93-437a-adbb-394f7EXAMPLE" }

Sample Response

{ "AutomationExecution":{ "AutomationExecutionId":"8a5f5be8-5d93-437a-adbb-394f7EXAMPLE", "AutomationExecutionStatus":"Success", "DocumentName":"CreateImage", "DocumentVersion":"1", "ExecutedBy":"arn:aws:sts::111122223333:assumed-role/Example", "ExecutionEndTime":1.585062669053E9, "ExecutionStartTime":1.585061570827E9, "Mode":"Auto", "Outputs":{ }, "Parameters":{ "InstanceId":[ "i-02573cafcfEXAMPLE" ] }, "ResolvedTargets":{ "ParameterValues":[ ], "Truncated":false }, "StepExecutions":[ { "Action":"aws:createImage", "ExecutionEndTime":1.585062668968E9, "ExecutionStartTime":1.585061571144E9, "Inputs":{ "ImageDescription":"\"AMI for i-02573cafcfEXAMPLE created on 2020-03-24_14.52.51\"", "ImageName":"\"i-02573cafcfEXAMPLE-2020-03-24_14.52.51\"", "InstanceId":"\"i-02573cafcfEXAMPLE\"", "NoReboot":"false" }, "OnFailure":"Abort", "Outputs":{ "ImageId":[ "ami-0f4706cb37EXAMPLE" ], "ImageState":[ "available" ], "OutputPayload":[ "{\"ImageId\":\"ami-0f4706cb37EXAMPLE\",\"ImageState\":\"available\"}" ] }, "OverriddenParameters":{ }, "StepExecutionId":"eff80946-356d-4128-97b2-6a0f5EXAMPLE", "StepName":"createImage", "StepStatus":"Success" } ], "StepExecutionsTruncated":false, "Targets":[ ] } }

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: