AWS
action CloudWatch

# put_rule_targets

Creates or updates CloudWatch event rule targets

Run it now
View details

Type | action
Module | chaosaws.cloudwatch.actions
Name | put_rule_targets
Return | mapping

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

Name | Type | Default | Required | Title | Description
--- | --- | --- | --- | --- | ---
rule_name | string |  | Yes | Rule Name | Name of the rule to remove
targets | list |  | Yes | Targets | List 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

## Related starters

- AWS
  action CloudWatch

  ## `delete_rule`

  Deletes a CloudWatch rule
- AWS
  action CloudWatch

  ## `enable_rule`

  Enables a CloudWatch rule
- AWS
  action CloudWatch

  ## `remove_rule_targets`

  Removes CloudWatch rule targets