interface CfnIndexProps
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.S3Vectors.CfnIndexProps |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awss3vectors#CfnIndexProps |
Java | software.amazon.awscdk.services.s3vectors.CfnIndexProps |
Python | aws_cdk.aws_s3vectors.CfnIndexProps |
TypeScript | aws-cdk-lib » aws_s3vectors » CfnIndexProps |
Properties for defining a CfnIndex.
See also: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3vectors-index.html
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_s3vectors as s3vectors } from 'aws-cdk-lib';
const cfnIndexProps: s3vectors.CfnIndexProps = {
dataType: 'dataType',
dimension: 123,
distanceMetric: 'distanceMetric',
// the properties below are optional
encryptionConfiguration: {
kmsKeyArn: 'kmsKeyArn',
sseType: 'sseType',
},
indexName: 'indexName',
metadataConfiguration: {
nonFilterableMetadataKeys: ['nonFilterableMetadataKeys'],
},
vectorBucketArn: 'vectorBucketArn',
vectorBucketName: 'vectorBucketName',
};
Properties
| Name | Type | Description |
|---|---|---|
| data | string | The data type of the vectors to be inserted into the vector index. |
| dimension | number | The dimensions of the vectors to be inserted into the vector index. |
| distance | string | The distance metric to be used for similarity search. Valid values are:. |
| encryption | IResolvable | Encryption | The encryption configuration for a vector index. |
| index | string | The name of the vector index to create. |
| metadata | IResolvable | Metadata | The metadata configuration for the vector index. |
| vector | string | The Amazon Resource Name (ARN) of the vector bucket that contains the vector index. |
| vector | string | The name of the vector bucket that contains the vector index. |
dataType
Type:
string
The data type of the vectors to be inserted into the vector index.
Currently, only float32 is supported, which represents 32-bit floating-point numbers.
dimension
Type:
number
The dimensions of the vectors to be inserted into the vector index.
This value must be between 1 and 4096, inclusive. All vectors stored in the index must have the same number of dimensions.
The dimension value affects the storage requirements and search performance. Higher dimensions require more storage space and may impact search latency.
distanceMetric
Type:
string
The distance metric to be used for similarity search. Valid values are:.
cosine- Measures the cosine of the angle between two vectors.euclidean- Measures the straight-line distance between two points in multi-dimensional space. Lower values indicate greater similarity.
encryptionConfiguration?
Type:
IResolvable | Encryption
(optional)
The encryption configuration for a vector index.
By default, if you don't specify, all new vectors in the vector index will use the encryption configuration of the vector bucket.
indexName?
Type:
string
(optional)
The name of the vector index to create.
The index name must be between 3 and 63 characters long and can contain only lowercase letters, numbers, hyphens (-), and dots (.). The index name must be unique within the vector bucket.
If you don't specify a name, AWS CloudFormation generates a unique ID and uses that ID for the index name.
If you specify a name, you can't perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you need to replace the resource, specify a new name.
metadataConfiguration?
Type:
IResolvable | Metadata
(optional)
The metadata configuration for the vector index.
vectorBucketArn?
Type:
string
(optional)
The Amazon Resource Name (ARN) of the vector bucket that contains the vector index.
vectorBucketName?
Type:
string
(optional)
The name of the vector bucket that contains the vector index.

.NET
Go
Java
Python
TypeScript