Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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.
Synopsis
- data ModifySpotFleetRequest = ModifySpotFleetRequest' {}
- newModifySpotFleetRequest :: Text -> ModifySpotFleetRequest
- modifySpotFleetRequest_context :: Lens' ModifySpotFleetRequest (Maybe Text)
- modifySpotFleetRequest_excessCapacityTerminationPolicy :: Lens' ModifySpotFleetRequest (Maybe ExcessCapacityTerminationPolicy)
- modifySpotFleetRequest_launchTemplateConfigs :: Lens' ModifySpotFleetRequest (Maybe [LaunchTemplateConfig])
- modifySpotFleetRequest_onDemandTargetCapacity :: Lens' ModifySpotFleetRequest (Maybe Int)
- modifySpotFleetRequest_targetCapacity :: Lens' ModifySpotFleetRequest (Maybe Int)
- modifySpotFleetRequest_spotFleetRequestId :: Lens' ModifySpotFleetRequest Text
- data ModifySpotFleetRequestResponse = ModifySpotFleetRequestResponse' {
- return' :: Maybe Bool
- httpStatus :: Int
- newModifySpotFleetRequestResponse :: Int -> ModifySpotFleetRequestResponse
- modifySpotFleetRequestResponse_return :: Lens' ModifySpotFleetRequestResponse (Maybe Bool)
- modifySpotFleetRequestResponse_httpStatus :: Lens' ModifySpotFleetRequestResponse Int
Creating a Request
data ModifySpotFleetRequest Source #
Contains the parameters for ModifySpotFleetRequest.
See: newModifySpotFleetRequest
smart constructor.
ModifySpotFleetRequest' | |
|
Instances
newModifySpotFleetRequest Source #
Create a value of ModifySpotFleetRequest
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
ModifySpotFleetRequest
, modifySpotFleetRequest_context
- Reserved.
ModifySpotFleetRequest
, modifySpotFleetRequest_excessCapacityTerminationPolicy
- 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.
ModifySpotFleetRequest
, modifySpotFleetRequest_launchTemplateConfigs
- 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.
ModifySpotFleetRequest
, modifySpotFleetRequest_onDemandTargetCapacity
- The number of On-Demand Instances in the fleet.
ModifySpotFleetRequest
, modifySpotFleetRequest_targetCapacity
- The size of the fleet.
ModifySpotFleetRequest
, modifySpotFleetRequest_spotFleetRequestId
- The ID of the Spot Fleet request.
Request Lenses
modifySpotFleetRequest_context :: Lens' ModifySpotFleetRequest (Maybe Text) Source #
Reserved.
modifySpotFleetRequest_excessCapacityTerminationPolicy :: Lens' ModifySpotFleetRequest (Maybe ExcessCapacityTerminationPolicy) Source #
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.
modifySpotFleetRequest_launchTemplateConfigs :: Lens' ModifySpotFleetRequest (Maybe [LaunchTemplateConfig]) Source #
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.
modifySpotFleetRequest_onDemandTargetCapacity :: Lens' ModifySpotFleetRequest (Maybe Int) Source #
The number of On-Demand Instances in the fleet.
modifySpotFleetRequest_targetCapacity :: Lens' ModifySpotFleetRequest (Maybe Int) Source #
The size of the fleet.
modifySpotFleetRequest_spotFleetRequestId :: Lens' ModifySpotFleetRequest Text Source #
The ID of the Spot Fleet request.
Destructuring the Response
data ModifySpotFleetRequestResponse Source #
Contains the output of ModifySpotFleetRequest.
See: newModifySpotFleetRequestResponse
smart constructor.
ModifySpotFleetRequestResponse' | |
|
Instances
Generic ModifySpotFleetRequestResponse Source # | |
Read ModifySpotFleetRequestResponse Source # | |
Show ModifySpotFleetRequestResponse Source # | |
Defined in Amazonka.EC2.ModifySpotFleetRequest | |
NFData ModifySpotFleetRequestResponse Source # | |
Defined in Amazonka.EC2.ModifySpotFleetRequest rnf :: ModifySpotFleetRequestResponse -> () # | |
Eq ModifySpotFleetRequestResponse Source # | |
type Rep ModifySpotFleetRequestResponse Source # | |
Defined in Amazonka.EC2.ModifySpotFleetRequest type Rep ModifySpotFleetRequestResponse = D1 ('MetaData "ModifySpotFleetRequestResponse" "Amazonka.EC2.ModifySpotFleetRequest" "amazonka-ec2-2.0-48L9RAJvmvzAdBkRegqWCL" 'False) (C1 ('MetaCons "ModifySpotFleetRequestResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "return'") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))) |
newModifySpotFleetRequestResponse Source #
Create a value of ModifySpotFleetRequestResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:return':ModifySpotFleetRequestResponse'
, modifySpotFleetRequestResponse_return
- If the request succeeds, the response returns true
. If the request
fails, no response is returned, and instead an error message is
returned.
$sel:httpStatus:ModifySpotFleetRequestResponse'
, modifySpotFleetRequestResponse_httpStatus
- The response's http status code.
Response Lenses
modifySpotFleetRequestResponse_return :: Lens' ModifySpotFleetRequestResponse (Maybe Bool) Source #
If the request succeeds, the response returns true
. If the request
fails, no response is returned, and instead an error message is
returned.
modifySpotFleetRequestResponse_httpStatus :: Lens' ModifySpotFleetRequestResponse Int Source #
The response's http status code.