Package com.ngrok.services

# Class IpRestrictions

java.lang.Object
com.ngrok.services.IpRestrictions

public class IpRestrictions extends Object
An IP restriction is a restriction placed on the CIDRs that are allowed to initiate traffic to a specific aspect of your ngrok account. An IP restriction has a type which defines the ingress it applies to. IP restrictions can be used to enforce the source IPs that can make API requests, log in to the dashboard, start ngrok agents, and connect to your public-facing endpoints. See also https://ngrok.com/docs/api#api-ip-restrictions.

- ## Nested Class Summary

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

- ## Constructor Summary

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

- ## Method Summary

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

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

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

- ## Constructor Details

  - ### IpRestrictions

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

- ## Method Details

  - ### create

    public IpRestrictions.CreateCallBuilder create(String type, List<String> ipPolicyIds)
    Create a new IP restriction See also https://ngrok.com/docs/api#api-ip-restrictions-create.
    Parameters:
      `type` - the type of IP restriction. this defines what traffic will be restricted with the attached policies. four values are currently supported: `dashboard`, `api`, `agent`, and `endpoints`
      `ipPolicyIds` - the set of IP policy identifiers that are used to enforce the restriction
    Returns:
      a call builder for this API call

  - ### delete

    public IpRestrictions.DeleteCallBuilder delete(String id)
    Delete an IP restriction See also https://ngrok.com/docs/api#api-ip-restrictions-delete.
    Parameters:
      `id` - a resource identifier
    Returns:
      a call builder for this API call

  - ### get

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

  - ### list

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

  - ### update

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