amazonka-ec2-2.0: Amazon Elastic Compute Cloud SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.EC2.GetSpotPlacementScores

Description

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.

This operation returns paginated results.

Synopsis

Creating a Request

data GetSpotPlacementScores Source #

See: newGetSpotPlacementScores smart constructor.

Constructors

GetSpotPlacementScores' 

Fields

  • dryRun :: Maybe Bool

    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.

  • instanceRequirementsWithMetadata :: Maybe InstanceRequirementsWithMetadataRequest

    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.

  • instanceTypes :: Maybe [Text]

    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.

  • maxResults :: Maybe Natural

    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.

  • nextToken :: Maybe Text

    The token for the next set of results.

  • regionNames :: Maybe [Text]

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

  • singleAvailabilityZone :: Maybe Bool

    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 :: Maybe TargetCapacityUnitType

    The unit for the target capacity.

    Default: units (translates to number of instances)

  • targetCapacity :: Natural

    The target capacity.

Instances

Instances details
ToHeaders GetSpotPlacementScores Source # 
Instance details

Defined in Amazonka.EC2.GetSpotPlacementScores

ToPath GetSpotPlacementScores Source # 
Instance details

Defined in Amazonka.EC2.GetSpotPlacementScores

ToQuery GetSpotPlacementScores Source # 
Instance details

Defined in Amazonka.EC2.GetSpotPlacementScores

AWSPager GetSpotPlacementScores Source # 
Instance details

Defined in Amazonka.EC2.GetSpotPlacementScores

AWSRequest GetSpotPlacementScores Source # 
Instance details

Defined in Amazonka.EC2.GetSpotPlacementScores

Associated Types

type AWSResponse GetSpotPlacementScores #

Generic GetSpotPlacementScores Source # 
Instance details

Defined in Amazonka.EC2.GetSpotPlacementScores

Associated Types

type Rep GetSpotPlacementScores :: Type -> Type #

Read GetSpotPlacementScores Source # 
Instance details

Defined in Amazonka.EC2.GetSpotPlacementScores

Show GetSpotPlacementScores Source # 
Instance details

Defined in Amazonka.EC2.GetSpotPlacementScores

NFData GetSpotPlacementScores Source # 
Instance details

Defined in Amazonka.EC2.GetSpotPlacementScores

Methods

rnf :: GetSpotPlacementScores -> () #

Eq GetSpotPlacementScores Source # 
Instance details

Defined in Amazonka.EC2.GetSpotPlacementScores

Hashable GetSpotPlacementScores Source # 
Instance details

Defined in Amazonka.EC2.GetSpotPlacementScores

type AWSResponse GetSpotPlacementScores Source # 
Instance details

Defined in Amazonka.EC2.GetSpotPlacementScores

type Rep GetSpotPlacementScores Source # 
Instance details

Defined in Amazonka.EC2.GetSpotPlacementScores

newGetSpotPlacementScores Source #

Create a value of GetSpotPlacementScores with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:dryRun:GetSpotPlacementScores', getSpotPlacementScores_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.

$sel:instanceRequirementsWithMetadata:GetSpotPlacementScores', getSpotPlacementScores_instanceRequirementsWithMetadata - 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.

GetSpotPlacementScores, getSpotPlacementScores_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.

$sel:maxResults:GetSpotPlacementScores', getSpotPlacementScores_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.

GetSpotPlacementScores, getSpotPlacementScores_nextToken - The token for the next set of results.

$sel:regionNames:GetSpotPlacementScores', getSpotPlacementScores_regionNames - The Regions used to narrow down the list of Regions to be scored. Enter the Region code, for example, us-east-1.

GetSpotPlacementScores, getSpotPlacementScores_singleAvailabilityZone - 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.

GetSpotPlacementScores, getSpotPlacementScores_targetCapacityUnitType - The unit for the target capacity.

Default: units (translates to number of instances)

GetSpotPlacementScores, getSpotPlacementScores_targetCapacity - The target capacity.

Request Lenses

getSpotPlacementScores_dryRun :: Lens' GetSpotPlacementScores (Maybe Bool) Source #

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.

getSpotPlacementScores_instanceRequirementsWithMetadata :: Lens' GetSpotPlacementScores (Maybe InstanceRequirementsWithMetadataRequest) Source #

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.

getSpotPlacementScores_instanceTypes :: Lens' GetSpotPlacementScores (Maybe [Text]) Source #

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.

getSpotPlacementScores_maxResults :: Lens' GetSpotPlacementScores (Maybe Natural) Source #

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.

getSpotPlacementScores_regionNames :: Lens' GetSpotPlacementScores (Maybe [Text]) Source #

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

getSpotPlacementScores_singleAvailabilityZone :: Lens' GetSpotPlacementScores (Maybe Bool) Source #

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.

