action EC2

stop_instances_by_incremental_steps

Stop a count of instances incrementally by steps

Run it now
View details
Typeaction
Modulechaosaws.ec2.actions
Namestop_instances_by_incremental_steps
Returnlist

Usage

JSON

{
  "name": "stop-instances-by-incremental-steps",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosaws.ec2.actions",
    "func": "stop_instances_by_incremental_steps",
    "arguments": {
      "volume": 0,
      "step_quantity": 0,
      "step_duration": 0
    }
  }
}

YAML

name: stop-instances-by-incremental-steps
provider:
  arguments:
    step_duration: 0
    step_quantity: 0
    volume: 0
  func: stop_instances_by_incremental_steps
  module: chaosaws.ec2.actions
  type: python
type: action

Arguments

NameTypeDefaultRequiredTitleDescription
volumeintegerYesTotal AmountTotal amount of instances to stops overall
step_quantityintegerYesStep AmountStep quantity to stop at a time
step_durationintegerYesDuration Between StepsHow long to wait for between two steps
azstringnullNoAvailability ZoneAvailability zone to target. If the tags field is left empty, all instances in this AZ will be stopped
tagsstringNoTagsComma-separated list of k=v tags to filter which instances can be stopped
forcebooleanfalseNoForceForce the operation

If you need more control, you can also provide a list of filters following the documentation https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ec2.html#EC2.Client.describe_instances

Signature

def stop_instances_by_incremental_steps(
        volume: int,
        step_quantity: int,
        step_duration: int,
        az: str = None,
        tags: Union[str, Dict[str, Any]] = None,
        force: bool = False,
        configuration: Dict[str, Dict[str, str]] = None,
        secrets: Dict[str, Dict[str, str]] = None) -> List[Dict[str, Any]]:
    pass