Class: AWSCDK::OpenSearchServerless::CfnIndexProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
open_search_serverless/cfn_index_props.rb

Overview

Properties for defining a CfnIndex.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(collection_endpoint:, index_name:, mappings: nil, settings: nil) ⇒ CfnIndexProps

Returns a new instance of CfnIndexProps.

Parameters:



13
14
15
16
17
18
19
20
21
22
# File 'open_search_serverless/cfn_index_props.rb', line 13

def initialize(collection_endpoint:, index_name:, mappings: nil, settings: nil)
  @collection_endpoint = collection_endpoint
  Jsii::Type.check_type(@collection_endpoint, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "collectionEndpoint")
  @index_name = index_name
  Jsii::Type.check_type(@index_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "indexName")
  @mappings = mappings.is_a?(Hash) ? ::AWSCDK::OpenSearchServerless::CfnIndex::MappingsProperty.new(**mappings.transform_keys(&:to_sym)) : mappings
  Jsii::Type.check_type(@mappings, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19vcGVuc2VhcmNoc2VydmVybGVzcy5DZm5JbmRleC5NYXBwaW5nc1Byb3BlcnR5In1dfX0=")), "mappings") unless @mappings.nil?
  @settings = settings.is_a?(Hash) ? ::AWSCDK::OpenSearchServerless::CfnIndex::IndexSettingsProperty.new(**settings.transform_keys(&:to_sym)) : settings
  Jsii::Type.check_type(@settings, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19vcGVuc2VhcmNoc2VydmVybGVzcy5DZm5JbmRleC5JbmRleFNldHRpbmdzUHJvcGVydHkifV19fQ==")), "settings") unless @settings.nil?
end

Instance Attribute Details

#collection_endpointString (readonly)

The endpoint for the collection.



28
29
30
# File 'open_search_serverless/cfn_index_props.rb', line 28

def collection_endpoint
  @collection_endpoint
end

#index_nameString (readonly)

The name of the OpenSearch Serverless index.



33
34
35
# File 'open_search_serverless/cfn_index_props.rb', line 33

def index_name
  @index_name
end

#mappingsAWSCDK::IResolvable, ... (readonly)

Index mappings for the OpenSearch Serverless index.



38
39
40
# File 'open_search_serverless/cfn_index_props.rb', line 38

def mappings
  @mappings
end

#settingsAWSCDK::IResolvable, ... (readonly)

Index settings for the OpenSearch Serverless index.



43
44
45
# File 'open_search_serverless/cfn_index_props.rb', line 43

def settings
  @settings
end

Class Method Details

.jsii_propertiesObject



45
46
47
48
49
50
51
52
# File 'open_search_serverless/cfn_index_props.rb', line 45

def self.jsii_properties
  {
    :collection_endpoint => "collectionEndpoint",
    :index_name => "indexName",
    :mappings => "mappings",
    :settings => "settings",
  }
end

Instance Method Details

#to_jsiiObject



54
55
56
57
58
59
60
61
62
63
# File 'open_search_serverless/cfn_index_props.rb', line 54

def to_jsii
  result = {}
  result.merge!({
    "collectionEndpoint" => @collection_endpoint,
    "indexName" => @index_name,
    "mappings" => @mappings,
    "settings" => @settings,
  })
  result.compact
end