Class TargetCapacitySpecificationRequest
- java.lang.Object
-
- software.amazon.awssdk.services.ec2.model.TargetCapacitySpecificationRequest
-
- All Implemented Interfaces:
Serializable
,SdkPojo
,ToCopyableBuilder<TargetCapacitySpecificationRequest.Builder,TargetCapacitySpecificationRequest>
@Generated("software.amazon.awssdk:codegen") public final class TargetCapacitySpecificationRequest extends Object implements SdkPojo, Serializable, ToCopyableBuilder<TargetCapacitySpecificationRequest.Builder,TargetCapacitySpecificationRequest>
The number of units to request. You can choose to set the target capacity as the number of instances. Or you can set the target capacity to 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 InstanceMaxTotalPrice
parameter, or both parameters 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. TheMaxTotalPrice
parameters are located in OnDemandOptionsRequest and SpotOptionsRequest.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
TargetCapacitySpecificationRequest.Builder
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
totalTargetCapacity
public final Integer totalTargetCapacity()
The number of units to request, filled using the default target capacity type.
- Returns:
- The number of units to request, filled using the default target capacity type.
-
onDemandTargetCapacity
public final Integer onDemandTargetCapacity()
The number of On-Demand units to request.
- Returns:
- The number of On-Demand units to request.
-
spotTargetCapacity
public final Integer spotTargetCapacity()
The number of Spot units to request.
- Returns:
- The number of Spot units to request.
-
defaultTargetCapacityType
public final DefaultTargetCapacityType defaultTargetCapacityType()
The default target capacity type.
If the service returns an enum value that is not available in the current SDK version,
defaultTargetCapacityType
will returnDefaultTargetCapacityType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromdefaultTargetCapacityTypeAsString()
.- Returns:
- The default target capacity type.
- See Also:
DefaultTargetCapacityType
-
defaultTargetCapacityTypeAsString
public final String defaultTargetCapacityTypeAsString()
The default target capacity type.
If the service returns an enum value that is not available in the current SDK version,
defaultTargetCapacityType
will returnDefaultTargetCapacityType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromdefaultTargetCapacityTypeAsString()
.- Returns:
- The default target capacity type.
- See Also:
DefaultTargetCapacityType
-
targetCapacityUnitType
public final TargetCapacityUnitType targetCapacityUnitType()
The unit for the target capacity. You can specify this parameter only when using attributed-based instance type selection.
Default:
units
(the number of instances)If the service returns an enum value that is not available in the current SDK version,
targetCapacityUnitType
will returnTargetCapacityUnitType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromtargetCapacityUnitTypeAsString()
.- Returns:
- The unit for the target capacity. You can specify this parameter only when using attributed-based
instance type selection.
Default:
units
(the number of instances) - See Also:
TargetCapacityUnitType
-
targetCapacityUnitTypeAsString
public final String targetCapacityUnitTypeAsString()
The unit for the target capacity. You can specify this parameter only when using attributed-based instance type selection.
Default:
units
(the number of instances)If the service returns an enum value that is not available in the current SDK version,
targetCapacityUnitType
will returnTargetCapacityUnitType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromtargetCapacityUnitTypeAsString()
.- Returns:
- The unit for the target capacity. You can specify this parameter only when using attributed-based
instance type selection.
Default:
units
(the number of instances) - See Also:
TargetCapacityUnitType
-
toBuilder
public TargetCapacitySpecificationRequest.Builder toBuilder()
- Specified by:
toBuilder
in interfaceToCopyableBuilder<TargetCapacitySpecificationRequest.Builder,TargetCapacitySpecificationRequest>
-
builder
public static TargetCapacitySpecificationRequest.Builder builder()
-
serializableBuilderClass
public static Class<? extends TargetCapacitySpecificationRequest.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFields
in interfaceSdkPojo
-
toString
public final String toString()
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
-
sdkFieldNameToField
public final Map<String,SdkField<?>> sdkFieldNameToField()
- Specified by:
sdkFieldNameToField
in interfaceSdkPojo
-
-