Class CfnEC2FleetPropsMixin.OnDemandOptionsRequestProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnEC2FleetPropsMixin.OnDemandOptionsRequestProperty>
- Enclosing interface:
CfnEC2FleetPropsMixin.OnDemandOptionsRequestProperty
CfnEC2FleetPropsMixin.OnDemandOptionsRequestProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionallocationStrategy(String allocationStrategy) build()Builds the configured instance.capacityReservationOptions(CfnEC2FleetPropsMixin.CapacityReservationOptionsRequestProperty capacityReservationOptions) capacityReservationOptions(IResolvable capacityReservationOptions) maxTotalPrice(String maxTotalPrice) Sets the value ofCfnEC2FleetPropsMixin.OnDemandOptionsRequestProperty.getMaxTotalPrice()minTargetCapacity(Number minTargetCapacity) singleAvailabilityZone(Boolean singleAvailabilityZone) singleAvailabilityZone(IResolvable singleAvailabilityZone) singleInstanceType(Boolean singleInstanceType) singleInstanceType(IResolvable singleInstanceType)
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
allocationStrategy
@Stability(Stable) public CfnEC2FleetPropsMixin.OnDemandOptionsRequestProperty.Builder allocationStrategy(String allocationStrategy) - Parameters:
allocationStrategy- The strategy that determines the order of the launch template overrides to use in fulfilling On-Demand capacity.lowest-price- EC2 Fleet uses price to determine the order, launching the lowest price first.prioritized- EC2 Fleet uses the priority that you assigned to each launch template override, launching the highest priority first.Default:
lowest-price- Returns:
this
-
capacityReservationOptions
@Stability(Stable) public CfnEC2FleetPropsMixin.OnDemandOptionsRequestProperty.Builder capacityReservationOptions(IResolvable capacityReservationOptions) Sets the value ofCfnEC2FleetPropsMixin.OnDemandOptionsRequestProperty.getCapacityReservationOptions()- Parameters:
capacityReservationOptions- The strategy for using unused Capacity Reservations for fulfilling On-Demand capacity. Supported only for fleets of typeinstant.- Returns:
this
-
capacityReservationOptions
@Stability(Stable) public CfnEC2FleetPropsMixin.OnDemandOptionsRequestProperty.Builder capacityReservationOptions(CfnEC2FleetPropsMixin.CapacityReservationOptionsRequestProperty capacityReservationOptions) Sets the value ofCfnEC2FleetPropsMixin.OnDemandOptionsRequestProperty.getCapacityReservationOptions()- Parameters:
capacityReservationOptions- The strategy for using unused Capacity Reservations for fulfilling On-Demand capacity. Supported only for fleets of typeinstant.- Returns:
this
-
maxTotalPrice
@Stability(Stable) public CfnEC2FleetPropsMixin.OnDemandOptionsRequestProperty.Builder maxTotalPrice(String maxTotalPrice) Sets the value ofCfnEC2FleetPropsMixin.OnDemandOptionsRequestProperty.getMaxTotalPrice()- Parameters:
maxTotalPrice- The maximum amount per hour for On-Demand Instances that you're willing to pay.If your fleet includes T instances that are configured as
unlimited, and if their average CPU usage exceeds the baseline utilization, you will incur a charge for surplus credits. TheMaxTotalPricedoes not account for surplus credits, and, if you use surplus credits, your final cost might be higher than what you specified forMaxTotalPrice. For more information, see Surplus credits can incur charges in the Amazon EC2 User Guide .- Returns:
this
-
minTargetCapacity
@Stability(Stable) public CfnEC2FleetPropsMixin.OnDemandOptionsRequestProperty.Builder minTargetCapacity(Number minTargetCapacity) - Parameters:
minTargetCapacity- The minimum target capacity for On-Demand Instances in the fleet. If this minimum capacity isn't reached, no instances are launched.Constraints: Maximum value of
1000. Supported only for fleets of typeinstant.At least one of the following must be specified:
SingleAvailabilityZone|SingleInstanceType- Returns:
this
-
singleAvailabilityZone
@Stability(Stable) public CfnEC2FleetPropsMixin.OnDemandOptionsRequestProperty.Builder singleAvailabilityZone(Boolean singleAvailabilityZone) - Parameters:
singleAvailabilityZone- Indicates that the fleet launches all On-Demand Instances into a single Availability Zone. Supported only for fleets of typeinstant.- Returns:
this
-
singleAvailabilityZone
@Stability(Stable) public CfnEC2FleetPropsMixin.OnDemandOptionsRequestProperty.Builder singleAvailabilityZone(IResolvable singleAvailabilityZone) - Parameters:
singleAvailabilityZone- Indicates that the fleet launches all On-Demand Instances into a single Availability Zone. Supported only for fleets of typeinstant.- Returns:
this
-
singleInstanceType
@Stability(Stable) public CfnEC2FleetPropsMixin.OnDemandOptionsRequestProperty.Builder singleInstanceType(Boolean singleInstanceType) - Parameters:
singleInstanceType- Indicates that the fleet uses a single instance type to launch all On-Demand Instances in the fleet. Supported only for fleets of typeinstant.- Returns:
this
-
singleInstanceType
@Stability(Stable) public CfnEC2FleetPropsMixin.OnDemandOptionsRequestProperty.Builder singleInstanceType(IResolvable singleInstanceType) - Parameters:
singleInstanceType- Indicates that the fleet uses a single instance type to launch all On-Demand Instances in the fleet. Supported only for fleets of typeinstant.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnEC2FleetPropsMixin.OnDemandOptionsRequestProperty>- Returns:
- a new instance of
CfnEC2FleetPropsMixin.OnDemandOptionsRequestProperty - Throws:
NullPointerException- if any required attribute was not provided
-