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: AuthorizeVpcEndpointAccessRequestRequestTypeDef = {  # (1)
    "DomainName": ...,
    "Account": ...,
}

parent.authorize_vpc_endpoint_access(**kwargs)
  1. See AuthorizeVpcEndpointAccessRequestRequestTypeDef

can_paginate#

Check if an operation can be paginated.

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

# can_paginate method definition

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

cancel_elasticsearch_service_software_update#

Cancels a scheduled service software update for an Amazon ES domain.

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

# cancel_elasticsearch_service_software_update method definition

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

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

parent.cancel_elasticsearch_service_software_update(**kwargs)
  1. See CancelElasticsearchServiceSoftwareUpdateRequestRequestTypeDef

close#

Closes underlying endpoint connections.

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

# close method definition

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

create_elasticsearch_domain#

Creates a new Elasticsearch domain.

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

# create_elasticsearch_domain method definition

def create_elasticsearch_domain(
    self,
    *,
    DomainName: str,
    ElasticsearchVersion: str = ...,
    ElasticsearchClusterConfig: ElasticsearchClusterConfigTypeDef = ...,  # (1)
    EBSOptions: EBSOptionsTypeDef = ...,  # (2)
    AccessPolicies: str = ...,
    SnapshotOptions: SnapshotOptionsTypeDef = ...,  # (3)
    VPCOptions: VPCOptionsTypeDef = ...,  # (4)
    CognitoOptions: CognitoOptionsTypeDef = ...,  # (5)
    EncryptionAtRestOptions: EncryptionAtRestOptionsTypeDef = ...,  # (6)
    NodeToNodeEncryptionOptions: NodeToNodeEncryptionOptionsTypeDef = ...,  # (7)
    AdvancedOptions: Mapping[str, str] = ...,
    LogPublishingOptions: Mapping[LogTypeType, LogPublishingOptionTypeDef] = ...,  # (8)
    DomainEndpointOptions: DomainEndpointOptionsTypeDef = ...,  # (9)
    AdvancedSecurityOptions: AdvancedSecurityOptionsInputTypeDef = ...,  # (10)
    AutoTuneOptions: AutoTuneOptionsInputTypeDef = ...,  # (11)
    TagList: Sequence[TagTypeDef] = ...,  # (12)
) -> CreateElasticsearchDomainResponseTypeDef:  # (13)
    ...
  1. See ElasticsearchClusterConfigTypeDef
  2. See EBSOptionsTypeDef
  3. See SnapshotOptionsTypeDef
  4. See VPCOptionsTypeDef
  5. See CognitoOptionsTypeDef
  6. See EncryptionAtRestOptionsTypeDef
  7. See NodeToNodeEncryptionOptionsTypeDef
  8. See LogTypeType LogPublishingOptionTypeDef
  9. See DomainEndpointOptionsTypeDef
  10. See AdvancedSecurityOptionsInputTypeDef
  11. See AutoTuneOptionsInputTypeDef
  12. See TagTypeDef
  13. See CreateElasticsearchDomainResponseTypeDef
# create_elasticsearch_domain method usage example with argument unpacking

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

parent.create_elasticsearch_domain(**kwargs)
  1. See CreateElasticsearchDomainRequestRequestTypeDef

create_outbound_cross_cluster_search_connection#

Creates a new cross-cluster search connection from a source domain to a destination domain.

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

# create_outbound_cross_cluster_search_connection method definition

def create_outbound_cross_cluster_search_connection(
    self,
    *,
    SourceDomainInfo: DomainInformationTypeDef,  # (1)
    DestinationDomainInfo: DomainInformationTypeDef,  # (1)
    ConnectionAlias: str,
) -> CreateOutboundCrossClusterSearchConnectionResponseTypeDef:  # (3)
    ...
  1. See DomainInformationTypeDef
  2. See DomainInformationTypeDef
  3. See CreateOutboundCrossClusterSearchConnectionResponseTypeDef
# create_outbound_cross_cluster_search_connection method usage example with argument unpacking

kwargs: CreateOutboundCrossClusterSearchConnectionRequestRequestTypeDef = {  # (1)
    "SourceDomainInfo": ...,
    "DestinationDomainInfo": ...,
    "ConnectionAlias": ...,
}

parent.create_outbound_cross_cluster_search_connection(**kwargs)
  1. See CreateOutboundCrossClusterSearchConnectionRequestRequestTypeDef

create_package#

Create a package for use with Amazon ES domains.

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

# create_package method definition

