Skip to content

ECS  >  Operations  >  register_daemon_task_definition

register_daemon_task_definition

Operation

register_daemon_task_definition async

register_daemon_task_definition(input: RegisterDaemonTaskDefinitionInput, plugins: list[Plugin] | None = None) -> RegisterDaemonTaskDefinitionOutput

Registers a new daemon task definition from the supplied family and containerDefinitions. Optionally, you can add data volumes to your containers with the volumes parameter. For more information, see Daemon task definitions in the Amazon Elastic Container Service Developer Guide.

A daemon task definition is a template that describes the containers that form a daemon. Daemons deploy cross-cutting software agents such as security monitoring, telemetry, and logging across your Amazon ECS infrastructure.

Each time you call RegisterDaemonTaskDefinition, a new revision of the daemon task definition is created. You can't modify a revision after you register it.

Parameters:

Name Type Description Default
input RegisterDaemonTaskDefinitionInput

An instance of RegisterDaemonTaskDefinitionInput.

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
RegisterDaemonTaskDefinitionOutput

An instance of RegisterDaemonTaskDefinitionOutput.

Input

RegisterDaemonTaskDefinitionInput dataclass

Bases: _SerdeShape

Dataclass for RegisterDaemonTaskDefinitionInput structure.

Attributes

container_definitions class-attribute instance-attribute
container_definitions: list[DaemonContainerDefinition] | None = ...

A list of container definitions in JSON format that describe the containers that make up your daemon task.

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

The number of CPU units used by the daemon task. It can be expressed as an integer using CPU units (for example, 1024).

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

The Amazon Resource Name (ARN) of the task execution role that grants the Amazon ECS container agent permission to make Amazon Web Services API calls on your behalf. The task execution role is required for daemon tasks that pull container images from Amazon ECR or send container logs to CloudWatch.

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

You must specify a family for a daemon task definition. This family is used as a name for your daemon task definition. Up to 255 letters (uppercase and lowercase), numbers, underscores, and hyphens are allowed.

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

The IPC namespace mode for the daemon. The valid values are none and shared. The default is none.

If none is specified or no value is provided, the daemon runs with its own IPC namespace, isolated from other tasks. If shared is specified, the daemon joins the host IPC namespace, making it accessible to non-daemon tasks that use ipcMode: "host" or other daemons that use ipcMode: "shared".

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

The amount of memory (in MiB) used by the daemon task. It can be expressed as an integer using MiB (for example, 1024).

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

The PID namespace mode for the daemon. The valid values are none and shared. The default is none.

If none is specified or no value is provided, the daemon runs with its own PID namespace, isolated from other tasks. If shared is specified, the daemon joins the host PID namespace, making it accessible to non-daemon tasks that use pidMode: "host" or other daemons that use pidMode: "shared".

tags class-attribute instance-attribute
tags: list[Tag] | None = ...

The metadata that you apply to the daemon task definition to help you categorize and organize them. Each tag consists of a key and an optional value. You define both of them.

The following basic restrictions apply to tags:

  • Maximum number of tags per resource - 50

  • For each resource, each tag key must be unique, and each tag key can have only one value.

  • Maximum key length - 128 Unicode characters in UTF-8

  • Maximum value length - 256 Unicode characters in UTF-8

  • If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.

  • Tag keys and values are case-sensitive.

  • Do not use aws:, AWS:, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.

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

The short name or full Amazon Resource Name (ARN) of the IAM role that containers in this daemon task can assume. All containers in this daemon task are granted the permissions that are specified in this role.

volumes class-attribute instance-attribute
volumes: list[DaemonVolume] | None = ...

A list of volume definitions in JSON format that containers in your daemon task can use.

Output

RegisterDaemonTaskDefinitionOutput dataclass

Bases: _SerdeShape

Dataclass for RegisterDaemonTaskDefinitionOutput structure.

Attributes

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

The full Amazon Resource Name (ARN) of the registered daemon task definition.

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.