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. boto3 documentation

# close method definition

def close(
    self,
) -> None:
    ...

create_access_policy#

Creates a data access policy for OpenSearch Serverless.

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

# create_access_policy method definition

def create_access_policy(
    self,
    *,
    name: str,
    policy: str,
    type: AccessPolicyTypeType,  # (1)
    clientToken: str = ...,
    description: str = ...,
) -> CreateAccessPolicyResponseTypeDef:  # (2)
    ...
  1. See AccessPolicyTypeType
  2. See CreateAccessPolicyResponseTypeDef
# create_access_policy method usage example with argument unpacking

kwargs: CreateAccessPolicyRequestRequestTypeDef = {  # (1)
    "name": ...,
    "policy": ...,
    "type": ...,
}

parent.create_access_policy(**kwargs)
  1. See CreateAccessPolicyRequestRequestTypeDef

create_collection#

Creates a new OpenSearch Serverless collection.

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

# create_collection method definition

def create_collection(
    self,
    *,
    name: str,
    clientToken: str = ...,
    description: str = ...,
    standbyReplicas: StandbyReplicasType = ...,  # (1)
    tags: Sequence[TagTypeDef] = ...,  # (2)
    type: CollectionTypeType = ...,  # (3)
) -> CreateCollectionResponseTypeDef:  # (4)
    ...
  1. See StandbyReplicasType
  2. See TagTypeDef
  3. See CollectionTypeType
  4. See CreateCollectionResponseTypeDef
# create_collection method usage example with argument unpacking

kwargs: CreateCollectionRequestRequestTypeDef = {  # (1)
    "name": ...,
}

parent.create_collection(**kwargs)
  1. See CreateCollectionRequestRequestTypeDef

create_lifecycle_policy#

Creates a lifecyle policy to be applied to OpenSearch Serverless indexes.

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

# create_lifecycle_policy method definition

def create_lifecycle_policy(
    self,
    *,
    name: str,
    policy: str,
    type: LifecyclePolicyTypeType,  # (1)
    clientToken: str = ...,
    description: str = ...,
) -> CreateLifecyclePolicyResponseTypeDef:  # (2)
    ...
  1. See LifecyclePolicyTypeType
  2. See CreateLifecyclePolicyResponseTypeDef
# create_lifecycle_policy method usage example with argument unpacking

kwargs: CreateLifecyclePolicyRequestRequestTypeDef = {  # (1)
    "name": ...,
    "policy": ...,
    "type": ...,
}

parent.create_lifecycle_policy(**kwargs)
  1. See CreateLifecyclePolicyRequestRequestTypeDef

create_security_config#

Specifies a security configuration for OpenSearch Serverless.

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

# create_security_config method definition

def create_security_config(
    self,
    *,
    name: str,
    type: SecurityConfigTypeType,  # (1)
    clientToken: str = ...,
    description: str = ...,
    samlOptions: SamlConfigOptionsTypeDef = ...,  # (2)
) -> CreateSecurityConfigResponseTypeDef:  # (3)
    ...
  1. See SecurityConfigTypeType
  2. See SamlConfigOptionsTypeDef
  3. See CreateSecurityConfigResponseTypeDef
# create_security_config method usage example with argument unpacking

kwargs: CreateSecurityConfigRequestRequestTypeDef = {  # (1)
    "name": ...,
    "type": ...,
}

parent.create_security_config(**kwargs)
  1. See CreateSecurityConfigRequestRequestTypeDef

create_security_policy#

Creates a security policy to be used by one or more OpenSearch Serverless collections.

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

# create_security_policy method definition

def create_security_policy(
    self,
    *,
    name: str,
    policy: str,
    type: SecurityPolicyTypeType,  # (1)
    clientToken: str = ...,
    description: str = ...,
) -> CreateSecurityPolicyResponseTypeDef:  # (2)
    ...
  1. See SecurityPolicyTypeType
  2. See CreateSecurityPolicyResponseTypeDef
# create_security_policy method usage example with argument unpacking

kwargs: CreateSecurityPolicyRequestRequestTypeDef = {  # (1)
    "name": ...,
    "policy": ...,
    "type": ...,
}

parent.create_security_policy(**kwargs)
  1. See CreateSecurityPolicyRequestRequestTypeDef

create_vpc_endpoint#

Creates an OpenSearch Serverless-managed interface VPC endpoint.

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

# create_vpc_endpoint method definition

def create_vpc_endpoint(
    self,
    *,
    name: str,
    subnetIds: Sequence[str],
    vpcId: str,
    clientToken: str = ...,
    securityGroupIds: Sequence[str] = ...,
) -> CreateVpcEndpointResponseTypeDef:  # (1)
    ...
  1. See CreateVpcEndpointResponseTypeDef
# create_vpc_endpoint method usage example with argument unpacking

kwargs: CreateVpcEndpointRequestRequestTypeDef = {  # (1)
    "name": ...,
    "subnetIds": ...,
    "vpcId": ...,
}

parent.create_vpc_endpoint(**kwargs)
  1. See CreateVpcEndpointRequestRequestTypeDef

delete_access_policy#

Deletes an OpenSearch Serverless access policy.

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

# delete_access_policy method definition

def delete_access_policy(
    self,
    *,
    name: str,
    type: AccessPolicyTypeType,  # (1)
    clientToken: str = ...,
) -> Dict[str, Any]:
    ...
  1. See AccessPolicyTypeType
# delete_access_policy method usage example with argument unpacking

kwargs: DeleteAccessPolicyRequestRequestTypeDef = {  # (1)
    "name": ...,
    "type": ...,
}

parent.delete_access_policy(**kwargs)
  1. See DeleteAccessPolicyRequestRequestTypeDef

delete_collection#

Deletes an OpenSearch Serverless collection.

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

# delete_collection method definition

def delete_collection(
    self,
    *,
    id: str,