Stop Instances operation


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

<wsdl-location>

Specifies the target Web Service Description Language (WSDL) URL for Amazon EC2

Examples:

Conditional:

  • Required if not specified in the request
  • If specified in the configuration and request, the value in the request overrides the value in the configuration
<endpoint-address>

Specifies the web service endpoint for the adapter to use while performing operations on Amazon EC2 instances across different regions
Default value: US East region: http://us-east-1.ec2.amazonaws.com/

No

<signature-properties>

Specifies the mode for signing the adapter request

Failed to execute the [panel] macro.

Conditional:

  • Required if not specified in the configuration
  • If <signature-properties mode = "key-files">, requires <private-key-file>
     and <certificate-file>
  • If <signature-properties mode = "key-data">, requires <private-key-data> and <certificate-data> 

    Failed to execute the [panel] macro.

<operation-name>

Contains the name of the operation: stop-instances

Yes

<instances-set>

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-request>
   <wsdl-location>http://ec2.amazonaws.com/doc/2009-11-30/</wsdl-location>
   <endpoint-address>http://us-east-1.ec2.amazonaws.com/</endpoint-address>
   <signature-properties mode = "key-files">
       <private-key-file>C:\Security\
pk-MJ5GIUNLM2XJ3VRJSYTKOFDWILELDQHB.PEM</private-key-file>
       <certificate-file>C:\Security\
cert-MJ5GIUNLM2XJ3VRJSYTKOFDWILELDQHB.PEM</certificate-file>
   </signature-properties>    
   <operation-name>stop-instances</operation-name>
   <parameters>
       <instances-set>
           <item>
               <instance-id>i-bd90bfd5</instance-id>
           </item>
       </instances-set>
   </parameters>
</amazon-ec2-request>

The following figure shows the response for the sample Stop Instances operation. 

Sample adapter response for the Stop Instances operation

<amazon-ec2-response>
   <metadata>
       <status>success</status>
   </metadata>
   <StopInstancesResponse>
       <requestId>cab287ed-09f4-4abd-81b0-af332eca359e</requestId>
       <instancesSet>
           <item>
               <instanceId>i-bd90bfd5</instanceId>
               <currentState>
                   <code>64</code>
                   <name>stopping</name>
               </currentState>
               <previousState>
                   <code>16</code>
                   <name>running</name>
               </previousState>
           </item>
       </instancesSet>
   </StopInstancesResponse>
</amazon-ec2-response>

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*