Class: AWSCDK::Notifications::CfnEventRuleProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
notifications/cfn_event_rule_props.rb

Overview

Properties for defining a CfnEventRule.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(event_type:, notification_configuration_arn:, regions:, source:, event_pattern: nil) ⇒ CfnEventRuleProps

Returns a new instance of CfnEventRuleProps.

Parameters:

  • event_type (String)

    The event type this rule should match with the EventBridge events.

  • notification_configuration_arn (String)

    The ARN for the NotificationConfiguration associated with this EventRule .

  • regions (Array<String>)

    A list of AWS Regions that send events to this EventRule .

  • source (String)

    The event source this rule should match with the EventBridge event sources.

  • event_pattern (String, nil) (defaults to: nil)

    An additional event pattern used to further filter the events this EventRule receives.



14
15
16
17
18
19
20
21
22
23
24
25
# File 'notifications/cfn_event_rule_props.rb', line 14

def initialize(event_type:, notification_configuration_arn:, regions:, source:, event_pattern: nil)
  @event_type = event_type
  Jsii::Type.check_type(@event_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "eventType")
  @notification_configuration_arn = notification_configuration_arn
  Jsii::Type.check_type(@notification_configuration_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "notificationConfigurationArn")
  @regions = regions
  Jsii::Type.check_type(@regions, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "regions")
  @source = source
  Jsii::Type.check_type(@source, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "source")
  @event_pattern = event_pattern
  Jsii::Type.check_type(@event_pattern, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "eventPattern") unless @event_pattern.nil?
end

Instance Attribute Details

#event_patternString? (readonly)

An additional event pattern used to further filter the events this EventRule receives.

For more information, see Amazon EventBridge event patterns in the Amazon EventBridge User Guide.



57
58
59
# File 'notifications/cfn_event_rule_props.rb', line 57

def event_pattern
  @event_pattern
end

#event_typeString (readonly)

The event type this rule should match with the EventBridge events.

It must match with atleast one of the valid EventBridge event types. For example, Amazon EC2 Instance State change Notification and Amazon CloudWatch State Change. For more information, see Event delivery from AWS services in the Amazon EventBridge User Guide .



33
34
35
# File 'notifications/cfn_event_rule_props.rb', line 33

def event_type
  @event_type
end

#notification_configuration_arnString (readonly)

The ARN for the NotificationConfiguration associated with this EventRule .



38
39
40
# File 'notifications/cfn_event_rule_props.rb', line 38

def notification_configuration_arn
  @notification_configuration_arn
end

#regionsArray<String> (readonly)

A list of AWS Regions that send events to this EventRule .



43
44
45
# File 'notifications/cfn_event_rule_props.rb', line 43

def regions
  @regions
end

#sourceString (readonly)

The event source this rule should match with the EventBridge event sources.

It must match with atleast one of the valid EventBridge event sources. Only AWS service sourced events are supported. For example, aws.ec2 and aws.cloudwatch . For more information, see Event delivery from AWS services in the Amazon EventBridge User Guide .



50
51
52
# File 'notifications/cfn_event_rule_props.rb', line 50

def source
  @source
end

Class Method Details

.jsii_propertiesObject



59
60
61
62
63
64
65
66
67
# File 'notifications/cfn_event_rule_props.rb', line 59

def self.jsii_properties
  {
    :event_type => "eventType",
    :notification_configuration_arn => "notificationConfigurationArn",
    :regions => "regions",
    :source => "source",
    :event_pattern => "eventPattern",
  }
end

Instance Method Details

#to_jsiiObject



69
70
71
72
73
74
75
76
77
78
79
# File 'notifications/cfn_event_rule_props.rb', line 69

def to_jsii
  result = {}
  result.merge!({
    "eventType" => @event_type,
    "notificationConfigurationArn" => @notification_configuration_arn,
    "regions" => @regions,
    "source" => @source,
    "eventPattern" => @event_pattern,
  })
  result.compact
end