describeTaskSets method
Describes the task sets in the specified cluster and service. This is used
when a service uses the EXTERNAL
deployment controller type.
For more information, see Amazon
ECS Deployment Types in the Amazon Elastic Container Service
Developer Guide.
May throw ServerException. May throw ClientException. May throw InvalidParameterException. May throw ClusterNotFoundException. May throw UnsupportedFeatureException. May throw AccessDeniedException. May throw ServiceNotFoundException. May throw ServiceNotActiveException.
Parameter cluster
:
The short name or full Amazon Resource Name (ARN) of the cluster that
hosts the service that the task sets exist in.
Parameter service
:
The short name or full Amazon Resource Name (ARN) of the service that the
task sets exist in.
Parameter include
:
Specifies whether to see the resource tags for the task set. If
TAGS
is specified, the tags are included in the response. If
this field is omitted, tags are not included in the response.
Parameter taskSets
:
The ID or full Amazon Resource Name (ARN) of task sets to describe.
Implementation
Future<DescribeTaskSetsResponse> describeTaskSets({
required String cluster,
required String service,
List<TaskSetField>? include,
List<String>? taskSets,
}) async {
ArgumentError.checkNotNull(cluster, 'cluster');
ArgumentError.checkNotNull(service, 'service');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonEC2ContainerServiceV20141113.DescribeTaskSets'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'cluster': cluster,
'service': service,
if (include != null)
'include': include.map((e) => e.toValue()).toList(),
if (taskSets != null) 'taskSets': taskSets,
},
);
return DescribeTaskSetsResponse.fromJson(jsonResponse.body);
}