AWS
action CloudWatch

# delete_rule

Deletes a CloudWatch rule

Run it now
View details

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

Usage

JSON

    {
      "name": "delete-rule",
      "type": "action",
      "provider": {
        "type": "python",
        "module": "chaosaws.cloudwatch.actions",
        "func": "delete_rule",
        "arguments": {
          "rule_name": ""
        }
      }
    }

YAML

    name: delete-rule
    provider:
      arguments:
        rule_name: ""
      func: delete_rule
      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
force | boolean | false | No | Force | Remove all targets before removing the rule

All rule targets must be removed before deleting the rule. Set input argument force to True to force all rule targets to be deleted.

Signature

    def delete_rule(rule_name: str,
                    force: bool = False,
                    configuration: Dict[str, Dict[str, str]] = None,
                    secrets: Dict[str, Dict[str, str]] = None) -> Dict[str, Any]:
        pass

## Related starters

- AWS
  probe CloudWatch

  ## `get_metric_data`

  Gets metric data for a given metric in a given time period. This method allows for more data to be retrieved than get_metric_statistics
- AWS
  probe CloudWatch

  ## `get_alarm_state_value`

  Return the state value of an alarm
- AWS
  action CloudWatch

  ## `put_rule_targets`

  Creates or updates CloudWatch event rule targets