DescribeDaemonTaskDefinition - Amazon Elastic Container Service

DescribeDaemonTaskDefinition

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.

Request Syntax

{ "daemonTaskDefinition": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

daemonTaskDefinition

The family for the latest ACTIVE revision, family and revision (family:revision) for a specific revision in the family, or full Amazon Resource Name (ARN) of the daemon task definition to describe.

Type: String

Required: Yes

Response Syntax

{ "daemonTaskDefinition": { "containerDefinitions": [ { "command": [ "string" ], "cpu": number, "dependsOn": [ { "condition": "string", "containerName": "string" } ], "entryPoint": [ "string" ], "environment": [ { "name": "string", "value": "string" } ], "environmentFiles": [ { "type": "string", "value": "string" } ], "essential": boolean, "firelensConfiguration": { "options": { "string" : "string" }, "type": "string" }, "healthCheck": { "command": [ "string" ], "interval": number, "retries": number, "startPeriod": number, "timeout": number }, "image": "string", "interactive": boolean, "linuxParameters": { "capabilities": { "add": [ "string" ], "drop": [ "string" ] }, "devices": [ { "containerPath": "string", "hostPath": "string", "permissions": [ "string" ] } ], "initProcessEnabled": boolean, "tmpfs": [ { "containerPath": "string", "mountOptions": [ "string" ], "size": number } ] }, "logConfiguration": { "logDriver": "string", "options": { "string" : "string" }, "secretOptions": [ { "name": "string", "valueFrom": "string" } ] }, "memory": number, "memoryReservation": number, "mountPoints": [ { "containerPath": "string", "readOnly": boolean, "sourceVolume": "string" } ], "name": "string", "privileged": boolean, "pseudoTerminal": boolean, "readonlyRootFilesystem": boolean, "repositoryCredentials": { "credentialsParameter": "string" }, "restartPolicy": { "enabled": boolean, "ignoredExitCodes": [ number ], "restartAttemptPeriod": number }, "secrets": [ { "name": "string", "valueFrom": "string" } ], "startTimeout": number, "stopTimeout": number, "systemControls": [ { "namespace": "string", "value": "string" } ], "ulimits": [ { "hardLimit": number, "name": "string", "softLimit": number } ], "user": "string", "workingDirectory": "string" } ], "cpu": "string", "daemonTaskDefinitionArn": "string", "deleteRequestedAt": number, "executionRoleArn": "string", "family": "string", "memory": "string", "registeredAt": number, "registeredBy": "string", "revision": number, "status": "string", "taskRoleArn": "string", "volumes": [ { "host": { "sourcePath": "string" }, "name": "string" } ] } }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

daemonTaskDefinition

The full daemon task definition description.

Type: DaemonTaskDefinition object

Errors

For information about the errors that are common to all actions, see Common Error Types.

AccessDeniedException

You don't have authorization to perform the requested action.

message

Message that describes the cause of the exception.

HTTP Status Code: 400

ClientException

These errors are usually caused by a client action. This client action might be using an action or resource on behalf of a user that doesn't have permissions to use the action or resource. Or, it might be specifying an identifier that isn't valid.

message

Message that describes the cause of the exception.

HTTP Status Code: 400

InvalidParameterException

The specified parameter isn't valid. Review the available parameters for the API request.

For more information about service event errors, see Amazon ECS service event messages.

message

Message that describes the cause of the exception.

HTTP Status Code: 400

ServerException

These errors are usually caused by a server issue.

message

Message that describes the cause of the exception.

HTTP Status Code: 500

Examples

In the following example or examples, the Authorization header contents (AUTHPARAMS) must be replaced with an AWS Signature Version 4 signature. For more information, see Signature Version 4 Signing Process in the AWS General Reference.

You only need to learn how to sign HTTP requests if you intend to create them manually. When you use the AWS Command Line Interface or one of the AWS SDKs to make requests to AWS, these tools automatically sign the requests for you, with the access key that you specify when you configure the tools. When you use these tools, you don't have to sign requests yourself.

Example

This example describes the first revision of the monitoring-agent daemon task definition.

Sample Request

POST / HTTP/1.1 Host: ecs.us-east-1.amazonaws.com Accept-Encoding: identity X-Amz-Target: AmazonEC2ContainerServiceV20141113.DescribeDaemonTaskDefinition X-Amz-Date: 20250315T103000Z Content-Type: application/x-amz-json-1.1 Authorization: AUTHPARAMS { "daemonTaskDefinition": "monitoring-agent:1" }

Sample Response

HTTP/1.1 200 OK Server: Server Date: Sat, 15 Mar 2025 10:30:00 GMT Content-Type: application/x-amz-json-1.1 Content-Length: 679 Connection: keep-alive x-amzn-RequestId: 123a4b56-7c89-01d2-3ef4-example5678f { "daemonTaskDefinition": { "daemonTaskDefinitionArn": "arn:aws:ecs:us-east-1:123456789012:daemon-task-definition/monitoring-agent:1", "family": "monitoring-agent", "revision": 1, "containerDefinitions": [ { "name": "cloudwatch-agent", "image": "public.ecr.aws/cloudwatch-agent/cloudwatch-agent:latest", "memory": 256, "cpu": 128, "essential": true, "logConfiguration": { "logDriver": "awslogs", "options": { "awslogs-group": "/ecs/daemon/monitoring-agent", "awslogs-region": "us-east-1", "awslogs-stream-prefix": "ecs" } }, "environment": [ { "name": "USE_DEFAULT_CONFIG", "value": "true" } ], "mountPoints": [], "secrets": [] } ], "cpu": "128", "memory": "256", "executionRoleArn": "arn:aws:iam::123456789012:role/ecsTaskExecutionRole", "taskRoleArn": "arn:aws:iam::123456789012:role/ecsDaemonTaskRole", "volumes": [], "status": "ACTIVE", "registeredAt": "2025-03-15T10:30:00.000Z", "registeredBy": "arn:aws:iam::123456789012:user/admin" } }

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: