TerminateInstances
Description
Shuts down one or more instances. This operation is idempotent; if you terminate an instance more than once, each call will succeed.
Terminated instances will remain visible after termination (approximately one hour).
Request Parameters
| Name | Description | Required |
|---|---|---|
|
Type: |
Ancestor: None
Children: instancesSet
instancesSet
Set of instances.
Type: TerminateInstancesInfoType
Ancestor: TerminateInstancesType
Children: item
Yes
item
Information for a instance.
Type: TerminateInstancesItemType
Ancestor: instancesSet
Children: instanceId
Yes
instanceId
Instance ID to terminate.
Type: xsd:string
Default: None
Ancestor: item
Children: None
Yes
Response Elements
| Name | Description |
|---|---|
|
|
Type: TerminateInstancesResponseType Ancestor: None Children: |
|
The ID of the request. Type: xsd:string Ancestor: Children: None |
|
Instances set. Type: TerminateInstancesResponseInfoType Ancestor: Children: |
|
Response item. Type: TerminateInstancesResponseItemType Ancestor: Children: |
|
Instance ID. Type: xsd:string Ancestor: Children: None |
|
Shutdown state. Type: InstanceStateType Ancestor: Children: |
|
A 16-bit unsigned integer. The high byte is an opaque internal value and should be ignored. The low byte is set based on the state represented: Type: xsd:int Ancestor: Children: None |
|
The current state of the instance. Type: xsd:string Ancestor: Children: None |
|
Previous state. Type: InstanceStateType Ancestor: Children: |
|
A 16-bit unsigned integer. The high byte is an opaque internal value and should be ignored. The low byte is set based on the state represented: Type: xsd:int Ancestor: Children: None |
|
The current state of the instance. Type: xsd:string Ancestor: Children: None |
Examples
Example Request
This example terminates the i-3ea74257 instance.
<TerminateInstances xmlns="http://ec2.amazonaws.com/doc/2009-08-15/">
<instancesSet>
<item>
<instanceId>i-3ea74257</instanceId>
</item>
</instancesSet>
</TerminateInstances>
Example Response
<TerminateInstancesResponse xmlns="http://ec2.amazonaws.com/doc/2009-08-15/">
<instancesSet>
<item>
<instanceId>i-3ea74257</instanceId>
<shutdownState>
<code>32</code>
<name>shutting-down</name>
</shutdownState>
<previousState>
<code>16</code>
<name>running</name>
</previousState>
</item>
</instancesSet>
</TerminateInstancesResponse>