Skip to main content

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​

NameTypeDescription
idstringUnique identifier

Actions​

create()​

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

Properties for creation:

NameTypeRequiredDescription
activebooleanYes-
company_idstringYes-
condition_typestringYes-
created_bystringYes-
dns_search_domainsstringNo-
dns_serversstringNo-
edited_bystringYes-
guidstringNo-
hostnamesstringYes-
idstringYes-
network_namestringYes-
resolved_ips_for_hostnamestringNo-
ssidsstringNo-
trusted_dhcp_serversstringNo-
trusted_egress_ipsstringNo-
trusted_gatewaysstringNo-
trusted_subnetsstringNo-

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:

NameTypeRequiredDescription
activebooleanYes-
company_idstringYes-
condition_typestringYes-
created_bystringYes-
dns_search_domainsstringNo-
dns_serversstringNo-
edited_bystringYes-
guidstringNo-
hostnamesstringYes-
idstringYes-
network_namestringYes-
resolved_ips_for_hostnamestringNo-
ssidsstringNo-
trusted_dhcp_serversstringNo-
trusted_egress_ipsstringNo-
trusted_gatewaysstringNo-
trusted_subnetsstringNo-

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​

NameTypeRequiredDescription
activebooleanYes-
company_idstringYes-
condition_typestringYes-
created_bystringYes-
dns_search_domainsstringNo-
dns_serversstringNo-
edited_bystringYes-
guidstringNo-
hostnamesstringYes-
idstringYes-
network_namestringYes-
resolved_ips_for_hostnamestringNo-
ssidsstringNo-
trusted_dhcp_serversstringNo-
trusted_egress_ipsstringNo-
trusted_gatewaysstringNo-
trusted_subnetsstringNo-