Class: AWSCDK::Events::EventField

Inherits:
Jsii::Object
  • Object
show all
Includes:
IResolvable
Defined in:
events/event_field.rb

Overview

Represents a field in the event pattern.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ EventField

Returns a new instance of EventField.

Raises:

  • (NoMethodError)


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

.accountString

Extract the account from the event.

Returns:

  • (String)


36
37
38
# File 'events/event_field.rb', line 36

def self.()
  Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_events.EventField", "account")
end

.detail_typeString

Extract the detail type from the event.

Returns:

  • (String)


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_idString

Extract the event ID from the event.

Returns:

  • (String)


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.

Parameters:

  • path (String)

Returns:

  • (String)


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_methodsObject



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

.regionString

Extract the region from the event.

Returns:

  • (String)


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

.sourceString

Extract the source from the event.

Returns:

  • (String)


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

.timeString

Extract the time from the event.

Returns:

  • (String)


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_stackArray<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.

Returns:

  • (Array<String>)


81
82
83
# File 'events/event_field.rb', line 81

def creation_stack()
  jsii_get_property("creationStack")
end

#display_hintString

Human readable display hint about the event pattern.

Returns:

  • (String)


88
89
90
# File 'events/event_field.rb', line 88

def display_hint()
  jsii_get_property("displayHint")
end

#pathString

the path to a field in the event pattern.

Returns:

  • (String)


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.

Parameters:

Returns:

  • (Object)


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_jsonString

Convert the path to the field in the event pattern to JSON.

Returns:

  • (String)


111
112
113
# File 'events/event_field.rb', line 111

def to_json()
  jsii_call_method("toJSON", [])
end

#to_stringString

Return a string representation of this resolvable object.

Returns a reversible string representation.

Returns:

  • (String)


120
121
122
# File 'events/event_field.rb', line 120

def to_string()
  jsii_call_method("toString", [])
end