Skip to content

Get Task Protection

ecs_get_task_protection R Documentation

Retrieves the protection status of tasks in an Amazon ECS service

Description

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

Usage

ecs_get_task_protection(cluster, tasks)

Arguments

cluster

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

tasks

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

Value

A list with the following syntax:

list(
  protectedTasks = list(
    list(
      taskArn = "string",
      protectionEnabled = TRUE|FALSE,
      expirationDate = as.POSIXct(
        "2015-01-01"
      )
    )
  ),
  failures = list(
    list(
      arn = "string",
      reason = "string",
      detail = "string"
    )
  )
)

Request syntax

svc$get_task_protection(
  cluster = "string",
  tasks = list(
    "string"
  )
)

Examples

## Not run: 
# In this example, we get the protection status for a single task.
svc$get_task_protection(
  cluster = "test-task-protection",
  tasks = list(
    "b8b1cf532d0e46ba8d44a40d1de16772"
  )
)

## End(Not run)