Struct aws_sdk_ec2::client::fluent_builders::ModifySpotFleetRequest [−][src]
pub struct ModifySpotFleetRequest<C = DynConnector, M = AwsMiddleware, R = Standard> { /* fields omitted */ }
Expand description
Fluent builder constructing a request to ModifySpotFleetRequest
.
Modifies the specified Spot Fleet request.
You can only modify a Spot Fleet request of type maintain
.
While the Spot Fleet request is being modified, it is in the modifying
state.
To scale up your Spot Fleet, increase its target capacity. The Spot Fleet launches the
additional Spot Instances according to the allocation strategy for the Spot Fleet
request. If the allocation strategy is lowestPrice
, the Spot Fleet launches
instances using the Spot Instance pool with the lowest price. If the allocation strategy
is diversified
, the Spot Fleet distributes the instances across the Spot
Instance pools. If the allocation strategy is capacityOptimized
, Spot Fleet
launches instances from Spot Instance pools with optimal capacity for the number of instances
that are launching.
To scale down your Spot Fleet, decrease its target capacity. First, the Spot Fleet
cancels any open requests that exceed the new target capacity. You can request that the
Spot Fleet terminate Spot Instances until the size of the fleet no longer exceeds the
new target capacity. If the allocation strategy is lowestPrice
, the Spot
Fleet terminates the instances with the highest price per unit. If the allocation
strategy is capacityOptimized
, the Spot Fleet terminates the instances in
the Spot Instance pools that have the least available Spot Instance capacity. If the allocation
strategy is diversified
, the Spot Fleet terminates instances across the
Spot Instance pools. Alternatively, you can request that the Spot Fleet keep the fleet
at its current size, but not replace any Spot Instances that are interrupted or that you
terminate manually.
If you are finished with your Spot Fleet for now, but will use it again later, you can set the target capacity to 0.
Implementations
impl<C, M, R> ModifySpotFleetRequest<C, M, R> where
C: SmithyConnector,
M: SmithyMiddleware<C>,
R: NewRequestPolicy,
impl<C, M, R> ModifySpotFleetRequest<C, M, R> where
C: SmithyConnector,
M: SmithyMiddleware<C>,
R: NewRequestPolicy,
pub async fn send(
self
) -> Result<ModifySpotFleetRequestOutput, SdkError<ModifySpotFleetRequestError>> where
R::Policy: SmithyRetryPolicy<ModifySpotFleetRequestInputOperationOutputAlias, ModifySpotFleetRequestOutput, ModifySpotFleetRequestError, ModifySpotFleetRequestInputOperationRetryAlias>,
pub async fn send(
self
) -> Result<ModifySpotFleetRequestOutput, SdkError<ModifySpotFleetRequestError>> where
R::Policy: SmithyRetryPolicy<ModifySpotFleetRequestInputOperationOutputAlias, ModifySpotFleetRequestOutput, ModifySpotFleetRequestError, ModifySpotFleetRequestInputOperationRetryAlias>,
Sends the request and returns the response.
If an error occurs, an SdkError
will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
Indicates whether running Spot Instances should be terminated if the target capacity of the Spot Fleet request is decreased below the current size of the Spot Fleet.
pub fn set_excess_capacity_termination_policy(
self,
input: Option<ExcessCapacityTerminationPolicy>
) -> Self
pub fn set_excess_capacity_termination_policy(
self,
input: Option<ExcessCapacityTerminationPolicy>
) -> Self
Indicates whether running Spot Instances should be terminated if the target capacity of the Spot Fleet request is decreased below the current size of the Spot Fleet.
Appends an item to LaunchTemplateConfigs
.
To override the contents of this collection use set_launch_template_configs
.
The launch template and overrides. You can only use this parameter if you specified a
launch template (LaunchTemplateConfigs
) in your Spot Fleet request. If you
specified LaunchSpecifications
in your Spot Fleet request, then omit this
parameter.
The launch template and overrides. You can only use this parameter if you specified a
launch template (LaunchTemplateConfigs
) in your Spot Fleet request. If you
specified LaunchSpecifications
in your Spot Fleet request, then omit this
parameter.
The ID of the Spot Fleet request.
The ID of the Spot Fleet request.
The size of the fleet.
The size of the fleet.
The number of On-Demand Instances in the fleet.
The number of On-Demand Instances in the fleet.
Reserved.
Trait Implementations
Auto Trait Implementations
impl<C = DynConnector, M = AwsMiddleware, R = Standard> !RefUnwindSafe for ModifySpotFleetRequest<C, M, R>
impl<C, M, R> Send for ModifySpotFleetRequest<C, M, R> where
C: Send + Sync,
M: Send + Sync,
R: Send + Sync,
impl<C, M, R> Sync for ModifySpotFleetRequest<C, M, R> where
C: Send + Sync,
M: Send + Sync,
R: Send + Sync,
impl<C, M, R> Unpin for ModifySpotFleetRequest<C, M, R>
impl<C = DynConnector, M = AwsMiddleware, R = Standard> !UnwindSafe for ModifySpotFleetRequest<C, M, R>
Blanket Implementations
Mutably borrows from an owned value. Read more
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