Pac
Pac resource for Zscaler Internet Access.
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 Pac
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 Pac
resource = session.zia.Pac(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 Pac. Set properties on the resource instance, then call create() — this method takes no arguments.
Properties for creation:
| Name | Type | Required | Description |
|---|---|---|---|
create_time | integer | No | - |
description | string | No | - |
domain | string | No | - |
editable | boolean | No | - |
id | integer | No | - |
last_modification_time | integer | No | - |
last_modified_by | EntityReference | No | - |
name | string | No | - |
pac_commit_message | string | No | - |
pac_content | string | No | - |
pac_sub_URL | string | No | - |
pac_url | string | No | - |
pac_url_obfuscated | boolean | No | - |
pac_verification_status | string | No | - |
pac_version | integer | No | - |
pac_version_status | string | No | - |
total_hits | long | No | - |
Returns: Pac
Example:
resource = session.zia.Pac()
resource.create_time = 3600
resource.description = "Resource description"
resource.domain = "value"
resource.create()
print(f"Created with ID: {resource.id}")
delete()
Deletes a Pac by id. Only the id identifier is required; delete() takes no other arguments.
Example:
resource = session.zia.Pac(id="your-resource-id")
resource.delete()
validate_pac()
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
body | string | Yes | - |
Returns: PacValidationMessage
Example:
resource = session.zia.Pac()
result = resource.validate_pac(body="value")
print(result)
get_pac_version()
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
pac_version | integer | Yes | - |
filter | string | No | - |
Returns: PacFile
Example:
resource = session.zia.Pac(id="your-resource-id")
result = resource.get_pac_version(pac_version=3600)
print(result)
Attributes
| Name | Type | Required | Description |
|---|---|---|---|
create_time | integer | No | - |
description | string | No | - |
domain | string | No | - |
editable | boolean | No | - |
id | integer | No | - |
last_modification_time | integer | No | - |
last_modified_by | EntityReference | No | - |
name | string | No | - |
pac_commit_message | string | No | - |
pac_content | string | No | - |
pac_sub_URL | string | No | - |
pac_url | string | No | - |
pac_url_obfuscated | boolean | No | - |
pac_verification_status | string | No | - |
pac_version | integer | No | - |
pac_version_status | string | No | - |
total_hits | long | No | - |
Related
- Pac - Data structure definition
- Logging guide - enable verbose logs while debugging this resource