actionASG

change_subnets

Adds/removes subnets on autoscaling groups

Activity as code

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

Usage

JSON

{
  "name": "change-subnets",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosaws.asg.actions",
    "func": "change_subnets",
    "arguments": {
      "subnets": []
    }
  }
}

YAML

name: change-subnets
provider:
  arguments:
    subnets: []
  func: change_subnets
  module: chaosaws.asg.actions
  type: python
type: action
Typeaction
Modulechaosaws.asg.actions
Namechange_subnets
ReturnNone

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
subnetslistYesSubnet IDsList of subnets to associate with the selected ASG

One of *asg_names: a list of one or more asg names *tags: a list of key/value pair to identify asg(s) by

subnets: a list of subnet IDs to associate with the ASG

tags are expected as a list of dictionary objects:

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

Signature

def change_subnets(subnets: List[str],
                   asg_names: List[str] = None,
                   tags: List[dict] = None,
                   configuration: Dict[str, Dict[str, str]] = None,
                   secrets: Dict[str, Dict[str, str]] = None):
    pass