LssResources Collection
Iterate over LssResource resources in Zscaler Private Access V2.
Returned items are LssResource resources — access their fields via dot notation.
Iterate all items
import zssdk
from zssdk.zscore.config import Config
config = Config(api_version="v2")
session = zssdk.Session(
config=config,
profile_name="beta")
# Yield each item; pagination (if any) is handled automatically
for item in session.zpa.lss_resources.all():
print(item.id)
# Materialize the full list
all_items = list(session.zpa.lss_resources.all())
print(f"Total items: {len(all_items)}")
Iterate by page
# Paginated collections yield each server page; simple collections yield one page
for page in session.zpa.lss_resources().pages():
print(f"Got a page with {len(page)} items")
for item in page:
print(item.id)
Server-side pagination
This collection paginates server-side via the ListAllLssConfigs operation.
| Pagination token | Value |
|---|---|
| Style | page |
| Input token | page |
| Output token | totalPages |
| Limit key | pagesize |
| Result key | list |
# Tune the per-request batch size and cap total yielded items
for item in session.zpa.lss_resources.page_size(50).limit(100):
print(item.id)
See the Pagination guide for the full pagination model.
Filter and search
# Server-side filtering (query params sent to the API)
for item in session.zpa.lss_resources.filter(search="value"):
print(item.id)
Resource Type
Each item is a LssResource instance with standard CRUDL and any custom actions defined on that resource.
Related
- LssResource resource — individual resource operations
- Pagination guide