async def create_outbound_cross_cluster_search_connection(
self,
source_domain_info: "capo_elasticsearch_service.types.domain_information.DomainInformation",
destination_domain_info: "capo_elasticsearch_service.types.domain_information.DomainInformation",
connection_alias: "capo_elasticsearch_service.types.connection_alias.ConnectionAlias",
*,
config_overrides: Optional[AsyncElasticsearchServiceClientConfig] = None,
) -> "capo_elasticsearch_service.types.create_outbound_cross_cluster_search_connection_response.CreateOutboundCrossClusterSearchConnectionResponse":
"""<p>Creates a new cross-cluster search connection from a source domain to a destination domain.</p>
Args:
source_domain_info: <p>Specifies the <code><a>DomainInformation</a></code> for the source Elasticsearch domain.</p>
destination_domain_info: <p>Specifies the <code><a>DomainInformation</a></code> for the destination Elasticsearch domain.</p>
connection_alias: <p>Specifies the connection alias that will be used by the customer for this connection.</p>
Raises:
capo_elasticsearch_service.errors.disabled_operation_exception.DisabledOperationException: <p>An error occured because the client wanted to access a not supported operation. Gives http status code of 409.</p>
capo_elasticsearch_service.errors.internal_exception.InternalException: <p>The request processing has failed because of an unknown error, exception or failure (the failure is internal to the service) . Gives http status code of 500.</p>
capo_elasticsearch_service.errors.limit_exceeded_exception.LimitExceededException: <p>An exception for trying to create more than allowed resources or sub-resources. Gives http status code of 409.</p>
capo_elasticsearch_service.errors.resource_already_exists_exception.ResourceAlreadyExistsException: <p>An exception for creating a resource that already exists. Gives http status code of 400.</p>
capo_elasticsearch_service.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_elasticsearch_service.types.create_outbound_cross_cluster_search_connection_request.CreateOutboundCrossClusterSearchConnectionRequest]",
) -> AsyncOperationResponse[
"capo_elasticsearch_service.types.create_outbound_cross_cluster_search_connection_response.CreateOutboundCrossClusterSearchConnectionResponse"
]:
import capo_elasticsearch_service._operations.amazon_elasticsearch_service2015.create_outbound_cross_cluster_search_connection
(
output,
http_response,
) = await capo_elasticsearch_service._operations.amazon_elasticsearch_service2015.create_outbound_cross_cluster_search_connection.async_create_outbound_cross_cluster_search_connection(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging("CreateOutboundCrossClusterSearchConnection"),
)
input_: capo_elasticsearch_service.types.create_outbound_cross_cluster_search_connection_request.CreateOutboundCrossClusterSearchConnectionRequest = {
"source_domain_info": source_domain_info,
"destination_domain_info": destination_domain_info,
"connection_alias": connection_alias,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output