Skip to main content

UrlFilteringRule

Url Filtering Rule 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.

Quick Start​

import zssdk
import logging

# Enable debug logging for UrlFilteringRule
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 UrlFilteringRule
resource = session.zia.UrlFilteringRule(id="your-resource-id")
resource.load()
print(resource)

# Debug output shows HTTP request/response details

Identifiers​

NameTypeDescription
idstringUnique identifier

Actions​

create()​

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

Properties for creation:

NameTypeRequiredDescription
access_controlstringNo-
actionstringNo-
adaptive_access_profilesAdaptiveAccessProfileWrapperCollectionNo-
allow_policy_rule_re_orderbooleanNo-
authentication_levelsIAMAuthenticationLevelWrapperCollectionNo-
block_overridebooleanNo-
browser_eun_template_idintegerNo-
capture_flagstringNo-
capture_PCAPbooleanNo-
cbi_profileBrowserIsolationProfileNo-
cbi_profile_idintegerNo-
ciparulebooleanNo-
departmentsEntityReferenceWrapperCollectionNo-
descriptionstringNo-
device_groupsEntityReferenceWrapperCollectionNo-
device_trust_levelsDeviceTrustLevelsEnumCollectionNo-
devicesEntityReferenceWrapperCollectionNo-
end_user_notification_urlstringNo-
enforce_time_validitybooleanNo-
exclude_src_countriesbooleanNo-
groupsEntityReferenceWrapperCollectionNo-
http_header_action_profilesEntityReferenceWrapperCollectionNo-
http_header_profilesEntityReferenceWrapperCollectionNo-
icap_serverEntityReferenceNo-
idintegerNo-
labelsEntityReferenceWrapperCollectionNo-
last_modified_byEntityReferenceNo-
last_modified_timeintegerNo-
location_groupsEntityReferenceWrapperCollectionNo-
locationsEntityReferenceWrapperCollectionNo-
namestringNo-
orderintegerNo-
override_groupsEntityReferenceWrapperCollectionNo-
override_usersEntityReferenceWrapperCollectionNo-
predefinedbooleanNo-
protocolsBandwidthControlRuleProtocolsEnumCollectionNo-
rankintegerNo-
request_methodsUrlFilteringRuleRequestMethodsEnumCollectionNo-
size_quotaintegerNo-
source_countriesDestCountriesEnumCollectionNo-
source_ip_groupsEntityReferenceWrapperCollectionNo-
statestringNo-
template_synced_rulebooleanNo-
template_synced_rule_flagstringNo-
time_quotaintegerNo-
time_windowsEntityReferenceWrapperCollectionNo-
url_categoriesstringCollectionNo-
url_categories2stringCollectionNo-
user_agent_typesUserAgentTypesEnumCollectionNo-
user_risk_score_levelsUserRiskScoreLevelsEnumCollectionNo-
usersEntityReferenceWrapperCollectionNo-
validity_end_timeintegerNo-
validity_start_timeintegerNo-
validity_time_zone_idstringNo-
workload_groupsWorkloadGroupWrapperCollectionNo-

Returns: UrlFilteringRule

Example:

resource = session.zia.UrlFilteringRule()
resource.access_control = "value"
resource.action = "value"
resource.adaptive_access_profiles = [{"aap_index": 3600, "deleted": True, "iam_aap_id": "resource-id", "id": 3600}]
resource.create()
print(f"Created with ID: {resource.id}")

delete()​

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

Example:

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

load()​

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

Returns: UrlFilteringRule

Example:

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

update()​

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

Properties for update:

