cancel_spot_fleet_requests¶
Operation¶
cancel_spot_fleet_requests
async
¶
cancel_spot_fleet_requests(request: CancelSpotFleetRequestsInput | CancelSpotFleetRequestsInputDict, /, *, plugins: list[Plugin] | None = None) -> CancelSpotFleetRequestsOutput
cancel_spot_fleet_requests(*, plugins: list[Plugin] | None = None, **kwargs: Unpack[CancelSpotFleetRequestsInputDict]) -> CancelSpotFleetRequestsOutput
Cancels the specified Spot Fleet requests.
After you cancel a Spot Fleet request, the Spot Fleet launches no new instances.
You must also specify whether a canceled Spot Fleet request should
terminate its instances. If you choose to terminate the instances, the
Spot Fleet request enters the cancelled_terminating state. Otherwise,
the Spot Fleet request enters the cancelled_running state and the
instances continue to run until they are interrupted or you terminate
them manually.
Warning
Terminating an instance is permanent and irreversible.
After you terminate an instance, you can no longer connect to it, and it can't be recovered. All attached Amazon EBS volumes that are configured to be deleted on termination are also permanently deleted and can't be recovered. All data stored on instance store volumes is permanently lost. For more information, see How instance termination works.
Before you terminate an instance, ensure that you have backed up all data that you need to retain after the termination to persistent storage.
Restrictions
- You can delete up to 100 fleets in a single request. If you exceed the specified number, no fleets are deleted.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
plugins
|
list[Plugin] | None
|
A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations. |
None
|
Returns:
| Type | Description |
|---|---|
CancelSpotFleetRequestsOutput
|
An instance of |
Input¶
Pass the input fields as keyword arguments, or pass a model or dictionary as the first positional argument. Pass plugins separately as a keyword argument.
Model¶
CancelSpotFleetRequestsInput
dataclass
¶
Bases: _SerdeShape
Contains the parameters for CancelSpotFleetRequests.
Attributes¶
dry_run
class-attribute
instance-attribute
¶
dry_run: bool | None = ...
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.
spot_fleet_request_ids
class-attribute
instance-attribute
¶
The IDs of the Spot Fleet requests.
Constraint: You can specify up to 100 IDs in a single request.
terminate_instances
class-attribute
instance-attribute
¶
terminate_instances: bool | None = ...
Indicates whether to terminate the associated instances when the Spot Fleet request is canceled. The default is to terminate the instances.
To let the instances continue to run after the Spot Fleet request is
canceled, specify no-terminate-instances.
Dictionaries¶
CancelSpotFleetRequestsInputDict
¶
Bases: TypedDict
Dictionary form of CancelSpotFleetRequestsInput.
Attributes¶
dry_run
instance-attribute
¶
dry_run: bool | None
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.
spot_fleet_request_ids
instance-attribute
¶
The IDs of the Spot Fleet requests.
Constraint: You can specify up to 100 IDs in a single request.
terminate_instances
instance-attribute
¶
Indicates whether to terminate the associated instances when the Spot Fleet request is canceled. The default is to terminate the instances.
To let the instances continue to run after the Spot Fleet request is
canceled, specify no-terminate-instances.
Output¶
CancelSpotFleetRequestsOutput
dataclass
¶
Bases: _SerdeShape
Contains the output of CancelSpotFleetRequests.
Attributes¶
response_metadata
class-attribute
instance-attribute
¶
Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.
successful_fleet_requests
class-attribute
instance-attribute
¶
successful_fleet_requests: list[CancelSpotFleetRequestsSuccessItem] | None = ...
Information about the Spot Fleet requests that are successfully canceled.
unsuccessful_fleet_requests
class-attribute
instance-attribute
¶
unsuccessful_fleet_requests: list[CancelSpotFleetRequestsErrorItem] | None = ...
Information about the Spot Fleet requests that are not successfully canceled.