Skip to content

ECS  >  Operations  >  update_daemon

update_daemon

Operation

update_daemon async

update_daemon(input: UpdateDaemonInput, plugins: list[Plugin] | None = None) -> UpdateDaemonOutput

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.

Warning

Updating a daemon triggers a rolling deployment that drains and replaces container instances. Plan updates during maintenance windows to minimize impact on running services.

Note: ECS Managed Daemons is only supported for Amazon ECS Managed Instances Capacity Providers.

Parameters:

Name Type Description Default
input UpdateDaemonInput

An instance of UpdateDaemonInput.

required
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
UpdateDaemonOutput

An instance of UpdateDaemonOutput.

Input

UpdateDaemonInput dataclass

Bases: _SerdeShape

Dataclass for UpdateDaemonInput structure.

Attributes

capacity_provider_arns class-attribute instance-attribute
capacity_provider_arns: list[str] | None = ...

The Amazon Resource Names (ARNs) of the capacity providers to associate with the daemon.

critical class-attribute instance-attribute
critical: bool | None = ...

If the critical parameter of a daemon is true, and the daemon task fails, stops, or becomes unhealthy, Amazon ECS drains the container instance and stops the other tasks running on it. If the critical parameter is false, the daemon task failure doesn't affect the other tasks on the instance. The default value is true.

A non-critical daemon doesn't block instance registration. The container instance becomes active and continues to run your other tasks, whether the daemon task fails during scale-out or during a deployment.

Amazon ECS emits an EventBridge event when a daemon task fails to start, for both critical and non-critical daemons.

Daemon task launch failures during a deployment are still counted by the deployment circuit breaker. The circuit breaker can roll back an unstable target revision.

daemon_arn class-attribute instance-attribute
daemon_arn: str | None = ...

The Amazon Resource Name (ARN) of the daemon to update.

daemon_task_definition_arn class-attribute instance-attribute
daemon_task_definition_arn: str | None = ...

The Amazon Resource Name (ARN) of the daemon task definition to use for the updated daemon.

deployment_configuration class-attribute instance-attribute
deployment_configuration: DaemonDeploymentConfiguration | None = ...

Optional deployment parameters that control how the daemon rolls out updates, including the drain percentage, alarm-based rollback, and bake time.

enable_ecs_managed_tags class-attribute instance-attribute
enable_ecs_managed_tags: bool = ...

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.

enable_execute_command class-attribute instance-attribute
enable_execute_command: bool = ...

If true, the execute command functionality is turned on for all tasks in the daemon. If false, the execute command functionality is turned off.

propagate_tags class-attribute instance-attribute
propagate_tags: str | None = ...

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.

Output

UpdateDaemonOutput dataclass

Bases: _SerdeShape

Dataclass for UpdateDaemonOutput structure.

Attributes

created_at class-attribute instance-attribute
created_at: datetime | None = ...

The Unix timestamp for the time when the daemon was created.

daemon_arn class-attribute instance-attribute
daemon_arn: str | None = ...

The Amazon Resource Name (ARN) of the daemon.

deployment_arn class-attribute instance-attribute
deployment_arn: str | None = ...

The Amazon Resource Name (ARN) of the daemon deployment that was triggered by the update.

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.

status class-attribute instance-attribute
status: str | None = ...

The status of the daemon.

updated_at class-attribute instance-attribute
updated_at: datetime | None = ...

The Unix timestamp for the time when the daemon was last updated.