Sha256: c6dc58f157edad463450113700433c74a8fc4a10f50707bef3b64bba9bc6c29c

Contents?: true

Size: 594 Bytes

Versions: 4

Compression:

Stored size: 594 Bytes

Contents

class <%= class_name %>Event < ApplicationEvent
  rule_event(
    description: "Checks for security group changes",
    detail_type: ["AWS API Call via CloudTrail"],
    detail: {
      event_source: ["ec2.amazonaws.com"],
      event_name: [
        "AuthorizeSecurityGroupIngress",
        "AuthorizeSecurityGroupEgress",
        "RevokeSecurityGroupIngress",
        "RevokeSecurityGroupEgress",
        "CreateSecurityGroup",
        "DeleteSecurityGroup"
      ]
    }
  )
  def <%= options[:method] %>
    puts "event: #{JSON.dump(event)}" # event is available
    # your logic
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
jets-6.0.5 lib/jets/cli/generate/templates/event_types/rule.rb.tt
jets-6.0.4 lib/jets/cli/generate/templates/event_types/rule.rb.tt
jets-6.0.3 lib/jets/cli/generate/templates/event_types/rule.rb.tt
jets-6.0.2 lib/jets/cli/generate/templates/event_types/rule.rb.tt