Skip to main content

Location

Location resource for Zscaler Internet 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 Location
logging.getLogger('zssdk.zia').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 Location
resource = session.zia.Location(id="your-resource-id")
resource.load()
print(resource)

# Debug output shows HTTP request/response details

Identifiers​

NameTypeDescription
idstringUnique identifier

Actions​

bulk_delete_locations()​

Parameters:

NameTypeRequiredDescription
idsint32CollectionNo-

Example:

resource = session.zia.Location()
result = resource.bulk_delete_locations()
print(result)

create()​

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

Properties for creation:

NameTypeRequiredDescription
aup_block_internet_until_acceptedbooleanNo-
aup_enabledbooleanNo-
aup_force_ssl_inspectionbooleanNo-
aup_timeout_in_daysintegerNo-
auth_requiredbooleanNo-
authentication_profileEntityReferenceNo-
basic_auth_enabledbooleanNo-
bc_locationbooleanNo-
caution_enabledbooleanNo-
cc_locationbooleanNo-
child_countintegerNo-
cityEntityReferenceNo-
city_geo_idintegerNo-
cookies_and_proxybooleanNo-
countrystringNo-
default_extranet_dnsbooleanNo-
default_extranet_ts_poolbooleanNo-
descriptionstringNo-
digest_auth_enabledbooleanNo-
display_time_unitstringNo-
dn_bandwidthintegerNo-
dynamiclocation_groupsEntityReferenceWrapperCollectionNo-
ec_locationbooleanNo-
exclude_from_dynamic_groupsbooleanNo-
exclude_from_manual_groupsbooleanNo-
extranetEntityReferenceNo-
extranet_dnsEntityReferenceNo-
extranet_ip_poolEntityReferenceNo-
geo_overridebooleanNo-
idintegerNo-
idle_time_in_minutesintegerNo-
iot_discovery_enabledbooleanNo-
iot_enforce_policy_setbooleanNo-
ip_addressesstringCollectionNo-
ips_controlbooleanNo-
ipv6_dns64_prefixEntityReferenceNo-
ipv6_enabledbooleanNo-
jwt_authbooleanNo-
kerberos_authbooleanNo-
languagestringNo-
latitudeintegerNo-
longitudeintegerNo-
managed_byEntityReferenceNo-
match_in_childbooleanNo-
multi_tenant_vpn_credentialVpnCredentialNo-
namestringNo-
non_editablebooleanNo-
ofw_enabledbooleanNo-
other6_sub_locationbooleanNo-
other_sub_locationbooleanNo-
override_dn_bandwidthintegerNo-
override_up_bandwidthintegerNo-
parent_idintegerNo-
portsint32CollectionNo-
profilestringNo-
shared_down_bandwidthintegerNo-
shared_up_bandwidthintegerNo-
ssl_scan_enabledbooleanNo-
statestringNo-
static_location_groupsEntityReferenceWrapperCollectionNo-
sub_loc_acc_idsstringCollectionNo-
sub_loc_scopestringNo-
sub_loc_scope_enabledbooleanNo-
sub_loc_scope_valuesstringCollectionNo-
surrogate_IPbooleanNo-
surrogate_IP_enforced_for_known_browsersbooleanNo-
surrogate_refresh_time_in_minutesintegerNo-
surrogate_refresh_time_unitstringNo-
traffic_fwd_attributesintegerNo-
tzstringNo-
unused_dn_bandwidthintegerNo-
unused_up_bandwidthintegerNo-
up_bandwidthintegerNo-
virtual_zen_clustersEntityReferenceWrapperCollectionNo-
virtual_zensEntityReferenceWrapperCollectionNo-
vpn_credentialsVpnCredentialWrapperCollectionNo-
xff_forward_enabledbooleanNo-
zapp_ssl_scan_enabledbooleanNo-

Returns: Location

Example:

resource = session.zia.Location()
resource.aup_block_internet_until_accepted = True
resource.aup_enabled = True
resource.aup_force_ssl_inspection = True
resource.create()
print(f"Created with ID: {resource.id}")

delete()​

Deletes a Location by id. Only the id identifier is required; delete() takes no other arguments.

Example:

resource = session.zia.Location(id="your-resource-id")
resource.delete()

get_location_lite()​

Returns: Location

Example:

resource = session.zia.Location(id="your-resource-id")
result = resource.get_location_lite()
print(result)

load()​

Fetches an existing Location by id. Only the id identifier is required; load() takes no other arguments.

Returns: Location

Example:

resource = session.zia.Location(id="your-resource-id")
resource.load()
print(resource.name)

update()​

Updates an existing Location. Call load() first, modify properties, then call update() — this method takes no arguments.

Properties for update:

