Skip to main content

C2cIpRanges

C2c Ip Ranges resource for Private Access.

Resource operations

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
import logging

# Enable debug logging for C2cIpRanges
logging.getLogger('zssdk.zpa').setLevel(logging.DEBUG)
logging.basicConfig(level=logging.DEBUG)

session = zssdk.Session(
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​

NameTypeDescription
idstringUnique identifier

Actions​

create()​

Creates a new C2cIpRanges. Set properties on the resource instance, then call create() — this method takes no arguments.

Properties for creation:

NameTypeRequiredDescription
customer_idlongYes-
idlongNo-
modified_timeintegerNo-
creation_timeintegerNo-
modified_bylongNo-
is_deletedintegerNo-
namestringNo-
descriptionstringNo-
ip_range_beginstringNo-
ip_range_endstringNo-
subnet_cidrstringNo-
latitude_in_dbstringNo-
longitude_in_dbstringNo-
locationstringNo-
country_codestringNo-
enabledbooleanNo-
total_ipsintegerNo-
used_ipsintegerNo-
available_ipsintegerNo-
sccm_flagbooleanNo-
location_hintstringNo-

Returns: C2cIpRanges

Example:

resource = session.zpa.C2cIpRanges()
resource.customer_id = 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:

NameTypeRequiredDescription
customer_idlongYes-
sort_bySortNo-
filter_byUIFilterWrapperCollectionNo-
page_byPaginationNo-

Returns: C2cIpRanges

Example:

resource = session.zpa.C2cIpRanges()
result = resource.get_ip_ranges_by_page(customer_id=3600)
print(result)

get_SSO_login()​

Parameters:

NameTypeRequiredDescription
customer_idlongYes-

Returns: SSOLoginResource

Example:

resource = session.zpa.C2cIpRanges()
result = resource.get_SSO_login(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:

NameTypeRequiredDescription
customer_idlongYes-
idlongNo-
modified_timeintegerNo-
creation_timeintegerNo-
modified_bylongNo-
is_deletedintegerNo-
namestringNo-
descriptionstringNo-
ip_range_beginstringNo-
ip_range_endstringNo-
subnet_cidrstringNo-
latitude_in_dbstringNo-
longitude_in_dbstringNo-
locationstringNo-
country_codestringNo-
enabledbooleanNo-
total_ipsintegerNo-
used_ipsintegerNo-
available_ipsintegerNo-
sccm_flagbooleanNo-
location_hintstringNo-

Example:

resource = session.zpa.C2cIpRanges(id="your-resource-id")
resource.load()
resource.name = "Updated value"
resource.update()

update_SSO_login()​

Parameters:

NameTypeRequiredDescription
customer_idlongNo-
ssologinonlybooleanYes-

Example:

resource = session.zpa.C2cIpRanges()
result = resource.update_SSO_login(ssologinonly=True)
print(result)

add_or_update_customer_domains_for_association_type()​

Parameters:

NameTypeRequiredDescription
customer_idlongYes-
typestringYes-
microtenant_idlongNo-
bodyMgmtconfigV1AdminCustomersCustomerIdV2AddOrUpdateCustomerDomainsForAssociationTypeRequestBodyYes-

Example:

resource = session.zpa.C2cIpRanges()
result = resource.add_or_update_customer_domains_for_association_type(customer_id=3600, type="value", body=[{"id": 3600, "modified_time": 3600, "creation_time": 3600, "modified_by": 3600}])
print(result)

Attributes​

NameTypeRequiredDescription
idlongNo-
modified_timeintegerNo-
creation_timeintegerNo-
modified_bylongNo-
is_deletedintegerNo-
customer_idlongYes-
namestringNo-
descriptionstringNo-
ip_range_beginstringNo-
ip_range_endstringNo-
subnet_cidrstringNo-
latitude_in_dbstringNo-
longitude_in_dbstringNo-
locationstringNo-
country_codestringNo-
enabledbooleanNo-
total_ipsintegerNo-
used_ipsintegerNo-
available_ipsintegerNo-
sccm_flagbooleanNo-
location_hintstringNo-