AWS
action EC2

# stop_instances_by_incremental_steps

Stop a count of instances incrementally by steps

Run it now
View details

Type | action
Module | chaosaws.ec2.actions
Name | stop_instances_by_incremental_steps
Return | list

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

Name | Type | Default | Required | Title | Description
--- | --- | --- | --- | --- | ---
volume | integer |  | Yes | Total Amount | Total amount of instances to stops overall
step_quantity | integer |  | Yes | Step Amount | Step quantity to stop at a time
step_duration | integer |  | Yes | Duration Between Steps | How long to wait for between two steps
az | string | null | No | Availability Zone | Availability zone to target. If the tags field is left empty, all instances in this AZ will be stopped
tags | string |  | No | Tags | Comma-separated list of k=v tags to filter which instances can be stopped
force | boolean | false | No | Force | Force 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

## Related starters

- AWS
  action EC2

  ## `start_instances`

  Starts one or more EC2 instances
- AWS
  action EC2

  ## `detach_random_volume`

  Detaches a random (non-root) ebs volume from one or more EC2 instances
- AWS
  probe EC2

  ## `count_instances`

  Return count of instances matching the specified filters