All URIs are relative to https://subdomain.okta.com
Method | HTTP request | Description |
---|---|---|
ActivateNetworkZone | POST /api/v1/zones/{zoneId}/lifecycle/activate | Activate a Network Zone |
CreateNetworkZone | POST /api/v1/zones | Create a Network Zone |
DeactivateNetworkZone | POST /api/v1/zones/{zoneId}/lifecycle/deactivate | Deactivate a Network Zone |
DeleteNetworkZone | DELETE /api/v1/zones/{zoneId} | Delete a Network Zone |
GetNetworkZone | GET /api/v1/zones/{zoneId} | Retrieve a Network Zone |
ListNetworkZones | GET /api/v1/zones | List all Network Zones |
ReplaceNetworkZone | PUT /api/v1/zones/{zoneId} | Replace a Network Zone |
NetworkZone ActivateNetworkZone (string zoneId)
Activate a Network Zone
Activates a Network Zone by zoneId
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class ActivateNetworkZoneExample
{
public static void Main()
{
Configuration config = new Configuration();
config.OktaDomain = "https://subdomain.okta.com";
// Configure API key authorization: apiToken
config.Token ="YOUR_API_KEY";
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new NetworkZoneApi(config);
var zoneId = nzowc1U5Jh5xuAK0o0g3; // string | `id` of the Network Zone
try
{
// Activate a Network Zone
NetworkZone result = apiInstance.ActivateNetworkZone(zoneId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling NetworkZoneApi.ActivateNetworkZone: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
zoneId | string | `id` of the Network Zone |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Success | - |
403 | Forbidden | - |
404 | Not Found | - |
429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
NetworkZone 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
.
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class CreateNetworkZoneExample
{
public static void Main()
{
Configuration config = new Configuration();
config.OktaDomain = "https://subdomain.okta.com";
// Configure API key authorization: apiToken
config.Token ="YOUR_API_KEY";
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new NetworkZoneApi(config);
var zone = new NetworkZone(); // NetworkZone |
try
{
// Create a Network Zone
NetworkZone result = apiInstance.CreateNetworkZone(zone);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling NetworkZoneApi.CreateNetworkZone: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
zone | NetworkZone |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Success | - |
400 | Bad Request | - |
403 | Forbidden | - |
429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
NetworkZone DeactivateNetworkZone (string zoneId)
Deactivate a Network Zone
Deactivates a Network Zone by zoneId
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class DeactivateNetworkZoneExample
{
public static void Main()
{
Configuration config = new Configuration();
config.OktaDomain = "https://subdomain.okta.com";
// Configure API key authorization: apiToken
config.Token ="YOUR_API_KEY";
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new NetworkZoneApi(config);
var zoneId = nzowc1U5Jh5xuAK0o0g3; // string | `id` of the Network Zone
try
{
// Deactivate a Network Zone
NetworkZone result = apiInstance.DeactivateNetworkZone(zoneId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling NetworkZoneApi.DeactivateNetworkZone: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
zoneId | string | `id` of the Network Zone |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Success | - |
403 | Forbidden | - |
404 | Not Found | - |
429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void DeleteNetworkZone (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 or Rule. > * For Okta Identity Engine orgs, you can't delete a Network Zone with an ACTIVE status
. <x-lifecycle class="oie">
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class DeleteNetworkZoneExample
{
public static void Main()
{
Configuration config = new Configuration();
config.OktaDomain = "https://subdomain.okta.com";
// Configure API key authorization: apiToken
config.Token ="YOUR_API_KEY";
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new NetworkZoneApi(config);
var zoneId = nzowc1U5Jh5xuAK0o0g3; // string | `id` of the Network Zone
try
{
// Delete a Network Zone
apiInstance.DeleteNetworkZone(zoneId);
}
catch (ApiException e)
{
Debug.Print("Exception when calling NetworkZoneApi.DeleteNetworkZone: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
zoneId | string | `id` of the Network Zone |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | No Content | - |
403 | Forbidden | - |
404 | Not Found | - |
429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
NetworkZone GetNetworkZone (string zoneId)
Retrieve a Network Zone
Retrieves a Network Zone by zoneId
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class GetNetworkZoneExample
{
public static void Main()
{
Configuration config = new Configuration();
config.OktaDomain = "https://subdomain.okta.com";
// Configure API key authorization: apiToken
config.Token ="YOUR_API_KEY";
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new NetworkZoneApi(config);
var zoneId = nzowc1U5Jh5xuAK0o0g3; // string | `id` of the Network Zone
try
{
// Retrieve a Network Zone
NetworkZone result = apiInstance.GetNetworkZone(zoneId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling NetworkZoneApi.GetNetworkZone: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
zoneId | string | `id` of the Network Zone |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Success | - |
403 | Forbidden | - |
404 | Not Found | - |
429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List<NetworkZone> ListNetworkZones (string after = null, int? limit = null, string filter = null)
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
and usage
properties. See Filtering for more information on the expressions that are used in filtering.
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class ListNetworkZonesExample
{
public static void Main()
{
Configuration config = new Configuration();
config.OktaDomain = "https://subdomain.okta.com";
// Configure API key authorization: apiToken
config.Token ="YOUR_API_KEY";
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new NetworkZoneApi(config);
var after = BlockedIpZones; // string | (optional)
var limit = 5; // int? | (optional) (default to -1)
var filter = id eq "nzowc1U5Jh5xuAK0o0g3"; // string | (optional)
try
{
// List all Network Zones
List<NetworkZone> result = apiInstance.ListNetworkZones(after, limit, filter).ToListAsync();
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling NetworkZoneApi.ListNetworkZones: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
after | string | [optional] | |
limit | int? | [optional] [default to -1] | |
filter | string | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Success | - |
403 | Forbidden | - |
429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
NetworkZone ReplaceNetworkZone (string zoneId, NetworkZone zone)
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.
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class ReplaceNetworkZoneExample
{
public static void Main()
{
Configuration config = new Configuration();
config.OktaDomain = "https://subdomain.okta.com";
// Configure API key authorization: apiToken
config.Token ="YOUR_API_KEY";
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new NetworkZoneApi(config);
var zoneId = nzowc1U5Jh5xuAK0o0g3; // string | `id` of the Network Zone
var zone = new NetworkZone(); // NetworkZone |
try
{
// Replace a Network Zone
NetworkZone result = apiInstance.ReplaceNetworkZone(zoneId, zone);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling NetworkZoneApi.ReplaceNetworkZone: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
zoneId | string | `id` of the Network Zone | |
zone | NetworkZone |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Success | - |
400 | Bad Request | - |
403 | Forbidden | - |
404 | Not Found | - |
429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]