# VectorIndexProperty

- Source: Generated code
- Type last changed: v2.272.0 · 30 Sep 2026

## 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',
  }],
};
```

## Properties

- `dimensions`: number (required)

- `distanceFunction`: string (required)

- `indexName`: string (required)

- `projection`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnTable.ProjectionProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_dynamodb.CfnTable.ProjectionProperty.html) (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.

- `searchSchema`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnTable.SearchSchemaElementProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_dynamodb.CfnTable.SearchSchemaElementProperty.html)[]

- `vectorAttribute`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnTable.VectorAttributeProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_dynamodb.CfnTable.VectorAttributeProperty.html) (required)
