Class CfnIndex
- All Implemented Interfaces:
IInspectable,IEnvironmentAware,IIndexRef,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
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
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.s3vectors.*;
CfnIndex cfnIndex = CfnIndex.Builder.create(this, "MyCfnIndex")
.dataType("dataType")
.dimension(123)
.distanceMetric("distanceMetric")
// the properties below are optional
.encryptionConfiguration(EncryptionConfigurationProperty.builder()
.kmsKeyArn("kmsKeyArn")
.sseType("sseType")
.build())
.indexName("indexName")
.metadataConfiguration(MetadataConfigurationProperty.builder()
.nonFilterableMetadataKeys(List.of("nonFilterableMetadataKeys"))
.build())
.vectorBucketArn("vectorBucketArn")
.vectorBucketName("vectorBucketName")
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnIndex.static interfaceThe encryption configuration for a vector bucket or index.static interfaceThe metadata configuration for the vector index.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.interfaces.s3vectors.IIndexRef
IIndexRef.Jsii$Default, IIndexRef.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnIndex(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnIndex(software.amazon.jsii.JsiiObjectRef objRef) CfnIndex(software.constructs.Construct scope, String id, CfnIndexProps props) Create a newAWS::S3Vectors::Index. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringarnForIndex(IIndexRef resource) Returns the date and time when the vector index was created.Returns the Amazon Resource Name (ARN) of the specified index.The data type of the vectors to be inserted into the vector index.The dimensions of the vectors to be inserted into the vector index.The distance metric to be used for similarity search.The encryption configuration for a vector index.The name of the vector index to create.A reference to a Index resource.The metadata configuration for the vector index.The Amazon Resource Name (ARN) of the vector bucket that contains the vector index.The name of the vector bucket that contains the vector index.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.static BooleanisCfnIndex(Object x) Checks whether the given object is a CfnIndex.renderProperties(Map<String, Object> props) voidsetDataType(String value) The data type of the vectors to be inserted into the vector index.voidsetDimension(Number value) The dimensions of the vectors to be inserted into the vector index.voidsetDistanceMetric(String value) The distance metric to be used for similarity search.voidThe encryption configuration for a vector index.voidThe encryption configuration for a vector index.voidsetIndexName(String value) The name of the vector index to create.voidThe metadata configuration for the vector index.voidThe metadata configuration for the vector index.voidsetVectorBucketArn(String value) The Amazon Resource Name (ARN) of the vector bucket that contains the vector index.voidsetVectorBucketName(String value) The name of the vector bucket that contains the vector index.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnIndex
protected CfnIndex(software.amazon.jsii.JsiiObjectRef objRef) -
CfnIndex
protected CfnIndex(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnIndex
@Stability(Stable) public CfnIndex(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnIndexProps props) Create a newAWS::S3Vectors::Index.- Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties. This parameter is required.
-
-
Method Details
-
arnForIndex
- Parameters:
resource- This parameter is required.
-
isCfnIndex
Checks whether the given object is a CfnIndex.- Parameters:
x- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrCreationTime
Returns the date and time when the vector index was created.Example:
2024-12-21T10:30:00Z -
getAttrIndexArn
Returns the Amazon Resource Name (ARN) of the specified index.Example:
arn:aws:s3vectors:us-east-1:123456789012:bucket/amzn-s3-demo-vector-bucket/index/my-index -
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getIndexRef
A reference to a Index resource.- Specified by:
getIndexRefin interfaceIIndexRef
-
getDataType
The data type of the vectors to be inserted into the vector index. -
setDataType
The data type of the vectors to be inserted into the vector index. -
getDimension
The dimensions of the vectors to be inserted into the vector index. -
setDimension
The dimensions of the vectors to be inserted into the vector index. -
getDistanceMetric
The distance metric to be used for similarity search.Valid values are:.
-
setDistanceMetric
The distance metric to be used for similarity search.Valid values are:.
-
getEncryptionConfiguration
The encryption configuration for a vector index.Returns union: either
IResolvableorCfnIndex.EncryptionConfigurationProperty -
setEncryptionConfiguration
The encryption configuration for a vector index. -
setEncryptionConfiguration
@Stability(Stable) public void setEncryptionConfiguration(@Nullable CfnIndex.EncryptionConfigurationProperty value) The encryption configuration for a vector index. -
getIndexName
The name of the vector index to create. -
setIndexName
The name of the vector index to create. -
getMetadataConfiguration
The metadata configuration for the vector index.Returns union: either
IResolvableorCfnIndex.MetadataConfigurationProperty -
setMetadataConfiguration
The metadata configuration for the vector index. -
setMetadataConfiguration
@Stability(Stable) public void setMetadataConfiguration(@Nullable CfnIndex.MetadataConfigurationProperty value) The metadata configuration for the vector index. -
getVectorBucketArn
The Amazon Resource Name (ARN) of the vector bucket that contains the vector index. -
setVectorBucketArn
The Amazon Resource Name (ARN) of the vector bucket that contains the vector index. -
getVectorBucketName
The name of the vector bucket that contains the vector index. -
setVectorBucketName
The name of the vector bucket that contains the vector index.
-