def create_package(
    self,
    *,
    PackageName: str,
    PackageType: PackageTypeType,  # (1)
    PackageSource: PackageSourceTypeDef,  # (2)
    PackageDescription: str = ...,
) -> CreatePackageResponseTypeDef:  # (3)
    ...
  1. See PackageTypeType
  2. See PackageSourceTypeDef
  3. See CreatePackageResponseTypeDef
# create_package method usage example with argument unpacking

kwargs: CreatePackageRequestRequestTypeDef = {  # (1)
    "PackageName": ...,
    "PackageType": ...,
    "PackageSource": ...,
}

parent.create_package(**kwargs)
  1. See CreatePackageRequestRequestTypeDef

create_vpc_endpoint#

Creates an Amazon OpenSearch Service-managed VPC endpoint.

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

# create_vpc_endpoint method definition

def create_vpc_endpoint(
    self,
    *,
    DomainArn: str,
    VpcOptions: VPCOptionsTypeDef,  # (1)
    ClientToken: str = ...,
) -> CreateVpcEndpointResponseTypeDef:  # (2)
    ...
  1. See VPCOptionsTypeDef
  2. See CreateVpcEndpointResponseTypeDef
# create_vpc_endpoint method usage example with argument unpacking

kwargs: CreateVpcEndpointRequestRequestTypeDef = {  # (1)
    "DomainArn": ...,
    "VpcOptions": ...,
}

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

delete_elasticsearch_domain#

Permanently deletes the specified Elasticsearch domain and all of its data.

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

# delete_elasticsearch_domain method definition

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

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

parent.delete_elasticsearch_domain(**kwargs)
  1. See DeleteElasticsearchDomainRequestRequestTypeDef

delete_elasticsearch_service_role#

Deletes the service-linked role that Elasticsearch Service uses to manage and maintain VPC domains.

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

# delete_elasticsearch_service_role method definition

