actionCloudWatch

put_rule_targets

Creates or updates CloudWatch event rule targets

Activity as code

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

Typeaction
Modulechaosaws.cloudwatch.actions
Nameput_rule_targets
Returnmapping

Usage

JSON

{
  "name": "put-rule-targets",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaosaws.cloudwatch.actions",
    "func": "put_rule_targets",
    "arguments": {
      "rule_name": "",
      "targets": []
    }
  }
}

YAML

name: put-rule-targets
provider:
  arguments:
    rule_name: ""
    targets: []
  func: put_rule_targets
  module: chaosaws.cloudwatch.actions
  type: python
type: action

Arguments

NameTypeDefaultRequiredTitleDescription
rule_namestringYesRule NameName of the rule to remove
targetslistYesTargetsList of Clkoud Watch targets

Please refer to https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/events.html#CloudWatchEvents.Client.put_targets for details on input arguments.

Signature

def put_rule_targets(
        rule_name: str,
        targets: List[Dict[str, Any]],
        configuration: Dict[str, Dict[str, str]] = None,
        secrets: Dict[str, Dict[str, str]] = None) -> Dict[str, Any]:
    pass