Skip to main content

LssResource

Lss Resource resource for Zscaler Private Access V2.

Resource operations

This resource supports the following standard methods: create(), 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
from zssdk.zscore.config import Config

config = Config(api_version="v2")
import logging

# Enable debug logging for LssResource
logging.getLogger('zssdk.zpa').setLevel(logging.DEBUG)
logging.basicConfig(level=logging.DEBUG)

session = zssdk.Session(
config=config,
vanity_domain="your-vanity-domain",
client_id="your-client-id",
client_secret="your-client-secret",
)

# Get a specific LssResource
resource = session.zpa.LssResource(id="your-resource-id")
resource.load()
print(resource)

# Debug output shows HTTP request/response details

Identifiers​

NameTypeDescription
idstringUnique identifier

Actions​

create()​

Creates a new LssResource. Set properties on the resource instance, then call create() — this method takes no arguments.

Properties for creation:

NameTypeRequiredDescription
customer_idlongNo-
microtenant_idlongNo-
idlongNo-
configLssYes-
connector_groupsLssConnectorGroupWrapperCollectionNo-
policy_ruleLssPolicyRuleNo-
policy_rule_resourceLssPolicyRuleResourceNo-
inconsistent_config_detailsLssInconsistentConfigDetailsNo-

Example:

resource = session.zpa.LssResource()
resource.config = {"id": 3600, "modified_time": 3600, "creation_time": 3600, "modified_by": 3600}
resource.create()
print(f"Created with ID: {resource.id}")

delete()​

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

Example:

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

get_customer_lss_log_format()​

Parameters:

NameTypeRequiredDescription
customer_idlongYes-
log_typestringNo-

Returns: DynamicObject

Example:

resource = session.zpa.LssResource()
result = resource.get_customer_lss_log_format(customer_id=3600)
print(result)

load()​

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

Returns: LssResource

Example:

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

update()​

Updates an existing LssResource. Call load() first, modify properties, then call update() — this method takes no arguments.

Properties for update:

NameTypeRequiredDescription
customer_idlongNo-
microtenant_idlongNo-
idlongNo-
configLssYes-
connector_groupsLssConnectorGroupWrapperCollectionNo-
policy_ruleLssPolicyRuleNo-
policy_rule_resourceLssPolicyRuleResourceNo-
inconsistent_config_detailsLssInconsistentConfigDetailsNo-

Example:

resource = session.zpa.LssResource(id="your-resource-id")
resource.load()
# Modify resource attributes here, then call update()
resource.update()

Attributes​

NameTypeRequiredDescription
idlongNo-
configLssYes-
connector_groupsLssConnectorGroupWrapperCollectionNo-
policy_ruleLssPolicyRuleNo-
policy_rule_resourceLssPolicyRuleResourceNo-
inconsistent_config_detailsLssInconsistentConfigDetailsNo-
microtenant_idstringNo-