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:
-
daemon_task_definition
(String)
–
The family and revision (family:revision) or full Amazon Resource Name (ARN) of the daemon task definition to delete.
Raises:
-
AccessDeniedException
–
You don't have authorization to perform the requested action.
-
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.
-
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.
-
ServerException
–
These errors are usually caused by a server issue.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Examples:
To delete a daemon task definition
This example deletes the first revision of the monitoring-agent daemon task definition.
>>> await client.delete_daemon_task_definition(daemon_task_definition='monitoring-agent:1')
Source code in docs_src/capo_ecs/_services/async_ecs.py
| async def delete_daemon_task_definition(
self,
daemon_task_definition: "capo_ecs.types.string.String",
*,
config_overrides: Optional[AsyncECSClientConfig] = None,
) -> "capo_ecs.types.delete_daemon_task_definition_response.DeleteDaemonTaskDefinitionResponse":
"""<p>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.</p> <p>A daemon task definition must be in an <code>ACTIVE</code> state to be deleted.</p>
Args:
daemon_task_definition: <p>The <code>family</code> and <code>revision</code> (<code>family:revision</code>) or full Amazon Resource Name (ARN) of the daemon task definition to delete.</p>
Raises:
capo_ecs.errors.access_denied_exception.AccessDeniedException: <p>You don't have authorization to perform the requested action.</p>
capo_ecs.errors.client_exception.ClientException: <p>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.</p>
capo_ecs.errors.invalid_parameter_exception.InvalidParameterException: <p>The specified parameter isn't valid. Review the available parameters for the API request.</p> <p>For more information about service event errors, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-event-messages-list.html">Amazon ECS service event messages</a>. </p>
capo_ecs.errors.server_exception.ServerException: <p>These errors are usually caused by a server issue.</p>
capo_ecs.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
To delete a daemon task definition
This example deletes the first revision of the monitoring-agent daemon task definition.
>>> await client.delete_daemon_task_definition(daemon_task_definition='monitoring-agent:1')
"""
async def _handler(
req: "AsyncOperationRequest[capo_ecs.types.delete_daemon_task_definition_request.DeleteDaemonTaskDefinitionRequest]",
) -> AsyncOperationResponse[
"capo_ecs.types.delete_daemon_task_definition_response.DeleteDaemonTaskDefinitionResponse"
]:
import capo_ecs._operations.amazon_ec2_container_service_v20141113.delete_daemon_task_definition
(
output,
http_response,
) = await capo_ecs._operations.amazon_ec2_container_service_v20141113.delete_daemon_task_definition.async_delete_daemon_task_definition(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteDaemonTaskDefinition")
)
input_: capo_ecs.types.delete_daemon_task_definition_request.DeleteDaemonTaskDefinitionRequest = {
"daemon_task_definition": daemon_task_definition
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|