daemon_task_definitions
Creates, updates, deletes, gets or lists a daemon_task_definitions resource.
Overview
| Name | daemon_task_definitions |
| Type | Resource |
| Id | aws.ecs.daemon_task_definitions |
Fields
The following fields are returned by SELECT queries:
- describe_daemon_task_definition
- list_daemon_task_definitions
| Name | Datatype | Description |
|---|---|---|
container_definitions | array | A list of container definitions in JSON format that describe the containers that make up the daemon task. |
cpu | string | The number of CPU units used by the daemon task. |
daemon_task_definition_arn | string | The full Amazon Resource Name (ARN) of the daemon task definition. |
delete_requested_at | string (date-time) | The Unix timestamp for the time when the daemon task definition delete was requested. |
execution_role_arn | string | 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. |
family | string | The name of a family that this daemon task definition is registered to. |
ipc_mode | string | 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". (none, shared) |
memory | string | The amount of memory (in MiB) used by the daemon task. |
pid_mode | string | 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". (none, shared) |
registered_at | string (date-time) | The Unix timestamp for the time when the daemon task definition was registered. |
registered_by | string | The principal that registered the daemon task definition. |
revision | integer | The 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. |
status | string | The status of the daemon task definition. The valid values are ACTIVE, DELETE_IN_PROGRESS, and DELETED. (ACTIVE, DELETE_IN_PROGRESS, DELETED) |
task_role_arn | string | The 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. |
volumes | array | The list of data volume definitions for the daemon task. |
| Name | Datatype | Description |
|---|---|---|
daemon_task_definitions | array | The list of daemon task definition summaries. |
next_token | string | The nextToken value to include in a future ListDaemonTaskDefinitions request. When the results of a ListDaemonTaskDefinitions request exceed maxResults, this value can be used to retrieve the next page of results. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_daemon_task_definition | select | region | 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. | |
list_daemon_task_definitions | select | region | Returns 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_definition | insert | region, family, containerDefinitions | 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. | |
delete_daemon_task_definition | delete | region | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_daemon_task_definition
- list_daemon_task_definitions
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
;
Returns 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.
SELECT
daemon_task_definitions,
next_token
FROM aws.ecs.daemon_task_definitions
WHERE region = '{{ region }}' -- required
;
INSERT examples
- register_daemon_task_definition
- Manifest
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
;
# Description fields are for documentation purposes
- name: daemon_task_definitions
props:
- name: region
value: "{{ region }}"
description: Required parameter for the daemon_task_definitions resource.
- name: family
value: "{{ family }}"
description: |
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.
- name: taskRoleArn
value: "{{ taskRoleArn }}"
description: |
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.
- name: executionRoleArn
value: "{{ executionRoleArn }}"
description: |
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.
- name: containerDefinitions
description: |
A list of container definitions in JSON format that describe the containers that make up your daemon task.
value:
- name: "{{ name }}"
image: "{{ image }}"
memory: {{ memory }}
memoryReservation: {{ memoryReservation }}
repositoryCredentials:
credentialsParameter: "{{ credentialsParameter }}"
healthCheck:
command:
- "{{ command }}"
interval: {{ interval }}
timeout: {{ timeout }}
retries: {{ retries }}
startPeriod: {{ startPeriod }}
cpu: {{ cpu }}
essential: {{ essential }}
entryPoint: "{{ entryPoint }}"
command: "{{ command }}"
workingDirectory: "{{ workingDirectory }}"
environmentFiles: "{{ environmentFiles }}"
environment: "{{ environment }}"
secrets: "{{ secrets }}"
readonlyRootFilesystem: {{ readonlyRootFilesystem }}
mountPoints: "{{ mountPoints }}"
logConfiguration:
logDriver: "{{ logDriver }}"
options: "{{ options }}"
secretOptions:
- name: "{{ name }}"
valueFrom: "{{ valueFrom }}"
firelensConfiguration:
type_: "{{ type_ }}"
options: "{{ options }}"
privileged: {{ privileged }}
user: "{{ user }}"
ulimits: "{{ ulimits }}"
linuxParameters:
capabilities:
add:
- "{{ add }}"
drop:
- "{{ drop }}"
devices:
- hostPath: "{{ hostPath }}"
containerPath: "{{ containerPath }}"
permissions: "{{ permissions }}"
initProcessEnabled: {{ initProcessEnabled }}
tmpfs:
- containerPath: "{{ containerPath }}"
size: {{ size }}
mountOptions: "{{ mountOptions }}"
dependsOn: "{{ dependsOn }}"
startTimeout: {{ startTimeout }}
stopTimeout: {{ stopTimeout }}
systemControls: "{{ systemControls }}"
interactive: {{ interactive }}
pseudoTerminal: {{ pseudoTerminal }}
restartPolicy:
enabled: {{ enabled }}
ignoredExitCodes:
- {{ ignoredExitCodes }}
restartAttemptPeriod: {{ restartAttemptPeriod }}
- name: cpu
value: "{{ cpu }}"
description: |
The number of CPU units used by the daemon task. It can be expressed as an integer using CPU units (for example, 1024).
- name: memory
value: "{{ memory }}"
description: |
The amount of memory (in MiB) used by the daemon task. It can be expressed as an integer using MiB (for example, 1024).
- name: volumes
description: |
A list of volume definitions in JSON format that containers in your daemon task can use.
value:
- name: "{{ name }}"
host:
sourcePath: "{{ sourcePath }}"
- name: tags
description: |
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.
value:
- key: "{{ key }}"
value: "{{ value }}"
- name: pidMode
value: "{{ pidMode }}"
description: |
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".
valid_values: ['none', 'shared']
- name: ipcMode
value: "{{ ipcMode }}"
description: |
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".
valid_values: ['none', 'shared']
DELETE examples
- delete_daemon_task_definition
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
;