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#

Adds the data source on the 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_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 EncryptionAtRestOptionsTypeDef
  8. See NodeToNodeEncryptionOptionsTypeDef
  9. See LogTypeType LogPublishingOptionTypeDef
  10. See DomainEndpointOptionsTypeDef
  11. See AdvancedSecurityOptionsInputTypeDef
  12. See TagTypeDef
  13. See AutoTuneOptionsInputTypeDef
  14. See OffPeakWindowOptionsTypeDef
  15. See SoftwareUpdateOptionsTypeDef
  16. See CreateDomainResponseTypeDef
# create_domain method usage example with argument unpacking

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

parent.create_domain(**kwargs)
  1. See CreateDomainRequestRequestTypeDef

create_outbound_connection#

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

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

# create_outbound_connection method definition

def create_outbound_connection(
    self,
    *,
    LocalDomainInfo: DomainInformationContainerTypeDef,  # (1)
    RemoteDomainInfo: DomainInformationContainerTypeDef,  # (1)
    ConnectionAlias: str,
    ConnectionMode: ConnectionModeType = ...,  # (3)
    ConnectionProperties: ConnectionPropertiesTypeDef = ...,  # (4)
) -> CreateOutboundConnectionResponseTypeDef:  # (5)
    ...
  1. See DomainInformationContainerTypeDef
  2. See DomainInformationContainerTypeDef
  3. See ConnectionModeType
  4. See ConnectionPropertiesTypeDef
  5. See CreateOutboundConnectionResponseTypeDef
# create_outbound_connection method usage example with argument unpacking

kwargs: CreateOutboundConnectionRequestRequestTypeDef = {  # (1)
    "LocalDomainInfo": ...,
    "RemoteDomainInfo": ...,
    "ConnectionAlias": ...,
}

parent.create_outbound_connection(**kwargs)
  1. See CreateOutboundConnectionRequestRequestTypeDef

create_package#

Creates a package for use with Amazon OpenSearch Service domains.

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