updateServicePrimaryTaskSet method
Modifies which task set in a service is the primary task set. Any
parameters that are updated on the primary task set in a service will
transition to the 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 ServiceNotFoundException. May throw ServiceNotActiveException. May throw TaskSetNotFoundException. May throw AccessDeniedException.
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 primaryTaskSet
:
The short name or full Amazon Resource Name (ARN) of the task set to set
as the primary task set in the deployment.
Parameter service
:
The short name or full Amazon Resource Name (ARN) of the service that the
task set exists in.
Implementation
Future<UpdateServicePrimaryTaskSetResponse> updateServicePrimaryTaskSet({
required String cluster,
required String primaryTaskSet,
required String service,
}) async {
ArgumentError.checkNotNull(cluster, 'cluster');
ArgumentError.checkNotNull(primaryTaskSet, 'primaryTaskSet');
ArgumentError.checkNotNull(service, 'service');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target':
'AmazonEC2ContainerServiceV20141113.UpdateServicePrimaryTaskSet'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'cluster': cluster,
'primaryTaskSet': primaryTaskSet,
'service': service,
},
);
return UpdateServicePrimaryTaskSetResponse.fromJson(jsonResponse.body);
}