def delete_elasticsearch_service_role(
    self,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef

delete_inbound_cross_cluster_search_connection#

Allows the destination domain owner to delete an existing inbound cross-cluster search connection.

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

# delete_inbound_cross_cluster_search_connection method definition

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

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

parent.delete_inbound_cross_cluster_search_connection(**kwargs)
  1. See DeleteInboundCrossClusterSearchConnectionRequestRequestTypeDef

delete_outbound_cross_cluster_search_connection#

Allows the source domain owner to delete an existing outbound cross-cluster search connection.

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

# delete_outbound_cross_cluster_search_connection method definition

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

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

parent.delete_outbound_cross_cluster_search_connection(**kwargs)
  1. See DeleteOutboundCrossClusterSearchConnectionRequestRequestTypeDef

delete_package#

Delete the package.

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

# delete_package method definition

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

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

parent.delete_package(**kwargs)
  1. See DeletePackageRequestRequestTypeDef

delete_vpc_endpoint#

Deletes an Amazon OpenSearch Service-managed interface VPC endpoint.

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

# delete_vpc_endpoint method definition

def delete_vpc_endpoint(
    self,
    *,
    VpcEndpointId: str,
) -> DeleteVpcEndpointResponseTypeDef:  # (1)
    ...
  1. See DeleteVpcEndpointResponseTypeDef
# delete_vpc_endpoint method usage example with argument unpacking

kwargs: DeleteVpcEndpointRequestRequestTypeDef = {  # (1)
    "VpcEndpointId": ...,
}

parent.delete_vpc_endpoint(**kwargs)
  1. See DeleteVpcEndpointRequestRequestTypeDef

describe_domain_auto_tunes#

Provides scheduled Auto-Tune action details for the Elasticsearch domain, such as Auto-Tune action type, description, severity, and scheduled date.

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

# describe_domain_auto_tunes method definition

def describe_domain_auto_tunes(
    self,
    *,
    DomainName: str,
    MaxResults: int = ...,
    NextToken: str = ...,
) -> DescribeDomainAutoTunesResponseTypeDef:  # (1)
    ...
  1. See DescribeDomainAutoTunesResponseTypeDef
# describe_domain_auto_tunes method usage example with argument unpacking

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

parent.describe_domain_auto_tunes(**kwargs)
  1. See DescribeDomainAutoTunesRequestRequestTypeDef

describe_domain_change_progress#

Returns information about the current blue/green deployment happening on a domain, including a change ID, status, and progress stages.

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

# describe_domain_change_progress method definition

def describe_domain_change_progress(
    self,
    *,
    DomainName: str,
    ChangeId: str = ...,
) -> DescribeDomainChangeProgressResponseTypeDef:  # (1)
    ...
  1. See DescribeDomainChangeProgressResponseTypeDef
# describe_domain_change_progress method usage example with argument unpacking

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

parent.describe_domain_change_progress(**kwargs)
  1. See DescribeDomainChangeProgressRequestRequestTypeDef

describe_elasticsearch_domain#

Returns domain configuration information about the specified Elasticsearch domain, including the domain ID, domain endpoint, and domain ARN.

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

# describe_elasticsearch_domain method definition

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

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

parent.describe_elasticsearch_domain(**kwargs)
  1. See DescribeElasticsearchDomainRequestRequestTypeDef

describe_elasticsearch_domain_config#

Provides cluster configuration information about the specified Elasticsearch domain, such as the state, creation date, update version, and update date for cluster options.

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

# describe_elasticsearch_domain_config method definition

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

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

parent.describe_elasticsearch_domain_config(**kwargs)
  1. See DescribeElasticsearchDomainConfigRequestRequestTypeDef

describe_elasticsearch_domains#

Returns domain configuration information about the specified Elasticsearch domains, including the domain ID, domain endpoint, and domain ARN.

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

# describe_elasticsearch_domains method definition

def describe_elasticsearch_domains(
    self,
    *,
    DomainNames: Sequence[str],
) -> DescribeElasticsearchDomainsResponseTypeDef:  # (1)
    ...
  1. See DescribeElasticsearchDomainsResponseTypeDef
# describe_elasticsearch_domains method usage example with argument unpacking

kwargs: DescribeElasticsearchDomainsRequestRequestTypeDef = {  # (1)
    "DomainNames": ...,
}

parent.describe_elasticsearch_domains(**kwargs)
  1. See DescribeElasticsearchDomainsRequestRequestTypeDef

describe_elasticsearch_instance_type_limits#

Describe Elasticsearch Limits for a given InstanceType and ElasticsearchVersion.

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

# describe_elasticsearch_instance_type_limits method definition

def describe_elasticsearch_instance_type_limits(
    self,
    *,
    InstanceType: ESPartitionInstanceTypeType,  # (1)
    ElasticsearchVersion: str,
    DomainName: str = ...,
) -> DescribeElasticsearchInstanceTypeLimitsResponseTypeDef:  # (2)
    ...
  1. See ESPartitionInstanceTypeType
  2. See DescribeElasticsearchInstanceTypeLimitsResponseTypeDef
# describe_elasticsearch_instance_type_limits method usage example with argument unpacking

kwargs: DescribeElasticsearchInstanceTypeLimitsRequestRequestTypeDef = {  # (1)
    "InstanceType": ...,
    "ElasticsearchVersion": ...,
}

parent.describe_elasticsearch_instance_type_limits(**kwargs)
  1. See DescribeElasticsearchInstanceTypeLimitsRequestRequestTypeDef

describe_inbound_cross_cluster_search_connections#

Lists all the inbound cross-cluster search connections for a destination domain.

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

# describe_inbound_cross_cluster_search_connections method definition

def describe_inbound_cross_cluster_search_connections(
    self,
    *,
    Filters: Sequence[FilterTypeDef] = ...,  # (1)
    MaxResults: int = ...,
    NextToken: str = ...,
) -> DescribeInboundCrossClusterSearchConnectionsResponseTypeDef:  # (2)
    ...
  1. See FilterTypeDef
  2. See DescribeInboundCrossClusterSearchConnectionsResponseTypeDef
# describe_inbound_cross_cluster_search_connections method usage example with argument unpacking

kwargs: DescribeInboundCrossClusterSearchConnectionsRequestRequestTypeDef = {  # (1)
    "Filters": ...,
}

parent.describe_inbound_cross_cluster_search_connections(**kwargs)
  1. See DescribeInboundCrossClusterSearchConnectionsRequestRequestTypeDef

describe_outbound_cross_cluster_search_connections#

Lists all the outbound cross-cluster search connections for a source domain.

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

# describe_outbound_cross_cluster_search_connections method definition

def describe_outbound_cross_cluster_search_connections(
    self,
    *,
    Filters: Sequence[FilterTypeDef] = ...,  # (1)
    MaxResults: int = ...,
    NextToken: str = ...,
) -> DescribeOutboundCrossClusterSearchConnectionsResponseTypeDef:  # (2)
    ...
  1. See FilterTypeDef
  2. See DescribeOutboundCrossClusterSearchConnectionsResponseTypeDef
# describe_outbound_cross_cluster_search_connections method usage example with argument unpacking

kwargs: DescribeOutboundCrossClusterSearchConnectionsRequestRequestTypeDef = {  # (1)
    "Filters": ...,
}

parent.describe_outbound_cross_cluster_search_connections(**kwargs)
  1. See DescribeOutboundCrossClusterSearchConnectionsRequestRequestTypeDef

describe_packages#

Describes all packages available to Amazon ES.

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