deleteTaskSet method
Deletes a specified task set within a 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 AccessDeniedException.
May throw ClientException.
May throw ClusterNotFoundException.
May throw InvalidParameterException.
May throw LimitExceededException.
May throw ServerException.
May throw ServiceNotActiveException.
May throw ServiceNotFoundException.
May throw TaskSetNotFoundException.
May throw UnsupportedFeatureException.
Parameter cluster :
The short name or full Amazon Resource Name (ARN) of the cluster that
hosts the service that the task set found in to delete.
Parameter service :
The short name or full Amazon Resource Name (ARN) of the service that
hosts the task set to delete.
Parameter taskSet :
The task set ID or full Amazon Resource Name (ARN) of the task set to
delete.
Parameter force :
If true, you can delete a task set even if it hasn't been
scaled down to zero.
Implementation
Future<DeleteTaskSetResponse> deleteTaskSet({
required String cluster,
required String service,
required String taskSet,
bool? force,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonEC2ContainerServiceV20141113.DeleteTaskSet'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'cluster': cluster,
'service': service,
'taskSet': taskSet,
if (force != null) 'force': force,
},
);
return DeleteTaskSetResponse.fromJson(jsonResponse.body);
}