DeleteDaemonTaskDefinition
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.
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
familyandrevision(family:revision) or full Amazon Resource Name (ARN) of the daemon task definition to delete.Type: String
Required: Yes
Response Syntax
{
"daemonTaskDefinitionArn": "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.
- daemonTaskDefinitionArn
-
The full Amazon Resource Name (ARN) of the deleted daemon task definition.
Type: String
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
Example
This example deletes 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.DeleteDaemonTaskDefinition
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: 97
Connection: keep-alive
x-amzn-RequestId: 123a4b56-7c89-01d2-3ef4-example5678f
{
"daemonTaskDefinitionArn": "arn:aws:ecs:us-east-1:123456789012:daemon-task-definition/monitoring-agent:1"
}
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: