ListServices - AWS App Runner

ListServices

Returns a list of running AWS App Runner services in your AWS account.

Request Syntax

{ "MaxResults": number, "NextToken": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

MaxResults

The maximum number of results to include in each response (result page). It's used for a paginated request.

If you don't specify MaxResults, the request retrieves all available results in a single response.

Type: Integer

Valid Range: Minimum value of 1. Maximum value of 20.

Required: No

NextToken

A token from a previous result page. Used for a paginated request. The request retrieves the next result page. All other parameter values must be identical to the ones specified in the initial request.

If you don't specify NextToken, the request retrieves the first result page.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 51200.

Pattern: .*

Required: No

Response Syntax

{ "NextToken": "string", "ServiceSummaryList": [ { "CreatedAt": number, "ServiceArn": "string", "ServiceId": "string", "ServiceName": "string", "ServiceUrl": "string", "Status": "string", "UpdatedAt": number } ] }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

NextToken

The token that you can pass in a subsequent request to get the next result page. It's returned in a paginated request.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 51200.

Pattern: .*

ServiceSummaryList

A list of service summary information records. In a paginated request, the request returns up to MaxResults records for each call.

Type: Array of ServiceSummary objects

Errors

For information about the errors that are common to all actions, see Common Errors.

InternalServiceErrorException

An unexpected service exception occurred.

HTTP Status Code: 500

InvalidRequestException

One or more input parameters aren't valid. Refer to the API action's document page, correct the input parameters, and try the action again.

HTTP Status Code: 400

Examples

Paginated listing of App Runner services

This example illustrates how to list all App Runner services in the AWS account. Up to two services are listed in each response. This example shows the first request. The response includes two results and a token that can be used in the next request. When a subsequent response doesn't include a token, all services have been listed.

Sample Request

$ aws apprunner list-services --cli-input-json "`cat`" { "MaxResults": 2 }

Sample Response

{ "NextToken": "eyJDdXN0b21lckFjY291bnRJZCI6IjI3MDIwNTQwMjg0NSIsIlNlcnZpY2VTdGF0dXNDb2RlIjoiUFJPVklTSU9OSU5HIiwiSGFzaEtleSI6IjI3MDIwNTQwMjg0NSNhYjhmOTRjZmUyOWE0NjBmYjg3NjBhZmQyZWU4NzU1NSJ9", "ServiceSummaryList": [ { "CreatedAt": "2020-11-20T19:05:25Z", "UpdatedAt": "2020-11-23T12:41:37Z", "ServiceArn": "arn:aws:apprunner:us-east-1:123456789012:service/python-app/8fe1e10304f84fd2b0df550fe98a71fa", "ServiceId": "8fe1e10304f84fd2b0df550fe98a71fa", "ServiceName": "python-app", "ServiceUrl": "psbqam834h.us-east-1.awsapprunner.com", "Status": "RUNNING" }, { "CreatedAt": "2020-11-06T23:15:30Z", "UpdatedAt": "2020-11-23T13:21:22Z", "ServiceArn": "arn:aws:apprunner:us-east-1:123456789012:service/golang-container-app/ab8f94cfe29a460fb8760afd2ee87555", "ServiceId": "ab8f94cfe29a460fb8760afd2ee87555", "ServiceName": "golang-container-app", "ServiceUrl": "e2m8rrrx33.us-east-1.awsapprunner.com", "Status": "RUNNING" } ] }

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: