Skip to content

confirm_connection async

confirm_connection(
    connection_id: ConnectionId,
    *,
    config_overrides: Optional[AsyncDirectConnectClientConfig] = None,
) -> ConfirmConnectionResponse

Confirms the creation of the specified hosted connection on an interconnect.

Upon creation, the hosted connection is initially in the Ordering state, and remains in this state until the owner confirms creation of the hosted connection.

Parameters:

  • connection_id (ConnectionId) –

    The ID of the hosted connection.

Raises:

Source code in docs_src/capo_direct_connect/_services/async_direct_connect.py
async def confirm_connection(
    self,
    connection_id: "capo_direct_connect.types.connection_id.ConnectionId",
    *,
    config_overrides: Optional[AsyncDirectConnectClientConfig] = None,
) -> "capo_direct_connect.types.confirm_connection_response.ConfirmConnectionResponse":
    """<p>Confirms the creation of the specified hosted connection on an interconnect.</p> <p>Upon creation, the hosted connection is initially in the <code>Ordering</code> state, and remains in this state until the owner confirms creation of the hosted connection.</p>

    Args:
        connection_id: <p>The ID of the hosted connection.</p>

    Raises:
        capo_direct_connect.errors.direct_connect_client_exception.DirectConnectClientException: <p>One or more parameters are not valid.</p>
        capo_direct_connect.errors.direct_connect_server_exception.DirectConnectServerException: <p>A server-side error occurred.</p>
        capo_direct_connect.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_direct_connect.types.confirm_connection_request.ConfirmConnectionRequest]",
    ) -> AsyncOperationResponse[
        "capo_direct_connect.types.confirm_connection_response.ConfirmConnectionResponse"
    ]:
        import capo_direct_connect._operations.overture_service.confirm_connection

        (
            output,
            http_response,
        ) = await capo_direct_connect._operations.overture_service.confirm_connection.async_confirm_connection(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ConfirmConnection")
    )
    input_: capo_direct_connect.types.confirm_connection_request.ConfirmConnectionRequest = {
        "connection_id": connection_id
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output