Skip to main content

FirewallDnsRule

Firewall Dns 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 FirewallDnsRule
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 FirewallDnsRule
resource = session.zia.FirewallDnsRule(id="your-resource-id")
resource.load()
print(resource)

# Debug output shows HTTP request/response details

Identifiers​

NameTypeDescription
idstringUnique identifier

Actions​

create()​

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

Properties for creation:

NameTypeRequiredDescription
access_controlstringNo-
actionstringYes-
application_groupsEntityReferenceWrapperCollectionNo-
applicationsApplicationsEnumCollectionNo-
block_response_codestringNo-
capture_PCAPbooleanNo-
default_dns_rule_name_usedbooleanNo-
default_rulebooleanNo-
departmentsEntityReferenceWrapperCollectionNo-
descriptionstringNo-
dest_addressesstringCollectionNo-
dest_countriesDestCountriesEnumCollectionNo-
dest_ip_categoriesstringCollectionNo-
dest_ip_groupsEntityReferenceWrapperCollectionNo-
dest_ipv6_groupsEntityReferenceWrapperCollectionNo-
device_groupsEntityReferenceWrapperCollectionNo-
devicesEntityReferenceWrapperCollectionNo-
dns_gatewayEntityReferenceNo-
dns_rule_request_typesDnsRuleRequestTypesEnumCollectionNo-
ec_groupsEntityReferenceWrapperCollectionNo-
edns_ecs_objectEntityReferenceNo-
end_point_application_groupsEndPointApplicationGroupWrapperCollectionNo-
end_point_application_threat_levelsThreatLevelEnumCollectionNo-
end_point_applicationsEndPointApplicationLiteWrapperCollectionNo-
eun_template_idintegerNo-
exclude_context_shield_end_pointbooleanNo-
groupsEntityReferenceWrapperCollectionNo-
is_eun_enabledbooleanYes-
is_web_EUN_enabledbooleanYes-
labelsEntityReferenceWrapperCollectionNo-
last_modified_byEntityReferenceNo-
last_modified_timeintegerNo-
location_groupsEntityReferenceWrapperCollectionNo-
locationsEntityReferenceWrapperCollectionNo-
namestringYes-
orderintegerNo-
packet_capture_flagstringNo-
predefinedbooleanNo-
protocolsProtocolsEnumCollectionNo-
rankintegerNo-
redirect_ipstringNo-
res_categoriesstringCollectionNo-
source_countriesDestCountriesEnumCollectionNo-
src_ip_groupsEntityReferenceWrapperCollectionNo-
src_ipsstringCollectionNo-
src_ipv6_groupsEntityReferenceWrapperCollectionNo-
statestringNo-
template_synced_rule_flagstringNo-
time_windowsEntityReferenceWrapperCollectionNo-
usersEntityReferenceWrapperCollectionNo-
zpa_ip_groupEntityReferenceNo-

Returns: FirewallDnsRule

Example:

resource = session.zia.FirewallDnsRule()
resource.action = "value"
resource.is_eun_enabled = True
resource.is_web_EUN_enabled = True
resource.name = "example-name"
resource.create()
print(f"Created with ID: {resource.id}")

delete()​

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

Example:

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

load()​

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

Returns: FirewallDnsRule

Example:

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

update()​

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

Properties for update:

