Package com.ngrok.services

# Class IpPolicies

java.lang.Object
com.ngrok.services.IpPolicies

public class IpPolicies extends Object
IP Policies are reusable groups of CIDR ranges with an `allow` or `deny` action. They can be attached to endpoints via the Endpoint Configuration IP Policy module. They can also be used with IP Restrictions to control source IP ranges that can start tunnel sessions and connect to the API and dashboard. See also https://ngrok.com/docs/api#api-ip-policies.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `class`
  `IpPolicies.CreateCallBuilder`
  A builder object encapsulating state for an unsent Create API call.
  `class`
  `IpPolicies.DeleteCallBuilder`
  A builder object encapsulating state for an unsent Delete API call.
  `class`
  `IpPolicies.GetCallBuilder`
  A builder object encapsulating state for an unsent Get API call.
  `class`
  `IpPolicies.ListCallBuilder`
  A builder object encapsulating state for an unsent List API call.
  `class`
  `IpPolicies.UpdateCallBuilder`
  A builder object encapsulating state for an unsent Update API call.

- ## Constructor Summary

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

- ## Method Summary

  Modifier and Type
  Method
  Description
  `IpPolicies.CreateCallBuilder`
  `create()`
  Create a new IP policy.
  `IpPolicies.DeleteCallBuilder`
  `delete(String id)`
  Delete an IP policy.
  `IpPolicies.GetCallBuilder`
  `get(String id)`
  Get detailed information about an IP policy by ID.
  `IpPolicies.ListCallBuilder`
  `list()`
  List all IP policies on this account See also https://ngrok.com/docs/api#api-ip-policies-list.
  `IpPolicies.UpdateCallBuilder`
  `update(String id)`
  Update attributes of an IP policy by ID See also https://ngrok.com/docs/api#api-ip-policies-update.

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

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

- ## Constructor Details

  - ### IpPolicies

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

- ## Method Details

  - ### create

    public IpPolicies.CreateCallBuilder create()
    Create a new IP policy. It will not apply to any traffic until you associate to a traffic source via an endpoint configuration or IP restriction. See also https://ngrok.com/docs/api#api-ip-policies-create.
    Returns:
      a call builder for this API call

  - ### delete

    public IpPolicies.DeleteCallBuilder delete(String id)
    Delete an IP policy. If the IP policy is referenced by another object for the purposes of traffic restriction it will be treated as if the IP policy remains but has zero rules. See also https://ngrok.com/docs/api#api-ip-policies-delete.
    Parameters:
      `id` - a resource identifier
    Returns:
      a call builder for this API call

  - ### get

    public IpPolicies.GetCallBuilder get(String id)
    Get detailed information about an IP policy by ID. See also https://ngrok.com/docs/api#api-ip-policies-get.
    Parameters:
      `id` - a resource identifier
    Returns:
      a call builder for this API call

  - ### list

    public IpPolicies.ListCallBuilder list()
    List all IP policies on this account See also https://ngrok.com/docs/api#api-ip-policies-list.
    Returns:
      a call builder for this API call

  - ### update

    public IpPolicies.UpdateCallBuilder update(String id)
    Update attributes of an IP policy by ID See also https://ngrok.com/docs/api#api-ip-policies-update.
    Parameters:
      `id` - the value of the `id` parameter as a `String`
    Returns:
      a call builder for this API call