Skip to content

/AWS1/CL_EC2TARGETCAPACITYSPEC

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.

CONSTRUCTOR

IMPORTING

Optional arguments:

IV_TOTALTARGETCAPACITY TYPE /AWS1/EC2INTEGER /AWS1/EC2INTEGER

The number of units to request, filled the default target capacity type.

IV_ONDEMANDTARGETCAPACITY TYPE /AWS1/EC2INTEGER /AWS1/EC2INTEGER

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.

IV_SPOTTARGETCAPACITY TYPE /AWS1/EC2INTEGER /AWS1/EC2INTEGER

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.

IV_DEFAULTTARGETCAPACITYTYPE TYPE /AWS1/EC2DEFAULTTARGETCAPTYPE /AWS1/EC2DEFAULTTARGETCAPTYPE

The default target capacity type.

IV_TARGETCAPACITYUNITTYPE TYPE /AWS1/EC2TARGETCAPUNITTYPE /AWS1/EC2TARGETCAPUNITTYPE

The unit for the target capacity.


Queryable Attributes

TotalTargetCapacity

The number of units to request, filled the default target capacity type.

Accessible with the following methods

Method Description
GET_TOTALTARGETCAPACITY() Getter for TOTALTARGETCAPACITY, with configurable default
ASK_TOTALTARGETCAPACITY() Getter for TOTALTARGETCAPACITY w/ exceptions if field has no
HAS_TOTALTARGETCAPACITY() Determine if TOTALTARGETCAPACITY has a value

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.

Accessible with the following methods

Method Description
GET_ONDEMANDTARGETCAPACITY() Getter for ONDEMANDTARGETCAPACITY, with configurable default
ASK_ONDEMANDTARGETCAPACITY() Getter for ONDEMANDTARGETCAPACITY w/ exceptions if field has
HAS_ONDEMANDTARGETCAPACITY() Determine if ONDEMANDTARGETCAPACITY has a value

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.

Accessible with the following methods

Method Description
GET_SPOTTARGETCAPACITY() Getter for SPOTTARGETCAPACITY, with configurable default
ASK_SPOTTARGETCAPACITY() Getter for SPOTTARGETCAPACITY w/ exceptions if field has no
HAS_SPOTTARGETCAPACITY() Determine if SPOTTARGETCAPACITY has a value

DefaultTargetCapacityType

The default target capacity type.

Accessible with the following methods

Method Description
GET_DEFAULTTARGETCAPTYPE() Getter for DEFAULTTARGETCAPACITYTYPE, with configurable defa
ASK_DEFAULTTARGETCAPTYPE() Getter for DEFAULTTARGETCAPACITYTYPE w/ exceptions if field
HAS_DEFAULTTARGETCAPTYPE() Determine if DEFAULTTARGETCAPACITYTYPE has a value

TargetCapacityUnitType

The unit for the target capacity.

Accessible with the following methods

Method Description
GET_TARGETCAPACITYUNITTYPE() Getter for TARGETCAPACITYUNITTYPE, with configurable default
ASK_TARGETCAPACITYUNITTYPE() Getter for TARGETCAPACITYUNITTYPE w/ exceptions if field has
HAS_TARGETCAPACITYUNITTYPE() Determine if TARGETCAPACITYUNITTYPE has a value