CfnIndexMixinProps

class aws_cdk.mixins_preview.aws_s3vectors.mixins.CfnIndexMixinProps(*, data_type=None, dimension=None, distance_metric=None, index_name=None, metadata_configuration=None, vector_bucket_arn=None, vector_bucket_name=None)

Bases: object

Properties for CfnIndexPropsMixin.

Parameters:
  • data_type (Optional[str]) – 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 (Union[int, float, None]) – 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.

  • distance_metric (Optional[str]) – 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.

  • index_name (Optional[str]) – 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. .. epigraph:: 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.

  • metadata_configuration (Union[IResolvable, MetadataConfigurationProperty, Dict[str, Any], None]) – The metadata configuration for the vector index.

  • vector_bucket_arn (Optional[str]) – The Amazon Resource Name (ARN) of the vector bucket that contains the vector index.

  • vector_bucket_name (Optional[str]) – The name of the vector bucket that contains the vector index.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3vectors-index.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_s3vectors import mixins as s3vectors_mixins

cfn_index_mixin_props = s3vectors_mixins.CfnIndexMixinProps(
    data_type="dataType",
    dimension=123,
    distance_metric="distanceMetric",
    index_name="indexName",
    metadata_configuration=s3vectors_mixins.CfnIndexPropsMixin.MetadataConfigurationProperty(
        non_filterable_metadata_keys=["nonFilterableMetadataKeys"]
    ),
    vector_bucket_arn="vectorBucketArn",
    vector_bucket_name="vectorBucketName"
)

Attributes

data_type

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3vectors-index.html#cfn-s3vectors-index-datatype

dimension

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3vectors-index.html#cfn-s3vectors-index-dimension

distance_metric

.

  • 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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3vectors-index.html#cfn-s3vectors-index-distancemetric

Type:

The distance metric to be used for similarity search. Valid values are

index_name

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. .. epigraph:

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.
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3vectors-index.html#cfn-s3vectors-index-indexname

metadata_configuration

The metadata configuration for the vector index.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3vectors-index.html#cfn-s3vectors-index-metadataconfiguration

vector_bucket_arn

The Amazon Resource Name (ARN) of the vector bucket that contains the vector index.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3vectors-index.html#cfn-s3vectors-index-vectorbucketarn

vector_bucket_name

The name of the vector bucket that contains the vector index.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3vectors-index.html#cfn-s3vectors-index-vectorbucketname