Struct rusoto_ec2::SpotOptionsRequest
source · [−]pub struct SpotOptionsRequest {
pub allocation_strategy: Option<String>,
pub instance_interruption_behavior: Option<String>,
pub instance_pools_to_use_count: Option<i64>,
pub maintenance_strategies: Option<FleetSpotMaintenanceStrategiesRequest>,
pub max_total_price: Option<String>,
pub min_target_capacity: Option<i64>,
pub single_availability_zone: Option<bool>,
pub single_instance_type: Option<bool>,
}
Expand description
Describes the configuration of Spot Instances in an EC2 Fleet request.
Fields
allocation_strategy: Option<String>
Indicates how to allocate the target Spot Instance capacity across the Spot Instance pools specified by the EC2 Fleet.
If the allocation strategy is lowest-price
, EC2 Fleet launches instances from the Spot Instance pools with the lowest price. This is the default allocation strategy.
If the allocation strategy is diversified
, EC2 Fleet launches instances from all of the Spot Instance pools that you specify.
If the allocation strategy is capacity-optimized
(recommended), EC2 Fleet launches instances from Spot Instance pools with optimal capacity for the number of instances that are launching. To give certain instance types a higher chance of launching first, use capacity-optimized-prioritized
. Set a priority for each instance type by using the Priority
parameter for LaunchTemplateOverrides
. You can assign the same priority to different LaunchTemplateOverrides
. EC2 implements the priorities on a best-effort basis, but optimizes for capacity first. capacity-optimized-prioritized
is supported only if your fleet uses a launch template. Note that if the On-Demand AllocationStrategy
is set to prioritized
, the same priority is applied when fulfilling On-Demand capacity.
instance_interruption_behavior: Option<String>
The behavior when a Spot Instance is interrupted. The default is terminate
.
instance_pools_to_use_count: Option<i64>
The number of Spot pools across which to allocate your target Spot capacity. Valid only when Spot AllocationStrategy is set to lowest-price
. EC2 Fleet selects the cheapest Spot pools and evenly allocates your target Spot capacity across the number of Spot pools that you specify.
maintenance_strategies: Option<FleetSpotMaintenanceStrategiesRequest>
The strategies for managing your Spot Instances that are at an elevated risk of being interrupted.
max_total_price: Option<String>
The maximum amount per hour for Spot Instances that you're willing to pay.
min_target_capacity: Option<i64>
The minimum target capacity for Spot Instances in the fleet. If the minimum target capacity is not reached, the fleet launches no instances.
single_availability_zone: Option<bool>
Indicates that the fleet launches all Spot Instances into a single Availability Zone. Supported only for fleets of type instant
.
single_instance_type: Option<bool>
Indicates that the fleet uses a single instance type to launch all Spot Instances in the fleet. Supported only for fleets of type instant
.
Trait Implementations
sourceimpl Clone for SpotOptionsRequest
impl Clone for SpotOptionsRequest
sourcefn clone(&self) -> SpotOptionsRequest
fn clone(&self) -> SpotOptionsRequest
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for SpotOptionsRequest
impl Debug for SpotOptionsRequest
sourceimpl Default for SpotOptionsRequest
impl Default for SpotOptionsRequest
sourcefn default() -> SpotOptionsRequest
fn default() -> SpotOptionsRequest
Returns the “default value” for a type. Read more
sourceimpl PartialEq<SpotOptionsRequest> for SpotOptionsRequest
impl PartialEq<SpotOptionsRequest> for SpotOptionsRequest
sourcefn eq(&self, other: &SpotOptionsRequest) -> bool
fn eq(&self, other: &SpotOptionsRequest) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &SpotOptionsRequest) -> bool
fn ne(&self, other: &SpotOptionsRequest) -> bool
This method tests for !=
.
impl StructuralPartialEq for SpotOptionsRequest
Auto Trait Implementations
impl RefUnwindSafe for SpotOptionsRequest
impl Send for SpotOptionsRequest
impl Sync for SpotOptionsRequest
impl Unpin for SpotOptionsRequest
impl UnwindSafe for SpotOptionsRequest
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more