describeClusters method
Describes one or more of your clusters.
For CLI examples, see describe-clusters.rst on GitHub.
May throw AccessDeniedException.
May throw ClientException.
May throw InvalidParameterException.
May throw ServerException.
Parameter clusters :
A list of up to 100 cluster names or full cluster Amazon Resource Name
(ARN) entries. If you do not specify a cluster, the default cluster is
assumed.
Parameter include :
Determines whether to include additional information about the clusters in
the response. If this field is omitted, this information isn't included.
If ATTACHMENTS is specified, the attachments for the
container instances or tasks within the cluster are included, for example
the capacity providers.
If SETTINGS is specified, the settings for the cluster are
included.
If CONFIGURATIONS is specified, the configuration for the
cluster is included.
If STATISTICS is specified, the task and service count is
included, separated by launch type.
If TAGS is specified, the metadata tags associated with the
cluster are included.
Implementation
Future<DescribeClustersResponse> describeClusters({
List<String>? clusters,
List<ClusterField>? include,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonEC2ContainerServiceV20141113.DescribeClusters'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (clusters != null) 'clusters': clusters,
if (include != null) 'include': include.map((e) => e.value).toList(),
},
);
return DescribeClustersResponse.fromJson(jsonResponse.body);
}