actionASG

suspend_processes

Suspends 1 or more processes on a list of auto-scaling groups

Activity as code

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

Typeaction
Modulechaosaws.asg.actions
Namesuspend_processes
Returnmapping

If no process is specified, all running auto-scaling processes will be suspended.

For a list of valid processes that can be suspended, reference: https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-suspend-resume-processes.html

Usage

JSON

{
  "name": "suspend-processes",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosaws.asg.actions",
    "func": "suspend_processes"
  }
}

YAML

name: suspend-processes
provider:
  func: suspend_processes
  module: chaosaws.asg.actions
  type: python
type: action

Arguments

NameTypeDefaultRequiredTitleDescription
asg_nameslistnullNoASG NamesOne or many ASG names as a JSON encoded list
tagslistnullNoASG TagsList of AWS tags for to identify ASG by tags instead of by names
process_nameslistnullNoProcess NamesList of process names to check for

One of:

tags are expected as a list of dictionary objects:

[
    {'Key': 'TagKey1', 'Value': 'TagValue1'},
    {'Key': 'TagKey2', 'Value': 'TagValue2'},
    ...
]

Signature

def suspend_processes(
        asg_names: List[str] = None,
        tags: List[Dict[str, str]] = None,
        process_names: List[str] = None,
        configuration: Dict[str, Dict[str, str]] = None,
        secrets: Dict[str, Dict[str, str]] = None) -> Dict[str, Any]:
    pass