Class: AWSCDK::Events::RuleTargetInput

Inherits:
Jsii::Object
  • Object
show all
Defined in:
events/rule_target_input.rb

Overview

The input to send to the event target.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeRuleTargetInput

Returns a new instance of RuleTargetInput.



8
9
10
# File 'events/rule_target_input.rb', line 8

def initialize
  Jsii::Object.instance_method(:initialize).bind(self).call
end

Class Method Details

.from_event_path(path) ⇒ AWSCDK::Events::RuleTargetInput

Take the event target input from a path in the event JSON.

Parameters:

  • path (String)

Returns:

  • (AWSCDK::Events::RuleTargetInput)


22
23
24
25
# File 'events/rule_target_input.rb', line 22

def self.from_event_path(path)
  Jsii::Type.check_type(path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "path")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_events.RuleTargetInput", "fromEventPath", [path])
end

.from_multiline_text(text) ⇒ AWSCDK::Events::RuleTargetInput

Pass text to the event target, splitting on newlines.

This is only useful when passing to a target that does not take a single argument.

May contain strings returned by EventField.from() to substitute in parts of the matched event.

Parameters:

  • text (String)

Returns:

  • (AWSCDK::Events::RuleTargetInput)


37
38
39
40
# File 'events/rule_target_input.rb', line 37

def self.from_multiline_text(text)
  Jsii::Type.check_type(text, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "text")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_events.RuleTargetInput", "fromMultilineText", [text])
end

.from_object(obj) ⇒ AWSCDK::Events::RuleTargetInput

Pass a JSON object to the event target.

May contain strings returned by EventField.from() to substitute in parts of the matched event.

Parameters:

  • obj (Object)

Returns:

  • (AWSCDK::Events::RuleTargetInput)

    RuleTargetInput



49
50
51
52
# File 'events/rule_target_input.rb', line 49

def self.from_object(obj)
  Jsii::Type.check_type(obj, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "obj")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_events.RuleTargetInput", "fromObject", [obj])
end

.from_text(text) ⇒ AWSCDK::Events::RuleTargetInput

Pass text to the event target.

May contain strings returned by EventField.from() to substitute in parts of the matched event.

The Rule Target input value will be a single string: the string you pass here. Do not use this method to pass a complex value like a JSON object to a Rule Target. Use RuleTargetInput.fromObject() instead.

Parameters:

  • text (String)

Returns:

  • (AWSCDK::Events::RuleTargetInput)


65
66
67
68
# File 'events/rule_target_input.rb', line 65

def self.from_text(text)
  Jsii::Type.check_type(text, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "text")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_events.RuleTargetInput", "fromText", [text])
end

.jsii_overridable_methodsObject



12
13
14
15
16
# File 'events/rule_target_input.rb', line 12

def self.jsii_overridable_methods
  {
    :bind => { kind: :method, name: "bind", is_optional: false },
  }
end

Instance Method Details

#bind(rule) ⇒ AWSCDK::Events::RuleTargetInputProperties

Return the input properties for this input object.



74
75
76
77
# File 'events/rule_target_input.rb', line 74

def bind(rule)
  Jsii::Type.check_type(rule, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19ldmVudHMuSVJ1bGVSZWYifQ==")), "rule")
  jsii_call_method("bind", [rule])
end