Class: AWSCDK::Events::EventField
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::Events::EventField
- Includes:
- IResolvable
- Defined in:
- events/event_field.rb
Overview
Represents a field in the event pattern.
Class Method Summary collapse
-
.account ⇒ String
Extract the account from the event.
-
.detail_type ⇒ String
Extract the detail type from the event.
-
.event_id ⇒ String
Extract the event ID from the event.
-
.from_path(path) ⇒ String
Extract a custom JSON path from the event.
- .jsii_overridable_methods ⇒ Object
-
.region ⇒ String
Extract the region from the event.
-
.source ⇒ String
Extract the source from the event.
-
.time ⇒ String
Extract the time from the event.
Instance Method Summary collapse
-
#creation_stack ⇒ Array<String>
The creation stack of this resolvable which will be appended to errors thrown during resolution.
-
#display_hint ⇒ String
Human readable display hint about the event pattern.
-
#initialize(*args) ⇒ EventField
constructor
A new instance of EventField.
-
#path ⇒ String
the path to a field in the event pattern.
-
#resolve(_ctx) ⇒ Object
Produce the Token's value at resolution time.
-
#to_json ⇒ String
Convert the path to the field in the event pattern to JSON.
-
#to_string ⇒ String
Return a string representation of this resolvable object.
Constructor Details
#initialize(*args) ⇒ EventField
Returns a new instance of EventField.
9 10 11 |
# File 'events/event_field.rb', line 9 def initialize(*args) raise NoMethodError, "aws-cdk-lib.aws_events.EventField does not have a visible constructor; use the provided factory methods" end |
Class Method Details
.account ⇒ String
Extract the account from the event.
36 37 38 |
# File 'events/event_field.rb', line 36 def self.account() Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_events.EventField", "account") end |
.detail_type ⇒ String
Extract the detail type from the event.
43 44 45 |
# File 'events/event_field.rb', line 43 def self.detail_type() Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_events.EventField", "detailType") end |
.event_id ⇒ String
Extract the event ID from the event.
50 51 52 |
# File 'events/event_field.rb', line 50 def self.event_id() Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_events.EventField", "eventId") end |
.from_path(path) ⇒ String
Extract a custom JSON path from the event.
28 29 30 31 |
# File 'events/event_field.rb', line 28 def self.from_path(path) Jsii::Type.check_type(path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "path") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_events.EventField", "fromPath", [path]) end |
.jsii_overridable_methods ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'events/event_field.rb', line 13 def self.jsii_overridable_methods { :creation_stack => { kind: :property, name: "creationStack", is_optional: false }, :display_hint => { kind: :property, name: "displayHint", is_optional: false }, :path => { kind: :property, name: "path", is_optional: false }, :resolve => { kind: :method, name: "resolve", is_optional: false }, :to_json => { kind: :method, name: "toJSON", is_optional: false }, :to_string => { kind: :method, name: "toString", is_optional: false }, } end |
.region ⇒ String
Extract the region from the event.
57 58 59 |
# File 'events/event_field.rb', line 57 def self.region() Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_events.EventField", "region") end |
.source ⇒ String
Extract the source from the event.
64 65 66 |
# File 'events/event_field.rb', line 64 def self.source() Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_events.EventField", "source") end |
.time ⇒ String
Extract the time from the event.
71 72 73 |
# File 'events/event_field.rb', line 71 def self.time() Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_events.EventField", "time") end |
Instance Method Details
#creation_stack ⇒ Array<String>
The creation stack of this resolvable which will be appended to errors thrown during resolution.
This may return an array with a single informational element indicating how to get this property populated, if it was skipped for performance reasons.
81 82 83 |
# File 'events/event_field.rb', line 81 def creation_stack() jsii_get_property("creationStack") end |
#display_hint ⇒ String
Human readable display hint about the event pattern.
88 89 90 |
# File 'events/event_field.rb', line 88 def display_hint() jsii_get_property("displayHint") end |
#path ⇒ String
the path to a field in the event pattern.
95 96 97 |
# File 'events/event_field.rb', line 95 def path() jsii_get_property("path") end |
#resolve(_ctx) ⇒ Object
Produce the Token's value at resolution time.
103 104 105 106 |
# File 'events/event_field.rb', line 103 def resolve(_ctx) Jsii::Type.check_type(_ctx, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5JUmVzb2x2ZUNvbnRleHQifQ==")), "_ctx") jsii_call_method("resolve", [_ctx]) end |
#to_json ⇒ String
Convert the path to the field in the event pattern to JSON.
111 112 113 |
# File 'events/event_field.rb', line 111 def to_json() jsii_call_method("toJSON", []) end |
#to_string ⇒ String
Return a string representation of this resolvable object.
Returns a reversible string representation.
120 121 122 |
# File 'events/event_field.rb', line 120 def to_string() jsii_call_method("toString", []) end |