Struct aws_sdk_ec2::types::builders::OnDemandOptionsBuilder
source · #[non_exhaustive]pub struct OnDemandOptionsBuilder { /* private fields */ }
Expand description
A builder for OnDemandOptions
.
Implementations§
source§impl OnDemandOptionsBuilder
impl OnDemandOptionsBuilder
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 get_allocation_strategy(
&self
) -> &Option<FleetOnDemandAllocationStrategy>
pub fn get_allocation_strategy( &self ) -> &Option<FleetOnDemandAllocationStrategy>
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 get_capacity_reservation_options(
&self
) -> &Option<CapacityReservationOptions>
pub fn get_capacity_reservation_options( &self ) -> &Option<CapacityReservationOptions>
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 get_single_instance_type(&self) -> &Option<bool>
pub fn get_single_instance_type(&self) -> &Option<bool>
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 get_single_availability_zone(&self) -> &Option<bool>
pub fn get_single_availability_zone(&self) -> &Option<bool>
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 get_min_target_capacity(&self) -> &Option<i32>
pub fn get_min_target_capacity(&self) -> &Option<i32>
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 get_max_total_price(&self) -> &Option<String>
pub fn get_max_total_price(&self) -> &Option<String>
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
.
Trait Implementations§
source§impl Clone for OnDemandOptionsBuilder
impl Clone for OnDemandOptionsBuilder
source§fn clone(&self) -> OnDemandOptionsBuilder
fn clone(&self) -> OnDemandOptionsBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for OnDemandOptionsBuilder
impl Debug for OnDemandOptionsBuilder
source§impl Default for OnDemandOptionsBuilder
impl Default for OnDemandOptionsBuilder
source§fn default() -> OnDemandOptionsBuilder
fn default() -> OnDemandOptionsBuilder
source§impl PartialEq<OnDemandOptionsBuilder> for OnDemandOptionsBuilder
impl PartialEq<OnDemandOptionsBuilder> for OnDemandOptionsBuilder
source§fn eq(&self, other: &OnDemandOptionsBuilder) -> bool
fn eq(&self, other: &OnDemandOptionsBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.