Struct aws_sdk_ec2::types::builders::OnDemandOptionsRequestBuilder
source · #[non_exhaustive]pub struct OnDemandOptionsRequestBuilder { /* private fields */ }
Expand description
A builder for OnDemandOptionsRequest
.
Implementations§
source§impl OnDemandOptionsRequestBuilder
impl OnDemandOptionsRequestBuilder
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: CapacityReservationOptionsRequest
) -> Self
pub fn capacity_reservation_options( self, input: CapacityReservationOptionsRequest ) -> 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<CapacityReservationOptionsRequest>
) -> Self
pub fn set_capacity_reservation_options( self, input: Option<CapacityReservationOptionsRequest> ) -> 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<CapacityReservationOptionsRequest>
pub fn get_capacity_reservation_options( &self ) -> &Option<CapacityReservationOptionsRequest>
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.
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. The MaxTotalPrice
does not account for surplus credits, and, if you use surplus credits, your final cost might be higher than what you specified for MaxTotalPrice
. For more information, see Surplus credits can incur charges in the EC2 User Guide.
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.
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. The MaxTotalPrice
does not account for surplus credits, and, if you use surplus credits, your final cost might be higher than what you specified for MaxTotalPrice
. For more information, see Surplus credits can incur charges in the EC2 User Guide.
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.
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. The MaxTotalPrice
does not account for surplus credits, and, if you use surplus credits, your final cost might be higher than what you specified for MaxTotalPrice
. For more information, see Surplus credits can incur charges in the EC2 User Guide.
sourcepub fn build(self) -> OnDemandOptionsRequest
pub fn build(self) -> OnDemandOptionsRequest
Consumes the builder and constructs a OnDemandOptionsRequest
.
Trait Implementations§
source§impl Clone for OnDemandOptionsRequestBuilder
impl Clone for OnDemandOptionsRequestBuilder
source§fn clone(&self) -> OnDemandOptionsRequestBuilder
fn clone(&self) -> OnDemandOptionsRequestBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Default for OnDemandOptionsRequestBuilder
impl Default for OnDemandOptionsRequestBuilder
source§fn default() -> OnDemandOptionsRequestBuilder
fn default() -> OnDemandOptionsRequestBuilder
source§impl PartialEq for OnDemandOptionsRequestBuilder
impl PartialEq for OnDemandOptionsRequestBuilder
source§fn eq(&self, other: &OnDemandOptionsRequestBuilder) -> bool
fn eq(&self, other: &OnDemandOptionsRequestBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for OnDemandOptionsRequestBuilder
Auto Trait Implementations§
impl Freeze for OnDemandOptionsRequestBuilder
impl RefUnwindSafe for OnDemandOptionsRequestBuilder
impl Send for OnDemandOptionsRequestBuilder
impl Sync for OnDemandOptionsRequestBuilder
impl Unpin for OnDemandOptionsRequestBuilder
impl UnwindSafe for OnDemandOptionsRequestBuilder
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more