GetTaskProtection
Source:
src/AWS/ECS/GetTaskProtection.ts
Runtime binding for ecs:GetTaskProtection.
Bind this operation to a Cluster inside a function runtime to get a
callable that reads the scale-in protection status of service-managed tasks
in the bound cluster. The cluster ARN is injected automatically and the
host is granted ecs:GetTaskProtection on the cluster’s tasks.
Task Protection
Section titled “Task Protection”const getTaskProtection = yield* AWS.ECS.GetTaskProtection(cluster);
const response = yield* getTaskProtection({ tasks: [taskArn] });const protected_ = response.protectedTasks?.[0]?.protectionEnabled;