AWS
probe EC2

# count_instances

Return count of instances matching the specified filters

Run it now
View details

Type | probe
Module | chaosaws.ec2.probes
Name | count_instances
Return | integer

Usage

JSON

    {
      "name": "count-instances",
      "type": "probe",
      "provider": {
        "type": "python",
        "module": "chaosaws.ec2.probes",
        "func": "count_instances",
        "arguments": {
          "filters": []
        }
      }
    }

YAML

    name: count-instances
    provider:
      arguments:
        filters: []
      func: count_instances
      module: chaosaws.ec2.probes
      type: python
    type: probe

Arguments

Name | Type | Default | Required | Title | Description
--- | --- | --- | --- | --- | ---
filters | list | null | No | Instance Filters | List of key/value pairs to select instances

Please refer to https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ec2/client/describe_instances.html# for details on filters.

Signature

    def count_instances(filters: List[Dict[str, Any]],
                        configuration: Dict[str, Dict[str, str]] = None,
                        secrets: Dict[str, Dict[str, str]] = None) -> int:
        pass

## Related starters

- AWS
  probe EC2

  ## `instance_state`

  Determines if EC2 instances match desired state
- 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