| Did this page help you? Yes No Tell us about it... |
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 |
|---|---|
Canceling a Spot Instance request does not terminate running Spot Instances associated with the request. |
| Name | Description | Required |
|---|---|---|
|
|
One or more Spot Instance request IDs. Type: String Default: None |
Yes |
The elements in the following table are wrapped in a
CancelSpotInstanceRequestsResponse structure.
| Name | Description |
|---|---|
|
|
The ID of the request. Type: xsd:string |
|
|
A list of Spot Instance requests. Each request is wrapped
in an |
This example cancels a Spot Instance request.
https://ec2.amazonaws.com/?Action=CancelSpotInstanceRequests &SpotInstanceRequestId.1=sir-e95fae02 &AUTHPARAMS
<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>