aws.event-rule

Filters

event-rule-target

Filter event rules by their targets

example

policies:
    - name: find-event-rules-with-no-targets
      resource: aws.event-rule
      filters:
        - type: event-rule-target
          key: Arn
          value: absent
properties:
  default:
    type: object
  key:
    type: string
  op:
    enum:
    - eq
    - equal
    - ne
    - not-equal
    - gt
    - greater-than
    - ge
    - gte
    - le
    - lte
    - lt
    - less-than
    - glob
    - regex
    - regex-case
    - in
    - ni
    - not-in
    - contains
    - difference
    - intersect
  type:
    enum:
    - event-rule-target
  value:
    oneOf:
    - type: array
    - type: string
    - type: boolean
    - type: number
    - type: 'null'
  value_from:
    additionalProperties: 'False'
    properties:
      expr:
        oneOf:
        - type: integer
        - type: string
      format:
        enum:
        - csv
        - json
        - txt
        - csv2dict
      url:
        type: string
    required:
    - url
    type: object
  value_regex:
    type: string
  value_type:
    enum:
    - age
    - integer
    - expiration
    - normalize
    - size
    - cidr
    - cidr_size
    - swap
    - resource_count
    - expr
    - unique_size
    - date
    - version
required:
- type

Permissions - events:ListTargetsByRule

invalid-targets

Filter event rules for invalid targets, Use the all option to find any event rules that have all invalid targets, otherwise defaults to filtering any event rule with at least one invalid target.

example

policies:
    - name: find-event-rules-with-invalid-targets
      resource: aws.event-rule
      filters:
        - type: invalid-targets
          all: true # defaults to false
properties:
  all:
    default: false
    type: boolean
  type:
    enum:
    - invalid-targets
required:
- type

Permissions - events:ListTargetsByRule

Actions

delete

Delete an event rule, force target removal with the force option

example

policies:
    - name: force-delete-rules
      resource: aws.event-rule
      filters:
        - Name: my-event-rule
      actions:
        - type: delete
          force: true
properties:
  force:
    type: boolean
  type:
    enum:
    - delete
required:
- type

Permissions - events:DeleteRule, events:RemoveTargets, events:ListTargetsByRule