Skip to content

OpenSearchServiceClient#

Index > OpenSearchService > OpenSearchServiceClient

Auto-generated documentation for OpenSearchService type annotations stubs module mypy-boto3-opensearch.

OpenSearchServiceClient#

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

# OpenSearchServiceClient usage example

from boto3.session import Session
from mypy_boto3_opensearch.client import OpenSearchServiceClient

def get_opensearch_client() -> OpenSearchServiceClient:
    return Session().client("opensearch")

Exceptions#

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

# Exceptions.exceptions usage example

client = boto3.client("opensearch")

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

from mypy_boto3_opensearch.client import Exceptions

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

Methods#

accept_inbound_connection#

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

Type annotations and code completion for boto3.client("opensearch").accept_inbound_connection method. boto3 documentation

# accept_inbound_connection method definition

def accept_inbound_connection(
    self,
    *,
    ConnectionId: str,
) -> AcceptInboundConnectionResponseTypeDef:  # (1)
    ...
  1. See AcceptInboundConnectionResponseTypeDef
# accept_inbound_connection method usage example with argument unpacking

kwargs: AcceptInboundConnectionRequestRequestTypeDef = {  # (1)
    "ConnectionId": ...,
}

parent.accept_inbound_connection(**kwargs)
  1. See AcceptInboundConnectionRequestRequestTypeDef

add_data_source#

Creates a new direct-query data source to the specified domain.

Type annotations and code completion for boto3.client("opensearch").add_data_source method. boto3 documentation

# add_data_source method definition

def add_data_source(
    self,
    *,
    DomainName: str,
    Name: str,
    DataSourceType: DataSourceTypeTypeDef,  # (1)
    Description: str = ...,
) -> AddDataSourceResponseTypeDef:  # (2)
    ...
  1. See DataSourceTypeTypeDef
  2. See AddDataSourceResponseTypeDef
# add_data_source method usage example with argument unpacking

kwargs: AddDataSourceRequestRequestTypeDef = {  # (1)
    "DomainName": ...,
    "Name": ...,
    "DataSourceType": ...,
}

parent.add_data_source(**kwargs)
  1. See AddDataSourceRequestRequestTypeDef

add_tags#

Attaches tags to an existing Amazon OpenSearch Service domain.

Type annotations and code completion for boto3.client("opensearch").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 OpenSearch Service domain.

Type annotations and code completion for boto3.client("opensearch").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("opensearch").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("opensearch").can_paginate method. boto3 documentation

# can_paginate method definition

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

cancel_domain_config_change#

Cancels a pending configuration change on an Amazon OpenSearch Service domain.

Type annotations and code completion for boto3.client("opensearch").cancel_domain_config_change method. boto3 documentation

# cancel_domain_config_change method definition

def cancel_domain_config_change(
    self,
    *,
    DomainName: str,
    DryRun: bool = ...,
) -> CancelDomainConfigChangeResponseTypeDef:  # (1)
    ...
  1. See CancelDomainConfigChangeResponseTypeDef
# cancel_domain_config_change method usage example with argument unpacking

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

parent.cancel_domain_config_change(**kwargs)
  1. See CancelDomainConfigChangeRequestRequestTypeDef

cancel_service_software_update#

Cancels a scheduled service software update for an Amazon OpenSearch Service domain.

Type annotations and code completion for boto3.client("opensearch").cancel_service_software_update method. boto3 documentation

# cancel_service_software_update method definition

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

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

parent.cancel_service_software_update(**kwargs)
  1. See CancelServiceSoftwareUpdateRequestRequestTypeDef

close#

Closes underlying endpoint connections.

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

# close method definition

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

create_domain#

Creates an Amazon OpenSearch Service domain.

Type annotations and code completion for boto3.client("opensearch").create_domain method. boto3 documentation

# create_domain method definition

def create_domain(
    self,
    *,
    DomainName: str,
    EngineVersion: str = ...,
    ClusterConfig: ClusterConfigTypeDef = ...,  # (1)
    EBSOptions: EBSOptionsTypeDef = ...,  # (2)
    AccessPolicies: str = ...,
    IPAddressType: IPAddressTypeType = ...,  # (3)
    SnapshotOptions: SnapshotOptionsTypeDef = ...,  # (4)
    VPCOptions: VPCOptionsTypeDef = ...,  # (5)
    CognitoOptions: CognitoOptionsTypeDef = ...,  # (6)
    EncryptionAtRestOptions: EncryptionAtRestOptionsTypeDef = ...,  # (7)
    NodeToNodeEncryptionOptions: NodeToNodeEncryptionOptionsTypeDef = ...,  # (8)
    AdvancedOptions: Mapping[str, str] = ...,
    LogPublishingOptions: Mapping[LogTypeType, LogPublishingOptionTypeDef] = ...,  # (9)
    DomainEndpointOptions: DomainEndpointOptionsTypeDef = ...,  # (10)
    AdvancedSecurityOptions: AdvancedSecurityOptionsInputTypeDef = ...,  # (11)
    TagList: Sequence[TagTypeDef] = ...,  # (12)
    AutoTuneOptions: AutoTuneOptionsInputTypeDef = ...,  # (13)
    OffPeakWindowOptions: OffPeakWindowOptionsTypeDef = ...,  # (14)
    SoftwareUpdateOptions: SoftwareUpdateOptionsTypeDef = ...,  # (15)
) -> CreateDomainResponseTypeDef:  # (16)
    ...
  1. See ClusterConfigTypeDef
  2. See EBSOptionsTypeDef
  3. See IPAddressTypeType
  4. See SnapshotOptionsTypeDef
  5. See VPCOptionsTypeDef
  6. See CognitoOptionsTypeDef
  7. See EncryptionAtRestOptionsType