CfnIndexProps Struct
Properties for defining a CfnIndex.
| Source | |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_opensearchserverless as opensearchserverless } from 'aws-cdk-lib';
declare const propertyMappingProperty_: opensearchserverless.CfnIndex.PropertyMappingProperty;
const cfnIndexProps: opensearchserverless.CfnIndexProps = {
collectionEndpoint: 'collectionEndpoint',
indexName: 'indexName',
// the properties below are optional
mappings: {
properties: {
propertiesKey: {
type: 'type',
// the properties below are optional
analyzer: 'analyzer',
compressionLevel: 'compressionLevel',
dataType: 'dataType',
dimension: 123,
index: false,
method: {
name: 'name',
// the properties below are optional
engine: 'engine',
parameters: {
efConstruction: 123,
m: 123,
},
spaceType: 'spaceType',
},
properties: {
propertiesKey: propertyMappingProperty_,
},
spaceType: 'spaceType',
value: 'value',
},
},
},
settings: {
analysis: {
analyzer: {
analyzerKey: {
charFilter: ['charFilter'],
filter: ['filter'],
tokenizer: 'tokenizer',
type: 'type',
},
},
},
index: {
knn: false,
knnAlgoParamEfSearch: 123,
refreshInterval: 'refreshInterval',
},
},
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_opensearchserverless as opensearchserverless
# property_mapping_property_: opensearchserverless.CfnIndex.PropertyMappingProperty
cfn_index_props = opensearchserverless.CfnIndexProps(
collection_endpoint="collectionEndpoint",
index_name="indexName",
# the properties below are optional
mappings=opensearchserverless.CfnIndex.MappingsProperty(
properties={
"properties_key": opensearchserverless.CfnIndex.PropertyMappingProperty(
type="type",
# the properties below are optional
analyzer="analyzer",
compression_level="compressionLevel",
data_type="dataType",
dimension=123,
index=False,
method=opensearchserverless.CfnIndex.MethodProperty(
name="name",
# the properties below are optional
engine="engine",
parameters=opensearchserverless.CfnIndex.ParametersProperty(
ef_construction=123,
m=123
),
space_type="spaceType"
),
properties={
"properties_key": property_mapping_property_
},
space_type="spaceType",
value="value"
)
}
),
settings=opensearchserverless.CfnIndex.IndexSettingsProperty(
analysis=opensearchserverless.CfnIndex.AnalysisProperty(
analyzer={
"analyzer_key": opensearchserverless.CfnIndex.AnalyzerItemsProperty(
char_filter=["charFilter"],
filter=["filter"],
tokenizer="tokenizer",
type="type"
)
}
),
index=opensearchserverless.CfnIndex.IndexProperty(
knn=False,
knn_algo_param_ef_search=123,
refresh_interval="refreshInterval"
)
)
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.opensearchserverless.*;
PropertyMappingProperty propertyMappingProperty_;
CfnIndexProps cfnIndexProps = CfnIndexProps.builder()
.collectionEndpoint("collectionEndpoint")
.indexName("indexName")
// the properties below are optional
.mappings(MappingsProperty.builder()
.properties(Map.of(
"propertiesKey", PropertyMappingProperty.builder()
.type("type")
// the properties below are optional
.analyzer("analyzer")
.compressionLevel("compressionLevel")
.dataType("dataType")
.dimension(123)
.index(false)
.method(MethodProperty.builder()
.name("name")
// the properties below are optional
.engine("engine")
.parameters(ParametersProperty.builder()
.efConstruction(123)
.m(123)
.build())
.spaceType("spaceType")
.build())
.properties(Map.of(
"propertiesKey", propertyMappingProperty_))
.spaceType("spaceType")
.value("value")
.build()))
.build())
.settings(IndexSettingsProperty.builder()
.analysis(AnalysisProperty.builder()
.analyzer(Map.of(
"analyzerKey", AnalyzerItemsProperty.builder()
.charFilter(List.of("charFilter"))
.filter(List.of("filter"))
.tokenizer("tokenizer")
.type("type")
.build()))
.build())
.index(IndexProperty.builder()
.knn(false)
.knnAlgoParamEfSearch(123)
.refreshInterval("refreshInterval")
.build())
.build())
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.OpenSearchServerless;
PropertyMappingProperty propertyMappingProperty_;
var cfnIndexProps = new CfnIndexProps {
CollectionEndpoint = "collectionEndpoint",
IndexName = "indexName",
// the properties below are optional
Mappings = new MappingsProperty {
Properties = new Dictionary<string, object> {
{ "propertiesKey", new PropertyMappingProperty {
Type = "type",
// the properties below are optional
Analyzer = "analyzer",
CompressionLevel = "compressionLevel",
DataType = "dataType",
Dimension = 123,
Index = false,
Method = new MethodProperty {
Name = "name",
// the properties below are optional
Engine = "engine",
Parameters = new ParametersProperty {
EfConstruction = 123,
M = 123
},
SpaceType = "spaceType"
},
Properties = new Dictionary<string, object> {
{ "propertiesKey", propertyMappingProperty_ }
},
SpaceType = "spaceType",
Value = "value"
} }
}
},
Settings = new IndexSettingsProperty {
Analysis = new AnalysisProperty {
Analyzer = new Dictionary<string, object> {
{ "analyzerKey", new AnalyzerItemsProperty {
CharFilter = new [] { "charFilter" },
Filter = new [] { "filter" },
Tokenizer = "tokenizer",
Type = "type"
} }
}
},
Index = new IndexProperty {
Knn = false,
KnnAlgoParamEfSearch = 123,
RefreshInterval = "refreshInterval"
}
}
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
var propertyMappingProperty_ PropertyMappingProperty
cfnIndexProps := &CfnIndexProps{
CollectionEndpoint: jsii.String("collectionEndpoint"),
IndexName: jsii.String("indexName"),
// the properties below are optional
Mappings: &MappingsProperty{
Properties: map[string]interface{}{
"propertiesKey": &PropertyMappingProperty{
"type": jsii.String("type"),
// the properties below are optional
"analyzer": jsii.String("analyzer"),
"compressionLevel": jsii.String("compressionLevel"),
"dataType": jsii.String("dataType"),
"dimension": jsii.Number(123),
"index": jsii.Boolean(false),
"method": &MethodProperty{
"name": jsii.String("name"),
// the properties below are optional
"engine": jsii.String("engine"),
"parameters": &ParametersProperty{
"efConstruction": jsii.Number(123),
"m": jsii.Number(123),
},
"spaceType": jsii.String("spaceType"),
},
"properties": map[string]interface{}{
"propertiesKey": propertyMappingProperty_,
},
"spaceType": jsii.String("spaceType"),
"value": jsii.String("value"),
},
},
},
Settings: &IndexSettingsProperty{
Analysis: &AnalysisProperty{
Analyzer: map[string]interface{}{
"analyzerKey": &AnalyzerItemsProperty{
"charFilter": []*string{
jsii.String("charFilter"),
},
"filter": []*string{
jsii.String("filter"),
},
"tokenizer": jsii.String("tokenizer"),
"type": jsii.String("type"),
},
},
},
Index: &IndexProperty{
Knn: jsii.Boolean(false),
KnnAlgoParamEfSearch: jsii.Number(123),
RefreshInterval: jsii.String("refreshInterval"),
},
},
}
Properties
collectionEndpointstringcollection_endpointstrcollectionEndpointStringCollectionEndpointstringCollectionEndpoint*string required #The endpoint for the collection.
The name of the OpenSearch Serverless index.
mappingsoptionalIResolvable | CfnIndex.MappingsPropertymappingsoptionaltyping.Union[IResolvable, MappingsProperty]mappingsoptionalIResolvableMappingsoptionalIResolvableMappingsoptionalinterface{} #Index mappings for the OpenSearch Serverless index.
settingsoptionalIResolvable | CfnIndex.IndexSettingsPropertysettingsoptionaltyping.Union[IResolvable, IndexSettingsProperty]settingsoptionalIResolvableSettingsoptionalIResolvableSettingsoptionalinterface{} #Index settings for the OpenSearch Serverless index.