probeECS

describe_service

Returns AWS response describing the specified cluster service

Activity as code

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

Typeprobe
Modulechaosaws.ecs.probes
Namedescribe_service
Returnmapping

Usage

JSON

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

YAML

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

Arguments

NameTypeDefaultRequiredTitleDescription
clusterstringYesClusterName of the target ECS cluster
servicestringYesServiceName of the target service

Probe example:

"steady-state-hypothesis": {
  "title": "MyService pending count is 1",
  "probes": [
    {
      "type": "probe",
      "name": "Service pending count",
      "tolerance": {
        "type": "jsonpath",
        "path": $.services[0].pendingCount,
        "expect": 1
      },
      "provider": {
        "type": "python",
        "module": "chaosaws.ecs.probes",
        "func": "describe_service",
        "arguments": {
          "cluster": "MyCluster",
          "service": "MyService"
        }
      }
    }
  ]
}

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_service(
        cluster: str,
        service: str,
        configuration: Dict[str, Dict[str, str]] = None,
        secrets: Dict[str, Dict[str, str]] = None) -> Dict[str, Any]:
    pass