Skip to main content

Client Connector SDK

This article outlines the Zscaler Python SDK resources you can use to manage Client Connector features programmatically, with code examples.

Quick Start​

import zssdk

session = zssdk.Session(
vanity_domain="your-vanity-domain",
client_id="your-client-id",
client_secret="your-client-secret",
)

# Access Client Connector service
zcc = session.zcc

Available Resources​

Access individual resources using the has pattern:

ResourceDescription
PredefinedIPBasedApplicationPredefined I P Based Application resource
ApplicationProfileApplication Profile resource
ProcessBasedApplicationProcess Based Application resource
TrustedNetworkTrusted Network resource
PrivacyInfoPrivacy Info resource
UserPasswordUser Password resource
CustomIPBasedApplicationCustom I P Based Application resource
DeviceOtpDevice Otp resource
AdminRoleAdmin Role resource
AdminUserAdmin User resource
WebFailOpenPolicyWeb Fail Open Policy resource
WebForwardingProfileWeb Forwarding Profile resource
AppServiceContractApp Service Contract resource

Collections​

List resources using the hasMany pattern:

CollectionResource Type
web_policiesRecord
predefined_IP_based_applicationsPredefinedIPBasedApplication
application_profilesApplicationProfile
process_based_applicationsProcessBasedApplication
trusted_networksTrustedNetwork
custom_IP_based_applicationsCustomIPBasedApplication
devicesDeviceList
admin_rolesAdminRole
admin_usersAdminUser
fail_open_policiesWebFailOpenPolicy
web_forwarding_profilesWebForwardingProfile
app_service_contractsAppServiceContract

Example: CRUD Operations​

import zssdk

session = zssdk.Session(
vanity_domain="your-vanity-domain",
client_id="your-client-id",
client_secret="your-client-secret",
)

# Create
resource = session.zcc.PredefinedIPBasedApplication()
resource.uid = "value"
resource.create()

# Read
resource = session.zcc.PredefinedIPBasedApplication(id=resource.id)
resource.load()
print(resource.uid)

# Update
resource.uid = "Updated value"
resource.update()

# Delete
resource.delete()

Example: List Resources​

# List all resources
for item in session.zcc.web_policies():
print(f"{item.id}: {item.uid}")