OpenSearchServiceServerless / Client / create_collection
create_collection#
- OpenSearchServiceServerless.Client.create_collection(**kwargs)#
Creates a new OpenSearch Serverless collection. For more information, see Creating and managing Amazon OpenSearch Serverless collections.
See also: AWS API Documentation
Request Syntax
response = client.create_collection( clientToken='string', description='string', name='string', tags=[ { 'key': 'string', 'value': 'string' }, ], type='SEARCH'|'TIMESERIES'|'VECTORSEARCH' )
- Parameters:
clientToken (string) –
Unique, case-sensitive identifier to ensure idempotency of the request.
This field is autopopulated if not provided.
description (string) – Description of the collection.
name (string) –
[REQUIRED]
Name of the collection.
tags (list) –
An arbitrary set of tags (key–value pairs) to associate with the OpenSearch Serverless collection.
(dict) –
A map of key-value pairs associated to an OpenSearch Serverless resource.
key (string) – [REQUIRED]
The key to use in the tag.
value (string) – [REQUIRED]
The value of the tag.
type (string) – The type of collection.
- Return type:
dict
- Returns:
Response Syntax
{ 'createCollectionDetail': { 'arn': 'string', 'createdDate': 123, 'description': 'string', 'id': 'string', 'kmsKeyArn': 'string', 'lastModifiedDate': 123, 'name': 'string', 'status': 'CREATING'|'DELETING'|'ACTIVE'|'FAILED', 'type': 'SEARCH'|'TIMESERIES'|'VECTORSEARCH' } }
Response Structure
(dict) –
createCollectionDetail (dict) –
Details about the collection.
arn (string) –
The Amazon Resource Name (ARN) of the collection.
createdDate (integer) –
The Epoch time when the collection was created.
description (string) –
A description of the collection.
id (string) –
The unique identifier of the collection.
kmsKeyArn (string) –
The Amazon Resource Name (ARN) of the KMS key with which to encrypt the collection.
lastModifiedDate (integer) –
The date and time when the collection was last modified.
name (string) –
The name of the collection.
status (string) –
The current status of the collection.
type (string) –
The type of collection.
Exceptions
OpenSearchServiceServerless.Client.exceptions.OcuLimitExceededException
OpenSearchServiceServerless.Client.exceptions.InternalServerException
OpenSearchServiceServerless.Client.exceptions.ConflictException
OpenSearchServiceServerless.Client.exceptions.ValidationException
OpenSearchServiceServerless.Client.exceptions.ServiceQuotaExceededException