Skip to content

describe_tunnel async

describe_tunnel(
    tunnel_id: TunnelId,
    *,
    config_overrides: Optional[AsyncIoTSecureTunnelingClientConfig] = None,
) -> DescribeTunnelResponse

Gets information about a tunnel identified by the unique tunnel id.

Requires permission to access the DescribeTunnel action.

Parameters:

  • tunnel_id (TunnelId) –

    The tunnel to describe.

Raises:

Source code in docs_src/capo_iotsecuretunneling/_services/async_io_t_secure_tunneling.py
async def describe_tunnel(
    self,
    tunnel_id: "capo_iotsecuretunneling.types.tunnel_id.TunnelId",
    *,
    config_overrides: Optional[AsyncIoTSecureTunnelingClientConfig] = None,
) -> (
    "capo_iotsecuretunneling.types.describe_tunnel_response.DescribeTunnelResponse"
):
    """<p>Gets information about a tunnel identified by the unique tunnel id.</p> <p>Requires permission to access the <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions">DescribeTunnel</a> action.</p>

    Args:
        tunnel_id: <p>The tunnel to describe.</p>

    Raises:
        capo_iotsecuretunneling.errors.resource_not_found_exception.ResourceNotFoundException: <p>Thrown when an operation is attempted on a resource that does not exist.</p>
        capo_iotsecuretunneling.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_iotsecuretunneling.types.describe_tunnel_request.DescribeTunnelRequest]",
    ) -> AsyncOperationResponse[
        "capo_iotsecuretunneling.types.describe_tunnel_response.DescribeTunnelResponse"
    ]:
        import capo_iotsecuretunneling._operations.io_t_secured_tunneling.describe_tunnel

        (
            output,
            http_response,
        ) = await capo_iotsecuretunneling._operations.io_t_secured_tunneling.describe_tunnel.async_describe_tunnel(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeTunnel")
    )
    input_: capo_iotsecuretunneling.types.describe_tunnel_request.DescribeTunnelRequest = {
        "tunnel_id": tunnel_id
    }

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