ListServicesForAutoScalingConfiguration
Returns a list of the associated App Runner services using an auto scaling configuration.
Request Syntax
{
"AutoScalingConfigurationArn": "string
",
"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.
- AutoScalingConfigurationArn
-
The Amazon Resource Name (ARN) of the App Runner auto scaling configuration that you want to list the services for.
The ARN can be a full auto scaling configuration ARN, or a partial ARN ending with either
.../name
or.../name/revision
. If a revision isn't specified, the latest active revision is used.Type: String
Length Constraints: Minimum length of 1. Maximum length of 1011.
Pattern:
arn:aws(-[\w]+)*:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[0-9]{12}:(\w|\/|-){1,1011}
Required: Yes
- 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 100.
Required: No
- NextToken
-
A token from a previous result page. It's 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 1. Maximum length of 1024.
Pattern:
.*
Required: No
Response Syntax
{
"NextToken": "string",
"ServiceArnList": [ "string" ]
}
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 1. Maximum length of 1024.
Pattern:
.*
- ServiceArnList
-
A list of service ARN records. In a paginated request, the request returns up to
MaxResults
records for each call.Type: Array of strings
Length Constraints: Minimum length of 1. Maximum length of 1011.
Pattern:
arn:aws(-[\w]+)*:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[0-9]{12}:(\w|\/|-){1,1011}
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
- ResourceNotFoundException
-
A resource doesn't exist for the specified Amazon Resource Name (ARN) in your AWS account.
HTTP Status Code: 400
Examples
Paginated listing of all App Runner services associated to an auto scaling configuration
This example illustrates how to list all of the App Runner services that are associated with a specific auto scaling configuration. 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 associated services have been listed.
Sample Request
$ aws apprunner list-services-for-auto-scaling-configuration --cli-input-json "`cat`"
{
"AutoScalingConfigurationArn": "arn:aws:apprunner:us-east-1:123456789012:autoscalingconfiguration/high-availability/2/6a4d47db94434d30a42cab9a00d21d44",
"MaxResults": 2
}
Sample Response
{
"ServiceArnList": [
"arn:aws:apprunner:us-east-1:123456789012:service/golang-container-app/e598803c0a7848459f3fd978ef5ed86c",
"arn:aws:apprunner:us-east-1:123456789012:service/java-app/b6644b84cd04451faaad27054a70e21a"
],
"NextToken": "eyJBdXRvU2NhbGluZ0NvbmZpZ3VyYXRpb25Bcm4iOiJhcm46YXdzOmFwcHJ1bm5lcjp1cy1lYXN0LTE6MTIzNDU2Nzg5MDEyOmF1dG9zY2FsaW5nY29uZmlndXJhdGlvbi9oaWdoLWF2YWlsYWJpbGl0eS8yLzZhNGQ0N2RiOTQ0MzRkMzBhNDJjYWI5YTAwZDIxZDQ0IiwiU2VydmljZUFybiI6ImFybjphd3M6YXBwcnVubmVyOnVzLWVhc3QtMToxMjM0NTY3ODkwMTI6c2VydmljZS9ydW5sYWl5YW5nL2I2NjQ0Yjg0Y2QwNDQ1MWZhYWFkMjcwNTRhNzBlMjFhIn0="
}
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: