StartExecutionPreview
Initiates the process of creating a preview showing the effects that running a specified Automation runbook would have on the targeted resources.
Request Syntax
{
"DocumentName": "string
",
"DocumentVersion": "string
",
"ExecutionInputs": { ... }
}
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.
- DocumentName
-
The name of the Automation runbook to run. The result of the execution preview indicates what the impact would be of running this runbook.
Type: String
Pattern:
^[a-zA-Z0-9_\-.]{3,128}$
Required: Yes
- DocumentVersion
-
The version of the Automation runbook to run. The default value is
$DEFAULT
.Type: String
Pattern:
([$]LATEST|[$]DEFAULT|^[1-9][0-9]*$)
Required: No
- ExecutionInputs
-
Information about the inputs that can be specified for the preview operation.
Type: ExecutionInputs object
Note: This object is a Union. Only one member of this object can be specified or returned.
Required: No
Response Syntax
{
"ExecutionPreviewId": "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.
- ExecutionPreviewId
-
The ID of the execution preview generated by the system.
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}
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
- ValidationException
-
The request isn't valid. Verify that you entered valid contents for the command and try again.
HTTP Status Code: 400
Examples
Example
This example illustrates one usage of StartExecutionPreview.
Sample Request
POST / HTTP/1.1
Host: ssm.us-east-2.amazonaws.com
Accept-Encoding: identity
X-Amz-Target: AmazonSSM.StartExecutionPreview
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
{
"DocumentName": "MyExampleDocument"
}
Example
This example illustrates one usage of StartExecutionPreview.
Sample Response
{
"ExecutionPreviewId": "2f27d6e5-9676-4708-b8bd-aef0aEXAMPLE"
}
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: