Class CfnIndexMixinProps.Builder
java.lang.Object
software.amazon.awscdk.mixins.preview.services.s3vectors.mixins.CfnIndexMixinProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnIndexMixinProps>
- Enclosing interface:
CfnIndexMixinProps
@Stability(Stable)
public static final class CfnIndexMixinProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnIndexMixinProps>
A builder for
CfnIndexMixinProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.Sets the value ofCfnIndexMixinProps.getDataType()Sets the value ofCfnIndexMixinProps.getDimension()distanceMetric(String distanceMetric) Sets the value ofCfnIndexMixinProps.getDistanceMetric()encryptionConfiguration(IResolvable encryptionConfiguration) Sets the value ofCfnIndexMixinProps.getEncryptionConfiguration()encryptionConfiguration(CfnIndexPropsMixin.EncryptionConfigurationProperty encryptionConfiguration) Sets the value ofCfnIndexMixinProps.getEncryptionConfiguration()Sets the value ofCfnIndexMixinProps.getIndexName()metadataConfiguration(IResolvable metadataConfiguration) Sets the value ofCfnIndexMixinProps.getMetadataConfiguration()metadataConfiguration(CfnIndexPropsMixin.MetadataConfigurationProperty metadataConfiguration) Sets the value ofCfnIndexMixinProps.getMetadataConfiguration()vectorBucketArn(String vectorBucketArn) Sets the value ofCfnIndexMixinProps.getVectorBucketArn()vectorBucketName(String vectorBucketName) Sets the value ofCfnIndexMixinProps.getVectorBucketName()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
dataType
Sets the value ofCfnIndexMixinProps.getDataType()- Parameters:
dataType- The data type of the vectors to be inserted into the vector index. Currently, onlyfloat32is supported, which represents 32-bit floating-point numbers.- Returns:
this
-
dimension
Sets the value ofCfnIndexMixinProps.getDimension()- Parameters:
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.
- Returns:
this
-
distanceMetric
Sets the value ofCfnIndexMixinProps.getDistanceMetric()- Parameters:
distanceMetric- 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.
- Returns:
this
-
encryptionConfiguration
@Stability(Stable) public CfnIndexMixinProps.Builder encryptionConfiguration(IResolvable encryptionConfiguration) Sets the value ofCfnIndexMixinProps.getEncryptionConfiguration()- Parameters:
encryptionConfiguration- 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.- Returns:
this
-
encryptionConfiguration
@Stability(Stable) public CfnIndexMixinProps.Builder encryptionConfiguration(CfnIndexPropsMixin.EncryptionConfigurationProperty encryptionConfiguration) Sets the value ofCfnIndexMixinProps.getEncryptionConfiguration()- Parameters:
encryptionConfiguration- 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.- Returns:
this
-
indexName
Sets the value ofCfnIndexMixinProps.getIndexName()- Parameters:
indexName- 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.
- Returns:
this
-
metadataConfiguration
@Stability(Stable) public CfnIndexMixinProps.Builder metadataConfiguration(IResolvable metadataConfiguration) Sets the value ofCfnIndexMixinProps.getMetadataConfiguration()- Parameters:
metadataConfiguration- The metadata configuration for the vector index.- Returns:
this
-
metadataConfiguration
@Stability(Stable) public CfnIndexMixinProps.Builder metadataConfiguration(CfnIndexPropsMixin.MetadataConfigurationProperty metadataConfiguration) Sets the value ofCfnIndexMixinProps.getMetadataConfiguration()- Parameters:
metadataConfiguration- The metadata configuration for the vector index.- Returns:
this
-
vectorBucketArn
Sets the value ofCfnIndexMixinProps.getVectorBucketArn()- Parameters:
vectorBucketArn- The Amazon Resource Name (ARN) of the vector bucket that contains the vector index.- Returns:
this
-
vectorBucketName
Sets the value ofCfnIndexMixinProps.getVectorBucketName()- Parameters:
vectorBucketName- The name of the vector bucket that contains the vector index.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnIndexMixinProps>- Returns:
- a new instance of
CfnIndexMixinProps - Throws:
NullPointerException- if any required attribute was not provided
-