Struct aws_sdk_ec2::client::fluent_builders::ModifyFleet [−][src]
pub struct ModifyFleet<C = DynConnector, M = AwsMiddleware, R = Standard> { /* fields omitted */ }
Expand description
Fluent builder constructing a request to ModifyFleet
.
Modifies the specified EC2 Fleet.
You can only modify an EC2 Fleet request of type maintain
.
While the EC2 Fleet is being modified, it is in the modifying
state.
To scale up your EC2 Fleet, increase its target capacity. The EC2 Fleet launches the additional
Spot Instances according to the allocation strategy for the EC2 Fleet request. If the allocation
strategy is lowest-price
, the EC2 Fleet launches instances using the Spot Instance
pool with the lowest price. If the allocation strategy is diversified
, the
EC2 Fleet distributes the instances across the Spot Instance pools. If the allocation strategy
is capacity-optimized
, EC2 Fleet launches instances from Spot Instance pools with optimal
capacity for the number of instances that are launching.
To scale down your EC2 Fleet, decrease its target capacity. First, the EC2 Fleet cancels any open
requests that exceed the new target capacity. You can request that the EC2 Fleet terminate Spot
Instances until the size of the fleet no longer exceeds the new target capacity. If the
allocation strategy is lowest-price
, the EC2 Fleet terminates the instances with
the highest price per unit. If the allocation strategy is capacity-optimized
,
the EC2 Fleet terminates the instances in the Spot Instance pools that have the least available
Spot Instance capacity. If the allocation strategy is diversified
, the EC2 Fleet terminates
instances across the Spot Instance pools. Alternatively, you can request that the EC2 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 EC2 Fleet for now, but will use it again later, you can set the target capacity to 0.
Implementations
impl<C, M, R> ModifyFleet<C, M, R> where
C: SmithyConnector,
M: SmithyMiddleware<C>,
R: NewRequestPolicy,
impl<C, M, R> ModifyFleet<C, M, R> where
C: SmithyConnector,
M: SmithyMiddleware<C>,
R: NewRequestPolicy,
pub async fn send(self) -> Result<ModifyFleetOutput, SdkError<ModifyFleetError>> where
R::Policy: SmithyRetryPolicy<ModifyFleetInputOperationOutputAlias, ModifyFleetOutput, ModifyFleetError, ModifyFleetInputOperationRetryAlias>,
pub async fn send(self) -> Result<ModifyFleetOutput, SdkError<ModifyFleetError>> where
R::Policy: SmithyRetryPolicy<ModifyFleetInputOperationOutputAlias, ModifyFleetOutput, ModifyFleetError, ModifyFleetInputOperationRetryAlias>,
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.
Checks whether you have the required permissions for the action, without actually making the request,
and provides an error response. If you have the required permissions, the error response is DryRunOperation
.
Otherwise, it is UnauthorizedOperation
.
Checks whether you have the required permissions for the action, without actually making the request,
and provides an error response. If you have the required permissions, the error response is DryRunOperation
.
Otherwise, it is UnauthorizedOperation
.
pub fn excess_capacity_termination_policy(
self,
inp: FleetExcessCapacityTerminationPolicy
) -> Self
pub fn excess_capacity_termination_policy(
self,
inp: FleetExcessCapacityTerminationPolicy
) -> Self
Indicates whether running instances should be terminated if the total target capacity of the EC2 Fleet is decreased below the current size of the EC2 Fleet.
pub fn set_excess_capacity_termination_policy(
self,
input: Option<FleetExcessCapacityTerminationPolicy>
) -> Self
pub fn set_excess_capacity_termination_policy(
self,
input: Option<FleetExcessCapacityTerminationPolicy>
) -> Self
Indicates whether running instances should be terminated if the total target capacity of the EC2 Fleet is decreased below the current size of the EC2 Fleet.
pub fn launch_template_configs(
self,
inp: impl Into<FleetLaunchTemplateConfigRequest>
) -> Self
pub fn launch_template_configs(
self,
inp: impl Into<FleetLaunchTemplateConfigRequest>
) -> Self
Appends an item to LaunchTemplateConfigs
.
To override the contents of this collection use set_launch_template_configs
.
The launch template and overrides.
pub fn set_launch_template_configs(
self,
input: Option<Vec<FleetLaunchTemplateConfigRequest>>
) -> Self
pub fn set_launch_template_configs(
self,
input: Option<Vec<FleetLaunchTemplateConfigRequest>>
) -> Self
The launch template and overrides.
The ID of the EC2 Fleet.
The size of the EC2 Fleet.
pub fn set_target_capacity_specification(
self,
input: Option<TargetCapacitySpecificationRequest>
) -> Self
pub fn set_target_capacity_specification(
self,
input: Option<TargetCapacitySpecificationRequest>
) -> Self
The size of the EC2 Fleet.
Reserved.
Trait Implementations
Auto Trait Implementations
impl<C = DynConnector, M = AwsMiddleware, R = Standard> !RefUnwindSafe for ModifyFleet<C, M, R>
impl<C, M, R> Unpin for ModifyFleet<C, M, R>
impl<C = DynConnector, M = AwsMiddleware, R = Standard> !UnwindSafe for ModifyFleet<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