Class: AWSCDK::Events::RuleTargetInputProperties

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

Overview

The input properties for an event target.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(input: nil, input_path: nil, input_paths_map: nil, input_template: nil) ⇒ RuleTargetInputProperties

Returns a new instance of RuleTargetInputProperties.

Parameters:

  • input (String, nil) (defaults to: nil)

    Literal input to the target service (must be valid JSON).

  • input_path (String, nil) (defaults to: nil)

    JsonPath to take input from the input event.

  • input_paths_map (Hash{String => String}, nil) (defaults to: nil)

    Paths map to extract values from event and insert into inputTemplate.

  • input_template (String, nil) (defaults to: nil)

    Input template to insert paths map into.



11
12
13
14
15
16
17
18
19
20
# File 'events/rule_target_input_properties.rb', line 11

def initialize(input: nil, input_path: nil, input_paths_map: nil, input_template: nil)
  @input = input
  Jsii::Type.check_type(@input, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "input") unless @input.nil?
  @input_path = input_path
  Jsii::Type.check_type(@input_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "inputPath") unless @input_path.nil?
  @input_paths_map = input_paths_map
  Jsii::Type.check_type(@input_paths_map, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "inputPathsMap") unless @input_paths_map.nil?
  @input_template = input_template
  Jsii::Type.check_type(@input_template, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "inputTemplate") unless @input_template.nil?
end

Instance Attribute Details

#inputString? (readonly)

Note:

Default: - input for the event target. If the input contains a paths map values wil be extracted from event and inserted into the inputTemplate.

Literal input to the target service (must be valid JSON).

Returns:

  • (String, nil)


26
27
28
# File 'events/rule_target_input_properties.rb', line 26

def input
  @input
end

#input_pathString? (readonly)

Note:

Default: - None. The entire matched event is passed as input

JsonPath to take input from the input event.

Returns:

  • (String, nil)


31
32
33
# File 'events/rule_target_input_properties.rb', line 31

def input_path
  @input_path
end

#input_paths_mapHash{String => String}? (readonly)

Note:

Default: - No values extracted from event.

Paths map to extract values from event and insert into inputTemplate.

Returns:

  • (Hash{String => String}, nil)


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

def input_paths_map
  @input_paths_map
end

#input_templateString? (readonly)

Note:

Default: - None.

Input template to insert paths map into.

Returns:

  • (String, nil)


41
42
43
# File 'events/rule_target_input_properties.rb', line 41

def input_template
  @input_template
end

Class Method Details

.jsii_propertiesObject



43
44
45
46
47
48
49
50
# File 'events/rule_target_input_properties.rb', line 43

def self.jsii_properties
  {
    :input => "input",
    :input_path => "inputPath",
    :input_paths_map => "inputPathsMap",
    :input_template => "inputTemplate",
  }
end

Instance Method Details

#to_jsiiObject



52
53
54
55
56
57
58
59
60
61
# File 'events/rule_target_input_properties.rb', line 52

def to_jsii
  result = {}
  result.merge!({
    "input" => @input,
    "inputPath" => @input_path,
    "inputPathsMap" => @input_paths_map,
    "inputTemplate" => @input_template,
  })
  result.compact
end