OpenSearch Service Serverless

2023/07/26 - OpenSearch Service Serverless - 3 updated api methods

Changes  This release adds new collection type VectorSearch.

BatchGetCollection (updated) Link ¶
Changes (response)
{'collectionDetails': {'type': {'VECTORSEARCH'}}}

Returns attributes for one or more collections, including the collection endpoint and the OpenSearch Dashboards endpoint. For more information, see Creating and managing Amazon OpenSearch Serverless collections.

See also: AWS API Documentation

Request Syntax

client.batch_get_collection(
    ids=[
        'string',
    ],
    names=[
        'string',
    ]
)
type ids:

list

param ids:

A list of collection IDs. You can't provide names and IDs in the same request. The ID is part of the collection endpoint. You can also retrieve it using the ListCollections API.

  • (string) --

type names:

list

param names:

A list of collection names. You can't provide names and IDs in the same request.

  • (string) --

rtype:

dict

returns:

Response Syntax

{
    'collectionDetails': [
        {
            'arn': 'string',
            'collectionEndpoint': 'string',
            'createdDate': 123,
            'dashboardEndpoint': 'string',
            'description': 'string',
            'id': 'string',
            'kmsKeyArn': 'string',
            'lastModifiedDate': 123,
            'name': 'string',
            'status': 'CREATING'|'DELETING'|'ACTIVE'|'FAILED',
            'type': 'SEARCH'|'TIMESERIES'|'VECTORSEARCH'
        },
    ],
    'collectionErrorDetails': [
        {
            'errorCode': 'string',
            'errorMessage': 'string',
            'id': 'string',
            'name': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • collectionDetails (list) --

      Details about each collection.

      • (dict) --

        Details about each OpenSearch Serverless collection, including the collection endpoint and the OpenSearch Dashboards endpoint.

        • arn (string) --

          The Amazon Resource Name (ARN) of the collection.

        • collectionEndpoint (string) --

          Collection-specific endpoint used to submit index, search, and data upload requests to an OpenSearch Serverless collection.

        • createdDate (integer) --

          The Epoch time when the collection was created.

        • dashboardEndpoint (string) --

          Collection-specific endpoint used to access OpenSearch Dashboards.

        • description (string) --

          A description of the collection.

        • id (string) --

          A unique identifier for the collection.

        • kmsKeyArn (string) --

          The ARN of the Amazon Web Services KMS key used 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.

    • collectionErrorDetails (list) --

      Error information for the request.

      • (dict) --

        Error information for an OpenSearch Serverless request.

        • errorCode (string) --

          The error code for the request. For example, NOT_FOUND.

        • errorMessage (string) --

          A description of the error. For example, The specified Collection is not found.

        • id (string) --

          If the request contains collection IDs, the response includes the IDs provided in the request.

        • name (string) --

          If the request contains collection names, the response includes the names provided in the request.

CreateCollection (updated) Link ¶
Changes (request, response)
Request
{'type': {'VECTORSEARCH'}}
Response
{'createCollectionDetail': {'type': {'VECTORSEARCH'}}}

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

See also: AWS API Documentation

Request Syntax

client.create_collection(
    clientToken='string',
    description='string',
    name='string',
    tags=[
        {
            'key': 'string',
            'value': 'string'
        },
    ],
    type='SEARCH'|'TIMESERIES'|'VECTORSEARCH'
)
type clientToken:

string

param clientToken:

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

This field is autopopulated if not provided.

type description:

string

param description:

Description of the collection.

type name:

string

param name:

[REQUIRED]

Name of the collection.

type tags:

list

param tags:

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 type:

string

param type:

The type of collection.

rtype:

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.

UpdateCollection (updated) Link ¶
Changes (response)
{'updateCollectionDetail': {'type': {'VECTORSEARCH'}}}

Updates an OpenSearch Serverless collection.

See also: AWS API Documentation

Request Syntax

client.update_collection(
    clientToken='string',
    description='string',
    id='string'
)
type clientToken:

string

param clientToken:

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

This field is autopopulated if not provided.

type description:

string

param description:

A description of the collection.

type id:

string

param id:

[REQUIRED]

The unique identifier of the collection.

rtype:

dict

returns:

Response Syntax

{
    'updateCollectionDetail': {
        'arn': 'string',
        'createdDate': 123,
        'description': 'string',
        'id': 'string',
        'lastModifiedDate': 123,
        'name': 'string',
        'status': 'CREATING'|'DELETING'|'ACTIVE'|'FAILED',
        'type': 'SEARCH'|'TIMESERIES'|'VECTORSEARCH'
    }
}

Response Structure

  • (dict) --

    • updateCollectionDetail (dict) --

      Details about the updated collection.

      • arn (string) --

        The Amazon Resource Name (ARN) of the collection.

      • createdDate (integer) --

        The date and time when the collection was created.

      • description (string) --

        The description of the collection.

      • id (string) --

        The unique identifier of 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 collection type.