CreateReplaceRootVolumeTask - Amazon Elastic Compute Cloud
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China.


Creates a root volume replacement task for an Amazon EC2 instance. The root volume can either be restored to its initial launch state, or it can be restored using a specific snapshot.

For more information, see Replace a root volume in the Amazon Elastic Compute Cloud User Guide.

Request Parameters

The following parameters are for this specific action. For more information about required and optional parameters that are common to all actions, see Common Query Parameters.


Unique, case-sensitive identifier you provide to ensure the idempotency of the request. If you do not specify a client token, a randomly generated token is used for the request to ensure idempotency. For more information, see Ensuring idempotency.

Type: String

Required: No


Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

Type: Boolean

Required: No


The ID of the instance for which to replace the root volume.

Type: String

Required: Yes


The ID of the snapshot from which to restore the replacement root volume. If you want to restore the volume to the initial launch state, omit this parameter.

Type: String

Required: No


The tags to apply to the root volume replacement task.

Type: Array of TagSpecification objects

Required: No

Response Elements

The following elements are returned by the service.


Information about the root volume replacement task.

Type: ReplaceRootVolumeTask object


The ID of the request.

Type: String


For information about the errors that are common to all actions, see Common client error codes.

See Also

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