Skip to content

ECS  >  Operations  >  get_task_protection

get_task_protection

Operation

get_task_protection async

get_task_protection(input: GetTaskProtectionInput, plugins: list[Plugin] | None = None) -> GetTaskProtectionOutput

Retrieves the protection status of tasks in an Amazon ECS service.

Parameters:

Name Type Description Default
input GetTaskProtectionInput

An instance of GetTaskProtectionInput.

required
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
GetTaskProtectionOutput

An instance of GetTaskProtectionOutput.

Input

GetTaskProtectionInput dataclass

Bases: _SerdeShape

Dataclass for GetTaskProtectionInput structure.

Attributes

cluster class-attribute instance-attribute
cluster: str | None = ...

The short name or full Amazon Resource Name (ARN) of the cluster that hosts the service that the task sets exist in.

tasks class-attribute instance-attribute
tasks: list[str] | None = ...

A list of up to 100 task IDs or full ARN entries.

Output

GetTaskProtectionOutput dataclass

Bases: _SerdeShape

Dataclass for GetTaskProtectionOutput structure.

Attributes

failures class-attribute instance-attribute
failures: list[Failure] | None = ...

Any failures associated with the call.

protected_tasks class-attribute instance-attribute
protected_tasks: list[ProtectedTask] | None = ...

A list of tasks with the following information.

  • taskArn: The task ARN.

  • protectionEnabled: The protection status of the task. If scale-in protection is turned on for a task, the value is true. Otherwise, it is false.

  • expirationDate: The epoch time when protection for the task will expire.

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.