Skip to main content

Microtenant

Microtenant resource for Zscaler Private Access.

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 Microtenant
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 Microtenant
resource = session.zpa.Microtenant(id="your-resource-id")
resource.load()
print(resource)

# Debug output shows HTTP request/response details

Identifiers​

NameTypeDescription
idstringUnique identifier

Actions​

create_microtenant()​

Parameters:

NameTypeRequiredDescription
customer_idlongYes-
modified_timeintegerNo-
creation_timeintegerNo-
modified_bystringNo-
idstringNo-
namestringNo-
descriptionstringNo-
priorityintegerNo-
enabledbooleanNo-
criteria_attributestringNo-
criteria_attribute_valuesstringCollectionNo-
privileged_approvals_enabledbooleanNo-

Example:

resource = session.zpa.Microtenant()
result = resource.create_microtenant(customer_id=3600)
print(result)

delete()​

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

Example:

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

get_all_microtenants()​

Parameters:

NameTypeRequiredDescription
customer_idlongYes-
sort_bySortNo-
filter_byUIFilterWrapperCollectionNo-
page_byPaginationNo-

Returns: Microtenant

Example:

resource = session.zpa.Microtenant()
result = resource.get_all_microtenants(customer_id=3600)
print(result)

load()​

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

Returns: Microtenant

Example:

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

update_microtenant()​

Parameters:

NameTypeRequiredDescription
customer_idlongYes-
modified_timeintegerNo-
creation_timeintegerNo-
modified_bystringNo-
idstringNo-
namestringNo-
descriptionstringNo-
priorityintegerNo-
enabledbooleanNo-
criteria_attributestringNo-
criteria_attribute_valuesstringCollectionNo-
privileged_approvals_enabledbooleanNo-

Example:

resource = session.zpa.Microtenant(id="your-resource-id")
result = resource.update_microtenant(customer_id=3600)
print(result)

Attributes​

NameTypeRequiredDescription
idlongNo-
modified_timeintegerNo-
creation_timeintegerNo-
modified_bylongNo-
namestringYes-
descriptionstringNo-
priorityintegerNo-
enabledbooleanNo-
operatorstringYes-
criteria_attributestringNo-
criteria_attribute_valuesstringCollectionNo-
privileged_approvals_enabledbooleanNo-
userUserResourceNo-
rolesMicrotenantRoleCollectionNo-
name_without_trimstringNo-
scope_orderintegerNo-