getSpotPlacementScores_targetCapacityUnitType :: Lens' GetSpotPlacementScores (Maybe TargetCapacityUnitType) Source #

The unit for the target capacity.

Default: units (translates to number of instances)

Destructuring the Response

data GetSpotPlacementScoresResponse Source #

See: newGetSpotPlacementScoresResponse smart constructor.

Constructors

GetSpotPlacementScoresResponse' 

Fields

  • nextToken :: Maybe Text

    The token for the next set of results.

  • spotPlacementScores :: Maybe [SpotPlacementScore]

    The Spot placement score for the top 10 Regions or Availability Zones, scored on a scale from 1 to 10. Each score
 reflects how likely it is that each Region or Availability Zone will succeed at fulfilling the specified target capacity
 /at the time of the Spot placement score request/. A score of 10 means that your Spot capacity request is highly likely to succeed in that Region or Availability Zone.

    If you request a Spot placement score for Regions, a high score assumes that your fleet request will be configured to use all Availability Zones and the capacity-optimized allocation strategy. If you request a Spot placement score for Availability Zones, a high score assumes that your fleet request will be configured to use a single Availability Zone and the capacity-optimized allocation strategy.

    Different
 Regions or Availability Zones might return the same score.

    The Spot placement score serves as a recommendation only. No score guarantees that your Spot request will be fully or partially fulfilled.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Generic GetSpotPlacementScoresResponse Source # 
Instance details

Defined in Amazonka.EC2.GetSpotPlacementScores

Associated Types

type Rep GetSpotPlacementScoresResponse :: Type -> Type #

Read GetSpotPlacementScoresResponse Source # 
Instance details

Defined in Amazonka.EC2.GetSpotPlacementScores

Show GetSpotPlacementScoresResponse Source # 
Instance details

Defined in Amazonka.EC2.GetSpotPlacementScores

NFData GetSpotPlacementScoresResponse Source # 
Instance details

Defined in Amazonka.EC2.GetSpotPlacementScores

Eq GetSpotPlacementScoresResponse Source # 
Instance details

Defined in Amazonka.EC2.GetSpotPlacementScores

type Rep GetSpotPlacementScoresResponse Source # 
Instance details

Defined in Amazonka.EC2.GetSpotPlacementScores

type Rep GetSpotPlacementScoresResponse = D1 ('MetaData "GetSpotPlacementScoresResponse" "Amazonka.EC2.GetSpotPlacementScores" "amazonka-ec2-2.0-48L9RAJvmvzAdBkRegqWCL" 'False) (C1 ('MetaCons "GetSpotPlacementScoresResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "nextToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "spotPlacementScores") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [SpotPlacementScore])) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

newGetSpotPlacementScoresResponse Source #

Create a value of GetSpotPlacementScoresResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

GetSpotPlacementScores, getSpotPlacementScoresResponse_nextToken - The token for the next set of results.

$sel:spotPlacementScores:GetSpotPlacementScoresResponse', getSpotPlacementScoresResponse_spotPlacementScores - The Spot placement score for the top 10 Regions or Availability Zones, scored on a scale from 1 to 10. Each score
 reflects how likely it is that each Region or Availability Zone will succeed at fulfilling the specified target capacity
 /at the time of the Spot placement score request/. A score of 10 means that your Spot capacity request is highly likely to succeed in that Region or Availability Zone.

If you request a Spot placement score for Regions, a high score assumes that your fleet request will be configured to use all Availability Zones and the capacity-optimized allocation strategy. If you request a Spot placement score for Availability Zones, a high score assumes that your fleet request will be configured to use a single Availability Zone and the capacity-optimized allocation strategy.

Different
 Regions or Availability Zones might return the same score.

The Spot placement score serves as a recommendation only. No score guarantees that your Spot request will be fully or partially fulfilled.

$sel:httpStatus:GetSpotPlacementScoresResponse', getSpotPlacementScoresResponse_httpStatus - The response's http status code.

Response Lenses

getSpotPlacementScoresResponse_spotPlacementScores :: Lens' GetSpotPlacementScoresResponse (Maybe [SpotPlacementScore]) Source #

The Spot placement score for the top 10 Regions or Availability Zones, scored on a scale from 1 to 10. Each score
 reflects how likely it is that each Region or Availability Zone will succeed at fulfilling the specified target capacity
 /at the time of the Spot placement score request/. A score of 10 means that your Spot capacity request is highly likely to succeed in that Region or Availability Zone.

If you request a Spot placement score for Regions, a high score assumes that your fleet request will be configured to use all Availability Zones and the capacity-optimized allocation strategy. If you request a Spot placement score for Availability Zones, a high score assumes that your fleet request will be configured to use a single Availability Zone and the capacity-optimized allocation strategy.

Different
 Regions or Availability Zones might return the same score.

The Spot placement score serves as a recommendation only. No score guarantees that your Spot request will be fully or partially fulfilled.