Package com.ngrok.services

# Class Tunnels

java.lang.Object
com.ngrok.services.Tunnels

public class Tunnels extends Object
Tunnels provide endpoints to access services exposed by a running ngrok agent tunnel session or an SSH reverse tunnel session. See also https://ngrok.com/docs/api#api-tunnels.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `class`
  `Tunnels.GetCallBuilder`
  A builder object encapsulating state for an unsent Get API call.
  `class`
  `Tunnels.ListCallBuilder`
  A builder object encapsulating state for an unsent List API call.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Tunnels(NgrokApiClient apiClient)`
  Creates a new sub-client for Tunnels.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Tunnels.GetCallBuilder`
  `get(String id)`
  Get the status of a tunnel by ID See also https://ngrok.com/docs/api#api-tunnels-get.
  `Tunnels.ListCallBuilder`
  `list()`
  List all online tunnels currently running on the account.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### Tunnels

    public Tunnels(NgrokApiClient apiClient)
    Creates a new sub-client for Tunnels.
    Parameters:
      `apiClient` - an instance of `NgrokApiClient`

- ## Method Details

  - ### list

    public Tunnels.ListCallBuilder list()
    List all online tunnels currently running on the account. See also https://ngrok.com/docs/api#api-tunnels-list.
    Returns:
      a call builder for this API call

  - ### get

    public Tunnels.GetCallBuilder get(String id)
    Get the status of a tunnel by ID See also https://ngrok.com/docs/api#api-tunnels-get.
    Parameters:
      `id` - a resource identifier
    Returns:
      a call builder for this API call