logo
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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more