CfnIndexPropsMixin

class aws_cdk.mixins_preview.aws_s3vectors.mixins.CfnIndexPropsMixin(props, *, strategy=None)

Bases: Mixin

The AWS::S3Vectors::Index resource defines a vector index within an Amazon S3 vector bucket.

For more information, see Creating a vector index in a vector bucket in the Amazon Simple Storage Service User Guide .

You must specify either VectorBucketName or VectorBucketArn to identify the bucket that contains the index.

To control how AWS CloudFormation handles the vector index when the stack is deleted, you can set a deletion policy for your index. You can choose to retain the index or to delete the index. For more information, see DeletionPolicy attribute .

  • Permissions - The required permissions for CloudFormation to use are based on the operations that are performed on the stack.

  • Create

  • s3vectors:CreateIndex

  • s3vectors:GetIndex

  • Read

  • s3vectors:GetIndex

  • Delete

  • s3vectors:DeleteIndex

  • s3vectors:GetIndex

  • List

  • s3vectors:ListIndexes

See:

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

CloudformationResource:

AWS::S3Vectors::Index

Mixin:

true

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 import mixins
from aws_cdk.mixins_preview.aws_s3vectors import mixins as s3vectors_mixins

cfn_index_props_mixin = s3vectors_mixins.CfnIndexPropsMixin(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"
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::S3Vectors::Index.

Parameters:
  • props (Union[CfnIndexMixinProps, Dict[str, Any]]) – L1 properties to apply.

  • strategy (Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['dataType', 'dimension', 'distanceMetric', 'indexName', 'metadataConfiguration', 'vectorBucketArn', 'vectorBucketName']

Static Methods

classmethod is_mixin(x)

(experimental) Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

Stability:

experimental

MetadataConfigurationProperty

class CfnIndexPropsMixin.MetadataConfigurationProperty(*, non_filterable_metadata_keys=None)

Bases: object

The metadata configuration for the vector index.

This configuration allows you to specify which metadata keys should be treated as non-filterable.

Parameters:

non_filterable_metadata_keys (Optional[Sequence[str]]) – Non-filterable metadata keys allow you to enrich vectors with additional context during storage and retrieval. Unlike default metadata keys, these keys can’t be used as query filters. Non-filterable metadata keys can be retrieved but can’t be searched, queried, or filtered. You can access non-filterable metadata keys of your vectors after finding the vectors. You can specify 1 to 10 non-filterable metadata keys. Each key must be 1 to 63 characters long.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3vectors-index-metadataconfiguration.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

metadata_configuration_property = s3vectors_mixins.CfnIndexPropsMixin.MetadataConfigurationProperty(
    non_filterable_metadata_keys=["nonFilterableMetadataKeys"]
)

Attributes

non_filterable_metadata_keys

Non-filterable metadata keys allow you to enrich vectors with additional context during storage and retrieval.

Unlike default metadata keys, these keys can’t be used as query filters. Non-filterable metadata keys can be retrieved but can’t be searched, queried, or filtered. You can access non-filterable metadata keys of your vectors after finding the vectors.

You can specify 1 to 10 non-filterable metadata keys. Each key must be 1 to 63 characters long.

See:

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