Stop Instances operation for the Amazon EC2 REST adapter
The Stop Instances operation enables you to stop an instance that uses an Amazon EBS volume as the root device.
Instances that use Amazon EBS volumes as their root devices can be quickly stopped and started. When an instance is stopped, the compute resources associated with the instance are released and you are not billed for hourly instance usage. However, your root partition Amazon EBS volume still retains your data, and you are charged for Amazon EBS volume usage. You can restart your instance at any time.
The following figure shows a sample <items>
XML element for the Stop Instances operation.
Sample <items>
XML element for the Stop Instances operations
<items>
<item>
<parameters>
<instances-set>
<!--Zero or more repetitions:-->
<item>
<instance-id></instance-id>
</item>
</instances-set>
</parameters>
</item>
</items>
The following table describes the elements for this adapter request.
Adapter request elements for the Stop Instances operation
Element | Definition | Required |
---|---|---|
<access-key> | Specifies the Amazon Web Services (AWS) access key You need to generate the AWS access key by going to the Security Credentials tab in the AWS console. | Conditional;
|
<secret-key> | Specifies the AWS secret access key You need to generate the AWS secret access key by going to the Security Credentials tab in the AWS console. | Conditional;
|
<region> | Specifies the region with which you want the adapter to communicate Amazon EC2 is hosted in multiple locations world-wide. You must specify the region in which you want the adapter to perform the actions. Valid values:
| No |
| Contains the name of the operation: stop-instances | Yes |
| Contains one or more instance IDs corresponding to the instances that you want to stop | Yes |
The following figure shows a sample adapter request for the Start Instances operation.
Sample adapter request for the Stop Instances operation
<amazon-ec2-rest-request>
<operation-name>stop-instances</operation-name>
<parameters>
<items>
<item>
<parameters>
<instances-set>
<item>
<instance-id>i-65be346c</instance-id>
</item>
</instances-set>
</parameters>
</item>
</items>
</parameters>
</amazon-ec2-rest-request>
The following figure shows the response for the sample Stop Instances operation.
Sample adapter response for the Stop Instances operation
<amazon-ec2-rest-response>
<metadata>
<status>success</status>
</metadata>
<StopInstancesResponse>
<instancesSet>
<item>
<instanceId>i-65be346c</instanceId>
<currentState>
<code>64</code>
<name>stopping</name>
</currentState>
<previousState>
<code>16</code>
<name>running</name>
</previousState>
</item>
</instancesSet>
</StopInstancesResponse>
</amazon-ec2-rest-response>
Comments
Log in or register to comment.