Skip to content

describe_tunnel

describe_tunnel(
    tunnel_id: TunnelId,
    *,
    config_overrides: Optional[IoTSecureTunnelingClientConfig] = 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/io_t_secure_tunneling.py
def describe_tunnel(
    self,
    tunnel_id: "capo_iotsecuretunneling.types.tunnel_id.TunnelId",
    *,
    config_overrides: Optional[IoTSecureTunnelingClientConfig] = 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.
    """

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

        output, http_response = (
            capo_iotsecuretunneling._operations.io_t_secured_tunneling.describe_tunnel.describe_tunnel(
                req.options, req.input
            )
        )
        return OperationResponse(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 = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output