C2cIpRanges
C2c Ip Ranges resource for Zscaler Private Access V2.
This resource supports the following standard methods: create(), load(), update(), delete(). They operate on the instance state — set properties with dot notation, then call the method with no arguments. Any other action listed below is a custom action that takes explicit keyword arguments and returns a value.
Quick Start
import zssdk
from zssdk.zscore.config import Config
config = Config(api_version="v2")
import logging
# Enable debug logging for C2cIpRanges
logging.getLogger('zssdk.zpa').setLevel(logging.DEBUG)
logging.basicConfig(level=logging.DEBUG)
session = zssdk.Session(
config=config,
vanity_domain="your-vanity-domain",
client_id="your-client-id",
client_secret="your-client-secret",
)
# Get a specific C2cIpRanges
resource = session.zpa.C2cIpRanges(id="your-resource-id")
resource.load()
print(resource)
# Debug output shows HTTP request/response details
Identifiers
| Name | Type | Description |
|---|---|---|
id | string | Unique identifier |
Actions
create()
Creates a new C2cIpRanges. Set properties on the resource instance, then call create() — this method takes no arguments.
Properties for creation:
| Name | Type | Required | Description |
|---|---|---|---|
id | long | No | - |
modified_time | integer | No | - |
creation_time | integer | No | - |
modified_by | long | No | - |
is_deleted | integer | No | - |
name | string | No | - |
description | string | No | - |
ip_range_begin | string | No | - |
ip_range_end | string | No | - |
subnet_cidr | string | No | - |
latitude_in_db | string | No | - |
longitude_in_db | string | No | - |
location | string | No | - |
country_code | string | No | - |
enabled | boolean | No | - |
total_ips | integer | No | - |
used_ips | integer | No | - |
available_ips | integer | No | - |
sccm_flag | boolean | No | - |
location_hint | string | No | - |
Returns: C2cIpRanges
Example:
resource = session.zpa.C2cIpRanges()
resource.id = 3600
resource.modified_time = 3600
resource.creation_time = 3600
resource.create()
print(f"Created with ID: {resource.id}")
delete()
Deletes a C2cIpRanges by id. Only the id identifier is required; delete() takes no other arguments.
Example:
resource = session.zpa.C2cIpRanges(id="your-resource-id")
resource.delete()
get_ip_ranges_by_page()
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
customer_id | long | Yes | - |
sort_by | Sort | No | - |
filter_by | UIFilterWrapperCollection | No | - |
page_by | Pagination | No | - |
Returns: C2cIpRanges
Example:
resource = session.zpa.C2cIpRanges()
result = resource.get_ip_ranges_by_page(customer_id=3600)
print(result)
load()
Fetches an existing C2cIpRanges by id. Only the id identifier is required; load() takes no other arguments.
Returns: C2cIpRanges
Example:
resource = session.zpa.C2cIpRanges(id="your-resource-id")
resource.load()
print(resource.name)
update()
Updates an existing C2cIpRanges. Call load() first, modify properties, then call update() — this method takes no arguments.
Properties for update:
| Name | Type | Required | Description |
|---|---|---|---|
id | long | No | - |
modified_time | integer | No | - |
creation_time | integer | No | - |
modified_by | long | No | - |
is_deleted | integer | No | - |
name | string | No | - |
description | string | No | - |
ip_range_begin | string | No | - |
ip_range_end | string | No | - |
subnet_cidr | string | No | - |
latitude_in_db | string | No | - |
longitude_in_db | string | No | - |
location | string | No | - |
country_code | string | No | - |
enabled | boolean | No | - |
total_ips | integer | No | - |
used_ips | integer | No | - |
available_ips | integer | No | - |
sccm_flag | boolean | No | - |
location_hint | string | No | - |
Example:
resource = session.zpa.C2cIpRanges(id="your-resource-id")
resource.load()
resource.name = "Updated value"
resource.update()
Attributes
| Name | Type | Required | Description |
|---|---|---|---|
id | long | No | - |
modified_time | integer | No | - |
creation_time | integer | No | - |
modified_by | long | No | - |
is_deleted | integer | No | - |
customer_id | long | Yes | - |
name | string | No | - |
description | string | No | - |
ip_range_begin | string | No | - |
ip_range_end | string | No | - |
subnet_cidr | string | No | - |
latitude_in_db | string | No | - |
longitude_in_db | string | No | - |
location | string | No | - |
country_code | string | No | - |
enabled | boolean | No | - |
total_ips | integer | No | - |
used_ips | integer | No | - |
available_ips | integer | No | - |
sccm_flag | boolean | No | - |
location_hint | string | No | - |
Related
- C2cIpRanges - Data structure definition
- Logging guide - enable verbose logs while debugging this resource