Start Instances operation for the Amazon EC2 REST adapter
The Start Instances operation enables you to start an instance that uses an Amazon EBS volume as the root device.
You can quickly start and stop instances using Amazon EBS volumes as root devices. When an instance is stopped, the resources used by the instance are released and you are not billed for hourly instance usage. Amazon EC2 also allows you to restart a stopped instance.
The following figure shows a sample <items> XML element for the Start Instances operation.
Sample <items> XML element for the Start Instances operations
<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 Start 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;
|
<session-token> | Specifies the temporary session token generated using the AWS APIs. | Conditional; You must specify the Access Key and Secret Key as well in the configuration or the adapter request, else the <session-token> value is ignored. |
<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 |
<operation-name> | Contains the name of the operation: start-instances | Yes |
<instance-set> | Contains one or more instance IDs corresponding to the instances that you want to start | Yes |
The following figure shows a sample adapter request for the Start Instances operation.
Sample adapter request for the Start Instances operation
<operation-name>start-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 Start Instances operation.
Sample adapter response for the Start Instances operation
<metadata>
<status>success</status>
</metadata>
<StartInstancesResponse>
<instancesSet>
<item>
<instanceId>i-65be346c</instanceId>
<currentState>
<code>0</code>
<name>pending</name>
</currentState>
<previousState>
<code>80</code>
<name>stopped</name>
</previousState>
</item>
</instancesSet>
</StartInstancesResponse>
</amazon-ec2-rest-response>