POST /#Action=GetSpotPlacementScores

Calculates the Spot placement score for a Region or Availability Zone based on the specified target capacity and compute requirements.

You can specify your compute requirements either by using InstanceRequirementsWithMetadata and letting Amazon EC2 choose the optimal instance types to fulfill your Spot request, or you can specify the instance types by using InstanceTypes.

For more information, see Spot placement score in the Amazon EC2 User Guide.

Servers

Request headers

Name Type Required Description
X-Amz-Content-Sha256 String No
X-Amz-Credential String No
Content-Type String Yes The media type of the request body.

Default value: "text/xml"

X-Amz-Date String No
X-Amz-Algorithm String No
X-Amz-SignedHeaders String No
X-Amz-Security-Token String No
X-Amz-Signature String No

Query parameters

Name Type Required Description
Version String Yes

Possible values:

  • "2016-11-15"
MaxResults String No

Pagination limit

NextToken String No

Pagination token

Action String Yes

Possible values:

  • "GetSpotPlacementScores"

Request body fields

Name Type Required Description
MaxResults Integer No

The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. For more information, see Pagination.

InstanceTypes[] Array No

The instance types. We recommend that you specify at least three instance types. If you specify one or two instance types, or specify variations of a single instance type (for example, an m3.xlarge with and without instance storage), the returned placement score will always be low.

If you specify InstanceTypes, you can't specify InstanceRequirementsWithMetadata.

TargetCapacity Integer Yes

The target capacity.

RegionNames[] Array No

The Regions used to narrow down the list of Regions to be scored. Enter the Region code, for example, us-east-1.

NextToken String No

The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.

SingleAvailabilityZone Boolean No

Specify true so that the response returns a list of scored Availability Zones. Otherwise, the response returns a list of scored Regions.

A list of scored Availability Zones is useful if you want to launch all of your Spot capacity into a single Availability Zone.

TargetCapacityUnitType String No

The unit for the target capacity.

Default: units (translates to number of instances)

Possible values:

  • "memory-mib"
  • "vcpu"
  • "units"
DryRun Boolean No

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.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.