Class: AWSCDK::Kendra::CfnDataSource::ConnectionConfigurationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
kendra/cfn_data_source.rb

Overview

Provides the configuration information that's required to connect to a database.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(database_host:, database_name:, database_port:, secret_arn:, table_name:) ⇒ ConnectionConfigurationProperty

Returns a new instance of ConnectionConfigurationProperty.

Parameters:

  • database_host (String)

    The name of the host for the database.

  • database_name (String)

    The name of the database containing the document data.

  • database_port (Numeric)

    The port that the database uses for connections.

  • secret_arn (String)

    The Amazon Resource Name (ARN) of an AWS Secrets Manager secret that stores the credentials.

  • table_name (String)

    The name of the table that contains the document data.



1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
# File 'kendra/cfn_data_source.rb', line 1380

def initialize(database_host:, database_name:, database_port:, secret_arn:, table_name:)
  @database_host = database_host
  Jsii::Type.check_type(@database_host, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "databaseHost")
  @database_name = database_name
  Jsii::Type.check_type(@database_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "databaseName")
  @database_port = database_port
  Jsii::Type.check_type(@database_port, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "databasePort")
  @secret_arn = secret_arn
  Jsii::Type.check_type(@secret_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "secretArn")
  @table_name = table_name
  Jsii::Type.check_type(@table_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "tableName")
end

Instance Attribute Details

#database_hostString (readonly)

The name of the host for the database.

Can be either a string (host.subdomain.domain.tld) or an IPv4 or IPv6 address.



1399
1400
1401
# File 'kendra/cfn_data_source.rb', line 1399

def database_host
  @database_host
end

#database_nameString (readonly)

The name of the database containing the document data.



1404
1405
1406
# File 'kendra/cfn_data_source.rb', line 1404

def database_name
  @database_name
end

#database_portNumeric (readonly)

The port that the database uses for connections.



1409
1410
1411
# File 'kendra/cfn_data_source.rb', line 1409

def database_port
  @database_port
end

#secret_arnString (readonly)

The Amazon Resource Name (ARN) of an AWS Secrets Manager secret that stores the credentials.

The credentials should be a user-password pair. For more information, see Using a Database Data Source . For more information about AWS Secrets Manager , see What Is AWS Secrets Manager in the AWS Secrets Manager user guide.



1416
1417
1418
# File 'kendra/cfn_data_source.rb', line 1416

def secret_arn
  @secret_arn
end

#table_nameString (readonly)

The name of the table that contains the document data.



1421
1422
1423
# File 'kendra/cfn_data_source.rb', line 1421

def table_name
  @table_name
end

Class Method Details

.jsii_propertiesObject



1423
1424
1425
1426
1427
1428
1429
1430
1431
# File 'kendra/cfn_data_source.rb', line 1423

def self.jsii_properties
  {
    :database_host => "databaseHost",
    :database_name => "databaseName",
    :database_port => "databasePort",
    :secret_arn => "secretArn",
    :table_name => "tableName",
  }
end

Instance Method Details

#to_jsiiObject



1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
# File 'kendra/cfn_data_source.rb', line 1433

def to_jsii
  result = {}
  result.merge!({
    "databaseHost" => @database_host,
    "databaseName" => @database_name,
    "databasePort" => @database_port,
    "secretArn" => @secret_arn,
    "tableName" => @table_name,
  })
  result.compact
end