zscaler-sdk-python 0.1.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. zscaler/__init__.py +35 -0
  2. zscaler/cache/__init__.py +0 -0
  3. zscaler/cache/cache.py +105 -0
  4. zscaler/cache/no_op_cache.py +66 -0
  5. zscaler/cache/zscaler_cache.py +159 -0
  6. zscaler/constants.py +26 -0
  7. zscaler/errors/__init__.py +0 -0
  8. zscaler/errors/error.py +10 -0
  9. zscaler/errors/http_error.py +20 -0
  10. zscaler/errors/zscaler_api_error.py +21 -0
  11. zscaler/exceptions/__init__.py +1 -0
  12. zscaler/exceptions/exceptions.py +101 -0
  13. zscaler/logger.py +57 -0
  14. zscaler/ratelimiter/__init__.py +0 -0
  15. zscaler/ratelimiter/ratelimiter.py +37 -0
  16. zscaler/user_agent.py +21 -0
  17. zscaler/utils.py +546 -0
  18. zscaler/zia/__init__.py +629 -0
  19. zscaler/zia/activate.py +51 -0
  20. zscaler/zia/admin_and_role_management.py +336 -0
  21. zscaler/zia/apptotal.py +71 -0
  22. zscaler/zia/audit_logs.py +93 -0
  23. zscaler/zia/authentication_settings.py +94 -0
  24. zscaler/zia/client.py +88 -0
  25. zscaler/zia/cloud_apps.py +402 -0
  26. zscaler/zia/device_management.py +90 -0
  27. zscaler/zia/dlp.py +772 -0
  28. zscaler/zia/errors.py +37 -0
  29. zscaler/zia/firewall.py +1064 -0
  30. zscaler/zia/forwarding_control.py +267 -0
  31. zscaler/zia/isolation_profile.py +83 -0
  32. zscaler/zia/labels.py +178 -0
  33. zscaler/zia/locations.py +645 -0
  34. zscaler/zia/sandbox.py +201 -0
  35. zscaler/zia/security.py +232 -0
  36. zscaler/zia/ssl_inspection.py +169 -0
  37. zscaler/zia/traffic.py +819 -0
  38. zscaler/zia/url_categories.py +422 -0
  39. zscaler/zia/url_filtering.py +306 -0
  40. zscaler/zia/users.py +378 -0
  41. zscaler/zia/web_dlp.py +291 -0
  42. zscaler/zia/workload_groups.py +58 -0
  43. zscaler/zia/zpa_gateway.py +179 -0
  44. zscaler/zpa/README.md +40 -0
  45. zscaler/zpa/__init__.py +655 -0
  46. zscaler/zpa/app_segments.py +317 -0
  47. zscaler/zpa/app_segments_inspection.py +295 -0
  48. zscaler/zpa/app_segments_pra.py +296 -0
  49. zscaler/zpa/certificates.py +230 -0
  50. zscaler/zpa/client.py +113 -0
  51. zscaler/zpa/cloud_connector_groups.py +75 -0
  52. zscaler/zpa/connectors.py +500 -0
  53. zscaler/zpa/emergency_access.py +170 -0
  54. zscaler/zpa/errors.py +37 -0
  55. zscaler/zpa/idp.py +83 -0
  56. zscaler/zpa/inspection.py +968 -0
  57. zscaler/zpa/isolation_profile.py +85 -0
  58. zscaler/zpa/lss.py +544 -0
  59. zscaler/zpa/machine_groups.py +79 -0
  60. zscaler/zpa/policies.py +824 -0
  61. zscaler/zpa/posture_profiles.py +120 -0
  62. zscaler/zpa/privileged_remote_access.py +827 -0
  63. zscaler/zpa/provisioning.py +262 -0
  64. zscaler/zpa/saml_attributes.py +96 -0
  65. zscaler/zpa/scim_attributes.py +115 -0
  66. zscaler/zpa/scim_groups.py +133 -0
  67. zscaler/zpa/segment_groups.py +183 -0
  68. zscaler/zpa/server_groups.py +211 -0
  69. zscaler/zpa/servers.py +198 -0
  70. zscaler/zpa/service_edges.py +388 -0
  71. zscaler/zpa/trusted_networks.py +125 -0
  72. zscaler_sdk_python-0.1.3.dist-info/LICENSE.md +21 -0
  73. zscaler_sdk_python-0.1.3.dist-info/METADATA +362 -0
  74. zscaler_sdk_python-0.1.3.dist-info/RECORD +75 -0
  75. zscaler_sdk_python-0.1.3.dist-info/WHEEL +4 -0
