Skip to main content

network_zones

Creates, updates, deletes, gets or lists a network_zones resource.

Overview

Namenetwork_zones
TypeResource
Idokta.zones.network_zones

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringUnique identifier for the Network Zone
namestringUnique name for this Network Zone
_linksobjectSpecifies link relations (see Web Linking) available using the JSON Hypertext Application Language specification. This object is used for dynamic discovery of related resources and lifecycle operations.
createdstring (date-time)Timestamp when the object was created
lastUpdatedstring (date-time)Timestamp when the object was last modified
statusstringNetwork Zone status
systembooleanIndicates a system Network Zone: * true for system Network Zones * false for custom Network Zones The Okta org provides the following default system Network Zones: * LegacyIpZone * BlockedIpZone * DefaultEnhancedDynamicZone * DefaultExemptIpZone Admins can modify the name of the default system Network Zone and add up to 5000 gateway or proxy IP entries.
typestringThe type of Network Zone
usagestringThe usage of the Network Zone

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_network_zonesselectsubdomainafter, limit, filterLists 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 for more information on the expressions that are used in filtering.
get_network_zoneselectsubdomainRetrieves a Network Zone by zoneId
create_network_zoneinsertsubdomain, data__name, data__typeCreates 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.
replace_network_zonereplacesubdomain, data__name, data__typeReplaces 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

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.



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.

> Note: You can't add trusted proxy IPs to this zone, delete the zone, or create additional exempt IP zones.
delete_network_zonedeletesubdomainDeletes a Network Zone by zoneId
> Notes:
> * You can't delete a Network Zone that's used by a Policy or Rule.
> * For Okta Identity Engine orgs, you can't delete a Network Zone with an ACTIVE status. <x-lifecycle class="oie"></x-lifecycle>
activate_network_zoneexecsubdomainActivates a Network Zone by zoneId
deactivate_network_zoneexecsubdomainDeactivates a Network Zone by zoneId

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
subdomainstringThe domain of your organization. This can be a provided subdomain of an official okta domain (okta.com, oktapreview.com, etc) or one of your configured custom domains. (default: my-org)
afterstring
filterstring
limitinteger (int32)

SELECT examples

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 for more information on the expressions that are used in filtering.

SELECT
id,
name,
_links,
created,
lastUpdated,
status,
system,
type,
usage
FROM okta.zones.network_zones
WHERE subdomain = '{{ subdomain }}' -- required
AND after = '{{ after }}'
AND limit = '{{ limit }}'
AND filter = '{{ filter }}'
;

INSERT examples

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.

INSERT INTO okta.zones.network_zones (
data__name,
data__status,
data__type,
data__usage,
subdomain
)
SELECT
'{{ name }}' /* required */,
'{{ status }}',
'{{ type }}' /* required */,
'{{ usage }}',
'{{ subdomain }}'
RETURNING
id,
name,
_links,
created,
lastUpdated,
status,
system,
type,
usage
;

REPLACE examples

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

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.



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.

> Note: You can't add trusted proxy IPs to this zone, delete the zone, or create additional exempt IP zones.

REPLACE okta.zones.network_zones
SET
data__name = '{{ name }}',
data__status = '{{ status }}',
data__type = '{{ type }}',
data__usage = '{{ usage }}'
WHERE
subdomain = '{{ subdomain }}' --required
AND data__name = '{{ name }}' --required
AND data__type = '{{ type }}' --required
RETURNING
id,
name,
_links,
created,
lastUpdated,
status,
system,
type,
usage
;

DELETE examples

Deletes a Network Zone by zoneId
> Notes:
> * You can't delete a Network Zone that's used by a Policy or Rule.
> * For Okta Identity Engine orgs, you can't delete a Network Zone with an ACTIVE status. <x-lifecycle class="oie"></x-lifecycle>

DELETE FROM okta.zones.network_zones
WHERE subdomain = '{{ subdomain }}' --required
;

Lifecycle Methods

Activates a Network Zone by zoneId

EXEC okta.zones.network_zones.activate_network_zone 
@subdomain='{{ subdomain }}' --required
;