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 ServerException. May throw ClientException. May throw InvalidParameterException. May throw ClusterNotFoundException. May throw UnsupportedFeatureException. May throw AccessDeniedException. May throw ServiceNotFoundException. May throw ServiceNotActiveException. May throw TaskSetNotFoundException.

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

Parameter service : The short name or full Amazon Resource Name (ARN) of the service that the task set exists 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 {
  ArgumentError.checkNotNull(cluster, 'cluster');
  ArgumentError.checkNotNull(scale, 'scale');
  ArgumentError.checkNotNull(service, 'service');
  ArgumentError.checkNotNull(taskSet, 'taskSet');
  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);
}