Package com.okta.sdk.resource.api
Class NetworkZoneApi
java.lang.Object
com.okta.sdk.resource.api.NetworkZoneApi
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
date="2026-03-13T17:36:05.533634+05:30[Asia/Kolkata]",
comments="Generator version: 7.15.0")
public class NetworkZoneApi
extends Object
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionactivateNetworkZone(String zoneId) Activate a network zone Activates a Network Zone by `zoneId`activateNetworkZone(String zoneId, Map<String, String> additionalHeaders) Activate a network zone Activates a Network Zone by `zoneId`createNetworkZone(NetworkZone zone) Create a network zone Creates a Network Zone * For an IP Network Zone, you must define either `gateways` or `proxies`. * For a Dynamic Network Zone, you must define at least one of the following: `asns`, `locations`, or `proxyType`. * For an Enhanced Dynamic Network Zone, you must define at least one of the following: `asns`, `locations`, or `ipServiceCategories`.createNetworkZone(NetworkZone zone, Map<String, String> additionalHeaders) Create a network zone Creates a Network Zone * For an IP Network Zone, you must define either `gateways` or `proxies`. * For a Dynamic Network Zone, you must define at least one of the following: `asns`, `locations`, or `proxyType`. * For an Enhanced Dynamic Network Zone, you must define at least one of the following: `asns`, `locations`, or `ipServiceCategories`.deactivateNetworkZone(String zoneId) Deactivate a network zone Deactivates a Network Zone by `zoneId`deactivateNetworkZone(String zoneId, Map<String, String> additionalHeaders) Deactivate a network zone Deactivates a Network Zone by `zoneId`voiddeleteNetworkZone(String zoneId) Delete a network zone Deletes a Network Zone by `zoneId` > **Notes:** > * You can't delete a Network Zone that's used by a [Policy](https://developer.okta.com/docs/api/openapi/okta-management/management/tag/Policy/) or [Rule](https://developer.okta.com/docs/api/openapi/okta-management/management/tag/Policy/#tag/Policy/operation/listPolicyRules).voiddeleteNetworkZone(String zoneId, Map<String, String> additionalHeaders) Delete a network zone Deletes a Network Zone by `zoneId` > **Notes:** > * You can't delete a Network Zone that's used by a [Policy](https://developer.okta.com/docs/api/openapi/okta-management/management/tag/Policy/) or [Rule](https://developer.okta.com/docs/api/openapi/okta-management/management/tag/Policy/#tag/Policy/operation/listPolicyRules).getNetworkZone(String zoneId) Retrieve a network zone Retrieves a Network Zone by `zoneId`getNetworkZone(String zoneId, Map<String, String> additionalHeaders) Retrieve a network zone Retrieves a Network Zone by `zoneId`protected static com.fasterxml.jackson.databind.ObjectMapperlistNetworkZones(String after, Integer limit, String filter) List all network zones Lists all Network Zones with pagination.List all network zones Lists all Network Zones with pagination.listNetworkZonesPaged(String after, Integer limit, String filter) List all network zones (Paginated) Lists all Network Zones with pagination.listNetworkZonesPaged(String after, Integer limit, String filter, Map<String, String> additionalHeaders) List all network zones (Paginated with additional headers) Lists all Network Zones with pagination.replaceNetworkZone(String zoneId, NetworkZone zone) Replace a network zone Replaces a Network Zone by `zoneId`.replaceNetworkZone(String zoneId, NetworkZone zone, Map<String, String> additionalHeaders) Replace a network zone Replaces a Network Zone by `zoneId`.voidsetApiClient(ApiClient apiClient)
-
Constructor Details
-
NetworkZoneApi
public NetworkZoneApi() -
NetworkZoneApi
-
-
Method Details
-
getApiClient
-
setApiClient
-
activateNetworkZone
Activate a network zone Activates a Network Zone by `zoneId`- Parameters:
zoneId- `id` of the Network Zone (required)- Returns:
- NetworkZone
- Throws:
ApiException- if fails to make API call
-
activateNetworkZone
public NetworkZone activateNetworkZone(String zoneId, Map<String, String> additionalHeaders) throws ApiExceptionActivate a network zone Activates a Network Zone by `zoneId`- Parameters:
zoneId- `id` of the Network Zone (required)additionalHeaders- additionalHeaders for this call- Returns:
- NetworkZone
- Throws:
ApiException- if fails to make API call
-
createNetworkZone
Create a network zone Creates a Network Zone * For an IP Network Zone, you must define either `gateways` or `proxies`. * For a Dynamic Network Zone, you must define at least one of the following: `asns`, `locations`, or `proxyType`. * For an Enhanced Dynamic Network Zone, you must define at least one of the following: `asns`, `locations`, or `ipServiceCategories`. > **Note:** To view all properties for an Enhanced Dynamic Network Zone, select `DYNAMIC_V2` from the `type` dropdown list.- Parameters:
zone- (required)- Returns:
- NetworkZone
- Throws:
ApiException- if fails to make API call
-
createNetworkZone
public NetworkZone createNetworkZone(NetworkZone zone, Map<String, String> additionalHeaders) throws ApiExceptionCreate a network zone Creates a Network Zone * For an IP Network Zone, you must define either `gateways` or `proxies`. * For a Dynamic Network Zone, you must define at least one of the following: `asns`, `locations`, or `proxyType`. * For an Enhanced Dynamic Network Zone, you must define at least one of the following: `asns`, `locations`, or `ipServiceCategories`. > **Note:** To view all properties for an Enhanced Dynamic Network Zone, select `DYNAMIC_V2` from the `type` dropdown list.- Parameters:
zone- (required)additionalHeaders- additionalHeaders for this call- Returns:
- NetworkZone
- Throws:
ApiException- if fails to make API call
-
deactivateNetworkZone
Deactivate a network zone Deactivates a Network Zone by `zoneId`- Parameters:
zoneId- `id` of the Network Zone (required)- Returns:
- NetworkZone
- Throws:
ApiException- if fails to make API call
-
deactivateNetworkZone
public NetworkZone deactivateNetworkZone(String zoneId, Map<String, String> additionalHeaders) throws ApiExceptionDeactivate a network zone Deactivates a Network Zone by `zoneId`- Parameters:
zoneId- `id` of the Network Zone (required)additionalHeaders- additionalHeaders for this call- Returns:
- NetworkZone
- Throws:
ApiException- if fails to make API call
-
deleteNetworkZone
Delete a network zone Deletes a Network Zone by `zoneId` > **Notes:** > * You can't delete a Network Zone that's used by a [Policy](https://developer.okta.com/docs/api/openapi/okta-management/management/tag/Policy/) or [Rule](https://developer.okta.com/docs/api/openapi/okta-management/management/tag/Policy/#tag/Policy/operation/listPolicyRules). > * For Okta Identity Engine orgs, you can't delete a Network Zone with an ACTIVE `status`. <x-lifecycle class=\"oie\"></x-lifecycle>- Parameters:
zoneId- `id` of the Network Zone (required)- Throws:
ApiException- if fails to make API call
-
deleteNetworkZone
public void deleteNetworkZone(String zoneId, Map<String, String> additionalHeaders) throws ApiExceptionDelete a network zone Deletes a Network Zone by `zoneId` > **Notes:** > * You can't delete a Network Zone that's used by a [Policy](https://developer.okta.com/docs/api/openapi/okta-management/management/tag/Policy/) or [Rule](https://developer.okta.com/docs/api/openapi/okta-management/management/tag/Policy/#tag/Policy/operation/listPolicyRules). > * For Okta Identity Engine orgs, you can't delete a Network Zone with an ACTIVE `status`. <x-lifecycle class=\"oie\"></x-lifecycle>- Parameters:
zoneId- `id` of the Network Zone (required)additionalHeaders- additionalHeaders for this call- Throws:
ApiException- if fails to make API call
-
getNetworkZone
Retrieve a network zone Retrieves a Network Zone by `zoneId`- Parameters:
zoneId- `id` of the Network Zone (required)- Returns:
- NetworkZone
- Throws:
ApiException- if fails to make API call
-
getNetworkZone
public NetworkZone getNetworkZone(String zoneId, Map<String, String> additionalHeaders) throws ApiExceptionRetrieve a network zone Retrieves a Network Zone by `zoneId`- Parameters:
zoneId- `id` of the Network Zone (required)additionalHeaders- additionalHeaders for this call- Returns:
- NetworkZone
- Throws:
ApiException- if fails to make API call
-
listNetworkZones
public List<NetworkZone> listNetworkZones(String after, Integer limit, String filter) throws ApiException List all network zones Lists all Network Zones with pagination. A subset of zones can be returned that match a supported filter expression or query. This operation requires URL encoding. For example, `filter=(id eq \"nzoul0wf9jyb8xwZm0g3\" or id eq \"nzoul1MxmGN18NDQT0g3\")` is encoded as `filter=%28id+eq+%22nzoul0wf9jyb8xwZm0g3%22+or+id+eq+%22nzoul1MxmGN18NDQT0g3%22%29`. Okta supports filtering on the `id`, `usage`, and `system` properties. See [Filter](https://developer.okta.com/docs/api/#filter) for more information on the expressions that are used in filtering.- Parameters:
after- (optional)limit- (optional, default to -1)filter- (optional)- Returns:
- List<NetworkZone>
- Throws:
ApiException- if fails to make API call
-
listNetworkZones
public List<NetworkZone> listNetworkZones(String after, Integer limit, String filter, Map<String, String> additionalHeaders) throws ApiExceptionList all network zones Lists all Network Zones with pagination. A subset of zones can be returned that match a supported filter expression or query. This operation requires URL encoding. For example, `filter=(id eq \"nzoul0wf9jyb8xwZm0g3\" or id eq \"nzoul1MxmGN18NDQT0g3\")` is encoded as `filter=%28id+eq+%22nzoul0wf9jyb8xwZm0g3%22+or+id+eq+%22nzoul1MxmGN18NDQT0g3%22%29`. Okta supports filtering on the `id`, `usage`, and `system` properties. See [Filter](https://developer.okta.com/docs/api/#filter) for more information on the expressions that are used in filtering.- Parameters:
after- (optional)limit- (optional, default to -1)filter- (optional)additionalHeaders- additionalHeaders for this call- Returns:
- List<NetworkZone>
- Throws:
ApiException- if fails to make API call
-
listNetworkZonesPaged
List all network zones (Paginated) Lists all Network Zones with pagination. A subset of zones can be returned that match a supported filter expression or query. This operation requires URL encoding. For example, `filter=(id eq \"nzoul0wf9jyb8xwZm0g3\" or id eq \"nzoul1MxmGN18NDQT0g3\")` is encoded as `filter=%28id+eq+%22nzoul0wf9jyb8xwZm0g3%22+or+id+eq+%22nzoul1MxmGN18NDQT0g3%22%29`. Okta supports filtering on the `id`, `usage`, and `system` properties. See [Filter](https://developer.okta.com/docs/api/#filter) for more information on the expressions that are used in filtering. This method returns a lazy, paginated iterable that automatically handles pagination. It is thread-safe and does not cause memory leaks. Use this method in a for-each loop to automatically fetch all pages without manual cursor management.- Parameters:
after- (optional)limit- (optional, default to -1)filter- (optional)- Returns:
- Iterable<NetworkZone> lazy iterable over all pages
-
listNetworkZonesPaged
public Iterable<NetworkZone> listNetworkZonesPaged(String after, Integer limit, String filter, Map<String, String> additionalHeaders) List all network zones (Paginated with additional headers) Lists all Network Zones with pagination. A subset of zones can be returned that match a supported filter expression or query. This operation requires URL encoding. For example, `filter=(id eq \"nzoul0wf9jyb8xwZm0g3\" or id eq \"nzoul1MxmGN18NDQT0g3\")` is encoded as `filter=%28id+eq+%22nzoul0wf9jyb8xwZm0g3%22+or+id+eq+%22nzoul1MxmGN18NDQT0g3%22%29`. Okta supports filtering on the `id`, `usage`, and `system` properties. See [Filter](https://developer.okta.com/docs/api/#filter) for more information on the expressions that are used in filtering. This method returns a lazy, paginated iterable that automatically handles pagination. It is thread-safe and does not cause memory leaks.- Parameters:
after- (optional)limit- (optional, default to -1)filter- (optional)additionalHeaders- additional headers for this call- Returns:
- Iterable<NetworkZone> lazy iterable over all pages
-
replaceNetworkZone
Replace a network zone Replaces a Network Zone by `zoneId`. The replaced Network Zone type must be the same as the existing type. You can replace the usage (`POLICY`, `BLOCKLIST`) of a Network Zone by updating the `usage` attribute. **IP exempt zone**<br> If you have the IP exempt zone feature enabled, you can allow traffic from specific gateway IPs irrespective of Okta ThreatInsight configurations, blocked network zones, or IP change events within Identity Threat Protection with Okta AI.<br> <br> When you enable this feature, Okta creates a zone called `DefaultExemptIpZone`. Gateway IPs that you add to this zone always have access to Okta resources. See [IP exempt zone](https://help.okta.com/okta_help.htm?type=oie&id=csh-about-ip-exempt-zone). > **Note:** You can't add trusted proxy IPs to this zone, delete the zone, or create additional exempt IP zones.- Parameters:
zoneId- `id` of the Network Zone (required)zone- (required)- Returns:
- NetworkZone
- Throws:
ApiException- if fails to make API call
-
replaceNetworkZone
public NetworkZone replaceNetworkZone(String zoneId, NetworkZone zone, Map<String, String> additionalHeaders) throws ApiExceptionReplace a network zone Replaces a Network Zone by `zoneId`. The replaced Network Zone type must be the same as the existing type. You can replace the usage (`POLICY`, `BLOCKLIST`) of a Network Zone by updating the `usage` attribute. **IP exempt zone**<br> If you have the IP exempt zone feature enabled, you can allow traffic from specific gateway IPs irrespective of Okta ThreatInsight configurations, blocked network zones, or IP change events within Identity Threat Protection with Okta AI.<br> <br> When you enable this feature, Okta creates a zone called `DefaultExemptIpZone`. Gateway IPs that you add to this zone always have access to Okta resources. See [IP exempt zone](https://help.okta.com/okta_help.htm?type=oie&id=csh-about-ip-exempt-zone). > **Note:** You can't add trusted proxy IPs to this zone, delete the zone, or create additional exempt IP zones.- Parameters:
zoneId- `id` of the Network Zone (required)zone- (required)additionalHeaders- additionalHeaders for this call- Returns:
- NetworkZone
- Throws:
ApiException- if fails to make API call
-
getObjectMapper
protected static com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
-