Skip to main content

daemon_task_definitions

Creates, updates, deletes, gets or lists a daemon_task_definitions resource.

Overview

Namedaemon_task_definitions
TypeResource
Idaws.ecs.daemon_task_definitions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
container_definitionsarrayA list of container definitions in JSON format that describe the containers that make up the daemon task.
cpustringThe number of CPU units used by the daemon task.
daemon_task_definition_arnstringThe full Amazon Resource Name (ARN) of the daemon task definition.
delete_requested_atstring (date-time)The Unix timestamp for the time when the daemon task definition delete was requested.
execution_role_arnstringThe 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.
familystringThe name of a family that this daemon task definition is registered to.
ipc_modestringThe 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". (none, shared)
memorystringThe amount of memory (in MiB) used by the daemon task.
pid_modestringThe 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". (none, shared)
registered_atstring (date-time)The Unix timestamp for the time when the daemon task definition was registered.
registered_bystringThe principal that registered the daemon task definition.
revisionintegerThe revision of the daemon task in a particular family. The revision is a version number of a daemon task definition in a family. When you register a daemon task definition for the first time, the revision is 1. Each time that you register a new revision of a daemon task definition in the same family, the revision value always increases by one.
statusstringThe status of the daemon task definition. The valid values are ACTIVE, DELETE_IN_PROGRESS, and DELETED. (ACTIVE, DELETE_IN_PROGRESS, DELETED)
task_role_arnstringThe short name or full Amazon Resource Name (ARN) of the IAM role that grants containers in the daemon task permission to call Amazon Web Services APIs on your behalf.
volumesarrayThe list of data volume definitions for the daemon task.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_daemon_task_definitionselectregionDescribes a daemon task definition. You can specify a family and revision to find information about a specific daemon task definition, or you can simply specify the family to find the latest ACTIVE revision in that family.
list_daemon_task_definitionsselectregionReturns a list of daemon task definitions that are registered to your account. You can filter the results by family name, status, or both to find daemon task definitions that match your criteria.
register_daemon_task_definitioninsertregion, family, containerDefinitionsRegisters 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.
delete_daemon_task_definitiondeleteregionDeletes the specified daemon task definition. After a daemon task definition is deleted, no new daemons can be created using this definition. Existing daemons that reference the deleted daemon task definition continue to run. A daemon task definition must be in an ACTIVE state to be deleted.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Describes a daemon task definition. You can specify a family and revision to find information about a specific daemon task definition, or you can simply specify the family to find the latest ACTIVE revision in that family.

SELECT
container_definitions,
cpu,
daemon_task_definition_arn,
delete_requested_at,
execution_role_arn,
family,
ipc_mode,
memory,
pid_mode,
registered_at,
registered_by,
revision,
status,
task_role_arn,
volumes
FROM aws.ecs.daemon_task_definitions
WHERE region = '{{ region }}' -- required
;

INSERT examples

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.

INSERT INTO aws.ecs.daemon_task_definitions (
family,
taskRoleArn,
executionRoleArn,
containerDefinitions,
cpu,
memory,
volumes,
tags,
pidMode,
ipcMode,
region
)
SELECT
'{{ family }}' /* required */,
'{{ taskRoleArn }}',
'{{ executionRoleArn }}',
'{{ containerDefinitions }}' /* required */,
'{{ cpu }}',
'{{ memory }}',
'{{ volumes }}',
'{{ tags }}',
'{{ pidMode }}',
'{{ ipcMode }}',
'{{ region }}'
RETURNING
daemon_task_definition_arn
;

DELETE examples

Deletes the specified daemon task definition. After a daemon task definition is deleted, no new daemons can be created using this definition. Existing daemons that reference the deleted daemon task definition continue to run. A daemon task definition must be in an ACTIVE state to be deleted.

DELETE FROM aws.ecs.daemon_task_definitions
WHERE region = '{{ region }}' --required
;