AWS AZ
action AZ:MQ

# fail_az

Forces a reboot for Amazon MQ (ActiveMQ) running brokers that have an active-standby setup

Run it now
View details

Type | action
Module | azchaosaws.mq.actions
Name | fail_az
Return | mapping

This function forces a reboot for Amazon MQ (ActiveMQ) running brokers that have an active-standby setup (ACTIVE_STANDBY_MULTI_AZ). The reboot operation is asynchronous as documented in https://docs.aws.amazon.com/amazon-mq/latest/api-reference/brokers-broker-id-reboot.html#RebootBroker. Please ensure that your brokers are tagged with the key-value pairs provided.

Usage

JSON

    {
      "name": "fail_az",
      "type": "action",
      "provider": {
        "type": "python",
        "module": "azchaosaws.mq.actions",
        "func": "fail_az",
        "arguments": {
          "az": "",
          "dry_run": true
        }
      }
    }

YAML

    name: fail_az
    provider:
      arguments:
        az: ""
        dry_run: true
      func: fail_az
      module: azchaosaws.mq.actions
      type: python
    type: action

Arguments

Name | Type | Default | Required | Title | Description
--- | --- | --- | --- | --- | ---
az | string |  | Yes | Availability Zone | AZ to target
tags | List[Dict[str, str]] | [{"Key": "AZ_FAILURE", "Value": "True"}] | No | Tags | Match only resources with these tags
dry_run | bool | false | No | Dry Run | Only perform a dry run for it

Required:

- az (str): An availability zone
- dry_run (bool): The boolean flag to simulate a dry run or not. Setting to True will only run read-only operations and not make changes to resources. (Accepted values: True | False)

Optional:

- tags (List[Dict[str, str]]): A list of key-value pairs to filter the ELBv2(s) by. (Default: `[{"Key": "AZ_FAILURE", "Value": "True"}]` )

Return structure

    {
      "AvailabilityZone": str,
      "DryRun": bool,
      "Brokers": {
        "Success": {
          "BrokerIds": List[str]
        },
        "Failed": {
          "BrokerIds": List[str]
        }
      }
    }

Signature

    def fail_az(
        az: str = None,
        dry_run: bool = None,
        tags: List[Dict[str, str]] = [{"AZ_FAILURE": "True"}],
        configuration: Configuration = None,
    ) -> Dict[str, Any]:
        pass

## Related starters

- AWS AZ
  action AZ:ELB

  ## `recover_az`

  Rolls back the ELB(s) that were affected by the fail_az action
- AWS AZ
  action AZ:EC2

  ## `recover_az`

  Rolls back the subnet(s) and/or EC2 instances that were affected by the fail_az action
- AWS AZ
  action AZ:ELBv2

  ## `recover_az`

  Rolls back the ELB(s) that were affected by the fail_az action