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.Types.TargetCapacitySpecification

Description

 
Synopsis

Documentation

data TargetCapacitySpecification Source #

The number of units to request. You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O. If the request type is maintain, you can specify a target capacity of 0 and add capacity later.

You can use the On-Demand Instance MaxTotalPrice parameter, the Spot Instance MaxTotalPrice, or both to ensure that your fleet cost does not exceed your budget. If you set a maximum price per hour for the On-Demand Instances and Spot Instances in your request, EC2 Fleet will launch instances until it reaches the maximum amount that you're willing to pay. When the maximum amount you're willing to pay is reached, the fleet stops launching instances even if it hasn’t met the target capacity. The MaxTotalPrice parameters are located in OnDemandOptions and SpotOptions.

See: newTargetCapacitySpecification smart constructor.

Constructors

TargetCapacitySpecification' 

Fields

Instances

Instances details
FromXML TargetCapacitySpecification Source # 
Instance details

Defined in Amazonka.EC2.Types.TargetCapacitySpecification

Generic TargetCapacitySpecification Source # 
Instance details

Defined in Amazonka.EC2.Types.TargetCapacitySpecification

Associated Types

type Rep TargetCapacitySpecification :: Type -> Type #

Read TargetCapacitySpecification Source # 
Instance details

Defined in Amazonka.EC2.Types.TargetCapacitySpecification

Show TargetCapacitySpecification Source # 
Instance details

Defined in Amazonka.EC2.Types.TargetCapacitySpecification

NFData TargetCapacitySpecification Source # 
Instance details

Defined in Amazonka.EC2.Types.TargetCapacitySpecification

Eq TargetCapacitySpecification Source # 
Instance details

Defined in Amazonka.EC2.Types.TargetCapacitySpecification

Hashable TargetCapacitySpecification Source # 
Instance details

Defined in Amazonka.EC2.Types.TargetCapacitySpecification

type Rep TargetCapacitySpecification Source # 
Instance details

Defined in Amazonka.EC2.Types.TargetCapacitySpecification

type Rep TargetCapacitySpecification = D1 ('MetaData "TargetCapacitySpecification" "Amazonka.EC2.Types.TargetCapacitySpecification" "amazonka-ec2-2.0-48L9RAJvmvzAdBkRegqWCL" 'False) (C1 ('MetaCons "TargetCapacitySpecification'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "defaultTargetCapacityType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe DefaultTargetCapacityType)) :*: S1 ('MetaSel ('Just "onDemandTargetCapacity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Int))) :*: (S1 ('MetaSel ('Just "spotTargetCapacity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Int)) :*: (S1 ('MetaSel ('Just "targetCapacityUnitType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe TargetCapacityUnitType)) :*: S1 ('MetaSel ('Just "totalTargetCapacity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Int))))))

newTargetCapacitySpecification :: TargetCapacitySpecification Source #

Create a value of TargetCapacitySpecification 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:defaultTargetCapacityType:TargetCapacitySpecification', targetCapacitySpecification_defaultTargetCapacityType - The default TotalTargetCapacity, which is either Spot or On-Demand.

$sel:onDemandTargetCapacity:TargetCapacitySpecification', targetCapacitySpecification_onDemandTargetCapacity - The number of On-Demand units to request. If you specify a target capacity for Spot units, you cannot specify a target capacity for On-Demand units.

$sel:spotTargetCapacity:TargetCapacitySpecification', targetCapacitySpecification_spotTargetCapacity - The maximum number of Spot units to launch. If you specify a target capacity for On-Demand units, you cannot specify a target capacity for Spot units.

$sel:targetCapacityUnitType:TargetCapacitySpecification', targetCapacitySpecification_targetCapacityUnitType - The unit for the target capacity.

Default: units (translates to number of instances)

$sel:totalTargetCapacity:TargetCapacitySpecification', targetCapacitySpecification_totalTargetCapacity - The number of units to request, filled using DefaultTargetCapacityType.

targetCapacitySpecification_onDemandTargetCapacity :: Lens' TargetCapacitySpecification (Maybe Int) Source #

The number of On-Demand units to request. If you specify a target capacity for Spot units, you cannot specify a target capacity for On-Demand units.

targetCapacitySpecification_spotTargetCapacity :: Lens' TargetCapacitySpecification (Maybe Int) Source #

The maximum number of Spot units to launch. If you specify a target capacity for On-Demand units, you cannot specify a target capacity for Spot units.

targetCapacitySpecification_targetCapacityUnitType :: Lens' TargetCapacitySpecification (Maybe TargetCapacityUnitType) Source #

The unit for the target capacity.

Default: units (translates to number of instances)

targetCapacitySpecification_totalTargetCapacity :: Lens' TargetCapacitySpecification (Maybe Int) Source #

The number of units to request, filled using DefaultTargetCapacityType.