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'
)
Unique, case-sensitive identifier to ensure idempotency of the request.
This field is autopopulated if not provided.
[REQUIRED]
Name of the collection.
An arbitrary set of tags (key–value pairs) to associate with the OpenSearch Serverless collection.
A map of key-value pairs associated to an OpenSearch Serverless resource.
The key to use in the tag.
The value of the tag.
dict
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'
}
}
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.InternalServerException
OpenSearchServiceServerless.Client.exceptions.ConflictException
OpenSearchServiceServerless.Client.exceptions.ValidationException