Skip to content

delete_outbound_connection

delete_outbound_connection(
    connection_id: ConnectionId,
    *,
    config_overrides: Optional[OpenSearchClientConfig] = None,
) -> DeleteOutboundConnectionResponse

Allows the source Amazon OpenSearch Service domain owner to delete an existing outbound cross-cluster search connection. For more information, see Cross-cluster search for Amazon OpenSearch Service.

Parameters:

  • connection_id (ConnectionId) –

    The ID of the outbound connection you want to permanently delete.

Raises:

Source code in docs_src/capo_opensearch/_services/open_search.py
def delete_outbound_connection(
    self,
    connection_id: "capo_opensearch.types.connection_id.ConnectionId",
    *,
    config_overrides: Optional[OpenSearchClientConfig] = None,
) -> "capo_opensearch.types.delete_outbound_connection_response.DeleteOutboundConnectionResponse":
    """<p>Allows the source Amazon OpenSearch Service domain owner to delete an existing outbound cross-cluster search connection. For more information, see <a href="https://docs.aws.amazon.com/opensearch-service/latest/developerguide/cross-cluster-search.html">Cross-cluster search for Amazon OpenSearch Service</a>.</p>

    Args:
        connection_id: <p>The ID of the outbound connection you want to permanently delete.</p>

    Raises:
        capo_opensearch.errors.disabled_operation_exception.DisabledOperationException: <p>An error occured because the client wanted to access an unsupported operation.</p>
        capo_opensearch.errors.resource_not_found_exception.ResourceNotFoundException: <p>An exception for accessing or deleting a resource that doesn't exist.</p>
        capo_opensearch.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_opensearch.types.delete_outbound_connection_request.DeleteOutboundConnectionRequest]",
    ) -> OperationResponse[
        "capo_opensearch.types.delete_outbound_connection_response.DeleteOutboundConnectionResponse"
    ]:
        import capo_opensearch._operations.amazon_open_search_service.delete_outbound_connection

        output, http_response = (
            capo_opensearch._operations.amazon_open_search_service.delete_outbound_connection.delete_outbound_connection(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteOutboundConnection")
    )
    input_: capo_opensearch.types.delete_outbound_connection_request.DeleteOutboundConnectionRequest = {
        "connection_id": connection_id
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output