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 Details

    • Builder

      public Builder()
  • Method Details

    • dataType

      @Stability(Stable) public CfnIndexProps.Builder dataType(String dataType)
      Sets the value of CfnIndexProps.getDataType()
      Parameters:
      dataType - The data type of the vectors to be inserted into the vector index. This parameter is required. Currently, only float32 is supported, which represents 32-bit floating-point numbers.
      Returns:
      this
    • dimension

      @Stability(Stable) public CfnIndexProps.Builder dimension(Number dimension)
      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

      @Stability(Stable) public CfnIndexProps.Builder distanceMetric(String distanceMetric)
      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)
      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)
      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

      @Stability(Stable) public CfnIndexProps.Builder indexName(String indexName)
      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)
      Parameters:
      metadataConfiguration - The metadata configuration for the vector index.
      Returns:
      this
    • metadataConfiguration

      @Stability(Stable) public CfnIndexProps.Builder metadataConfiguration(CfnIndex.MetadataConfigurationProperty metadataConfiguration)
      Parameters:
      metadataConfiguration - The metadata configuration for the vector index.
      Returns:
      this
    • vectorBucketArn

      @Stability(Stable) public CfnIndexProps.Builder vectorBucketArn(String vectorBucketArn)
      Parameters:
      vectorBucketArn - The Amazon Resource Name (ARN) of the vector bucket that contains the vector index.
      Returns:
      this
    • vectorBucketName

      @Stability(Stable) public CfnIndexProps.Builder vectorBucketName(String vectorBucketName)
      Parameters:
      vectorBucketName - The name of the vector bucket that contains the vector index.
      Returns:
      this
    • build

      @Stability(Stable) public CfnIndexProps build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<CfnIndexProps>
      Returns:
      a new instance of CfnIndexProps
      Throws:
      NullPointerException - if any required attribute was not provided