updateDaemon method
Updates the specified daemon. When you update a daemon, a new deployment is triggered that progressively rolls out the changes to the container instances associated with the daemon's capacity providers. For more information, see Daemon deployments in the Amazon Elastic Container Service Developer Guide.
Amazon ECS drains existing container instances and provisions new instances with the updated daemon. Amazon ECS automatically launches replacement tasks for your services.
May throw AccessDeniedException.
May throw ClientException.
May throw ClusterNotFoundException.
May throw DaemonNotActiveException.
May throw DaemonNotFoundException.
May throw InvalidParameterException.
May throw PlatformUnknownException.
May throw ServerException.
May throw UnsupportedFeatureException.
Parameter capacityProviderArns :
The Amazon Resource Names (ARNs) of the capacity providers to associate
with the daemon.
Parameter daemonArn :
The Amazon Resource Name (ARN) of the daemon to update.
Parameter daemonTaskDefinitionArn :
The Amazon Resource Name (ARN) of the daemon task definition to use for
the updated daemon.
Parameter deploymentConfiguration :
Optional deployment parameters that control how the daemon rolls out
updates, including the drain percentage, alarm-based rollback, and bake
time.
Parameter enableECSManagedTags :
Specifies whether to turn on Amazon ECS managed tags for the tasks in the
daemon. For more information, see Tagging
your Amazon ECS resources in the Amazon Elastic Container Service
Developer Guide.
Parameter enableExecuteCommand :
If true, the execute command functionality is turned on for
all tasks in the daemon. If false, the execute command
functionality is turned off.
Parameter propagateTags :
Specifies whether to propagate the tags from the daemon to the daemon
tasks. If you don't specify a value, the tags aren't propagated. You can
only propagate tags to daemon tasks during task creation.
Implementation
Future<UpdateDaemonResponse> updateDaemon({
required List<String> capacityProviderArns,
required String daemonArn,
required String daemonTaskDefinitionArn,
DaemonDeploymentConfiguration? deploymentConfiguration,
bool? enableECSManagedTags,
bool? enableExecuteCommand,
DaemonPropagateTags? propagateTags,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonEC2ContainerServiceV20141113.UpdateDaemon'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'capacityProviderArns': capacityProviderArns,
'daemonArn': daemonArn,
'daemonTaskDefinitionArn': daemonTaskDefinitionArn,
if (deploymentConfiguration != null)
'deploymentConfiguration': deploymentConfiguration,
if (enableECSManagedTags != null)
'enableECSManagedTags': enableECSManagedTags,
if (enableExecuteCommand != null)
'enableExecuteCommand': enableExecuteCommand,
if (propagateTags != null) 'propagateTags': propagateTags.value,
},
);
return UpdateDaemonResponse.fromJson(jsonResponse.body);
}