Class: AWSCDK::EventsTargets::EventBus
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::EventsTargets::EventBus
- Includes:
- AWSCDK::Events::IRuleTarget
- Defined in:
- events_targets/event_bus.rb
Overview
Notify an existing Event Bus of an event.
Class Method Summary collapse
Instance Method Summary collapse
-
#bind(rule, _id = nil) ⇒ AWSCDK::Events::RuleTargetConfig
Returns the rule target specification.
-
#initialize(event_bus, props = nil) ⇒ EventBus
constructor
A new instance of EventBus.
Constructor Details
#initialize(event_bus, props = nil) ⇒ EventBus
Returns a new instance of EventBus.
11 12 13 14 15 16 |
# File 'events_targets/event_bus.rb', line 11 def initialize(event_bus, props = nil) props = props.is_a?(Hash) ? ::AWSCDK::EventsTargets::EventBusProps.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(event_bus, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZXZlbnRzLklFdmVudEJ1cyJ9")), "eventBus") Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZXZlbnRzX3RhcmdldHMuRXZlbnRCdXNQcm9wcyJ9")), "props") unless props.nil? Jsii::Object.instance_method(:initialize).bind(self).call(event_bus, props) end |
Class Method Details
.jsii_overridable_methods ⇒ Object
18 19 20 21 22 |
# File 'events_targets/event_bus.rb', line 18 def self.jsii_overridable_methods { :bind => { kind: :method, name: "bind", is_optional: false }, } end |
Instance Method Details
#bind(rule, _id = nil) ⇒ AWSCDK::Events::RuleTargetConfig
Returns the rule target specification.
NOTE: Do not use the various input_xxx options. They can be set in a call to add_target.
31 32 33 34 35 |
# File 'events_targets/event_bus.rb', line 31 def bind(rule, _id = nil) Jsii::Type.check_type(rule, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19ldmVudHMuSVJ1bGVSZWYifQ==")), "rule") Jsii::Type.check_type(_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "_id") unless _id.nil? jsii_call_method("bind", [rule, _id]) end |