Class: AWSCDK::Pipes::CfnPipe::PipeTargetRedshiftDataParametersProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
pipes/cfn_pipe.rb

Overview

These are custom parameters to be used when the target is a Amazon Redshift cluster to invoke the Amazon Redshift Data API BatchExecuteStatement.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(database:, sqls:, db_user: nil, secret_manager_arn: nil, statement_name: nil, with_event: nil) ⇒ PipeTargetRedshiftDataParametersProperty

Returns a new instance of PipeTargetRedshiftDataParametersProperty.

Parameters:

  • database (String)

    The name of the database.

  • sqls (Array<String>)

    The SQL statement text to run.

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

    The database user name.

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

    The name or ARN of the secret that enables access to the database.

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

    The name of the SQL statement.

  • with_event (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    Indicates whether to send an event back to EventBridge after the SQL statement runs.



3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
# File 'pipes/cfn_pipe.rb', line 3686

def initialize(database:, sqls:, db_user: nil, secret_manager_arn: nil, statement_name: nil, with_event: nil)
  @database = database
  Jsii::Type.check_type(@database, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "database")
  @sqls = sqls
  Jsii::Type.check_type(@sqls, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "sqls")
  @db_user = db_user
  Jsii::Type.check_type(@db_user, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "dbUser") unless @db_user.nil?
  @secret_manager_arn = secret_manager_arn
  Jsii::Type.check_type(@secret_manager_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "secretManagerArn") unless @secret_manager_arn.nil?
  @statement_name = statement_name
  Jsii::Type.check_type(@statement_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "statementName") unless @statement_name.nil?
  @with_event = with_event
  Jsii::Type.check_type(@with_event, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "withEvent") unless @with_event.nil?
end

Instance Attribute Details

#databaseString (readonly)

The name of the database.

Required when authenticating using temporary credentials.



3707
3708
3709
# File 'pipes/cfn_pipe.rb', line 3707

def database
  @database
end

#db_userString? (readonly)

The database user name.

Required when authenticating using temporary credentials.



3719
3720
3721
# File 'pipes/cfn_pipe.rb', line 3719

def db_user
  @db_user
end

#secret_manager_arnString? (readonly)

The name or ARN of the secret that enables access to the database.

Required when authenticating using Secrets Manager.



3726
3727
3728
# File 'pipes/cfn_pipe.rb', line 3726

def secret_manager_arn
  @secret_manager_arn
end

#sqlsArray<String> (readonly)

The SQL statement text to run.



3712
3713
3714
# File 'pipes/cfn_pipe.rb', line 3712

def sqls
  @sqls
end

#statement_nameString? (readonly)

The name of the SQL statement.

You can name the SQL statement when you create it to identify the query.



3733
3734
3735
# File 'pipes/cfn_pipe.rb', line 3733

def statement_name
  @statement_name
end

#with_eventBoolean, ... (readonly)

Note:

Default: - false

Indicates whether to send an event back to EventBridge after the SQL statement runs.



3739
3740
3741
# File 'pipes/cfn_pipe.rb', line 3739

def with_event
  @with_event
end

Class Method Details

.jsii_propertiesObject



3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
# File 'pipes/cfn_pipe.rb', line 3741

def self.jsii_properties
  {
    :database => "database",
    :sqls => "sqls",
    :db_user => "dbUser",
    :secret_manager_arn => "secretManagerArn",
    :statement_name => "statementName",
    :with_event => "withEvent",
  }
end

Instance Method Details

#to_jsiiObject



3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
# File 'pipes/cfn_pipe.rb', line 3752

def to_jsii
  result = {}
  result.merge!({
    "database" => @database,
    "sqls" => @sqls,
    "dbUser" => @db_user,
    "secretManagerArn" => @secret_manager_arn,
    "statementName" => @statement_name,
    "withEvent" => @with_event,
  })
  result.compact
end