NameTypeRequiredDescription
access_controlstringNo-
actionstringNo-
adaptive_access_profilesAdaptiveAccessProfileWrapperCollectionNo-
allow_policy_rule_re_orderbooleanNo-
authentication_levelsIAMAuthenticationLevelWrapperCollectionNo-
block_overridebooleanNo-
browser_eun_template_idintegerNo-
capture_flagstringNo-
capture_PCAPbooleanNo-
cbi_profileBrowserIsolationProfileNo-
cbi_profile_idintegerNo-
ciparulebooleanNo-
departmentsEntityReferenceWrapperCollectionNo-
descriptionstringNo-
device_groupsEntityReferenceWrapperCollectionNo-
device_trust_levelsDeviceTrustLevelsEnumCollectionNo-
devicesEntityReferenceWrapperCollectionNo-
end_user_notification_urlstringNo-
enforce_time_validitybooleanNo-
exclude_src_countriesbooleanNo-
groupsEntityReferenceWrapperCollectionNo-
http_header_action_profilesEntityReferenceWrapperCollectionNo-
http_header_profilesEntityReferenceWrapperCollectionNo-
icap_serverEntityReferenceNo-
idintegerYes-
labelsEntityReferenceWrapperCollectionNo-
last_modified_byEntityReferenceNo-
last_modified_timeintegerNo-
location_groupsEntityReferenceWrapperCollectionNo-
locationsEntityReferenceWrapperCollectionNo-
namestringNo-
orderintegerNo-
override_groupsEntityReferenceWrapperCollectionNo-
override_usersEntityReferenceWrapperCollectionNo-
predefinedbooleanNo-
protocolsBandwidthControlRuleProtocolsEnumCollectionNo-
rankintegerNo-
request_methodsUrlFilteringRuleRequestMethodsEnumCollectionNo-
size_quotaintegerNo-
source_countriesDestCountriesEnumCollectionNo-
source_ip_groupsEntityReferenceWrapperCollectionNo-
statestringNo-
template_synced_rulebooleanNo-
template_synced_rule_flagstringNo-
time_quotaintegerNo-
time_windowsEntityReferenceWrapperCollectionNo-
url_categoriesstringCollectionNo-
url_categories2stringCollectionNo-
user_agent_typesUserAgentTypesEnumCollectionNo-
user_risk_score_levelsUserRiskScoreLevelsEnumCollectionNo-
usersEntityReferenceWrapperCollectionNo-
validity_end_timeintegerNo-
validity_start_timeintegerNo-
validity_time_zone_idstringNo-
workload_groupsWorkloadGroupWrapperCollectionNo-

Returns: UrlFilteringRule

Example:

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

Attributes​

NameTypeRequiredDescription
access_controlstringNo-
actionstringNo-
adaptive_access_profilesAdaptiveAccessProfileWrapperCollectionNo-
allow_policy_rule_re_orderbooleanNo-
authentication_levelsIAMAuthenticationLevelWrapperCollectionNo-
block_overridebooleanNo-
browser_eun_template_idintegerNo-
capture_flagstringNo-
capture_PCAPbooleanNo-
cbi_profileBrowserIsolationProfileNo-
cbi_profile_idintegerNo-
ciparulebooleanNo-
departmentsEntityReferenceWrapperCollectionNo-
descriptionstringNo-
device_groupsEntityReferenceWrapperCollectionNo-
device_trust_levelsDeviceTrustLevelsEnumCollectionNo-
devicesEntityReferenceWrapperCollectionNo-
end_user_notification_urlstringNo-
enforce_time_validitybooleanNo-
exclude_src_countriesbooleanNo-
groupsEntityReferenceWrapperCollectionNo-
http_header_action_profilesEntityReferenceWrapperCollectionNo-
http_header_profilesEntityReferenceWrapperCollectionNo-
icap_serverEntityReferenceNo-
idintegerNo-
labelsEntityReferenceWrapperCollectionNo-
last_modified_byEntityReferenceNo-
last_modified_timeintegerNo-
location_groupsEntityReferenceWrapperCollectionNo-
locationsEntityReferenceWrapperCollectionNo-
namestringNo-
orderintegerNo-
override_groupsEntityReferenceWrapperCollectionNo-
override_usersEntityReferenceWrapperCollectionNo-
predefinedbooleanNo-
protocolsBandwidthControlRuleProtocolsEnumCollectionNo-
rankintegerNo-
request_methodsUrlFilteringRuleRequestMethodsEnumCollectionNo-
size_quotaintegerNo-
source_countriesDestCountriesEnumCollectionNo-
source_ip_groupsEntityReferenceWrapperCollectionNo-
statestringNo-
template_synced_rulebooleanNo-
template_synced_rule_flagstringNo-
time_quotaintegerNo-
time_windowsEntityReferenceWrapperCollectionNo-
url_categoriesstringCollectionNo-
url_categories2stringCollectionNo-
user_agent_typesUserAgentTypesEnumCollectionNo-
user_risk_score_levelsUserRiskScoreLevelsEnumCollectionNo-
usersEntityReferenceWrapperCollectionNo-
validity_end_timeintegerNo-
validity_start_timeintegerNo-
validity_time_zone_idstringNo-
workload_groupsWorkloadGroupWrapperCollectionNo-