DescribeEcsClusters
Describes Amazon ECS clusters that are registered with a stack. If you specify only a stack ID,
you can use the MaxResults
and NextToken
parameters to paginate the
response. However, AWS OpsWorks Stacks currently supports only one cluster per layer, so the result
set has a maximum of one element.
Required Permissions: To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack or an attached policy that explicitly grants permission. For more information about user permissions, see Managing User Permissions.
This call accepts only one resource-identifying parameter.
Request Syntax
{
"EcsClusterArns": [ "string
" ],
"MaxResults": number
,
"NextToken": "string
",
"StackId": "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.
- EcsClusterArns
-
A list of ARNs, one for each cluster to be described.
Type: Array of strings
Required: No
- MaxResults
-
To receive a paginated response, use this parameter to specify the maximum number of results to be returned with a single call. If the number of available results exceeds this maximum, the response includes a
NextToken
value that you can assign to theNextToken
request parameter to get the next set of results.Type: Integer
Required: No
- NextToken
-
If the previous paginated request did not return all of the remaining results, the response object's
NextToken
parameter value is set to a token. To retrieve the next set of results, callDescribeEcsClusters
again and assign that token to the request object'sNextToken
parameter. If there are no remaining results, the previous response object'sNextToken
parameter is set tonull
.Type: String
Required: No
- StackId
-
A stack ID.
DescribeEcsClusters
returns a description of the cluster that is registered with the stack.Type: String
Required: No
Response Syntax
{
"EcsClusters": [
{
"EcsClusterArn": "string",
"EcsClusterName": "string",
"RegisteredAt": "string",
"StackId": "string"
}
],
"NextToken": "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.
- EcsClusters
-
A list of
EcsCluster
objects containing the cluster descriptions.Type: Array of EcsCluster objects
- NextToken
-
If a paginated request does not return all of the remaining results, this parameter is set to a token that you can assign to the request object's
NextToken
parameter to retrieve the next set of results. If the previous paginated request returned all of the remaining results, this parameter is set tonull
.Type: String
Errors
For information about the errors that are common to all actions, see Common Errors.
- ResourceNotFoundException
-
Indicates that a resource was not found.
HTTP Status Code: 400
- ValidationException
-
Indicates that a request was not valid.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: