AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::OpenSearchServerless::Collection

CfnCollection

Specifies 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

import { CfnCollection } from 'aws-cdk-lib/aws-opensearchserverless';

Or use the module namespace:

import * as opensearchserverless from 'aws-cdk-lib/aws-opensearchserverless';
// opensearchserverless.CfnCollection

Properties

Configuration passed to the constructor as CfnCollectionProps.

nameRequired
string

The 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 (-)

collectionGroupNameOptional
string

The name of the collection group to associate with the collection.

descriptionOptional
string

A description of the collection.

encryptionConfigOptional
IResolvable | EncryptionConfigProperty

Encryption settings for the collection.

standbyReplicasOptional
string

Indicates 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.

tagsOptional
CfnTag[]

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) .

typeOptional
string

The 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) .

vectorOptionsOptional
IResolvable | VectorOptionsProperty

Vector search configuration options for the collection.

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter

Quick Facts

LevelL1 (CloudFormation)
Moduleaws-opensearchserverless
CFN TypeAWS::OpenSearchServerless::Collection
Properties8

External Links