v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-1456373564.1 KB

Returns a list of existing clusters.

post/#X-Amz-Target=AmazonEC2ContainerServiceV20141113.ListClusters

Query parameters

maxResultsstring

Pagination limit

nextTokenstring

Pagination token

Headers

X-Amz-Target'AmazonEC2ContainerServiceV20141113.ListClusters' required

Request body

nextTokenstring
<p>The <code>nextToken</code> value returned from a <code>ListClusters</code> request indicating that more results are available to fulfill the request and further calls are needed. If <code>maxResults</code> was provided, it's possible the number of results to be fewer than <code>maxResults</code>.</p> <note> <p>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.</p> </note>
maxResultsinteger

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

Response

Success

clusterArnsString[]

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

nextTokenstring

The <code>nextToken</code> value to include in a future <code>ListClusters</code> request. When the results of a <code>ListClusters</code> request exceed <code>maxResults</code>, this value can be used to retrieve the next page of results. This value is <code>null</code> when there are no more results to return.

Example response

{
  "clusterArns": [
    "arn:aws:ecs:us-east-1:<aws_account_id>:cluster/test",
    "arn:aws:ecs:us-east-1:<aws_account_id>:cluster/default"
  ]
}