actionECS

stop_task

Stop a given ECS task instance. If no task_id is provided, a random task of the given service is stopped

Activity as code

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

Typeaction
Modulechaosaws.ecs.actions
Namestop_task
Returnmapping

Usage

JSON

{
  "name": "stop-task",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosaws.ecs.actions",
    "func": "stop_task"
  }
}

YAML

name: stop-task
provider:
  func: stop_task
  module: chaosaws.ecs.actions
  type: python
type: action

Arguments

NameTypeDefaultRequiredTitleDescription
clusterstringYesClusterName of the target ECS cluster
servicestringnullNoServiceName of the target service
task_idstringnullNoTask IDTask identifier to stop
reasonstring“Reliably Planned Experiment”NoReasonReason why stopping the task

Signature

def stop_task(cluster: str = None,
              task_id: str = None,
              service: str = None,
              reason: str = 'Chaos Testing',
              configuration: Dict[str, Dict[str, str]] = None,
              secrets: Dict[str, Dict[str, str]] = None) -> Dict[str, Any]:
    pass