actionAZ:MQ

fail_az

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

Activity as code

Below are the details and signature of the activity Python module.

Typeaction
Moduleazchaosaws.mq.actions
Namefail_az
Returnmapping

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

NameTypeDefaultRequiredTitleDescription
azstringYesAvailability ZoneAZ to target
tagsList[Dict[str, str]][{"Key": "AZ_FAILURE", "Value": "True"}]NoTagsMatch only resources with these tags
dry_runboolfalseNoDry RunOnly perform a dry run for it

Required:

Optional:

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