probeECS

describe_tasks

Returns AWS response describing the tasks for a provided cluster

Activity as code

Below are the details and signature of the activity Python module.

Typeprobe
Modulechaosaws.ecs.probes
Namedescribe_tasks
Returnmapping

Usage

JSON

{
  "name": "describe-tasks",
  "type": "probe",
  "provider": {
    "type": "python",
    "module": "chaosaws.ecs.probes",
    "func": "describe_tasks",
    "arguments": {
      "cluster": ""
    }
  }
}

YAML

name: describe-tasks
provider:
  arguments:
    cluster: ""
  func: describe_tasks
  module: chaosaws.ecs.probes
  type: python
type: probe

Arguments

NameTypeDefaultRequiredTitleDescription
clusterstringYesClusterName of the target ECS cluster

Probe example:

"steady-state-hypothesis": {
  "title": "MyCluster tasks are healthy",
  "probes": [
    {
      "type": "probe",
      "name": "first task is healthy",
      "tolerance": {
        "type": "jsonpath",
        "path": $.tasks[0].healthStatus,
        "expect": "HEALTHY"
      },
      "provider": {
        "type": "python",
        "module": "chaosaws.ecs.probes",
        "func": "describe_tasks",
        "arguments": {
          "cluster": "MyCluster"
        }
      }
    }
  ]
}

A full list of possible paths can be found at https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ecs.html#ECS.Client.describe_clusters

Signature

def describe_tasks(
        cluster: str,
        configuration: Dict[str, Dict[str, str]] = None,
        secrets: Dict[str, Dict[str, str]] = None) -> Dict[str, Any]:
    pass