AdvancedSecurityPolicy
Advanced Security Policy resource for Zscaler Internet Access.
This resource supports the following standard methods: create(), 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 AdvancedSecurityPolicy
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",
)
# Call create on AdvancedSecurityPolicy
resource = session.zia.AdvancedSecurityPolicy()
result = resource.create()
print(result)
# Debug output shows HTTP request/response details
Actions
create()
Creates a new AdvancedSecurityPolicy. Set properties on the resource instance, then call create() — this method takes no arguments.
Properties for creation:
| Name | Type | Required | Description |
|---|---|---|---|
action | string | No | - |
blacklist_urls | stringCollection | No | - |
Returns: AdvancedSecurityPolicy
Example:
resource = session.zia.AdvancedSecurityPolicy()
resource.action = "value"
resource.blacklist_urls = ["https://example.com"]
resource.create()
print(f"Created with ID: {resource.id}")
load()
Fetches an existing AdvancedSecurityPolicy by id. Only the id identifier is required; load() takes no other arguments.
Returns: AdvancedSecurityPolicy
Example:
resource = session.zia.AdvancedSecurityPolicy()
resource.load()
print(resource)
update()
Updates an existing AdvancedSecurityPolicy. Call load() first, modify properties, then call update() — this method takes no arguments.
Properties for update:
| Name | Type | Required | Description |
|---|---|---|---|
blacklist_urls | stringCollection | No | - |
Returns: AdvancedSecurityPolicy
Example:
resource = session.zia.AdvancedSecurityPolicy(id="your-resource-id")
resource.load()
# Modify resource attributes here, then call update()
resource.update()
Attributes
| Name | Type | Required | Description |
|---|---|---|---|
blacklist_urls | stringCollection | No | - |
action | string | No | - |
Related
- AdvancedSecurityPolicy - Data structure definition
- Logging guide - enable verbose logs while debugging this resource