Skip to content

/AWS1/CL_EC2=>GETSPOTPLACEMENTSCORES()

About 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.

Method Signature

IMPORTING

Required arguments:

IV_TARGETCAPACITY TYPE /AWS1/EC2SPOTPLCMTSCORESTGTCAP /AWS1/EC2SPOTPLCMTSCORESTGTCAP

The target capacity.

Optional arguments:

IT_INSTANCETYPES TYPE /AWS1/CL_EC2INSTANCETYPES_W=>TT_INSTANCETYPES TT_INSTANCETYPES

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.

IV_TARGETCAPACITYUNITTYPE TYPE /AWS1/EC2TARGETCAPUNITTYPE /AWS1/EC2TARGETCAPUNITTYPE

The unit for the target capacity.

IV_SINGLEAVAILABILITYZONE TYPE /AWS1/EC2BOOLEAN /AWS1/EC2BOOLEAN

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.

IT_REGIONNAMES TYPE /AWS1/CL_EC2REGIONNAMES_W=>TT_REGIONNAMES TT_REGIONNAMES

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

IO_INSTREQUIREMENTSWITHMET TYPE REF TO /AWS1/CL_EC2INSTREQUIREMENTS01 /AWS1/CL_EC2INSTREQUIREMENTS01

The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.

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

IV_DRYRUN TYPE /AWS1/EC2BOOLEAN /AWS1/EC2BOOLEAN

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.

IV_MAXRESULTS TYPE /AWS1/EC2SPOTPLCSCORESMAXRSS /AWS1/EC2SPOTPLCSCORESMAXRSS

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.

IV_NEXTTOKEN TYPE /AWS1/EC2STRING /AWS1/EC2STRING

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

RETURNING

OO_OUTPUT TYPE REF TO /AWS1/CL_EC2GETSPOTPLCSCORESRS /AWS1/CL_EC2GETSPOTPLCSCORESRS