GetExecutionPreview
Initiates the process of retrieving an existing preview that shows the effects that running a specified Automation runbook would have on the targeted resources.
Request Syntax
{
"ExecutionPreviewId": "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.
- ExecutionPreviewId
-
The ID of the existing execution preview.
Type: String
Length Constraints: Fixed length of 36.
Pattern:
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
Required: Yes
Response Syntax
{
"EndedAt": number,
"ExecutionPreview": { ... },
"ExecutionPreviewId": "string",
"Status": "string",
"StatusMessage": "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.
- EndedAt
-
A UTC timestamp indicating when the execution preview operation ended.
Type: Timestamp
- ExecutionPreview
-
Information about the changes that would be made if an execution were run.
Type: ExecutionPreview object
Note: This object is a Union. Only one member of this object can be specified or returned.
- ExecutionPreviewId
-
The generated ID for the existing execution preview.
Type: String
Length Constraints: Fixed length of 36.
Pattern:
[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
- Status
-
The current status of the execution preview operation.
Type: String
Valid Values:
Pending | InProgress | Success | Failed
- StatusMessage
-
Supplemental information about the current status of the execution preview.
Type: String
Errors
For information about the errors that are common to all actions, see Common Errors.
- InternalServerError
-
An error occurred on the server side.
HTTP Status Code: 500
- ResourceNotFoundException
-
The specified parameter to be shared could not be found.
HTTP Status Code: 400
Examples
Example
This example illustrates one usage of GetExecutionPreview.
Sample Request
POST / HTTP/1.1
Host: ssm.us-east-2.amazonaws.com
Accept-Encoding: identity
X-Amz-Target: AmazonSSM.GetExecutionPreview
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: 20241125T162110Z
Authorization: AWS4-HMAC-SHA256 Credential=AKIAIOSFODNN7EXAMPLE/20240325/us-east-2/ssm/aws4_request,
SignedHeaders=content-type;host;x-amz-date;x-amz-target, Signature=39c3b3042cd2aEXAMPLE
Content-Length: 86
{
"ExecutionPreviewId": "2f27d6e5-9676-4708-b8bd-aef0aEXAMPLE"
}
Example
This example illustrates one usage of GetExecutionPreview.
Sample Response
{
"ExecutionPreviewId": "2f27d6e5-9676-4708-b8bd-aef0EXAMPLE",
"EndedAt": "2024-11-25T01:50:39.424000+00:00",
"Status": "Success",
"ExecutionPreview": {
"Automation": {
"StepPreviews": {
"Undetermined": 1
},
"Regions": [
"us-east-2"
],
"TotalAccounts": 7
}
}
}
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: