Certificate
Certificate resource for Zscaler Private Access V1.
This resource supports the following standard methods: load(), update(), 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 Certificate
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 Certificate
resource = session.zpa.Certificate(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_certificate()
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
customer_id | long | No | - |
microtenant_id | long | No | - |
name | string | Yes | - |
description | string | No | - |
cert_blob | string | Yes | - |
Example:
resource = session.zpa.Certificate()
result = resource.create_certificate(name="example-name", cert_blob="value")
print(result)
delete()
Deletes a Certificate by id. Only the id identifier is required; delete() takes no other arguments.
Example:
resource = session.zpa.Certificate(id="your-resource-id")
resource.delete()
load()
Fetches an existing Certificate by id. Only the id identifier is required; load() takes no other arguments.
Returns: Certificate
Example:
resource = session.zpa.Certificate(id="your-resource-id")
resource.load()
print(resource.name)
update()
Updates an existing Certificate. Call load() first, modify properties, then call update() — this method takes no arguments.
Properties for update:
| Name | Type | Required | Description |
|---|---|---|---|
customer_id | long | No | - |
microtenant_id | long | No | - |
id | long | No | - |
modified_time | integer | No | - |
creation_time | integer | No | - |
modified_by | long | No | - |
name | string | Yes | - |
microtenant_name | string | No | - |
description | string | No | - |
valid_from_in_epoch_sec | long | No | - |
valid_to_in_epoch_sec | long | No | - |
certificate | string | Yes | - |
issued_to | string | No | - |
issued_by | string | No | - |
serial_no | string | No | - |
status | string | No | - |
public_key | string | No | - |
cert_chain | string | No | - |
san | stringCollection | No | - |
name_without_trim | string | No | - |
c_name | string | No | - |
read_only | boolean | No | - |
zscaler_managed | boolean | No | - |
Example:
resource = session.zpa.Certificate(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 | - |
description | string | No | - |
valid_from_in_epoch_sec | long | No | - |
valid_to_in_epoch_sec | long | No | - |
certificate | string | Yes | - |
issued_to | string | No | - |
issued_by | string | No | - |
serial_no | string | No | - |
status | string | No | - |
public_key | string | No | - |
cert_chain | string | No | - |
san | stringCollection | No | - |
name_without_trim | string | No | - |
c_name | string | No | - |
read_only | boolean | No | - |
zscaler_managed | boolean | No | - |
Related
- Certificate - Data structure definition
- Logging guide - enable verbose logs while debugging this resource