Class: AWSCDK::Bedrock::CfnKnowledgeBase::RDSConfigurationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
bedrock/cfn_knowledge_base.rb

Overview

Contains details about the storage configuration of the knowledge base in Amazon RDS.

For more information, see Create a vector index in Amazon RDS .

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(credentials_secret_arn:, database_name:, field_mapping:, resource_arn:, table_name:) ⇒ RDSConfigurationProperty

Returns a new instance of RDSConfigurationProperty.

Parameters:

  • credentials_secret_arn (String)

    The Amazon Resource Name (ARN) of the secret that you created in AWS Secrets Manager that is linked to your Amazon RDS database.

  • database_name (String)

    The name of your Amazon RDS database.

  • field_mapping (AWSCDK::IResolvable, AWSCDK::Bedrock::CfnKnowledgeBase::RDSFieldMappingProperty)

    Contains the names of the fields to which to map information about the vector store.

  • resource_arn (String)

    The Amazon Resource Name (ARN) of the vector store.

  • table_name (String)

    The name of the table in the database.



1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
# File 'bedrock/cfn_knowledge_base.rb', line 1883

def initialize(credentials_secret_arn:, database_name:, field_mapping:, resource_arn:, table_name:)
  @credentials_secret_arn = credentials_secret_arn
  Jsii::Type.check_type(@credentials_secret_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "credentialsSecretArn")
  @database_name = database_name
  Jsii::Type.check_type(@database_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "databaseName")
  @field_mapping = field_mapping.is_a?(Hash) ? ::AWSCDK::Bedrock::CfnKnowledgeBase::RDSFieldMappingProperty.new(**field_mapping.transform_keys(&:to_sym)) : field_mapping
  Jsii::Type.check_type(@field_mapping, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrLkNmbktub3dsZWRnZUJhc2UuUmRzRmllbGRNYXBwaW5nUHJvcGVydHkifV19fQ==")), "fieldMapping")
  @resource_arn = resource_arn
  Jsii::Type.check_type(@resource_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "resourceArn")
  @table_name = table_name
  Jsii::Type.check_type(@table_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "tableName")
end

Instance Attribute Details

#credentials_secret_arnString (readonly)

The Amazon Resource Name (ARN) of the secret that you created in AWS Secrets Manager that is linked to your Amazon RDS database.



1900
1901
1902
# File 'bedrock/cfn_knowledge_base.rb', line 1900

def credentials_secret_arn
  @credentials_secret_arn
end

#database_nameString (readonly)

The name of your Amazon RDS database.



1905
1906
1907
# File 'bedrock/cfn_knowledge_base.rb', line 1905

def database_name
  @database_name
end

#field_mappingAWSCDK::IResolvable, AWSCDK::Bedrock::CfnKnowledgeBase::RDSFieldMappingProperty (readonly)

Contains the names of the fields to which to map information about the vector store.



1910
1911
1912
# File 'bedrock/cfn_knowledge_base.rb', line 1910

def field_mapping
  @field_mapping
end

#resource_arnString (readonly)

The Amazon Resource Name (ARN) of the vector store.



1915
1916
1917
# File 'bedrock/cfn_knowledge_base.rb', line 1915

def resource_arn
  @resource_arn
end

#table_nameString (readonly)

The name of the table in the database.



1920
1921
1922
# File 'bedrock/cfn_knowledge_base.rb', line 1920

def table_name
  @table_name
end

Class Method Details

.jsii_propertiesObject



1922
1923
1924
1925
1926
1927
1928
1929
1930
# File 'bedrock/cfn_knowledge_base.rb', line 1922

def self.jsii_properties
  {
    :credentials_secret_arn => "credentialsSecretArn",
    :database_name => "databaseName",
    :field_mapping => "fieldMapping",
    :resource_arn => "resourceArn",
    :table_name => "tableName",
  }
end

Instance Method Details

#to_jsiiObject



1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
# File 'bedrock/cfn_knowledge_base.rb', line 1932

def to_jsii
  result = {}
  result.merge!({
    "credentialsSecretArn" => @credentials_secret_arn,
    "databaseName" => @database_name,
    "fieldMapping" => @field_mapping,
    "resourceArn" => @resource_arn,
    "tableName" => @table_name,
  })
  result.compact
end