

# StartExecutionPreview
<a name="API_StartExecutionPreview"></a>

Initiates the process of creating a preview showing the effects that running a specified Automation runbook would have on the targeted resources.

## Request Syntax
<a name="API_StartExecutionPreview_RequestSyntax"></a>

```
{
   "DocumentName": "string",
   "DocumentVersion": "string",
   "ExecutionInputs": { ... }
}
```

## Request Parameters
<a name="API_StartExecutionPreview_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [DocumentName](#API_StartExecutionPreview_RequestSyntax) **   <a name="systemsmanager-StartExecutionPreview-request-DocumentName"></a>
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](#API_StartExecutionPreview_RequestSyntax) **   <a name="systemsmanager-StartExecutionPreview-request-DocumentVersion"></a>
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](#API_StartExecutionPreview_RequestSyntax) **   <a name="systemsmanager-StartExecutionPreview-request-ExecutionInputs"></a>
Information about the inputs that can be specified for the preview operation.   
Type: [ExecutionInputs](API_ExecutionInputs.md) object  
 **Note: **This object is a Union. Only one member of this object can be specified or returned.  
Required: No

## Response Syntax
<a name="API_StartExecutionPreview_ResponseSyntax"></a>

```
{
   "ExecutionPreviewId": "string"
}
```

## Response Elements
<a name="API_StartExecutionPreview_ResponseElements"></a>

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](#API_StartExecutionPreview_ResponseSyntax) **   <a name="systemsmanager-StartExecutionPreview-response-ExecutionPreviewId"></a>
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
<a name="API_StartExecutionPreview_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** 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.    
 ** ReasonCode **   
The reason code for the invalid request.
HTTP Status Code: 400

## Examples
<a name="API_StartExecutionPreview_Examples"></a>

### Example
<a name="API_StartExecutionPreview_Example_1"></a>

This example illustrates one usage of StartExecutionPreview.

#### Sample Request
<a name="API_StartExecutionPreview_Example_1_Request"></a>

```
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
<a name="API_StartExecutionPreview_Example_2"></a>

This example illustrates one usage of StartExecutionPreview.

#### Sample Response
<a name="API_StartExecutionPreview_Example_2_Response"></a>

```
{
    "ExecutionPreviewId": "2f27d6e5-9676-4708-b8bd-aef0aEXAMPLE"
}
```

## See Also
<a name="API_StartExecutionPreview_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/ssm-2014-11-06/StartExecutionPreview) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/ssm-2014-11-06/StartExecutionPreview) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/ssm-2014-11-06/StartExecutionPreview) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/ssm-2014-11-06/StartExecutionPreview) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/ssm-2014-11-06/StartExecutionPreview) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/ssm-2014-11-06/StartExecutionPreview) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/ssm-2014-11-06/StartExecutionPreview) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/ssm-2014-11-06/StartExecutionPreview) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/ssm-2014-11-06/StartExecutionPreview) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/ssm-2014-11-06/StartExecutionPreview) 