Skip to content

confirm_private_virtual_interface async

confirm_private_virtual_interface(
    virtual_interface_id: VirtualInterfaceId,
    *,
    config_overrides: Optional[AsyncDirectConnectClientConfig] = None,
    virtual_gateway_id: Optional[VirtualGatewayId] = None,
    direct_connect_gateway_id: Optional[DirectConnectGatewayId] = None,
) -> ConfirmPrivateVirtualInterfaceResponse

Accepts ownership of a private virtual interface created by another Amazon Web Services account.

After the virtual interface owner makes this call, the virtual interface is created and attached to the specified virtual private gateway or Direct Connect gateway, and is made available to handle traffic.

Parameters:

Raises:

Source code in docs_src/capo_direct_connect/_services/async_direct_connect.py
async def confirm_private_virtual_interface(
    self,
    virtual_interface_id: "capo_direct_connect.types.virtual_interface_id.VirtualInterfaceId",
    *,
    config_overrides: Optional[AsyncDirectConnectClientConfig] = None,
    virtual_gateway_id: Optional[
        "capo_direct_connect.types.virtual_gateway_id.VirtualGatewayId"
    ] = None,
    direct_connect_gateway_id: Optional[
        "capo_direct_connect.types.direct_connect_gateway_id.DirectConnectGatewayId"
    ] = None,
) -> "capo_direct_connect.types.confirm_private_virtual_interface_response.ConfirmPrivateVirtualInterfaceResponse":
    """<p>Accepts ownership of a private virtual interface created by another Amazon Web Services account.</p> <p>After the virtual interface owner makes this call, the virtual interface is created and attached to the specified virtual private gateway or Direct Connect gateway, and is made available to handle traffic.</p>

    Args:
        virtual_interface_id: <p>The ID of the virtual interface.</p>
        virtual_gateway_id: <p>The ID of the virtual private gateway.</p>
        direct_connect_gateway_id: <p>The ID of the Direct Connect gateway.</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_private_virtual_interface_request.ConfirmPrivateVirtualInterfaceRequest]",
    ) -> AsyncOperationResponse[
        "capo_direct_connect.types.confirm_private_virtual_interface_response.ConfirmPrivateVirtualInterfaceResponse"
    ]:
        import capo_direct_connect._operations.overture_service.confirm_private_virtual_interface

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ConfirmPrivateVirtualInterface")
    )
    input_: capo_direct_connect.types.confirm_private_virtual_interface_request.ConfirmPrivateVirtualInterfaceRequest = {
        "virtual_interface_id": virtual_interface_id
    }
    if virtual_gateway_id is not None:
        input_["virtual_gateway_id"] = virtual_gateway_id
    if direct_connect_gateway_id is not None:
        input_["direct_connect_gateway_id"] = direct_connect_gateway_id

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