Skip to content

ECS  >  Operations  >  deregister_task_definition

deregister_task_definition

Operation

deregister_task_definition async

deregister_task_definition(request: DeregisterTaskDefinitionInput | DeregisterTaskDefinitionInputDict, /, *, plugins: list[Plugin] | None = None) -> DeregisterTaskDefinitionOutput
deregister_task_definition(*, plugins: list[Plugin] | None = None, **kwargs: Unpack[DeregisterTaskDefinitionInputDict]) -> DeregisterTaskDefinitionOutput

Deregisters the specified task definition by family and revision. Upon deregistration, the task definition is marked as INACTIVE. Existing tasks and services that reference an INACTIVE task definition continue to run without disruption. Existing services that reference an INACTIVE task definition can still scale up or down by modifying the service's desired count. If you want to delete a task definition revision, you must first deregister the task definition revision.

You can't use an INACTIVE task definition to run new tasks or create new services, and you can't update an existing service to reference an INACTIVE task definition. However, there may be up to a 10-minute window following deregistration where these restrictions have not yet taken effect.

Note

At this time, INACTIVE task definitions remain discoverable in your account indefinitely. However, this behavior is subject to change in the future. We don't recommend that you rely on INACTIVE task definitions persisting beyond the lifecycle of any associated tasks and services.

You must deregister a task definition revision before you delete it. For more information, see DeleteTaskDefinitions.

Parameters:

Name Type Description Default
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
DeregisterTaskDefinitionOutput

An instance of DeregisterTaskDefinitionOutput.

Input

Pass the input fields as keyword arguments, or pass a model or dictionary as the first positional argument. Pass plugins separately as a keyword argument.

Model

DeregisterTaskDefinitionInput dataclass

Bases: _SerdeShape

Attributes
task_definition class-attribute instance-attribute
task_definition: str | None = ...

The family and revision (family:revision) or full Amazon Resource Name (ARN) of the task definition to deregister. You must specify a revision.

Dictionaries

DeregisterTaskDefinitionInputDict

Bases: TypedDict

Dictionary form of DeregisterTaskDefinitionInput.

Attributes
task_definition instance-attribute
task_definition: Required[str]

The family and revision (family:revision) or full Amazon Resource Name (ARN) of the task definition to deregister. You must specify a revision.

Output

DeregisterTaskDefinitionOutput dataclass

Bases: _SerdeShape

Attributes

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.

task_definition class-attribute instance-attribute
task_definition: TaskDefinition | None = ...

The full description of the deregistered task.