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