Struct aws_sdk_ec2::model::on_demand_options::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for OnDemandOptions
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn allocation_strategy(self, input: FleetOnDemandAllocationStrategy) -> Self
pub fn allocation_strategy(self, input: FleetOnDemandAllocationStrategy) -> Self
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
sourcepub fn set_allocation_strategy(
self,
input: Option<FleetOnDemandAllocationStrategy>
) -> Self
pub fn set_allocation_strategy(
self,
input: Option<FleetOnDemandAllocationStrategy>
) -> Self
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
sourcepub fn capacity_reservation_options(
self,
input: CapacityReservationOptions
) -> Self
pub fn capacity_reservation_options(
self,
input: CapacityReservationOptions
) -> Self
The strategy for using unused Capacity Reservations for fulfilling On-Demand capacity.
Supported only for fleets of type instant
.
sourcepub fn set_capacity_reservation_options(
self,
input: Option<CapacityReservationOptions>
) -> Self
pub fn set_capacity_reservation_options(
self,
input: Option<CapacityReservationOptions>
) -> Self
The strategy for using unused Capacity Reservations for fulfilling On-Demand capacity.
Supported only for fleets of type instant
.
sourcepub fn single_instance_type(self, input: bool) -> Self
pub fn single_instance_type(self, input: bool) -> Self
Indicates that the fleet uses a single instance type to launch all On-Demand Instances in the fleet.
Supported only for fleets of type instant
.
sourcepub fn set_single_instance_type(self, input: Option<bool>) -> Self
pub fn set_single_instance_type(self, input: Option<bool>) -> Self
Indicates that the fleet uses a single instance type to launch all On-Demand Instances in the fleet.
Supported only for fleets of type instant
.
sourcepub fn single_availability_zone(self, input: bool) -> Self
pub fn single_availability_zone(self, input: bool) -> Self
Indicates that the fleet launches all On-Demand Instances into a single Availability Zone.
Supported only for fleets of type instant
.
sourcepub fn set_single_availability_zone(self, input: Option<bool>) -> Self
pub fn set_single_availability_zone(self, input: Option<bool>) -> Self
Indicates that the fleet launches all On-Demand Instances into a single Availability Zone.
Supported only for fleets of type instant
.
sourcepub fn min_target_capacity(self, input: i32) -> Self
pub fn min_target_capacity(self, input: i32) -> Self
The minimum target capacity for On-Demand Instances in the fleet. If the minimum target capacity is not reached, the fleet launches no instances.
Supported only for fleets of type instant
.
At least one of the following must be specified: SingleAvailabilityZone
| SingleInstanceType
sourcepub fn set_min_target_capacity(self, input: Option<i32>) -> Self
pub fn set_min_target_capacity(self, input: Option<i32>) -> Self
The minimum target capacity for On-Demand Instances in the fleet. If the minimum target capacity is not reached, the fleet launches no instances.
Supported only for fleets of type instant
.
At least one of the following must be specified: SingleAvailabilityZone
| SingleInstanceType
sourcepub fn max_total_price(self, input: impl Into<String>) -> Self
pub fn max_total_price(self, input: impl Into<String>) -> Self
The maximum amount per hour for On-Demand Instances that you're willing to pay.
sourcepub fn set_max_total_price(self, input: Option<String>) -> Self
pub fn set_max_total_price(self, input: Option<String>) -> Self
The maximum amount per hour for On-Demand Instances that you're willing to pay.
sourcepub fn build(self) -> OnDemandOptions
pub fn build(self) -> OnDemandOptions
Consumes the builder and constructs a OnDemandOptions
.