ForwardingRule
Forwarding Rule 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.
Quick Start
import zssdk
import logging
# Enable debug logging for ForwardingRule
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 ForwardingRule
resource = session.zia.ForwardingRule(id="your-resource-id")
resource.load()
print(resource)
# Debug output shows HTTP request/response details
Identifiers
| Name | Type | Description |
|---|---|---|
id | string | Unique identifier |
Actions
create()
Creates a new ForwardingRule. Set properties on the resource instance, then call create() — this method takes no arguments.
Properties for creation:
| Name | Type | Required | Description |
|---|---|---|---|
access_control | string | No | - |
app_service_groups | EntityReferenceWrapperCollection | No | - |
block_response_code | string | No | - |
dedicated_IP_gateway | EntityReference | No | - |
departments | EntityReferenceWrapperCollection | No | - |
description | string | No | - |
dest_addresses | stringCollection | No | - |
dest_countries | DestCountriesEnumCollection | No | - |
dest_ip_categories | stringCollection | No | - |
dest_ip_groups | EntityReferenceWrapperCollection | No | - |
dest_ipv6_groups | EntityReferenceWrapperCollection | No | - |
dest_workload_groups | EntityReferenceWrapperCollection | No | - |
device_groups | EntityReferenceWrapperCollection | No | - |
devices | EntityReferenceWrapperCollection | No | - |
ec_groups | EntityReferenceWrapperCollection | No | - |
end_point_application_groups | EndPointApplicationGroupWrapperCollection | No | - |
end_point_application_threat_levels | ThreatLevelEnumCollection | No | - |
end_point_applications | EndPointApplicationLiteWrapperCollection | No | - |
exclude_context_shield_end_point | boolean | No | - |
forward_method | string | Yes | - |
groups | EntityReferenceWrapperCollection | No | - |
id | integer | No | - |
labels | EntityReferenceWrapperCollection | No | - |
last_modified_by | EntityReference | No | - |
last_modified_time | integer | No | - |
location_groups | EntityReferenceWrapperCollection | No | - |
locations | EntityReferenceWrapperCollection | No | - |
name | string | Yes | - |
nw_application_groups | EntityReferenceWrapperCollection | No | - |
nw_applications | NwApplicationsEnumCollection | No | - |
nw_service_groups | EntityReferenceWrapperCollection | No | - |
nw_services | EntityReferenceWrapperCollection | No | - |
order | integer | No | - |
proxy_gateway | EntityReference | No | - |
rank | integer | Yes | - |
res_categories | stringCollection | No | - |
source_countries | DestCountriesEnumCollection | No | - |
source_ip_group_exclusion | boolean | No | - |
source_ip_group_exclusion_flag | boolean | No | - |
src_ip_groups | EntityReferenceWrapperCollection | No | - |
src_ips | stringCollection | No | - |
src_ipv6_groups | EntityReferenceWrapperCollection | No | - |
src_workload_groups | EntityReferenceWrapperCollection | No | - |
state | string | No | - |
template_synced_rule_flag | string | No | - |
time_windows | EntityReferenceWrapperCollection | No | - |
type | string | No | - |
users | EntityReferenceWrapperCollection | No | - |
wan_selection | string | No | - |
zpa_app_segments | AppSegmentWrapperCollection | No | - |
zpa_application_segment_groups | ZpaApplicationSegmentGroupWrapperCollection | No | - |
zpa_application_segments | ZpaApplicationSegmentWrapperCollection | No | - |
zpa_broker_rule | boolean | No | - |
zpa_gateway | EntityReference | No | - |
Returns: ForwardingRule
Example:
resource = session.zia.ForwardingRule()
resource.forward_method = "value"
resource.name = "example-name"
resource.rank = 3600
resource.create()
print(f"Created with ID: {resource.id}")
delete()
Deletes a ForwardingRule by id. Only the id identifier is required; delete() takes no other arguments.
Example:
resource = session.zia.ForwardingRule(id="your-resource-id")
resource.delete()
load()
Fetches an existing ForwardingRule by id. Only the id identifier is required; load() takes no other arguments.
Returns: ForwardingRule
Example:
resource = session.zia.ForwardingRule(id="your-resource-id")
resource.load()
print(resource.name)
update()
Updates an existing ForwardingRule. Call load() first, modify properties, then call update() — this method takes no arguments.
Properties for update:
| Name | Type | Required | Description |
|---|---|---|---|
access_control | string | No | - |
app_service_groups | EntityReferenceWrapperCollection | No | - |
block_response_code | string | No | - |
dedicated_IP_gateway | EntityReference | No | - |
departments | EntityReferenceWrapperCollection | No | - |
description | string | No | - |
dest_addresses | stringCollection | No | - |
dest_countries | DestCountriesEnumCollection | No | - |
dest_ip_categories | stringCollection | No | - |
dest_ip_groups | EntityReferenceWrapperCollection | No | - |
dest_ipv6_groups | EntityReferenceWrapperCollection | No | - |
dest_workload_groups | EntityReferenceWrapperCollection | No | - |
device_groups | EntityReferenceWrapperCollection | No | - |
devices | EntityReferenceWrapperCollection | No | - |
ec_groups | EntityReferenceWrapperCollection | No | - |
end_point_application_groups | EndPointApplicationGroupWrapperCollection | No | - |
end_point_application_threat_levels | ThreatLevelEnumCollection | No | - |
end_point_applications | EndPointApplicationLiteWrapperCollection | No | - |
exclude_context_shield_end_point | boolean | No | - |
forward_method | string | Yes | - |
groups | EntityReferenceWrapperCollection | No | - |
id | integer | No | - |
labels | EntityReferenceWrapperCollection | No | - |
last_modified_by | EntityReference | No | - |
last_modified_time | integer | No | - |
location_groups | EntityReferenceWrapperCollection | No | - |
locations | EntityReferenceWrapperCollection | No | - |
name | string | Yes | - |
nw_application_groups | EntityReferenceWrapperCollection | No | - |
nw_applications | NwApplicationsEnumCollection | No | - |
nw_service_groups | EntityReferenceWrapperCollection | No | - |
nw_services | EntityReferenceWrapperCollection | No | - |
order | integer | No | - |
proxy_gateway | EntityReference | No | - |
rank | integer | Yes | - |
res_categories | stringCollection | No | - |
source_countries | DestCountriesEnumCollection | No | - |
source_ip_group_exclusion | boolean | No | - |
source_ip_group_exclusion_flag | boolean | No | - |
src_ip_groups | EntityReferenceWrapperCollection | No | - |
src_ips | stringCollection | No | - |
src_ipv6_groups | EntityReferenceWrapperCollection | No | - |
src_workload_groups | EntityReferenceWrapperCollection | No | - |
state | string | No | - |
template_synced_rule_flag | string | No | - |
time_windows | EntityReferenceWrapperCollection | No | - |
type | string | No | - |
users | EntityReferenceWrapperCollection | No | - |
wan_selection | string | No | - |
zpa_app_segments | AppSegmentWrapperCollection | No | - |
zpa_application_segment_groups | ZpaApplicationSegmentGroupWrapperCollection | No | - |
zpa_application_segments | ZpaApplicationSegmentWrapperCollection | No | - |
zpa_broker_rule | boolean | No | - |
zpa_gateway | EntityReference | No | - |
Returns: ForwardingRule
Example:
resource = session.zia.ForwardingRule(id="your-resource-id")
resource.load()
resource.name = "Updated value"
resource.update()
Attributes
| Name | Type | Required | Description |
|---|---|---|---|
access_control | string | No | - |
app_service_groups | EntityReferenceWrapperCollection | No | - |
block_response_code | string | No | - |
dedicated_IP_gateway | EntityReference | No | - |
departments | EntityReferenceWrapperCollection | No | - |
description | string | No | - |
dest_addresses | stringCollection | No | - |
dest_countries | DestCountriesEnumCollection | No | - |
dest_ip_categories | stringCollection | No | - |
dest_ip_groups | EntityReferenceWrapperCollection | No | - |
dest_ipv6_groups | EntityReferenceWrapperCollection | No | - |
dest_workload_groups | EntityReferenceWrapperCollection | No | - |
device_groups | EntityReferenceWrapperCollection | No | - |
devices | EntityReferenceWrapperCollection | No | - |
ec_groups | EntityReferenceWrapperCollection | No | - |
end_point_application_groups | EndPointApplicationGroupWrapperCollection | No | - |
end_point_application_threat_levels | ThreatLevelEnumCollection | No | - |
end_point_applications | EndPointApplicationLiteWrapperCollection | No | - |
exclude_context_shield_end_point | boolean | No | - |
forward_method | string | Yes | - |
groups | EntityReferenceWrapperCollection | No | - |
id | integer | No | - |
labels | EntityReferenceWrapperCollection | No | - |
last_modified_by | EntityReference | No | - |
last_modified_time | integer | No | - |
location_groups | EntityReferenceWrapperCollection | No | - |
locations | EntityReferenceWrapperCollection | No | - |
name | string | Yes | - |
nw_application_groups | EntityReferenceWrapperCollection | No | - |
nw_applications | NwApplicationsEnumCollection | No | - |
nw_service_groups | EntityReferenceWrapperCollection | No | - |
nw_services | EntityReferenceWrapperCollection | No | - |
order | integer | No | - |
proxy_gateway | EntityReference | No | - |
rank | integer | Yes | - |
res_categories | stringCollection | No | - |
source_countries | DestCountriesEnumCollection | No | - |
source_ip_group_exclusion | boolean | No | - |
source_ip_group_exclusion_flag | boolean | No | - |
src_ip_groups | EntityReferenceWrapperCollection | No | - |
src_ips | stringCollection | No | - |
src_ipv6_groups | EntityReferenceWrapperCollection | No | - |
src_workload_groups | EntityReferenceWrapperCollection | No | - |
state | string | No | - |
template_synced_rule_flag | string | No | - |
time_windows | EntityReferenceWrapperCollection | No | - |
type | string | No | - |
users | EntityReferenceWrapperCollection | No | - |
wan_selection | string | No | - |
zpa_app_segments | AppSegmentWrapperCollection | No | - |
zpa_application_segment_groups | ZpaApplicationSegmentGroupWrapperCollection | No | - |
zpa_application_segments | ZpaApplicationSegmentWrapperCollection | No | - |
zpa_broker_rule | boolean | No | - |
zpa_gateway | EntityReference | No | - |
Related
- ForwardingRule - Data structure definition
- Logging guide - enable verbose logs while debugging this resource