Menu
Amazon Elastic Compute Cloud
API Reference (API Version 2016-11-15)

DescribeSpotFleetRequests

Describes your Spot fleet requests.

Spot fleet requests are deleted 48 hours after they are canceled and their instances are terminated.

Request Parameters

The following parameters are for this specific action. For more information about required and optional parameters that are common to all actions, see Common Query Parameters.

DryRun

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

Type: Boolean

Required: No

MaxResults

The maximum number of results to return in a single call. Specify a value between 1 and 1000. The default value is 1000. To retrieve the remaining results, make another call with the returned NextToken value.

Type: Integer

Required: No

NextToken

The token for the next set of results.

Type: String

Required: No

SpotFleetRequestId.N

The IDs of the Spot fleet requests.

Type: Array of strings

Required: No

Response Elements

The following elements are returned by the service.

nextToken

The token required to retrieve the next set of results. This value is null when there are no more results to return.

Type: String

requestId

The ID of the request.

Type: String

spotFleetRequestConfigSet

Information about the configuration of your Spot fleet.

Type: Array of SpotFleetRequestConfig objects

Errors

For information about the errors that are common to all actions, see Common Client Errors.

Example

Example

This example describes all of your Spot fleet requests.

Sample Request

https://ec2.amazonaws.com/?Action=DescribeSpotFleetRequests
&AUTHPARAMS

Sample Response

<DescribeSpotFleetRequestsResponse xmlns="http://ec2.amazonaws.com/doc/2016-11-15/">
    <requestId>4d68a6cc-8f2e-4be1-b425-example</requestId>
    <spotFleetRequestConfigSet>
        <item>
            <spotFleetRequestId>sfr-12345678-cb31-425e-8c23-example2710</spotFleetRequestId>
            <spotFleetRequestState>cancelled</spotFleetRequestState>
            <spotFleetRequestConfig>
                <spotPrice>0.0153</spotPrice>
                <targetCapacity>20</targetCapacity>
                <iamFleetRole>arn:aws:iam::123456789011:role/spot-fleet-role</iamFleetRole>
                <launchSpecifications>
                    <item>
                        <subnetId>subnet-1a2b3c4d</subnetId>
                        <ebsOptimized>false</ebsOptimized>
                        <imageId>ami-1ecae776</imageId>
                        <instanceType>m4.xlarge</instanceType>
                    </item>
                    <item>
                        <subnetId>subnet-1a2b3c4d</subnetId>
                        <ebsOptimized>false</ebsOptimized>
                        <imageId>ami-1ecae776</imageId>
                        <instanceType>m3.medium</instanceType>
                    </item>
                </launchSpecifications>
            </spotFleetRequestConfig>
        </item>
        <item>
            <spotFleetRequestId>sfr-abcdefgh-e71f-450d-880d-examplec127</spotFleetRequestId>
            <spotFleetRequestState>active</spotFleetRequestState>
            <spotFleetRequestConfig>
                <spotPrice>0.0153</spotPrice>
                <targetCapacity>5</targetCapacity>
                <iamFleetRole>arn:aws:iam::123456789011:role/spot-fleet-role</iamFleetRole>
                <launchSpecifications>
                    <item>
                        <subnetId>subnet-abc123ab</subnetId>
                        <ebsOptimized>false</ebsOptimized>
                        <imageId>ami-1ecae776</imageId>
                        <instanceType>m4.large</instanceType>
                    </item>
                    <item>
                        <subnetId>subnet-abc123ab</subnetId>
                        <ebsOptimized>false</ebsOptimized>
                        <imageId>ami-1ecae776</imageId>
                        <instanceType>m3.medium</instanceType>
                    </item>
                </launchSpecifications>
            </spotFleetRequestConfig>
        </item>
    </spotFleetRequestConfigSet>
</DescribeSpotFleetRequestsResponse>

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: