VectorIndexProperty Struct
| 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_dynamodb as dynamodb } from 'aws-cdk-lib';
const vectorIndexProperty: dynamodb.CfnTable.VectorIndexProperty = {
dimensions: 123,
distanceFunction: 'distanceFunction',
indexName: 'indexName',
projection: {
nonKeyAttributes: ['nonKeyAttributes'],
projectionType: 'projectionType',
},
vectorAttribute: {
attributeName: 'attributeName',
},
// the properties below are optional
searchSchema: [{
attributeName: 'attributeName',
searchSchemaElementType: 'searchSchemaElementType',
}],
};
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_dynamodb as dynamodb
vector_index_property = dynamodb.CfnTable.VectorIndexProperty(
dimensions=123,
distance_function="distanceFunction",
index_name="indexName",
projection=dynamodb.CfnTable.ProjectionProperty(
non_key_attributes=["nonKeyAttributes"],
projection_type="projectionType"
),
vector_attribute=dynamodb.CfnTable.VectorAttributeProperty(
attribute_name="attributeName"
),
# the properties below are optional
search_schema=[dynamodb.CfnTable.SearchSchemaElementProperty(
attribute_name="attributeName",
search_schema_element_type="searchSchemaElementType"
)]
)
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.dynamodb.*;
VectorIndexProperty vectorIndexProperty = VectorIndexProperty.builder()
.dimensions(123)
.distanceFunction("distanceFunction")
.indexName("indexName")
.projection(ProjectionProperty.builder()
.nonKeyAttributes(List.of("nonKeyAttributes"))
.projectionType("projectionType")
.build())
.vectorAttribute(VectorAttributeProperty.builder()
.attributeName("attributeName")
.build())
// the properties below are optional
.searchSchema(List.of(SearchSchemaElementProperty.builder()
.attributeName("attributeName")
.searchSchemaElementType("searchSchemaElementType")
.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.DynamoDB;
var vectorIndexProperty = new VectorIndexProperty {
Dimensions = 123,
DistanceFunction = "distanceFunction",
IndexName = "indexName",
Projection = new ProjectionProperty {
NonKeyAttributes = new [] { "nonKeyAttributes" },
ProjectionType = "projectionType"
},
VectorAttribute = new VectorAttributeProperty {
AttributeName = "attributeName"
},
// the properties below are optional
SearchSchema = new [] { new SearchSchemaElementProperty {
AttributeName = "attributeName",
SearchSchemaElementType = "searchSchemaElementType"
} }
};
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"
vectorIndexProperty := &VectorIndexProperty{
Dimensions: jsii.Number(123),
DistanceFunction: jsii.String("distanceFunction"),
IndexName: jsii.String("indexName"),
Projection: &ProjectionProperty{
NonKeyAttributes: []*string{
jsii.String("nonKeyAttributes"),
},
ProjectionType: jsii.String("projectionType"),
},
VectorAttribute: &VectorAttributeProperty{
AttributeName: jsii.String("attributeName"),
},
// the properties below are optional
SearchSchema: []interface{}{
&SearchSchemaElementProperty{
AttributeName: jsii.String("attributeName"),
SearchSchemaElementType: jsii.String("searchSchemaElementType"),
},
},
}
Properties
distanceFunctionstringdistance_functionstrdistanceFunctionStringDistanceFunctionstringDistanceFunction*string required #projectionIResolvable | CfnTable.ProjectionPropertyprojectiontyping.Union[IResolvable, ProjectionProperty]projectionIResolvableProjectionIResolvableProjectioninterface{} required #Represents attributes that are copied (projected) from the table into an index.
These are in addition to the primary key attributes and index key attributes, which are automatically projected.
searchSchemaoptionalIResolvable | IResolvable | CfnTable.search_schemaoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, SearchSchemaElementProperty]]]searchSchemaoptionalIResolvableSearchSchemaoptionalIResolvableSearchSchemaoptionalinterface{} #vectorAttributeIResolvable | CfnTable.VectorAttributePropertyvector_attributetyping.Union[IResolvable, VectorAttributeProperty]vectorAttributeIResolvableVectorAttributeIResolvableVectorAttributeinterface{} required #