Package com.ngrok.services

# Class IpPolicyRules

java.lang.Object
com.ngrok.services.IpPolicyRules

public class IpPolicyRules extends Object
IP Policy Rules are the IPv4 or IPv6 CIDRs entries that make up an IP Policy. See also https://ngrok.com/docs/api#api-ip-policy-rules.

- ## Nested Class Summary

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

- ## Constructor Summary

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

- ## Method Summary

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

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

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

- ## Constructor Details

  - ### IpPolicyRules

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

- ## Method Details

  - ### create

    public IpPolicyRules.CreateCallBuilder create(String cidr, String ipPolicyId, String action)
    Create a new IP policy rule attached to an IP Policy. See also https://ngrok.com/docs/api#api-ip-policy-rules-create.
    Parameters:
      `cidr` - an IP or IP range specified in CIDR notation. IPv4 and IPv6 are both supported.
      `ipPolicyId` - ID of the IP policy this IP policy rule will be attached to
      `action` - the action to apply to the policy rule, either `allow` or `deny`
    Returns:
      a call builder for this API call

  - ### delete

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

  - ### get

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

  - ### list

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

  - ### update

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