Skip to content

EC2  >  Operations  >  describe_fleets

describe_fleets

Operation

describe_fleets async

describe_fleets(input: DescribeFleetsInput, plugins: list[Plugin] | None = None) -> DescribeFleetsOutput

Describes the specified EC2 Fleet or all of your EC2 Fleets.

Warning

If a fleet is of type instant, you must specify the fleet ID in the request, otherwise the fleet does not appear in the response.

For more information, see Describe your EC2 Fleet in the Amazon EC2 User Guide.

Parameters:

Name Type Description Default
input DescribeFleetsInput

An instance of DescribeFleetsInput.

required
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
DescribeFleetsOutput

An instance of DescribeFleetsOutput.

Input

DescribeFleetsInput dataclass

Bases: _SerdeShape

Dataclass for DescribeFleetsInput structure.

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.

filters class-attribute instance-attribute
filters: list[Filter] | None = ...

The filters.

  • activity-status - The progress of the EC2 Fleet ( error | pending-fulfillment | pending-termination | fulfilled).

  • excess-capacity-termination-policy - Indicates whether to terminate running instances if the target capacity is decreased below the current EC2 Fleet size (true | false).

  • fleet-state - The state of the EC2 Fleet (submitted | active | deleted | failed | deleted-running | deleted-terminating | modifying).

  • replace-unhealthy-instances - Indicates whether EC2 Fleet should replace unhealthy instances (true | false).

  • type - The type of request (instant | request | maintain).

fleet_ids class-attribute instance-attribute
fleet_ids: list[str] | None = ...

The IDs of the EC2 Fleets.

Note

If a fleet is of type instant, you must specify the fleet ID, otherwise it does not appear in the response.

max_results class-attribute instance-attribute
max_results: int | None = ...

The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. For more information, see Pagination.

next_token class-attribute instance-attribute
next_token: str | None = ...

The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.

Output

DescribeFleetsOutput dataclass

Bases: _SerdeShape

Dataclass for DescribeFleetsOutput structure.

Attributes

fleets class-attribute instance-attribute
fleets: list[FleetData] | None = ...

Information about the EC2 Fleets.

next_token class-attribute instance-attribute
next_token: str | None = ...

The token to include in another request to get the next page of items. This value is null when there are no more items to return.

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

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.