NameTypeRequiredDescription
aup_block_internet_until_acceptedbooleanNo-
aup_enabledbooleanNo-
aup_force_ssl_inspectionbooleanNo-
aup_timeout_in_daysintegerNo-
auth_requiredbooleanNo-
authentication_profileEntityReferenceNo-
basic_auth_enabledbooleanNo-
bc_locationbooleanNo-
caution_enabledbooleanNo-
cc_locationbooleanNo-
child_countintegerNo-
cityEntityReferenceNo-
city_geo_idintegerNo-
cookies_and_proxybooleanNo-
countrystringNo-
default_extranet_dnsbooleanNo-
default_extranet_ts_poolbooleanNo-
descriptionstringNo-
digest_auth_enabledbooleanNo-
display_time_unitstringNo-
dn_bandwidthintegerNo-
dynamiclocation_groupsEntityReferenceWrapperCollectionNo-
ec_locationbooleanNo-
exclude_from_dynamic_groupsbooleanNo-
exclude_from_manual_groupsbooleanNo-
extranetEntityReferenceNo-
extranet_dnsEntityReferenceNo-
extranet_ip_poolEntityReferenceNo-
geo_overridebooleanNo-
idintegerYes-
idle_time_in_minutesintegerNo-
iot_discovery_enabledbooleanNo-
iot_enforce_policy_setbooleanNo-
ip_addressesstringCollectionNo-
ips_controlbooleanNo-
ipv6_dns64_prefixEntityReferenceNo-
ipv6_enabledbooleanNo-
jwt_authbooleanNo-
kerberos_authbooleanNo-
languagestringNo-
latitudeintegerNo-
longitudeintegerNo-
managed_byEntityReferenceNo-
match_in_childbooleanNo-
multi_tenant_vpn_credentialVpnCredentialNo-
namestringNo-
non_editablebooleanNo-
ofw_enabledbooleanNo-
other6_sub_locationbooleanNo-
other_sub_locationbooleanNo-
override_dn_bandwidthintegerNo-
override_up_bandwidthintegerNo-
parent_idintegerNo-
portsint32CollectionNo-
profilestringNo-
shared_down_bandwidthintegerNo-
shared_up_bandwidthintegerNo-
ssl_scan_enabledbooleanNo-
statestringNo-
static_location_groupsEntityReferenceWrapperCollectionNo-
sub_loc_acc_idsstringCollectionNo-
sub_loc_scopestringNo-
sub_loc_scope_enabledbooleanNo-
sub_loc_scope_valuesstringCollectionNo-
surrogate_IPbooleanNo-
surrogate_IP_enforced_for_known_browsersbooleanNo-
surrogate_refresh_time_in_minutesintegerNo-
surrogate_refresh_time_unitstringNo-
traffic_fwd_attributesintegerNo-
tzstringNo-
unused_dn_bandwidthintegerNo-
unused_up_bandwidthintegerNo-
up_bandwidthintegerNo-
virtual_zen_clustersEntityReferenceWrapperCollectionNo-
virtual_zensEntityReferenceWrapperCollectionNo-
vpn_credentialsVpnCredentialWrapperCollectionNo-
xff_forward_enabledbooleanNo-
zapp_ssl_scan_enabledbooleanNo-

Returns: Location

Example:

resource = session.zia.Location(id="your-resource-id")
resource.load()
resource.name = "Updated value"
resource.update()

Attributes​

NameTypeRequiredDescription
aup_block_internet_until_acceptedbooleanNo-
aup_enabledbooleanNo-
aup_force_ssl_inspectionbooleanNo-
aup_timeout_in_daysintegerNo-
auth_requiredbooleanNo-
authentication_profileEntityReferenceNo-
basic_auth_enabledbooleanNo-
bc_locationbooleanNo-
caution_enabledbooleanNo-
cc_locationbooleanNo-
child_countintegerNo-
cityEntityReferenceNo-
city_geo_idintegerNo-
cookies_and_proxybooleanNo-
countrystringNo-
default_extranet_dnsbooleanNo-
default_extranet_ts_poolbooleanNo-
descriptionstringNo-
digest_auth_enabledbooleanNo-
display_time_unitstringNo-
dn_bandwidthintegerNo-
dynamiclocation_groupsEntityReferenceWrapperCollectionNo-
ec_locationbooleanNo-
exclude_from_dynamic_groupsbooleanNo-
exclude_from_manual_groupsbooleanNo-
extranetEntityReferenceNo-
extranet_dnsEntityReferenceNo-
extranet_ip_poolEntityReferenceNo-
geo_overridebooleanNo-
idintegerNo-
idle_time_in_minutesintegerNo-
iot_discovery_enabledbooleanNo-
iot_enforce_policy_setbooleanNo-
ip_addressesstringCollectionNo-
ips_controlbooleanNo-
ipv6_dns64_prefixEntityReferenceNo-
ipv6_enabledbooleanNo-
jwt_authbooleanNo-
kerberos_authbooleanNo-
languagestringNo-
latitudeintegerNo-
longitudeintegerNo-
managed_byEntityReferenceNo-
match_in_childbooleanNo-
multi_tenant_vpn_credentialVpnCredentialNo-
namestringNo-
non_editablebooleanNo-
ofw_enabledbooleanNo-
other6_sub_locationbooleanNo-
other_sub_locationbooleanNo-
override_dn_bandwidthintegerNo-
override_up_bandwidthintegerNo-
parent_idintegerNo-
portsint32CollectionNo-
profilestringNo-
shared_down_bandwidthintegerNo-
shared_up_bandwidthintegerNo-
ssl_scan_enabledbooleanNo-
statestringNo-
static_location_groupsEntityReferenceWrapperCollectionNo-
sub_loc_acc_idsstringCollectionNo-
sub_loc_scopestringNo-
sub_loc_scope_enabledbooleanNo-
sub_loc_scope_valuesstringCollectionNo-
surrogate_IPbooleanNo-
surrogate_IP_enforced_for_known_browsersbooleanNo-
surrogate_refresh_time_in_minutesintegerNo-
surrogate_refresh_time_unitstringNo-
traffic_fwd_attributesintegerNo-
tzstringNo-
unused_dn_bandwidthintegerNo-
unused_up_bandwidthintegerNo-
up_bandwidthintegerNo-
virtual_zen_clustersEntityReferenceWrapperCollectionNo-
virtual_zensEntityReferenceWrapperCollectionNo-
vpn_credentialsVpnCredentialWrapperCollectionNo-
xff_forward_enabledbooleanNo-
zapp_ssl_scan_enabledbooleanNo-