ECS / Client / update_daemon

update_daemon

ECS.Client.update_daemon(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.update_daemon(
    daemonArn='string',
    daemonTaskDefinitionArn='string',
    capacityProviderArns=[
        'string',
    ],
    deploymentConfiguration={
        'drainPercent': 123.0,
        'alarms': {
            'alarmNames': [
                'string',
            ],
            'enable': True|False
        },
        'bakeTimeInMinutes': 123
    },
    propagateTags='DAEMON'|'NONE',
    enableECSManagedTags=True|False,
    enableExecuteCommand=True|False
)
Parameters:
  • daemonArn (string) –

    [REQUIRED]

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

  • daemonTaskDefinitionArn (string) –

    [REQUIRED]

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

  • capacityProviderArns (list) –

    [REQUIRED]

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

    • (string) –

  • deploymentConfiguration (dict) –

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

    • drainPercent (float) –

      The percentage of container instances to drain simultaneously during a daemon deployment. Valid values are between 0.0 and 100.0.

    • alarms (dict) –

      The CloudWatch alarm configuration for the daemon deployment. When alarms are triggered during a deployment, the deployment can be automatically rolled back.

      • alarmNames (list) –

        The CloudWatch alarm names to monitor during a daemon deployment.

        • (string) –

      • enable (boolean) –

        Determines whether to use the CloudWatch alarm option in the daemon deployment process. The default value is false.

    • bakeTimeInMinutes (integer) –

      The amount of time (in minutes) to wait after a successful deployment step before proceeding. This allows time to monitor for issues before continuing. The default value is 0.

  • propagateTags (string) – 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.

  • enableECSManagedTags (boolean) – 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.

  • enableExecuteCommand (boolean) – If true, the execute command functionality is turned on for all tasks in the daemon. If false, the execute command functionality is turned off.

Return type:

dict

Returns:

Response Syntax

{
    'daemonArn': 'string',
    'status': 'ACTIVE'|'DELETE_IN_PROGRESS',
    'createdAt': datetime(2015, 1, 1),
    'updatedAt': datetime(2015, 1, 1),
    'deploymentArn': 'string'
}

Response Structure

  • (dict) –

    • daemonArn (string) –

      The Amazon Resource Name (ARN) of the daemon.

    • status (string) –

      The status of the daemon.

    • createdAt (datetime) –

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

    • updatedAt (datetime) –

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

    • deploymentArn (string) –

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

Exceptions

  • ECS.Client.exceptions.AccessDeniedException

  • ECS.Client.exceptions.DaemonNotFoundException

  • ECS.Client.exceptions.PlatformUnknownException

  • ECS.Client.exceptions.DaemonNotActiveException

  • ECS.Client.exceptions.ServerException

  • ECS.Client.exceptions.InvalidParameterException

  • ECS.Client.exceptions.ClientException

  • ECS.Client.exceptions.ClusterNotFoundException

  • ECS.Client.exceptions.UnsupportedFeatureException