Class: AWSCDK::SchedulerTargets::EventBridgePutEventsEntry
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::SchedulerTargets::EventBridgePutEventsEntry
- Defined in:
- scheduler_targets/event_bridge_put_events_entry.rb
Overview
An entry to be sent to EventBridge.
Instance Attribute Summary collapse
-
#detail ⇒ AWSCDK::Scheduler::ScheduleTargetInput
readonly
The event body.
-
#detail_type ⇒ String
readonly
Used along with the source field to help identify the fields and values expected in the detail field.
-
#event_bus ⇒ AWSCDK::Events::IEventBus
readonly
The event bus the entry will be sent to.
-
#source ⇒ String
readonly
The service or application that caused this event to be generated.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(detail:, detail_type:, event_bus:, source:) ⇒ EventBridgePutEventsEntry
constructor
A new instance of EventBridgePutEventsEntry.
- #to_jsii ⇒ Object
Constructor Details
#initialize(detail:, detail_type:, event_bus:, source:) ⇒ EventBridgePutEventsEntry
Returns a new instance of EventBridgePutEventsEntry.
13 14 15 16 17 18 19 20 21 22 |
# File 'scheduler_targets/event_bridge_put_events_entry.rb', line 13 def initialize(detail:, detail_type:, event_bus:, source:) @detail = detail Jsii::Type.check_type(@detail, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2NoZWR1bGVyLlNjaGVkdWxlVGFyZ2V0SW5wdXQifQ==")), "detail") @detail_type = detail_type Jsii::Type.check_type(@detail_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "detailType") @event_bus = event_bus Jsii::Type.check_type(@event_bus, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZXZlbnRzLklFdmVudEJ1cyJ9")), "eventBus") @source = source Jsii::Type.check_type(@source, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "source") end |
Instance Attribute Details
#detail ⇒ AWSCDK::Scheduler::ScheduleTargetInput (readonly)
The event body.
Can either be provided as an object or as a JSON-serialized string
32 33 34 |
# File 'scheduler_targets/event_bridge_put_events_entry.rb', line 32 def detail @detail end |
#detail_type ⇒ String (readonly)
Used along with the source field to help identify the fields and values expected in the detail field.
For example, events by CloudTrail have detail type "AWS API Call via CloudTrail"
39 40 41 |
# File 'scheduler_targets/event_bridge_put_events_entry.rb', line 39 def detail_type @detail_type end |
#event_bus ⇒ AWSCDK::Events::IEventBus (readonly)
The event bus the entry will be sent to.
43 44 45 |
# File 'scheduler_targets/event_bridge_put_events_entry.rb', line 43 def event_bus @event_bus end |
#source ⇒ String (readonly)
The service or application that caused this event to be generated.
Example value: com.example.service
50 51 52 |
# File 'scheduler_targets/event_bridge_put_events_entry.rb', line 50 def source @source end |
Class Method Details
.jsii_properties ⇒ Object
52 53 54 55 56 57 58 59 |
# File 'scheduler_targets/event_bridge_put_events_entry.rb', line 52 def self.jsii_properties { :detail => "detail", :detail_type => "detailType", :event_bus => "eventBus", :source => "source", } end |
Instance Method Details
#to_jsii ⇒ Object
61 62 63 64 65 66 67 68 69 70 |
# File 'scheduler_targets/event_bridge_put_events_entry.rb', line 61 def to_jsii result = {} result.merge!({ "detail" => @detail, "detailType" => @detail_type, "eventBus" => @event_bus, "source" => @source, }) result.compact end |