probe ASG

instance_count_by_health

Reports the number of instances currently in the ASG by their health status

Run it now
View details
Typeprobe
Modulechaosaws.asg.probes
Nameinstance_count_by_health
Returninteger

Usage

JSON

{
  "name": "instance-count-by-health",
  "type": "probe",
  "provider": {
    "type": "python",
    "module": "chaosaws.asg.probes",
    "func": "instance_count_by_health"
  }
}

YAML

name: instance-count-by-health
provider:
  func: instance_count_by_health
  module: chaosaws.asg.probes
  type: python
type: probe

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
count_healthybooleantrueNoCount Only HealthyCount only healthy ASG

One of:

  • asg_names: a list of asg names to describe
  • tags: a list of key/value pairs to collect ASG(s)

count_healthy: boolean: true for healthy instance count, false for unhealthy instance count

tags are expected as a list of dictionary objects:

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

Signature

def instance_count_by_health(asg_names: List[str] = None,
                             tags: List[Dict[str, str]] = None,
                             count_healthy: bool = True,
                             configuration: Dict[str, Dict[str, str]] = None,
                             secrets: Dict[str, Dict[str, str]] = None) -> int:
    pass