NameTypeRequiredDescription
access_controlstringNo-
actionstringYes-
application_groupsEntityReferenceWrapperCollectionNo-
applicationsApplicationsEnumCollectionNo-
block_response_codestringNo-
capture_PCAPbooleanNo-
default_rulebooleanNo-
departmentsEntityReferenceWrapperCollectionNo-
descriptionstringNo-
dest_addressesstringCollectionNo-
dest_countriesDestCountriesEnumCollectionNo-
dest_ip_categoriesstringCollectionNo-
dest_ip_groupsEntityReferenceWrapperCollectionNo-
dest_ipv6_groupsEntityReferenceWrapperCollectionNo-
device_groupsEntityReferenceWrapperCollectionNo-
devicesEntityReferenceWrapperCollectionNo-
dns_gatewayEntityReferenceNo-
dns_rule_request_typesDnsRuleRequestTypesEnumCollectionNo-
ec_groupsEntityReferenceWrapperCollectionNo-
edns_ecs_objectEntityReferenceNo-
end_point_application_groupsEndPointApplicationGroupWrapperCollectionNo-
end_point_application_threat_levelsThreatLevelEnumCollectionNo-
end_point_applicationsEndPointApplicationLiteWrapperCollectionNo-
eun_template_idintegerNo-
exclude_context_shield_end_pointbooleanNo-
groupsEntityReferenceWrapperCollectionNo-
is_eun_enabledbooleanYes-
is_web_EUN_enabledbooleanYes-
labelsEntityReferenceWrapperCollectionNo-
last_modified_byEntityReferenceNo-
last_modified_timeintegerNo-
location_groupsEntityReferenceWrapperCollectionNo-
locationsEntityReferenceWrapperCollectionNo-
namestringYes-
orderintegerNo-
packet_capture_flagstringNo-
predefinedbooleanNo-
protocolsProtocolsEnumCollectionNo-
rankintegerNo-
redirect_ipstringNo-
res_categoriesstringCollectionNo-
source_countriesDestCountriesEnumCollectionNo-
src_ip_groupsEntityReferenceWrapperCollectionNo-
src_ipsstringCollectionNo-
src_ipv6_groupsEntityReferenceWrapperCollectionNo-
statestringNo-
template_synced_rule_flagstringNo-
time_windowsEntityReferenceWrapperCollectionNo-
usersEntityReferenceWrapperCollectionNo-
zpa_ip_groupEntityReferenceNo-

Returns: FirewallDnsRule

Example:

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

Attributes​

NameTypeRequiredDescription
access_controlstringNo-
actionstringYes-
application_groupsEntityReferenceWrapperCollectionNo-
applicationsApplicationsEnumCollectionNo-
block_response_codestringNo-
capture_PCAPbooleanNo-
default_dns_rule_name_usedbooleanNo-
default_rulebooleanNo-
departmentsEntityReferenceWrapperCollectionNo-
descriptionstringNo-
dest_addressesstringCollectionNo-
dest_countriesDestCountriesEnumCollectionNo-
dest_ip_categoriesstringCollectionNo-
dest_ip_groupsEntityReferenceWrapperCollectionNo-
dest_ipv6_groupsEntityReferenceWrapperCollectionNo-
device_groupsEntityReferenceWrapperCollectionNo-
devicesEntityReferenceWrapperCollectionNo-
dns_gatewayEntityReferenceNo-
dns_rule_request_typesDnsRuleRequestTypesEnumCollectionNo-
ec_groupsEntityReferenceWrapperCollectionNo-
edns_ecs_objectEntityReferenceNo-
end_point_application_groupsEndPointApplicationGroupWrapperCollectionNo-
end_point_application_threat_levelsThreatLevelEnumCollectionNo-
end_point_applicationsEndPointApplicationLiteWrapperCollectionNo-
eun_template_idintegerNo-
exclude_context_shield_end_pointbooleanNo-
groupsEntityReferenceWrapperCollectionNo-
idintegerYes-
is_eun_enabledbooleanYes-
is_web_EUN_enabledbooleanYes-
labelsEntityReferenceWrapperCollectionNo-
last_modified_byEntityReferenceNo-
last_modified_timeintegerNo-
location_groupsEntityReferenceWrapperCollectionNo-
locationsEntityReferenceWrapperCollectionNo-
namestringYes-
orderintegerNo-
packet_capture_flagstringNo-
predefinedbooleanNo-
protocolsProtocolsEnumCollectionNo-
rankintegerNo-
redirect_ipstringNo-
res_categoriesstringCollectionNo-
source_countriesDestCountriesEnumCollectionNo-
src_ip_groupsEntityReferenceWrapperCollectionNo-
src_ipsstringCollectionNo-
src_ipv6_groupsEntityReferenceWrapperCollectionNo-
statestringNo-
template_synced_rule_flagstringNo-
time_windowsEntityReferenceWrapperCollectionNo-
usersEntityReferenceWrapperCollectionNo-
zpa_ip_groupEntityReferenceNo-