AWS::OpenSearchServerless::CollectionSpecifies an OpenSearch Serverless collection. For more information, see [Creating and managing Amazon OpenSearch Serverless collections](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/serverless-manage.html) in the *Amazon OpenSearch Service Developer Guide* . > You must create a matching [encryption policy](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/serverless-encryption.html) in order for a collection to be created successfully. You can specify the policy resource within the same CloudFormation template as the collection resource if you use the [DependsOn](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-dependson.html) attribute. See [Examples](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opensearchserverless-collection.html#aws-resource-opensearchserverless-collection--examples) for a sample template. Otherwise the encryption policy must already exist before you create the collection.
import { CfnCollection } from 'aws-cdk-lib/aws-opensearchserverless';Or use the module namespace:
import * as opensearchserverless from 'aws-cdk-lib/aws-opensearchserverless';
// opensearchserverless.CfnCollectionConfiguration passed to the constructor as CfnCollectionProps.
nameRequiredstringThe name of the collection. Collection names must meet the following criteria: - Starts with a lowercase letter - Unique to your account and AWS Region - Contains between 3 and 28 characters - Contains only lowercase letters a-z, the numbers 0-9, and the hyphen (-)
collectionGroupNameOptionalstringThe name of the collection group to associate with the collection.
descriptionOptionalstringA description of the collection.
encryptionConfigOptionalIResolvable | EncryptionConfigPropertyEncryption settings for the collection.
standbyReplicasOptionalstringIndicates whether to use standby replicas for the collection. You can't update this property after the collection is already created. If you attempt to modify this property, the collection continues to use the original value.
tagsOptionalCfnTag[]An arbitrary set of tags (key–value pairs) to associate with the collection. For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html) .
typeOptionalstringThe type of collection. Possible values are `SEARCH` , `TIMESERIES` , and `VECTORSEARCH` . For more information, see [Choosing a collection type](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/serverless-overview.html#serverless-usecase) .
vectorOptionsOptionalIResolvable | VectorOptionsPropertyVector search configuration options for the collection.
This L1 construct maps directly to the following CloudFormation resource type.
Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.
Subscribe to Newsletteraws-opensearchserverlessAWS::OpenSearchServerless::Collection