@@ -0,0 +1,655 @@
1
+ import logging
2
+ import os
3
+ import time
4
+ import urllib.parse
5
+ import uuid
6
+ from time import sleep
7
+
8
+ import requests
9
+ from box import BoxList
10
+
11
+ from zscaler import __version__
12
+ from zscaler.cache.no_op_cache import NoOpCache
13
+ from zscaler.cache.zscaler_cache import ZscalerCache
14
+ from zscaler.constants import ZPA_BASE_URLS
15
+ from zscaler.errors.http_error import HTTPError, ZscalerAPIError
16
+ from zscaler.exceptions.exceptions import HTTPException, ZscalerAPIException
17
+ from zscaler.logger import setup_logging
18
+ from zscaler.ratelimiter.ratelimiter import RateLimiter
19
+ from zscaler.user_agent import UserAgent
20
+ from zscaler.utils import (
21
+ convert_keys_to_snake,
22
+ dump_request,
23
+ dump_response,
24
+ format_json_response,
25
+ is_token_expired,
26
+ retry_with_backoff,
27
+ snake_to_camel,
28
+ )
29
+ from zscaler.zpa.app_segments import ApplicationSegmentAPI
30
+ from zscaler.zpa.app_segments_inspection import AppSegmentsInspectionAPI
31
+ from zscaler.zpa.app_segments_pra import AppSegmentsPRAAPI
32
+ from zscaler.zpa.certificates import CertificatesAPI
33
+ from zscaler.zpa.client import ZPAClient
34
+ from zscaler.zpa.cloud_connector_groups import CloudConnectorGroupsAPI
35
+ from zscaler.zpa.connectors import AppConnectorControllerAPI
36
+ from zscaler.zpa.emergency_access import EmergencyAccessAPI
37
+ from zscaler.zpa.idp import IDPControllerAPI
38
+ from zscaler.zpa.inspection import InspectionControllerAPI
39
+ from zscaler.zpa.isolation_profile import IsolationProfileAPI
40
+ from zscaler.zpa.lss import LSSConfigControllerAPI
41
+ from zscaler.zpa.machine_groups import MachineGroupsAPI
42
+ from zscaler.zpa.policies import PolicySetsAPI
43
+ from zscaler.zpa.posture_profiles import PostureProfilesAPI
44
+ from zscaler.zpa.privileged_remote_access import PrivilegedRemoteAccessAPI
45
+ from zscaler.zpa.provisioning import ProvisioningKeyAPI
46
+ from zscaler.zpa.saml_attributes import SAMLAttributesAPI
47
+ from zscaler.zpa.scim_attributes import ScimAttributeHeaderAPI
48
+ from zscaler.zpa.scim_groups import SCIMGroupsAPI
49
+ from zscaler.zpa.segment_groups import SegmentGroupsAPI
50
+ from zscaler.zpa.server_groups import ServerGroupsAPI
51
+ from zscaler.zpa.servers import AppServersAPI
52
+ from zscaler.zpa.service_edges import ServiceEdgesAPI
53
+ from zscaler.zpa.trusted_networks import TrustedNetworksAPI
54
+
55
+ # Setup the logger
56
+ setup_logging(logger_name="zscaler-sdk-python")
57
+ logger = logging.getLogger("zscaler-sdk-python")
58
+
59
+
60
+ class ZPAClientHelper(ZPAClient):
61
+ """A Controller to access Endpoints in the Zscaler Private Access (ZPA) API.
62
+
63
+ The ZPA object stores the session token and simplifies access to API interfaces within ZPA.
64
+
65
+ Attributes:
66
+ client_id (str): The ZPA API client ID generated from the ZPA console.
67
+ client_secret (str): The ZPA API client secret generated from the ZPA console.
68
+ customer_id (str): The ZPA tenant ID found in the Administration > Company menu in the ZPA console.
69
+ cloud (str): The Zscaler cloud for your tenancy, accepted values are:
70
+
71
+ * ``production``
72
+ * ``beta``
73
+ * ``gov``
74
+ * ``govus``
75
+ * ``zpatwo``
76
+ """
77
+
78
+ def __init__(
79
+ self,
80
+ client_id,
81
+ client_secret,
82
+ customer_id,
83
+ cloud,
84
+ timeout=240,
85
+ cache=None,
86
+ fail_safe=False,
87
+ ):
88
+ # Initialize rate limiter
89
+ # You may want to adjust these parameters as per your rate limit configuration
90
+ self.rate_limiter = RateLimiter(
91
+ get_limit=20, # Adjusted to allow 20 GET requests per 10 seconds
92
+ post_put_delete_limit=10, # Adjusted to allow 10 POST/PUT/DELETE requests per 10 seconds
93
+ get_freq=10, # Adjust frequency to 10 seconds
94
+ post_put_delete_freq=10, # Adjust frequency to 10 seconds
95
+ )
96
+
97
+ # Validate cloud value
98
+ if cloud not in ZPA_BASE_URLS:
99
+ valid_clouds = ", ".join(ZPA_BASE_URLS.keys())
100
+ raise ValueError(
101
+ f"The provided ZPA_CLOUD value '{cloud}' is not supported. "
102
+ f"Please use one of the following supported values: {valid_clouds}"
103
+ )
104
+
105
+ # Continue with existing initialization...
106
+ # Select the appropriate URL
107
+ self.baseurl = ZPA_BASE_URLS.get(cloud, ZPA_BASE_URLS["PRODUCTION"])
108
+
109
+ self.timeout = timeout
110
+ self.client_id = client_id
111
+ self.client_secret = client_secret
112
+ self.customer_id = customer_id
113
+ self.cloud = cloud
114
+ self.url = f"{self.baseurl}/mgmtconfig/v1/admin/customers/{customer_id}"
115
+ self.user_config_url = f"{self.baseurl}/userconfig/v1/customers/{customer_id}"
116
+ self.v2_url = f"{self.baseurl}/mgmtconfig/v2/admin/customers/{customer_id}"
117
+ self.cbi_url = f"{self.baseurl}/cbiconfig/cbi/api/customers/{customer_id}"
118
+ self.fail_safe = fail_safe
119
+ # Cache setup
120
+ cache_enabled = os.environ.get("ZSCALER_CLIENT_CACHE_ENABLED", "true").lower() == "true"
121
+ if cache is None:
122
+ if cache_enabled:
123
+ ttl = int(os.environ.get("ZSCALER_CLIENT_CACHE_DEFAULT_TTL", 3600))
124
+ tti = int(os.environ.get("ZSCALER_CLIENT_CACHE_DEFAULT_TTI", 1800))
125
+ self.cache = ZscalerCache(ttl=ttl, tti=tti)
126
+ else:
127
+ self.cache = NoOpCache()
128
+ else:
129
+ self.cache = cache
130
+
131
+ # Initialize user-agent
132
+ ua = UserAgent()
133
+ self.user_agent = ua.get_user_agent_string()
134
+ self.refreshToken()
135
+
136
+ def refreshToken(self):
137
+ # login
138
+ response = self.login()
139
+ if response is None or response.status_code > 299 or not response.json():
140
+ logger.error("Failed to login using provided credentials, response: %s", response)
141
+ raise Exception("Failed to login using provided credentials.")
142
+ self.access_token = response.json().get("access_token")
143
+ self.headers = {
144
+ "Content-Type": "application/json",
145
+ "Accept": "application/json",
146
+ "Authorization": f"Bearer {self.access_token}",
147
+ "User-Agent": self.user_agent,
148
+ }
149
+
150
+ @retry_with_backoff(retries=5)
151
+ def login(self):
152
+ """Log in to the ZPA API and set the access token for subsequent requests."""
153
+ data = urllib.parse.urlencode({"client_id": self.client_id, "client_secret": self.client_secret})
154
+ headers = {
155
+ "Content-Type": "application/x-www-form-urlencoded",
156
+ "Accept": "application/json",
157
+ "User-Agent": self.user_agent,
158
+ }
159
+ try:
160
+ url = f"{self.baseurl}/signin"
161
+ resp = requests.post(url, data=data, headers=headers, timeout=self.timeout)
162
+ # Avoid logging all data from the response, focus on the status and a summary instead
163
+ logger.info("Login attempt with status: %d", resp.status_code)
164
+ return resp
165
+ except Exception as e:
166
+ logger.error("Login failed due to an exception: %s", str(e))
167
+ return None
168
+
169
+ def send(self, method, path, json=None, params=None, api_version: str = None):
170
+ """
171
+ Send a request to the ZPA API.
172
+
173
+ Parameters:
174
+ - method (str): The HTTP method.
175
+ - path (str): API endpoint path.
176
+ - json (dict, optional): Request payload. Defaults to None.
177
+ Returns:
178
+ - Response: Response object from the request.
179
+ """
180
+ api = self.url
181
+ if api_version is None:
182
+ api = self.url
183
+ elif api_version == "v2":
184
+ api = self.v2_url
185
+ elif api_version == "userconfig_v1":
186
+ api = self.user_config_url
187
+
188
+ url = f"{api}/{path.lstrip('/')}"
189
+ start_time = time.time()
190
+ # Update headers to include the user agent
191
+ headers_with_user_agent = self.headers.copy()
192
+ headers_with_user_agent["User-Agent"] = self.user_agent
193
+ # Generate a unique UUID for this request
194
+ request_uuid = uuid.uuid4()
195
+ dump_request(logger, url, method, json, params, headers_with_user_agent, request_uuid)
196
+ # Check cache before sending request
197
+ cache_key = self.cache.create_key(url, params)
198
+ if method == "GET" and self.cache.contains(cache_key):
199
+ resp = self.cache.get(cache_key)
200
+ dump_response(
201
+ logger=logger,
202
+ url=url,
203
+ method=method,
204
+ params=params,
205
+ resp=resp,
206
+ request_uuid=request_uuid,
207
+ start_time=start_time,
208
+ from_cache=True,
209
+ )
210
+ return resp
211
+
212
+ attempts = 0
213
+ while attempts < 5: # Trying a maximum of 5 times
214
+ try:
215
+ # If the token is None or expired, fetch a new token
216
+ if is_token_expired(self.access_token):
217
+ logger.warning("The provided or fetched token was already expired. Refreshing...")
218
+ self.refreshToken()
219
+ resp = requests.request(
220
+ method,
221
+ url,
222
+ json=json,
223
+ headers=headers_with_user_agent,
224
+ timeout=self.timeout,
225
+ )
226
+ dump_response(
227
+ logger=logger,
228
+ url=url,
229
+ params=params,
230
+ method=method,
231
+ resp=resp,
232
+ request_uuid=request_uuid,
233
+ start_time=start_time,
234
+ )
235
+ if resp.status_code == 429: # HTTP Status code 429 indicates "Too Many Requests"
236
+ sleep_time = int(
237
+ resp.headers.get("Retry-After", 2)
238
+ ) # Default to 60 seconds if 'Retry-After' header is missing
239
+ logger.warning(f"Rate limit exceeded. Retrying in {sleep_time} seconds.")
240
+ sleep(sleep_time)
241
+ attempts += 1
242
+ continue
243
+ else:
244
+ break
245
+ except requests.RequestException as e:
246
+ if attempts == 4: # If it's the last attempt, raise the exception
247
+ logger.error(f"Failed to send {method} request to {url} after 5 attempts. Error: {str(e)}")
248
+ raise e
249
+ else:
250
+ logger.warning(f"Failed to send {method} request to {url}. Retrying... Error: {str(e)}")
251
+ attempts += 1
252
+ sleep(5) # Sleep for 5 seconds before retrying
253
+
254
+ # If Non-GET call, clear the
255
+ if method != "GET":
256
+ self.cache.delete(cache_key)
257
+
258
+ # Detailed logging for request and response
259
+ try:
260
+ response_data = resp.json()
261
+ except ValueError: # Using ValueError for JSON decoding errors
262
+ response_data = resp.text
263
+ # check if call was succesful
264
+ if 200 > resp.status_code or resp.status_code > 299:
265
+ # create errors
266
+ try:
267
+ error = ZscalerAPIError(url, resp, response_data)
268
+ if self.fail_safe:
269
+ raise ZscalerAPIException(response_data)
270
+ except ZscalerAPIException:
271
+ raise
272
+ except Exception:
273
+ error = HTTPError(url, resp, response_data)
274
+ if self.fail_safe:
275
+ logger.error(response_data)
276
+ raise HTTPException(response_data)
277
+ logger.error(error)
278
+ # Cache the response if it's a successful GET request
279
+ if method == "GET" and resp.status_code == 200:
280
+ self.cache.add(cache_key, resp)
281
+ return resp
282
+
283
+ def get(self, path, json=None, params=None, api_version: str = None):
284
+ """
285
+ Send a GET request to the ZPA API.
286
+
287
+ Parameters:
288
+ - path (str): API endpoint path.
289
+ - data (dict, optional): Request payload. Defaults to None.
290
+ Returns:
291
+ - Response: Response object from the request.
292
+ """
293
+
294
+ # Use rate limiter before making a request
295
+ should_wait, delay = self.rate_limiter.wait("GET")
296
+ if should_wait:
297
+ time.sleep(delay)
298
+
299
+ # Now proceed with sending the request
300
+ resp = self.send("GET", path, json, params, api_version=api_version)
301
+ formatted_resp = format_json_response(resp, box_attrs=dict())
302
+ return formatted_resp
303
+
304
+ def put(self, path, json=None, params=None, api_version: str = None):
305
+ should_wait, delay = self.rate_limiter.wait("PUT")
306
+ if should_wait:
307
+ time.sleep(delay)
308
+ resp = self.send("PUT", path, json, params, api_version=api_version)
309
+ formatted_resp = format_json_response(resp, box_attrs=dict())
310
+ return formatted_resp
311
+
312
+ def post(self, path, json=None, params=None, api_version: str = None):
313
+ should_wait, delay = self.rate_limiter.wait("POST")
314
+ if should_wait:
315
+ time.sleep(delay)
316
+ resp = self.send("POST", path, json, params, api_version=api_version)
317
+ formatted_resp = format_json_response(resp, box_attrs=dict())
318
+ return formatted_resp
319
+
320
+ def delete(self, path, json=None, params=None, api_version: str = None):
321
+ should_wait, delay = self.rate_limiter.wait("DELETE")
322
+ if should_wait:
323
+ time.sleep(delay)
324
+ return self.send("DELETE", path, json, params, api_version=api_version)
325
+
326
+ def get_paginated_data(
327
+ self,
328
+ path=None,
329
+ params=None,
330
+ expected_status_code=200,
331
+ api_version: str = None,
332
+ search=None,
333
+ search_field="name",
334
+ max_pages=None,
335
+ max_items=None,
336
+ sort_order=None,
337
+ sort_by=None,
338
+ sort_dir=None,
339
+ start_time=None,
340
+ end_time=None,
341
+ idp_group_id=None,
342
+ scim_user_id=None,
343
+ page=None,
344
+ pagesize=20,
345
+ ):
346
+ """
347
+ Fetches paginated data from the ZPA API based on specified parameters and handles various types of API pagination.
348
+
349
+ Args:
350
+ path (str): The API endpoint path to send requests to.
351
+ params (dict): Initial set of query parameters for the API request.
352
+ expected_status_code (int): The expected HTTP status code for a successful request. Defaults to 200.
353
+ api_version (str): Specifies the version of the API to be used. Helps in routing within the API service.
354
+ search (str): Search query to filter the results based on specific conditions.
355
+ search_field (str): The field name against which to search the query. Default is "name".
356
+ max_pages (int): The maximum number of pages to fetch. If None, fetches all available pages.
357
+ max_items (int): The maximum number of items to fetch across all pages. Stops fetching once reached.
358
+ sort_order (str): Specifies the order of sorting (e.g., 'ASC' or 'DSC').
359
+ sort_by (str): Specifies the field name by which the results should be sorted.
360
+ sort_dir (str): Specifies the direction of sorting. Supported values: ASC, DESC.
361
+ start_time (str): The start of a time range for filtering data based on modification time.
362
+ end_time (str): The end of a time range for filtering data based on modification time.
363
+ idp_group_id (str): Identifier for a specific IDP group, used for fetching data related to that group.
364
+ scim_user_id (str): Identifier for a specific SCIM user, used for fetching data related to that user.
365
+ page (int): Specific page number to fetch. Overrides automatic pagination.
366
+ pagesize (int): Number of items per page, default is 20 as per API specification, maximum is 500.
367
+
368
+ Returns:
369
+ tuple: A tuple containing:
370
+ - BoxList: A list of fetched items wrapped in a BoxList for easy access.
371
+ - str: An error message if any occurred during the data fetching process.
372
+
373
+ Raises:
374
+ Logs errors and warnings through the configured logger when requests fail or if no data is found.
375
+ """
376
+ logger = logging.getLogger(__name__)
377
+
378
+ ERROR_MESSAGES = {
379
+ "UNEXPECTED_STATUS": "Unexpected status code {status_code} received for page {page}.",
380
+ "MISSING_DATA_KEY": "The key 'list' was not found in the response for page {page}.",
381
+ "EMPTY_RESULTS": "No results found for all requested pages.",
382
+ }
383
+
384
+ if params is None:
385
+ params = {}
386
+
387
+ if (page is not None or pagesize != 20) and (max_pages is not None or max_items is not None):
388
+ raise ValueError(
389
+ "Do not mix 'page' or 'pagesize' with 'max_pages' or 'max_items'. Choose either set of parameters."
390
+ )
391
+
392
+ params["pagesize"] = min(pagesize, 500) # Apply maximum constraint and handle default
393
+
394
+ if page:
395
+ params["page"] = page
396
+
397
+ if search:
398
+ api_search_field = snake_to_camel(search_field)
399
+ params["search"] = f"{api_search_field} EQ {search}"
400
+ if sort_order:
401
+ params["sortOrder"] = sort_order
402
+ if sort_by:
403
+ params["sortBy"] = sort_by
404
+ if sort_dir:
405
+ params["sortdir"] = sort_dir
406
+ if start_time and end_time:
407
+ params["startTime"] = start_time
408
+ params["endTime"] = end_time
409
+ if idp_group_id:
410
+ params["idpGroupId"] = idp_group_id
411
+ if scim_user_id:
412
+ params["scimUserId"] = scim_user_id
413
+
414
+ total_collected = 0
415
+ ret_data = []
416
+
417
+ try:
418
+ while True:
419
+ if max_pages is not None and (page is not None and page > max_pages):
420
+ break
421
+
422
+ should_wait, delay = self.rate_limiter.wait("GET")
423
+ if should_wait:
424
+ time.sleep(delay)
425
+
426
+ url = f"{path}?{urllib.parse.urlencode(params)}"
427
+ response = self.send("GET", url, api_version=api_version)
428
+
429
+ if response.status_code != expected_status_code:
430
+ error_msg = ERROR_MESSAGES["UNEXPECTED_STATUS"].format(status_code=response.status_code, page=page)
431
+ logger.error(error_msg)
432
+ return BoxList([]), error_msg
433
+
434
+ response_data = response.json()
435
+ data = response_data.get("list", [])
436
+ if not data and (page is None or page == 1):
437
+ error_msg = ERROR_MESSAGES["EMPTY_RESULTS"]
438
+ logger.warn(error_msg)
439
+ return BoxList([]), error_msg
440
+
441
+ data = convert_keys_to_snake(data)
442
+ ret_data.extend(data[: max_items - total_collected] if max_items is not None else data)
443
+ total_collected += len(data)
444
+
445
+ if max_items is not None and total_collected >= max_items:
446
+ break
447
+
448
+ nextPage = response_data.get("nextPage")
449
+ if not nextPage or (max_pages is not None and page >= max_pages):
450
+ break
451
+
452
+ page = nextPage if page is None else page + 1
453
+ params["page"] = page
454
+
455
+ finally:
456
+ time.sleep(1) # Ensure a delay between requests regardless of outcome
457
+
458
+ if not ret_data:
459
+ error_msg = ERROR_MESSAGES["EMPTY_RESULTS"]
460
+ logger.warn(error_msg)
461
+ return BoxList([]), error_msg
462
+
463
+ return BoxList(ret_data), None
464
+
465
+ @property
466
+ def app_segments(self):
467
+ """
468
+ The interface object for the :ref:`ZPA Application Segments interface <zpa-app_segments>`.
469
+
470
+ """
471
+ return ApplicationSegmentAPI(self)
472
+
473
+ @property
474
+ def app_segments_pra(self):
475
+ """
476
+ The interface object for the :ref:`ZPA Application Segments PRA interface <zpa-app_segments_pra>`.
477
+
478
+ """
479
+ return AppSegmentsPRAAPI(self)
480
+
481
+ @property
482
+ def app_segments_inspection(self):
483
+ """
484
+ The interface object for the :ref:`ZPA Application Segments PRA interface <zpa-app_segments_inspection>`.
485
+
486
+ """
487
+ return AppSegmentsInspectionAPI(self)
488
+
489
+ @property
490
+ def certificates(self):
491
+ """
492
+ The interface object for the :ref:`ZPA Browser Access Certificates interface <zpa-certificates>`.
493
+
494
+ """
495
+ return CertificatesAPI(self)
496
+
497
+ @property
498
+ def isolation_profile(self):
499
+ """
500
+ The interface object for the :ref:`ZPA Isolation Profiles <zpa-isolation_profile>`.
501
+
502
+ """
503
+ return IsolationProfileAPI(self)
504
+
505
+ @property
506
+ def cloud_connector_groups(self):
507
+ """
508
+ The interface object for the :ref:`ZPA Cloud Connector Groups interface <zpa-cloud_connector_groups>`.
509
+
510
+ """
511
+ return CloudConnectorGroupsAPI(self)
512
+
513
+ @property
514
+ def connectors(self):
515
+ """
516
+ The interface object for the :ref:`ZPA Connectors interface <zpa-connectors>`.
517
+
518
+ """
519
+ return AppConnectorControllerAPI(self)
520
+
521
+ @property
522
+ def emergency_access(self):
523
+ """
524
+ The interface object for the :ref:`ZPA Emergency Access interface <zpa-emergency_access>`.
525
+
526
+ """
527
+ return EmergencyAccessAPI(self)
528
+
529
+ @property
530
+ def idp(self):
531
+ """
532
+ The interface object for the :ref:`ZPA IDP interface <zpa-idp>`.
533
+
534
+ """
535
+ return IDPControllerAPI(self)
536
+
537
+ @property
538
+ def inspection(self):
539
+ """
540
+ The interface object for the :ref:`ZPA Inspection interface <zpa-inspection>`.
541
+
542
+ """
543
+ return InspectionControllerAPI(self)
544
+
545
+ @property
546
+ def lss(self):
547
+ """
548
+ The interface object for the :ref:`ZIA Log Streaming Service Config interface <zpa-lss>`.
549
+
550
+ """
551
+ return LSSConfigControllerAPI(self)
552
+
553
+ @property
554
+ def machine_groups(self):
555
+ """
556
+ The interface object for the :ref:`ZPA Machine Groups interface <zpa-machine_groups>`.
557
+
558
+ """
559
+ return MachineGroupsAPI(self)
560
+
561
+ @property
562
+ def policies(self):
563
+ """
564
+ The interface object for the :ref:`ZPA Policy Sets interface <zpa-policies>`.
565
+
566
+ """
567
+ return PolicySetsAPI(self)
568
+
569
+ @property
570
+ def posture_profiles(self):
571
+ """
572
+ The interface object for the :ref:`ZPA Posture Profiles interface <zpa-posture_profiles>`.
573
+
574
+ """
575
+ return PostureProfilesAPI(self)
576
+
577
+ @property
578
+ def privileged_remote_access(self):
579
+ """
580
+ The interface object for the :ref:`ZPA Privileged Remote Access interface <zpa-privileged_remote_access>`.
581
+
582
+ """
583
+ return PrivilegedRemoteAccessAPI(self)
584
+
585
+ @property
586
+ def provisioning(self):
587
+ """
588
+ The interface object for the :ref:`ZPA Provisioning interface <zpa-provisioning>`.
589
+
590
+ """
591
+ return ProvisioningKeyAPI(self)
592
+
593
+ @property
594
+ def saml_attributes(self):
595
+ """
596
+ The interface object for the :ref:`ZPA SAML Attributes interface <zpa-saml_attributes>`.
597
+
598
+ """
599
+ return SAMLAttributesAPI(self)
600
+
601
+ @property
602
+ def scim_attributes(self):
603
+ """
604
+ The interface object for the :ref:`ZPA SCIM Attributes interface <zpa-scim_attributes>`.
605
+
606
+ """
607
+ return ScimAttributeHeaderAPI(self)
608
+
609
+ @property
610
+ def scim_groups(self):
611
+ """
612
+ The interface object for the :ref:`ZPA SCIM Groups interface <zpa-scim_groups>`.
613
+
614
+ """
615
+ return SCIMGroupsAPI(self)
616
+
617
+ @property
618
+ def segment_groups(self):
619
+ """
620
+ The interface object for the :ref:`ZPA Segment Groups interface <zpa-segment_groups>`.
621
+
622
+ """
623
+ return SegmentGroupsAPI(self)
624
+
625
+ @property
626
+ def server_groups(self):
627
+ """
628
+ The interface object for the :ref:`ZPA Server Groups interface <zpa-server_groups>`.
629
+
630
+ """
631
+ return ServerGroupsAPI(self)
632
+
633
+ @property
634
+ def servers(self):
635
+ """
636
+ The interface object for the :ref:`ZPA Application Servers interface <zpa-app_servers>`.
637
+
638
+ """
639
+ return AppServersAPI(self)
640
+
641
+ @property
642
+ def service_edges(self):
643
+ """
644
+ The interface object for the :ref:`ZPA Service Edges interface <zpa-service_edges>`.
645
+
646
+ """
647
+ return ServiceEdgesAPI(self)
648
+
649
+ @property
650
+ def trusted_networks(self):
651
+ """
652
+ The interface object for the :ref:`ZPA Trusted Networks interface <zpa-trusted_networks>`.
653
+
654
+ """
655
+ return TrustedNetworksAPI(self)