Skip to main content

ApiKeyDetail

Api Key Detail resource for Zscaler Private Access V1.

Resource operations

This resource supports the following standard methods: load(), 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 ApiKeyDetail
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 ApiKeyDetail
resource = session.zpa.ApiKeyDetail(id="your-resource-id")
resource.load()
print(resource)

# Debug output shows HTTP request/response details

Identifiers​

NameTypeDescription
idstringUnique identifier

Actions​

create_api_key()​

Parameters:

NameTypeRequiredDescription
customer_idlongNo-
microtenant_idlongNo-
idlongNo-
modified_timeintegerNo-
creation_timeintegerNo-
modified_bylongNo-
namestringYes-
microtenant_namestringNo-
restriction_typestringNo-
client_idstringNo-
client_secretstringNo-
enabledbooleanNo-
token_expiry_time_in_secintegerNo-
role_idlongNo-
pin_session_enabledbooleanNo-
is_lockedbooleanNo-
sync_versionlongNo-
iam_client_idstringNo-
read_onlybooleanNo-
zscaler_managedbooleanNo-
name_without_trimstringNo-

Example:

resource = session.zpa.ApiKeyDetail()
result = resource.create_api_key(name="example-name")
print(result)

delete()​

Deletes a ApiKeyDetail by id. Only the id identifier is required; delete() takes no other arguments.

Example:

resource = session.zpa.ApiKeyDetail(id="your-resource-id")
resource.delete()

load()​

Fetches an existing ApiKeyDetail by id. Only the id identifier is required; load() takes no other arguments.

Returns: ApiKeyDetail

Example:

resource = session.zpa.ApiKeyDetail(id="your-resource-id")
resource.load()
print(resource.name)

update_api_key()​

Parameters:

NameTypeRequiredDescription
customer_idlongNo-
microtenant_idlongNo-
idlongNo-
modified_timeintegerNo-
creation_timeintegerNo-
modified_bylongNo-
namestringYes-
microtenant_namestringNo-
restriction_typestringNo-
client_idstringNo-
client_secretstringNo-
enabledbooleanNo-
token_expiry_time_in_secintegerNo-
role_idlongNo-
pin_session_enabledbooleanNo-
is_lockedbooleanNo-
sync_versionlongNo-
iam_client_idstringNo-
read_onlybooleanNo-
zscaler_managedbooleanNo-
name_without_trimstringNo-

Example:

resource = session.zpa.ApiKeyDetail(id="your-resource-id")
result = resource.update_api_key(name="example-name")
print(result)

Attributes​

NameTypeRequiredDescription
modified_timeintegerNo-
creation_timeintegerNo-
modified_bystringNo-
idstringNo-
microtenant_idlongNo-
microtenant_namestringNo-
restriction_typestringNo-
client_idstringNo-
namestringNo-
client_secretstringNo-
token_expiry_time_in_secintegerNo-
enabledbooleanNo-
pin_session_enabledbooleanNo-
is_lockedbooleanNo-
sync_versionlongNo-
iam_client_idstringNo-
delivery_taglongNo-
customer_idstringNo-
operation_typestringNo-
role_idlongNo-
read_onlybooleanNo-
zscaler_managedbooleanNo-