Class: AWSCDK::EventsTargets::LogGroupTargetInput

Inherits:
AWSCDK::Events::RuleTargetInput
  • Object
show all
Defined in:
events_targets/log_group_target_input.rb

Overview

The input to send to the CloudWatch LogGroup target.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeLogGroupTargetInput

Returns a new instance of LogGroupTargetInput.



8
9
10
# File 'events_targets/log_group_target_input.rb', line 8

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

Class Method Details

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

Deprecated.

use fromObjectV2

Pass a JSON object to the log group event target.

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

Parameters:

  • options (Object)

Returns:



26
27
28
29
# File 'events_targets/log_group_target_input.rb', line 26

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

.from_object_v2(options = nil) ⇒ AWSCDK::EventsTargets::LogGroupTargetInput

Pass a JSON object to the log group event target.

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

Parameters:

Returns:

  • (AWSCDK::EventsTargets::LogGroupTargetInput)


38
39
40
41
42
# File 'events_targets/log_group_target_input.rb', line 38

def self.from_object_v2(options = nil)
  options = options.is_a?(Hash) ? ::AWSCDK::EventsTargets::LogGroupTargetInputOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZXZlbnRzX3RhcmdldHMuTG9nR3JvdXBUYXJnZXRJbnB1dE9wdGlvbnMifQ==")), "options") unless options.nil?
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_events_targets.LogGroupTargetInput", "fromObjectV2", [options])
end

.jsii_overridable_methodsObject



12
13
14
15
16
# File 'events_targets/log_group_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.



48
49
50
51
# File 'events_targets/log_group_target_input.rb', line 48

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