updateTaskSet method

Future<UpdateTaskSetResponse> updateTaskSet({
  1. required String cluster,
  2. required Scale scale,
  3. required String service,
  4. required String taskSet,
})

Modifies a task set. 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 is found in.

Parameter scale : A floating-point percentage of the desired number of tasks to place and keep running in the task set.

Parameter service : The short name or full Amazon Resource Name (ARN) of the service that the task set is found in.

Parameter taskSet : The short name or full Amazon Resource Name (ARN) of the task set to update.

Implementation

Future<UpdateTaskSetResponse> updateTaskSet({
  required String cluster,
  required Scale scale,
  required String service,
  required String taskSet,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AmazonEC2ContainerServiceV20141113.UpdateTaskSet'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'cluster': cluster,
      'scale': scale,
      'service': service,
      'taskSet': taskSet,
    },
  );

  return UpdateTaskSetResponse.fromJson(jsonResponse.body);
}