actionCloudWatch

put_rule

Creates or updates a CloudWatch event rule

Activity as code

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

Typeaction
Modulechaosaws.cloudwatch.actions
Nameput_rule
Returnmapping

Usage

JSON

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

YAML

name: put-rule
provider:
  arguments:
    rule_name: ""
  func: put_rule
  module: chaosaws.cloudwatch.actions
  type: python
type: action

Arguments

NameTypeDefaultRequiredTitleDescription
rule_namestringYesRule NameName of the rule to remove
schedule_expressionstringnullNoSchedule Expression
event_patternstringnullNoEvent Pattern
statestringnullNoState
descriptionstringnullNoDescription
role_arnstringnullNoRole ARN

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

Signature

def put_rule(rule_name: str,
             schedule_expression: str = None,
             event_pattern: str = None,
             state: str = None,
             description: str = None,
             role_arn: str = None,
             configuration: Dict[str, Dict[str, str]] = None,
             secrets: Dict[str, Dict[str, str]] = None) -> Dict[str, Any]:
    pass