Location
Location resource for Zscaler Internet Access.
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
| Name | Type | Description |
|---|---|---|
id | string | Unique identifier |
Actions
bulk_delete_locations()
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
ids | int32Collection | No | - |
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:
| Name | Type | Required | Description |
|---|---|---|---|
aup_block_internet_until_accepted | boolean | No | - |
aup_enabled | boolean | No | - |
aup_force_ssl_inspection | boolean | No | - |
aup_timeout_in_days | integer | No | - |
auth_required | boolean | No | - |
authentication_profile | EntityReference | No | - |
basic_auth_enabled | boolean | No | - |
bc_location | boolean | No | - |
caution_enabled | boolean | No | - |
cc_location | boolean | No | - |
child_count | integer | No | - |
city | EntityReference | No | - |
city_geo_id | integer | No | - |
cookies_and_proxy | boolean | No | - |
country | string | No | - |
default_extranet_dns | boolean | No | - |
default_extranet_ts_pool | boolean | No | - |
description | string | No | - |
digest_auth_enabled | boolean | No | - |
display_time_unit | string | No | - |
dn_bandwidth | integer | No | - |
dynamiclocation_groups | EntityReferenceWrapperCollection | No | - |
ec_location | boolean | No | - |
exclude_from_dynamic_groups | boolean | No | - |
exclude_from_manual_groups | boolean | No | - |
extranet | EntityReference | No | - |
extranet_dns | EntityReference | No | - |
extranet_ip_pool | EntityReference | No | - |
geo_override | boolean | No | - |
id | integer | No | - |
idle_time_in_minutes | integer | No | - |
iot_discovery_enabled | boolean | No | - |
iot_enforce_policy_set | boolean | No | - |
ip_addresses | stringCollection | No | - |
ips_control | boolean | No | - |
ipv6_dns64_prefix | EntityReference | No | - |
ipv6_enabled | boolean | No | - |
jwt_auth | boolean | No | - |
kerberos_auth | boolean | No | - |
language | string | No | - |
latitude | integer | No | - |
longitude | integer | No | - |
managed_by | EntityReference | No | - |
match_in_child | boolean | No | - |
multi_tenant_vpn_credential | VpnCredential | No | - |
name | string | No | - |
non_editable | boolean | No | - |
ofw_enabled | boolean | No | - |
other6_sub_location | boolean | No | - |
other_sub_location | boolean | No | - |
override_dn_bandwidth | integer | No | - |
override_up_bandwidth | integer | No | - |
parent_id | integer | No | - |
ports | int32Collection | No | - |
profile | string | No | - |
shared_down_bandwidth | integer | No | - |
shared_up_bandwidth | integer | No | - |
ssl_scan_enabled | boolean | No | - |
state | string | No | - |
static_location_groups | EntityReferenceWrapperCollection | No | - |
sub_loc_acc_ids | stringCollection | No | - |
sub_loc_scope | string | No | - |
sub_loc_scope_enabled | boolean | No | - |
sub_loc_scope_values | stringCollection | No | - |
surrogate_IP | boolean | No | - |
surrogate_IP_enforced_for_known_browsers | boolean | No | - |
surrogate_refresh_time_in_minutes | integer | No | - |
surrogate_refresh_time_unit | string | No | - |
traffic_fwd_attributes | integer | No | - |
tz | string | No | - |
unused_dn_bandwidth | integer | No | - |
unused_up_bandwidth | integer | No | - |
up_bandwidth | integer | No | - |
virtual_zen_clusters | EntityReferenceWrapperCollection | No | - |
virtual_zens | EntityReferenceWrapperCollection | No | - |
vpn_credentials | VpnCredentialWrapperCollection | No | - |
xff_forward_enabled | boolean | No | - |
zapp_ssl_scan_enabled | boolean | No | - |
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:
| Name | Type | Required | Description |
|---|---|---|---|
aup_block_internet_until_accepted | boolean | No | - |
aup_enabled | boolean | No | - |
aup_force_ssl_inspection | boolean | No | - |
aup_timeout_in_days | integer | No | - |
auth_required | boolean | No | - |
authentication_profile | EntityReference | No | - |
basic_auth_enabled | boolean | No | - |
bc_location | boolean | No | - |
caution_enabled | boolean | No | - |
cc_location | boolean | No | - |
child_count | integer | No | - |
city | EntityReference | No | - |
city_geo_id | integer | No | - |
cookies_and_proxy | boolean | No | - |
country | string | No | - |
default_extranet_dns | boolean | No | - |
default_extranet_ts_pool | boolean | No | - |
description | string | No | - |
digest_auth_enabled | boolean | No | - |
display_time_unit | string | No | - |
dn_bandwidth | integer | No | - |
dynamiclocation_groups | EntityReferenceWrapperCollection | No | - |
ec_location | boolean | No | - |
exclude_from_dynamic_groups | boolean | No | - |
exclude_from_manual_groups | boolean | No | - |
extranet | EntityReference | No | - |
extranet_dns | EntityReference | No | - |
extranet_ip_pool | EntityReference | No | - |
geo_override | boolean | No | - |
id | integer | Yes | - |
idle_time_in_minutes | integer | No | - |
iot_discovery_enabled | boolean | No | - |
iot_enforce_policy_set | boolean | No | - |
ip_addresses | stringCollection | No | - |
ips_control | boolean | No | - |
ipv6_dns64_prefix | EntityReference | No | - |
ipv6_enabled | boolean | No | - |
jwt_auth | boolean | No | - |
kerberos_auth | boolean | No | - |
language | string | No | - |
latitude | integer | No | - |
longitude | integer | No | - |
managed_by | EntityReference | No | - |
match_in_child | boolean | No | - |
multi_tenant_vpn_credential | VpnCredential | No | - |
name | string | No | - |
non_editable | boolean | No | - |
ofw_enabled | boolean | No | - |
other6_sub_location | boolean | No | - |
other_sub_location | boolean | No | - |
override_dn_bandwidth | integer | No | - |
override_up_bandwidth | integer | No | - |
parent_id | integer | No | - |
ports | int32Collection | No | - |
profile | string | No | - |
shared_down_bandwidth | integer | No | - |
shared_up_bandwidth | integer | No | - |
ssl_scan_enabled | boolean | No | - |
state | string | No | - |
static_location_groups | EntityReferenceWrapperCollection | No | - |
sub_loc_acc_ids | stringCollection | No | - |
sub_loc_scope | string | No | - |
sub_loc_scope_enabled | boolean | No | - |
sub_loc_scope_values | stringCollection | No | - |
surrogate_IP | boolean | No | - |
surrogate_IP_enforced_for_known_browsers | boolean | No | - |
surrogate_refresh_time_in_minutes | integer | No | - |
surrogate_refresh_time_unit | string | No | - |
traffic_fwd_attributes | integer | No | - |
tz | string | No | - |
unused_dn_bandwidth | integer | No | - |
unused_up_bandwidth | integer | No | - |
up_bandwidth | integer | No | - |
virtual_zen_clusters | EntityReferenceWrapperCollection | No | - |
virtual_zens | EntityReferenceWrapperCollection | No | - |
vpn_credentials | VpnCredentialWrapperCollection | No | - |
xff_forward_enabled | boolean | No | - |
zapp_ssl_scan_enabled | boolean | No | - |
Returns: Location
Example:
resource = session.zia.Location(id="your-resource-id")
resource.load()
resource.name = "Updated value"
resource.update()
Attributes
| Name | Type | Required | Description |
|---|---|---|---|
aup_block_internet_until_accepted | boolean | No | - |
aup_enabled | boolean | No | - |
aup_force_ssl_inspection | boolean | No | - |
aup_timeout_in_days | integer | No | - |
auth_required | boolean | No | - |
authentication_profile | EntityReference | No | - |
basic_auth_enabled | boolean | No | - |
bc_location | boolean | No | - |
caution_enabled | boolean | No | - |
cc_location | boolean | No | - |
child_count | integer | No | - |
city | EntityReference | No | - |
city_geo_id | integer | No | - |
cookies_and_proxy | boolean | No | - |
country | string | No | - |
default_extranet_dns | boolean | No | - |
default_extranet_ts_pool | boolean | No | - |
description | string | No | - |
digest_auth_enabled | boolean | No | - |
display_time_unit | string | No | - |
dn_bandwidth | integer | No | - |
dynamiclocation_groups | EntityReferenceWrapperCollection | No | - |
ec_location | boolean | No | - |
exclude_from_dynamic_groups | boolean | No | - |
exclude_from_manual_groups | boolean | No | - |
extranet | EntityReference | No | - |
extranet_dns | EntityReference | No | - |
extranet_ip_pool | EntityReference | No | - |
geo_override | boolean | No | - |
id | integer | No | - |
idle_time_in_minutes | integer | No | - |
iot_discovery_enabled | boolean | No | - |
iot_enforce_policy_set | boolean | No | - |
ip_addresses | stringCollection | No | - |
ips_control | boolean | No | - |
ipv6_dns64_prefix | EntityReference | No | - |
ipv6_enabled | boolean | No | - |
jwt_auth | boolean | No | - |
kerberos_auth | boolean | No | - |
language | string | No | - |
latitude | integer | No | - |
longitude | integer | No | - |
managed_by | EntityReference | No | - |
match_in_child | boolean | No | - |
multi_tenant_vpn_credential | VpnCredential | No | - |
name | string | No | - |
non_editable | boolean | No | - |
ofw_enabled | boolean | No | - |
other6_sub_location | boolean | No | - |
other_sub_location | boolean | No | - |
override_dn_bandwidth | integer | No | - |
override_up_bandwidth | integer | No | - |
parent_id | integer | No | - |
ports | int32Collection | No | - |
profile | string | No | - |
shared_down_bandwidth | integer | No | - |
shared_up_bandwidth | integer | No | - |
ssl_scan_enabled | boolean | No | - |
state | string | No | - |
static_location_groups | EntityReferenceWrapperCollection | No | - |
sub_loc_acc_ids | stringCollection | No | - |
sub_loc_scope | string | No | - |
sub_loc_scope_enabled | boolean | No | - |
sub_loc_scope_values | stringCollection | No | - |
surrogate_IP | boolean | No | - |
surrogate_IP_enforced_for_known_browsers | boolean | No | - |
surrogate_refresh_time_in_minutes | integer | No | - |
surrogate_refresh_time_unit | string | No | - |
traffic_fwd_attributes | integer | No | - |
tz | string | No | - |
unused_dn_bandwidth | integer | No | - |
unused_up_bandwidth | integer | No | - |
up_bandwidth | integer | No | - |
virtual_zen_clusters | EntityReferenceWrapperCollection | No | - |
virtual_zens | EntityReferenceWrapperCollection | No | - |
vpn_credentials | VpnCredentialWrapperCollection | No | - |
xff_forward_enabled | boolean | No | - |
zapp_ssl_scan_enabled | boolean | No | - |
Related
- Location - Data structure definition
- Logging guide - enable verbose logs while debugging this resource