TerminateInstances

The TerminateInstances operation shuts down one or more instances. This operation is idempotent and terminating an instance that is in the process of shutting down (or already terminated) will succeed.

Terminated instances remain visible for a short period of time (approximately one hour) after termination, after which their instance ID is invalidated.

The following table describes the request parameters for TerminateInstances. Parameter names are case sensitive.

Element NameDefinitionRequired?Type
instancesSet One or more instance IDs returned from previous calls to RunInstances. Yesxsd:string[]

The following table describes the default response tags included in TerminateInstances responses.

Element NameDefinitionType
instancesSet A complex type containing describing the current and new state of each instance specified. ec2:TerminateInstancesResponseInfoType[]
<TerminateInstances xmlns="http://ec2.amazonaws.com/doc/2007-03-01">
  <instancesSet>
    <item>
      <instanceId>i-28a64341</instanceId>
    </item>
  </instancesSet>
</TerminateInstances>
<TerminateInstancesResponse xmlns="http://ec2.amazonaws.com/doc/2007-03-01">
  <instancesSet>
    <item>
      <instanceId>i-28a64341</instanceId>
      <shutdownState>
        <code>32</code>
        <name>shutting-down</name>
      </shutdownState>
      <previousState>
        <code>16</code>
        <name>running</name>
      </previousState>
    </item>
  </instancesSet>
</TerminateInstancesResponse>