PolicySet
Policy Set resource for Zscaler Private Access V1.
Resource operations
This resource supports the following standard methods: load(), update(). 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 PolicySet
logging.getLogger('zssdk.zpa').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 PolicySet
resource = session.zpa.PolicySet(id="your-resource-id")
resource.load()
print(resource)
# Debug output shows HTTP request/response details
Identifiers
| Name | Type | Description |
|---|---|---|
id | string | Unique identifier |
Actions
load()
Fetches an existing PolicySet by id. Only the id identifier is required; load() takes no other arguments.
Returns: PolicySet
Example:
resource = session.zpa.PolicySet(id="your-resource-id")
resource.load()
print(resource.name)
update()
Updates an existing PolicySet. Call load() first, modify properties, then call update() — this method takes no arguments.
Properties for update:
| Name | Type | Required | Description |
|---|---|---|---|
customer_id | long | Yes | - |
microtenant_id | long | No | - |
Example:
resource = session.zpa.PolicySet(id="your-resource-id")
resource.load()
resource.name = "Updated value"
resource.update()
Attributes
| Name | Type | Required | Description |
|---|---|---|---|
id | long | No | - |
modified_time | integer | No | - |
creation_time | integer | No | - |
modified_by | long | No | - |
name | string | Yes | - |
microtenant_id | long | No | - |
microtenant_name | string | No | - |
enabled | boolean | Yes | - |
description | string | No | - |
policy_type | integer | Yes | - |
sorted | boolean | No | - |
rules | PolicyRuleCollection | No | - |
name_without_trim | string | No | - |
Related
- PolicySet - Data structure definition
- Logging guide - enable verbose logs while debugging this resource