v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-1456373564.1 KB

Returns a list of services. You can filter the results by cluster, launch type, and scheduling strategy.

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

Query parameters

maxResultsstring

Pagination limit

nextTokenstring

Pagination token

Headers

X-Amz-Target'AmazonEC2ContainerServiceV20141113.ListServices' required

Request body

clusterstring

The short name or full Amazon Resource Name (ARN) of the cluster to use when filtering the <code>ListServices</code> results. If you do not specify a cluster, the default cluster is assumed.

nextTokenstring
<p>The <code>nextToken</code> value returned from a <code>ListServices</code> request indicating that more results are available to fulfill the request and further calls will be needed. If <code>maxResults</code> was provided, it is 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 service results that <code>ListServices</code> returned in paginated output. When this parameter is used, <code>ListServices</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>ListServices</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>ListServices</code> returns up to 10 results and a <code>nextToken</code> value if applicable.

launchType'EC2' | 'FARGATE' | 'EXTERNAL'

The launch type to use when filtering the <code>ListServices</code> results.

schedulingStrategy'REPLICA' | 'DAEMON'

The scheduling strategy to use when filtering the <code>ListServices</code> results.

Response

Success

serviceArnsString[]

The list of full ARN entries for each service that's associated with the specified cluster.

nextTokenstring

The <code>nextToken</code> value to include in a future <code>ListServices</code> request. When the results of a <code>ListServices</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

{
  "serviceArns": [
    "arn:aws:ecs:us-east-1:012345678910:service/my-http-service"
  ]
}