Amazon Elastic Compute Cloud
API Reference (API Version 2011-12-15)
Print this pageEmail this pageGo to the ForumsView the PDFShare this page on TwitterShare this page on FacebookBookmark this page on DeliciousSubmit this page to RedditSubmit this page to DiggDid this page help you?  Yes  No   Tell us about it...

CancelSpotInstanceRequests

Description

Cancels one or more Spot Instance requests. Spot Instances are instances that Amazon EC2 starts on your behalf when the maximum price that you specify exceeds the current Spot Price. Amazon EC2 periodically sets the Spot Price based on available Spot Instance capacity and current Spot Instance requests. For more information about Spot Instances, go to Spot Instances in the Amazon Elastic Compute Cloud User Guide.

[Important]Important

Canceling a Spot Instance request does not terminate running Spot Instances associated with the request.

Request Parameters

NameDescriptionRequired

SpotInstanceRequestId.n

One or more Spot Instance request IDs.

Type: String

Default: None

Yes

Response Elements

The elements in the following table are wrapped in a CancelSpotInstanceRequestsResponse structure.

NameDescription

requestId

The ID of the request.

Type: xsd:string

spotInstanceRequestSet

A list of Spot Instance requests. Each request is wrapped in an item element.

Type: CancelSpotInstanceRequestsResponseSetItemType

Examples

Example Request

This example cancels a Spot Instance request.

https://ec2.amazonaws.com/?Action=CancelSpotInstanceRequests
&SpotInstanceRequestId.1=sir-e95fae02
&AUTHPARAMS

Example Response

<CancelSpotInstanceRequestsResponse xmlns="http://ec2.amazonaws.com/doc/2011-12-15/">
  <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId>
  <spotInstanceRequestSet>
    <item>
      <spotInstanceRequestId>sir-e95fae02</spotInstanceRequestId>
      <state>cancelled</state>
    </item>
  </spotInstanceRequestSet></CancelSpotInstanceRequestsResponse>