Skip to content

ElasticsearchServiceClient#

Index > ElasticsearchService > ElasticsearchServiceClient

Auto-generated documentation for ElasticsearchService type annotations stubs module mypy-boto3-es.

ElasticsearchServiceClient#

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

# ElasticsearchServiceClient usage example

from boto3.session import Session
from mypy_boto3_es.client import ElasticsearchServiceClient

def get_es_client() -> ElasticsearchServiceClient:
    return Session().client("es")

Exceptions#

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

# Exceptions.exceptions usage example

client = boto3.client("es")

try:
    do_something(client)
except (
    client.exceptions.AccessDeniedException,
    client.exceptions.BaseException,
    client.exceptions.ClientError,
    client.exceptions.ConflictException,
    client.exceptions.DisabledOperationException,
    client.exceptions.InternalException,
    client.exceptions.InvalidPaginationTokenException,
    client.exceptions.InvalidTypeException,
    client.exceptions.LimitExceededException,
    client.exceptions.ResourceAlreadyExistsException,
    client.exceptions.ResourceNotFoundException,
    client.exceptions.ValidationException,
) as e:
    print(e)
# Exceptions.exceptions type checking example

from mypy_boto3_es.client import Exceptions

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

Methods#

accept_inbound_cross_cluster_search_connection#

Allows the destination domain owner to accept an inbound cross-cluster search connection request.

Type annotations and code completion for boto3.client("es").accept_inbound_cross_cluster_search_connection method. boto3 documentation

# accept_inbound_cross_cluster_search_connection method definition

def accept_inbound_cross_cluster_search_connection(
    self,
    *,
    CrossClusterSearchConnectionId: str,
) -> AcceptInboundCrossClusterSearchConnectionResponseTypeDef:  # (1)
    ...
  1. See AcceptInboundCrossClusterSearchConnectionResponseTypeDef
# accept_inbound_cross_cluster_search_connection method usage example with argument unpacking

kwargs: AcceptInboundCrossClusterSearchConnectionRequestRequestTypeDef = {  # (1)
    "CrossClusterSearchConnectionId": ...,
}

parent.accept_inbound_cross_cluster_search_connection(**kwargs)
  1. See AcceptInboundCrossClusterSearchConnectionRequestRequestTypeDef

add_tags#

Attaches tags to an existing Elasticsearch domain.

Type annotations and code completion for boto3.client("es").add_tags method. boto3 documentation

# add_tags method definition

def add_tags(
    self,
    *,
    ARN: str,
    TagList: Sequence[TagTypeDef],  # (1)
) -> EmptyResponseMetadataTypeDef:  # (2)
    ...
  1. See TagTypeDef
  2. See EmptyResponseMetadataTypeDef
# add_tags method usage example with argument unpacking

kwargs: AddTagsRequestRequestTypeDef = {  # (1)
    "ARN": ...,
    "TagList": ...,
}

parent.add_tags(**kwargs)
  1. See AddTagsRequestRequestTypeDef

associate_package#

Associates a package with an Amazon ES domain.

Type annotations and code completion for boto3.client("es").associate_package method. boto3 documentation

# associate_package method definition

def associate_package(
    self,
    *,
    PackageID: str,
    DomainName: str,
) -> AssociatePackageResponseTypeDef:  # (1)
    ...
  1. See AssociatePackageResponseTypeDef
# associate_package method usage example with argument unpacking

kwargs: AssociatePackageRequestRequestTypeDef = {  # (1)
    "PackageID": ...,
    "DomainName": ...,
}

parent.associate_package(**kwargs)
  1. See AssociatePackageRequestRequestTypeDef

authorize_vpc_endpoint_access#

Provides access to an Amazon OpenSearch Service domain through the use of an interface VPC endpoint.

Type annotations and code completion for boto3.client("es").authorize_vpc_endpoint_access method. boto3 documentation

# authorize_vpc_endpoint_access method definition

def authorize_vpc_endpoint_access(
    self,
    *,
    DomainName: str,
    Account: str,
) -> AuthorizeVpcEndpointAccessResponseTypeDef:  # (1)
    ...
  1. See AuthorizeVpcEndpointAccessResponseTypeDef
# authorize_vpc_endpoint_access method usage example with argument unpacking

kwargs: AuthorizeVpcEndpointAc