TrustedNetwork
Trusted Network resource for Zscaler Client Connector.
Resource operations
This resource supports the following standard methods: create(), 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 TrustedNetwork
logging.getLogger('zssdk.zcc').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 TrustedNetwork
resource = session.zcc.TrustedNetwork(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 TrustedNetwork. Set properties on the resource instance, then call create() — this method takes no arguments.
Properties for creation:
| Name | Type | Required | Description |
|---|---|---|---|
active | boolean | Yes | - |
company_id | string | Yes | - |
condition_type | string | Yes | - |
created_by | string | Yes | - |
dns_search_domains | string | No | - |
dns_servers | string | No | - |
edited_by | string | Yes | - |
guid | string | No | - |
hostnames | string | Yes | - |
id | string | Yes | - |
network_name | string | Yes | - |
resolved_ips_for_hostname | string | No | - |
ssids | string | No | - |
trusted_dhcp_servers | string | No | - |
trusted_egress_ips | string | No | - |
trusted_gateways | string | No | - |
trusted_subnets | string | No | - |
Returns: StringRecord
Example:
resource = session.zcc.TrustedNetwork()
resource.active = True
resource.company_id = "resource-id"
resource.condition_type = "value"
resource.created_by = "value"
resource.edited_by = "value"
resource.hostnames = "example-hostnames"
resource.network_name = "example-network-name"
resource.create()
print(f"Created with ID: {resource.id}")
delete()
Deletes a TrustedNetwork by id. Only the id identifier is required; delete() takes no other arguments.
Example:
resource = session.zcc.TrustedNetwork(id="your-resource-id")
resource.delete()
update_trusted_network()
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
active | boolean | Yes | - |
company_id | string | Yes | - |
condition_type | string | Yes | - |
created_by | string | Yes | - |
dns_search_domains | string | No | - |
dns_servers | string | No | - |
edited_by | string | Yes | - |
guid | string | No | - |
hostnames | string | Yes | - |
id | string | Yes | - |
network_name | string | Yes | - |
resolved_ips_for_hostname | string | No | - |
ssids | string | No | - |
trusted_dhcp_servers | string | No | - |
trusted_egress_ips | string | No | - |
trusted_gateways | string | No | - |
trusted_subnets | string | No | - |
Returns: CommonResponseContract
Example:
resource = session.zcc.TrustedNetwork()
result = resource.update_trusted_network(active=True, company_id="resource-id", condition_type="value", created_by="value", edited_by="value", hostnames="example-hostnames", id="resource-id", network_name="example-network-name")
print(result)
Attributes
| Name | Type | Required | Description |
|---|---|---|---|
active | boolean | Yes | - |
company_id | string | Yes | - |
condition_type | string | Yes | - |
created_by | string | Yes | - |
dns_search_domains | string | No | - |
dns_servers | string | No | - |
edited_by | string | Yes | - |
guid | string | No | - |
hostnames | string | Yes | - |
id | string | Yes | - |
network_name | string | Yes | - |
resolved_ips_for_hostname | string | No | - |
ssids | string | No | - |
trusted_dhcp_servers | string | No | - |
trusted_egress_ips | string | No | - |
trusted_gateways | string | No | - |
trusted_subnets | string | No | - |
Related
- TrustedNetwork - Data structure definition
- Logging guide - enable verbose logs while debugging this resource