Class: AWSCDK::Bedrock::CfnKnowledgeBase::OpenSearchServerlessConfigurationProperty

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 OpenSearch Service.

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(collection_arn:, field_mapping:, vector_index_name:) ⇒ OpenSearchServerlessConfigurationProperty

Returns a new instance of OpenSearchServerlessConfigurationProperty.

Parameters:



1453
1454
1455
1456
1457
1458
1459
1460
# File 'bedrock/cfn_knowledge_base.rb', line 1453

def initialize(collection_arn:, field_mapping:, vector_index_name:)
  @collection_arn = collection_arn
  Jsii::Type.check_type(@collection_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "collectionArn")
  @field_mapping = field_mapping.is_a?(Hash) ? ::AWSCDK::Bedrock::CfnKnowledgeBase::OpenSearchServerlessFieldMappingProperty.new(**field_mapping.transform_keys(&:to_sym)) : field_mapping
  Jsii::Type.check_type(@field_mapping, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrLkNmbktub3dsZWRnZUJhc2UuT3BlblNlYXJjaFNlcnZlcmxlc3NGaWVsZE1hcHBpbmdQcm9wZXJ0eSJ9XX19")), "fieldMapping")
  @vector_index_name = vector_index_name
  Jsii::Type.check_type(@vector_index_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "vectorIndexName")
end

Instance Attribute Details

#collection_arnString (readonly)

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



1466
1467
1468
# File 'bedrock/cfn_knowledge_base.rb', line 1466

def collection_arn
  @collection_arn
end

#vector_index_nameString (readonly)

The name of the vector store.



1476
1477
1478
# File 'bedrock/cfn_knowledge_base.rb', line 1476

def vector_index_name
  @vector_index_name
end

Class Method Details

.jsii_propertiesObject



1478
1479
1480
1481
1482
1483
1484
# File 'bedrock/cfn_knowledge_base.rb', line 1478

def self.jsii_properties
  {
    :collection_arn => "collectionArn",
    :field_mapping => "fieldMapping",
    :vector_index_name => "vectorIndexName",
  }
end

Instance Method Details

#to_jsiiObject



1486
1487
1488
1489
1490
1491
1492
1493
1494
# File 'bedrock/cfn_knowledge_base.rb', line 1486

def to_jsii
  result = {}
  result.merge!({
    "collectionArn" => @collection_arn,
    "fieldMapping" => @field_mapping,
    "vectorIndexName" => @vector_index_name,
  })
  result.compact
end