Skip to content

ECS  >  Operations  >  list_clusters

list_clusters

Operation

list_clusters async

list_clusters(input: ListClustersInput, plugins: list[Plugin] | None = None) -> ListClustersOutput

Returns a list of existing clusters.

Parameters:

Name Type Description Default
input ListClustersInput

An instance of ListClustersInput.

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
ListClustersOutput

An instance of ListClustersOutput.

Input

ListClustersInput dataclass

Bases: _SerdeShape

Attributes

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

The maximum number of cluster results that ListClusters returned in paginated output. When this parameter is used, ListClusters only returns maxResults results in a single page along with a nextToken response element. The remaining results of the initial request can be seen by sending another ListClusters request with the returned nextToken value. This value can be between 1 and 100. If this parameter isn't used, then ListClusters returns up to 100 results and a nextToken value if applicable.

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

The nextToken value returned from a ListClusters request indicating that more results are available to fulfill the request and further calls are needed. If maxResults was provided, it's possible the number of results to be fewer than maxResults.

Note

This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.

Output

ListClustersOutput dataclass

Bases: _SerdeShape

Attributes

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

The list of full Amazon Resource Name (ARN) entries for each cluster that's associated with your account.

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

The nextToken value to include in a future ListClusters request. When the results of a ListClusters request exceed maxResults, this value can be used to retrieve the next page of results. This value is null when there are no more results 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.