Skip to content

OpenSearchServiceServerlessClient#

Index > OpenSearchServiceServerless > OpenSearchServiceServerlessClient

Auto-generated documentation for OpenSearchServiceServerless type annotations stubs module mypy-boto3-opensearchserverless.

OpenSearchServiceServerlessClient#

Type annotations and code completion for boto3.client("opensearchserverless"). boto3 documentation

# OpenSearchServiceServerlessClient usage example

from boto3.session import Session
from mypy_boto3_opensearchserverless.client import OpenSearchServiceServerlessClient

def get_opensearchserverless_client() -> OpenSearchServiceServerlessClient:
    return Session().client("opensearchserverless")

Exceptions#

boto3 client exceptions are generated in runtime. This class provides code completion for boto3.client("opensearchserverless").exceptions structure.

# Exceptions.exceptions usage example

client = boto3.client("opensearchserverless")

try:
    do_something(client)
except (
    client.exceptions.ClientError,
    client.exceptions.ConflictException,
    client.exceptions.InternalServerException,
    client.exceptions.OcuLimitExceededException,
    client.exceptions.ResourceNotFoundException,
    client.exceptions.ServiceQuotaExceededException,
    client.exceptions.ValidationException,
) as e:
    print(e)
# Exceptions.exceptions type checking example

from mypy_boto3_opensearchserverless.client import Exceptions

def handle_error(exc: Exceptions.ClientError) -> None:
    ...

Methods#

batch_get_collection#

Returns attributes for one or more collections, including the collection endpoint and the OpenSearch Dashboards endpoint.

Type annotations and code completion for boto3.client("opensearchserverless").batch_get_collection method. boto3 documentation

# batch_get_collection method definition

def batch_get_collection(
    self,
    *,
    ids: Sequence[str] = ...,
    names: Sequence[str] = ...,
) -> BatchGetCollectionResponseTypeDef:  # (1)
    ...
  1. See BatchGetCollectionResponseTypeDef
# batch_get_collection method usage example with argument unpacking

kwargs: BatchGetCollectionRequestRequestTypeDef = {  # (1)
    "ids": ...,
}

parent.batch_get_collection(**kwargs)
  1. See BatchGetCollectionRequestRequestTypeDef

batch_get_effective_lifecycle_policy#

Returns a list of successful and failed retrievals for the OpenSearch Serverless indexes.

Type annotations and code completion for boto3.client("opensearchserverless").batch_get_effective_lifecycle_policy method. boto3 documentation

# batch_get_effective_lifecycle_policy method definition

def batch_get_effective_lifecycle_policy(
    self,
    *,
    resourceIdentifiers: Sequence[LifecyclePolicyResourceIdentifierTypeDef],  # (1)
) -> BatchGetEffectiveLifecyclePolicyResponseTypeDef:  # (2)
    ...
  1. See LifecyclePolicyResourceIdentifierTypeDef
  2. See BatchGetEffectiveLifecyclePolicyResponseTypeDef
# batch_get_effective_lifecycle_policy method usage example with argument unpacking

kwargs: BatchGetEffectiveLifecyclePolicyRequestRequestTypeDef = {  # (1)
    "resourceIdentifiers": ...,
}

parent.batch_get_effective_lifecycle_policy(**kwargs)
  1. See BatchGetEffectiveLifecyclePolicyRequestRequestTypeDef

batch_get_lifecycle_policy#

Returns one or more configured OpenSearch Serverless lifecycle policies.

Type annotations and code completion for boto3.client("opensearchserverless").batch_get_lifecycle_policy method. boto3 documentation

# batch_get_lifecycle_policy method definition

def batch_get_lifecycle_policy(
    self,
    *,
    identifiers: Sequence[LifecyclePolicyIdentifierTypeDef],  # (1)
) -> BatchGetLifecyclePolicyResponseTypeDef:  # (2)
    ...
  1. See LifecyclePolicyIdentifierTypeDef
  2. See BatchGetLifecyclePolicyResponseTypeDef
# batch_get_lifecycle_policy method usage example with argument unpacking

kwargs: BatchGetLifecyclePolicyRequestRequestTypeDef = {  # (1)
    "identifiers": ...,
}

parent.batch_get_lifecycle_policy(**kwargs)
  1. See BatchGetLifecyclePolicyRequestRequestTypeDef

batch_get_vpc_endpoint#

Returns attributes for one or more VPC endpoints associated with the current account.

Type annotations and code completion for boto3.client("opensearchserverless").batch_get_vpc_endpoint method. boto3 documentation

# batch_get_vpc_endpoint method definition

def batch_get_vpc_endpoint(
    self,
    *,
    ids: Sequence[str],
) -> BatchGetVpcEndpointResponseTypeDef:  # (1)
    ...
  1. See BatchGetVpcEndpointResponseTypeDef
# batch_get_vpc_endpoint method usage example with argument unpacking

kwargs: BatchGetVpcEndpointRequestRequestTypeDef = {  # (1)
    "ids": ...,
}

parent.batch_get_vpc_endpoint(**kwargs)
  1. See BatchGetVpcEndpointRequestRequestTypeDef

can_paginate#

Check if an operation can be paginated.

Type annotations and code completion for boto3.client("opensearchserverless").can_paginate method. boto3 documentation

# can_paginate method definition

def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...

close#

Closes underlying endpoint connections.

Type annotations and code completion for boto3.client("opensearchserverless").close method.