Class: Jets::Resource::Events::Rule
- Defined in:
- lib/jets/resource/events/rule.rb
Instance Method Summary collapse
- #definition ⇒ Object
-
#initialize(props = {}) ⇒ Rule
constructor
A new instance of Rule.
-
#merged_properties ⇒ Object
Do not name this method properties, that is a computed method of ‘Jets::Resource::Base`.
- #rule_logical_id ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(props = {}) ⇒ Rule
Returns a new instance of Rule.
3 4 5 |
# File 'lib/jets/resource/events/rule.rb', line 3 def initialize(props={}) @props = props # associated_properties from dsl.rb end |
Instance Method Details
#definition ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/jets/resource/events/rule.rb', line 7 def definition { rule_logical_id => { type: "AWS::Events::Rule", properties: merged_properties } } end |
#merged_properties ⇒ Object
Do not name this method properties, that is a computed method of ‘Jets::Resource::Base`
17 18 19 20 21 22 23 24 25 |
# File 'lib/jets/resource/events/rule.rb', line 17 def merged_properties { state: "ENABLED", targets: [{ arn: "!GetAtt {namespace}LambdaFunction.Arn", id: "{namespace}RuleTarget" }] }.deep_merge(@props) end |
#rule_logical_id ⇒ Object
27 28 29 |
# File 'lib/jets/resource/events/rule.rb', line 27 def rule_logical_id "{namespace}_events_rule" end |