Skip to content

Creates a new OpenSearch Serverless collection

Description

Creates a new OpenSearch Serverless collection. For more information, see Creating and managing Amazon OpenSearch Serverless collections.

Usage

opensearchserviceserverless_create_collection(name, type, description,
  tags, standbyReplicas, vectorOptions, collectionGroupName,
  encryptionConfig, deletionProtection, clientToken)

Arguments

  • name

    [required] Name of the collection.

  • type

    The type of collection.

  • description

    Description of the collection.

  • tags

    An arbitrary set of tags (key–value pairs) to associate with the OpenSearch Serverless collection.

  • standbyReplicas

    Indicates whether standby replicas should be used for a collection.

  • vectorOptions

    Configuration options for vector search capabilities in the collection.

  • collectionGroupName

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

  • encryptionConfig

    Encryption settings for the collection.

  • deletionProtection

    Indicates whether to enable deletion protection for the collection. When set to ENABLED, the collection cannot be deleted.

  • clientToken

    Unique, case-sensitive identifier to ensure idempotency of the request.

Value

A list with the following syntax:

list(
  createCollectionDetail = list(
    id = "string",
    name = "string",
    status = "CREATING"|"UPDATING"|"DELETING"|"ACTIVE"|"FAILED"|"UPDATE_FAILED",
    type = "SEARCH"|"TIMESERIES"|"VECTORSEARCH",
    description = "string",
    arn = "string",
    kmsKeyArn = "string",
    standbyReplicas = "ENABLED"|"DISABLED",
    deletionProtection = "ENABLED"|"DISABLED",
    vectorOptions = list(
      ServerlessVectorAcceleration = "ENABLED"|"DISABLED"|"ALLOWED"
    ),
    createdDate = 123,
    lastModifiedDate = 123,
    collectionGroupName = "string"
  )
)

Request syntax

svc$create_collection(
  name = "string",
  type = "SEARCH"|"TIMESERIES"|"VECTORSEARCH",
  description = "string",
  tags = list(
    list(
      key = "string",
      value = "string"
    )
  ),
  standbyReplicas = "ENABLED"|"DISABLED",
  vectorOptions = list(
    ServerlessVectorAcceleration = "ENABLED"|"DISABLED"|"ALLOWED"
  ),
  collectionGroupName = "string",
  encryptionConfig = list(
    aWSOwnedKey = TRUE|FALSE,
    kmsKeyArn = "string"
  ),
  deletionProtection = "ENABLED"|"DISABLED",
  clientToken = "string"
)