Class: AWSCDK::EventsTargets::RedshiftQuery

Inherits:
Jsii::Object
  • Object
show all
Includes:
AWSCDK::Events::IRuleTarget
Defined in:
events_targets/redshift_query.rb

Overview

Schedule an Amazon Redshift Query to be run, using the Redshift Data API.

If you would like Amazon Redshift to identify the Event Bridge rule, and present it in the Amazon Redshift console, append a QS2- prefix to both statement_name and rule_name.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cluster_arn, props) ⇒ RedshiftQuery

Returns a new instance of RedshiftQuery.

Parameters:



13
14
15
16
17
18
# File 'events_targets/redshift_query.rb', line 13

def initialize(cluster_arn, props)
  props = props.is_a?(Hash) ? ::AWSCDK::EventsTargets::RedshiftQueryProps.new(**props.transform_keys(&:to_sym)) : props
  Jsii::Type.check_type(cluster_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "clusterArn")
  Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZXZlbnRzX3RhcmdldHMuUmVkc2hpZnRRdWVyeVByb3BzIn0=")), "props")
  Jsii::Object.instance_method(:initialize).bind(self).call(cluster_arn, props)
end

Class Method Details

.jsii_overridable_methodsObject



20
21
22
23
24
# File 'events_targets/redshift_query.rb', line 20

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

Instance Method Details

#bind(rule, _id = nil) ⇒ AWSCDK::Events::RuleTargetConfig

Returns the rule target specification.

NOTE: Do not use the various input_xxx options. They can be set in a call to add_target.

Parameters:

Returns:



33
34
35
36
37
# File 'events_targets/redshift_query.rb', line 33

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