OpsWorks.Client.
describe_ecs_clusters
(**kwargs)¶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.
See also: AWS API Documentation
Request Syntax
response = client.describe_ecs_clusters(
EcsClusterArns=[
'string',
],
StackId='string',
NextToken='string',
MaxResults=123
)
A list of ARNs, one for each cluster to be described.
DescribeEcsClusters
returns a description of the cluster that is registered with the stack.NextToken
parameter value is set to a token. To retrieve the next set of results, call DescribeEcsClusters
again and assign that token to the request object's NextToken
parameter. If there are no remaining results, the previous response object's NextToken
parameter is set to null
.NextToken
value that you can assign to the NextToken
request parameter to get the next set of results.dict
Response Syntax
{
'EcsClusters': [
{
'EcsClusterArn': 'string',
'EcsClusterName': 'string',
'StackId': 'string',
'RegisteredAt': 'string'
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
Contains the response to a DescribeEcsClusters
request.
EcsClusters (list) --
A list of EcsCluster
objects containing the cluster descriptions.
(dict) --
Describes a registered Amazon ECS cluster.
EcsClusterArn (string) --
The cluster's ARN.
EcsClusterName (string) --
The cluster name.
StackId (string) --
The stack ID.
RegisteredAt (string) --
The time and date that the cluster was registered with the stack.
NextToken (string) --
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 to null
.
Exceptions
OpsWorks.Client.exceptions.ValidationException
OpsWorks.Client.exceptions.ResourceNotFoundException