zscaler-sdk-python 0.8.0__tar.gz → 0.9.0__tar.gz
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.
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/PKG-INFO +4 -4
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/pyproject.toml +5 -5
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/__init__.py +1 -1
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/utils.py +1 -5
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zia/cloudappcontrol.py +21 -4
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zia/dlp.py +7 -13
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zia/url_categories.py +1 -2
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zpa/segment_groups.py +43 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/LICENSE.md +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/README.md +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/cache/__init__.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/cache/cache.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/cache/no_op_cache.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/cache/zscaler_cache.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/constants.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/errors/__init__.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/errors/error.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/errors/http_error.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/errors/zscaler_api_error.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/exceptions/__init__.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/exceptions/exceptions.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/logger.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/ratelimiter/__init__.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/ratelimiter/ratelimiter.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/user_agent.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zcon/__init__.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zcon/activation.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zcon/admin_and_role_management.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zcon/client.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zcon/ecgroups.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zcon/locations.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zcon/provisioning.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zdx/__init__.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zdx/admin.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zdx/alerts.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zdx/apps.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zdx/devices.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zdx/filters.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zdx/inventory.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zdx/troubleshooting.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zdx/users.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zdx/zdx_client.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zia/__init__.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zia/activate.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zia/admin_and_role_management.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zia/apptotal.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zia/audit_logs.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zia/authentication_settings.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zia/client.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zia/cloud_apps.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zia/device_management.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zia/errors.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zia/firewall.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zia/forwarding_control.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zia/isolation_profile.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zia/labels.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zia/locations.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zia/sandbox.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zia/security.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zia/ssl_inspection.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zia/traffic.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zia/url_filtering.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zia/users.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zia/web_dlp.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zia/workload_groups.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zia/zpa_gateway.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zpa/README.md +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zpa/__init__.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zpa/app_segments.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zpa/app_segments_inspection.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zpa/app_segments_pra.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zpa/authdomains.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zpa/certificates.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zpa/client.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zpa/cloud_connector_groups.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zpa/connectors.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zpa/emergency_access.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zpa/errors.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zpa/idp.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zpa/inspection.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zpa/isolation.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zpa/lss.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zpa/machine_groups.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zpa/microtenants.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zpa/policies.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zpa/posture_profiles.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zpa/privileged_remote_access.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zpa/provisioning.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zpa/saml_attributes.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zpa/scim_attributes.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zpa/scim_groups.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zpa/server_groups.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zpa/servers.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zpa/service_edges.py +0 -0
- {zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zpa/trusted_networks.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: zscaler-sdk-python
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.9.0
|
|
4
4
|
Summary: Official Python SDK for the Zscaler Products (Beta)
|
|
5
5
|
Home-page: https://github.com/zscaler/zscaler-sdk-python
|
|
6
6
|
License: MIT
|
|
@@ -22,7 +22,7 @@ Classifier: Topic :: Security
|
|
|
22
22
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
23
23
|
Provides-Extra: dev
|
|
24
24
|
Requires-Dist: aenum ; extra == "dev"
|
|
25
|
-
Requires-Dist: aiohttp (>=3.10.
|
|
25
|
+
Requires-Dist: aiohttp (>=3.10.5)
|
|
26
26
|
Requires-Dist: arrow
|
|
27
27
|
Requires-Dist: black (>=24.3.0) ; extra == "dev"
|
|
28
28
|
Requires-Dist: certifi (>=2024.2.2)
|
|
@@ -30,11 +30,11 @@ Requires-Dist: charset-normalizer
|
|
|
30
30
|
Requires-Dist: cryptography (>=43.0.0)
|
|
31
31
|
Requires-Dist: flake8
|
|
32
32
|
Requires-Dist: flatdict
|
|
33
|
-
Requires-Dist: idna
|
|
33
|
+
Requires-Dist: idna (>=3.7,<4.0)
|
|
34
34
|
Requires-Dist: okta (>=2.9.7)
|
|
35
35
|
Requires-Dist: pycryptodomex
|
|
36
36
|
Requires-Dist: pydash (>=8.0.3) ; extra == "dev"
|
|
37
|
-
Requires-Dist: python-box (>=7.2.0
|
|
37
|
+
Requires-Dist: python-box (>=7.2.0)
|
|
38
38
|
Requires-Dist: python-dateutil
|
|
39
39
|
Requires-Dist: pytz
|
|
40
40
|
Requires-Dist: pyyaml
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "zscaler-sdk-python"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.9.0"
|
|
4
4
|
description = "Official Python SDK for the Zscaler Products (Beta)"
|
|
5
5
|
authors = ["Zscaler, Inc. <devrel@zscaler.com>"]
|
|
6
6
|
license = "MIT"
|
|
@@ -32,8 +32,8 @@ python = ">=3.9,<4.0"
|
|
|
32
32
|
arrow = "*"
|
|
33
33
|
certifi = ">=2024.2.2"
|
|
34
34
|
charset-normalizer = "*"
|
|
35
|
-
idna = "
|
|
36
|
-
python-box = "
|
|
35
|
+
idna = "^3.7"
|
|
36
|
+
python-box = ">=7.2.0"
|
|
37
37
|
python-dateutil = "*"
|
|
38
38
|
requests = ">=2.32.3"
|
|
39
39
|
responses = ">=0.25.3"
|
|
@@ -52,12 +52,12 @@ black = ">=24.3.0"
|
|
|
52
52
|
# cryptography = ">=3.4,<43.0"
|
|
53
53
|
cryptography = ">=43.0.0"
|
|
54
54
|
okta = ">=2.9.7"
|
|
55
|
-
aiohttp = ">=3.10.
|
|
55
|
+
aiohttp = ">=3.10.5"
|
|
56
56
|
|
|
57
57
|
[tool.poetry.dev-dependencies]
|
|
58
58
|
black = ">=24.3.0"
|
|
59
59
|
pytest = ">=8.3.1"
|
|
60
|
-
pytest-asyncio = "
|
|
60
|
+
pytest-asyncio = ">=0.23.8"
|
|
61
61
|
pytest-mock = "*"
|
|
62
62
|
pytest-recording = "^0.13.2"
|
|
63
63
|
pytest-cov = "*"
|
|
@@ -184,11 +184,7 @@ def transform_common_id_fields(id_groups: list, kwargs: dict, payload: dict):
|
|
|
184
184
|
elif key == "cbi_profile":
|
|
185
185
|
# Special handling for cbi_profile
|
|
186
186
|
if isinstance(value, dict) and all(k in value for k in ["id", "name", "url"]):
|
|
187
|
-
payload[payload_key] = {
|
|
188
|
-
"id": value["id"],
|
|
189
|
-
"name": value["name"],
|
|
190
|
-
"url": value["url"]
|
|
191
|
-
}
|
|
187
|
+
payload[payload_key] = {"id": value["id"], "name": value["name"], "url": value["url"]}
|
|
192
188
|
elif key == "cloud_app_risk_profile":
|
|
193
189
|
# Special handling for cloudAppRiskProfile
|
|
194
190
|
if isinstance(value, dict) and "id" in value:
|
|
@@ -110,6 +110,27 @@ class CloudAppControlAPI:
|
|
|
110
110
|
"""
|
|
111
111
|
return self.rest.get(f"webApplicationRules/{rule_type}/{rule_id}")
|
|
112
112
|
|
|
113
|
+
def get_rule_by_name(self, rule_type: str, rule_name: str) -> Box:
|
|
114
|
+
"""
|
|
115
|
+
Retrieves a specific Cloud App Control rule by its name and type.
|
|
116
|
+
|
|
117
|
+
Args:
|
|
118
|
+
rule_type (str): The type of rules to search within (e.g., "WEBMAIL").
|
|
119
|
+
rule_name (str): The name of the rule to retrieve.
|
|
120
|
+
|
|
121
|
+
Returns:
|
|
122
|
+
:obj:`Box`: The Cloud App Control rule if found, otherwise None.
|
|
123
|
+
|
|
124
|
+
Examples:
|
|
125
|
+
>>> rule = zia.cloudappcontrol.get_rule_by_name('WEBMAIL', 'Webmail Rule-1')
|
|
126
|
+
... print(rule)
|
|
127
|
+
"""
|
|
128
|
+
rules = self.list_rules(rule_type)
|
|
129
|
+
for rule in rules:
|
|
130
|
+
if rule.get("name") == rule_name:
|
|
131
|
+
return rule
|
|
132
|
+
return None
|
|
133
|
+
|
|
113
134
|
def add_rule(self, rule_type: str, name: str, **kwargs) -> Box:
|
|
114
135
|
"""
|
|
115
136
|
Adds a new cloud app control filter rule.
|
|
@@ -474,10 +495,6 @@ class CloudAppControlAPI:
|
|
|
474
495
|
# Set payload to value of existing record and convert nested dict keys.
|
|
475
496
|
payload = convert_keys(self.get_rule(rule_type, rule_id))
|
|
476
497
|
|
|
477
|
-
# Convert enabled to API format if present in kwargs
|
|
478
|
-
if "enabled" in kwargs:
|
|
479
|
-
kwargs["state"] = "ENABLED" if kwargs.pop("enabled") else "DISABLED"
|
|
480
|
-
|
|
481
498
|
# Convert enabled to API format if present in kwargs
|
|
482
499
|
if "enabled" in kwargs:
|
|
483
500
|
kwargs["state"] = "ENABLED" if kwargs.pop("enabled") else "DISABLED"
|
|
@@ -52,7 +52,7 @@ class DLPAPI:
|
|
|
52
52
|
if isinstance(list, Response):
|
|
53
53
|
return None
|
|
54
54
|
return list
|
|
55
|
-
|
|
55
|
+
|
|
56
56
|
def get_dict(self, dict_id: str) -> Box:
|
|
57
57
|
"""
|
|
58
58
|
Returns the DLP Dictionary that matches the specified DLP Dictionary id.
|
|
@@ -398,13 +398,7 @@ class DLPAPI:
|
|
|
398
398
|
else:
|
|
399
399
|
return response
|
|
400
400
|
|
|
401
|
-
def add_dlp_engine(
|
|
402
|
-
self,
|
|
403
|
-
name: str,
|
|
404
|
-
engine_expression=None,
|
|
405
|
-
custom_dlp_engine=None,
|
|
406
|
-
**kwargs
|
|
407
|
-
) -> Box:
|
|
401
|
+
def add_dlp_engine(self, name: str, engine_expression=None, custom_dlp_engine=None, **kwargs) -> Box:
|
|
408
402
|
"""
|
|
409
403
|
Adds a new dlp engine.
|
|
410
404
|
Args:
|
|
@@ -888,7 +882,7 @@ class DLPAPI:
|
|
|
888
882
|
if isinstance(response, Response):
|
|
889
883
|
return None
|
|
890
884
|
return response
|
|
891
|
-
|
|
885
|
+
|
|
892
886
|
def list_edm_schema_lite(self, schema_name: str = None, active_only: bool = None, fetch_tokens: bool = None) -> BoxList:
|
|
893
887
|
"""
|
|
894
888
|
Returns the list of active EDM templates (or EDM schemas) and their criteria (or token details), only.
|
|
@@ -896,7 +890,7 @@ class DLPAPI:
|
|
|
896
890
|
Args:
|
|
897
891
|
schema_name (str): The EDM schema name.
|
|
898
892
|
active_only (bool): If set to true, only active EDM templates (or schemas) are returned in the response.
|
|
899
|
-
fetch_tokens (bool): If set to true, the criteria
|
|
893
|
+
fetch_tokens (bool): If set to true, the criteria for the active templates are returned in the response.
|
|
900
894
|
|
|
901
895
|
Returns:
|
|
902
896
|
:obj:`BoxList`: A list containing ZIA DLP Engines.
|
|
@@ -911,11 +905,11 @@ class DLPAPI:
|
|
|
911
905
|
"""
|
|
912
906
|
params = {}
|
|
913
907
|
if schema_name is not None:
|
|
914
|
-
params[
|
|
908
|
+
params["schemaName"] = schema_name
|
|
915
909
|
if active_only is not None:
|
|
916
|
-
params[
|
|
910
|
+
params["activeOnly"] = active_only
|
|
917
911
|
if fetch_tokens is not None:
|
|
918
|
-
params[
|
|
912
|
+
params["fetchTokens"] = fetch_tokens
|
|
919
913
|
|
|
920
914
|
response = self.rest.get("/dlpExactDataMatchSchemas/lite", params=params)
|
|
921
915
|
if isinstance(response, Response):
|
|
@@ -58,7 +58,7 @@ class URLCategoriesAPI:
|
|
|
58
58
|
def review_domains_post(self, urls: list) -> BoxList:
|
|
59
59
|
"""
|
|
60
60
|
For the specified list of URLs, finds matching entries present in existing custom URL categories.
|
|
61
|
-
|
|
61
|
+
Allows the review of URLs for matches in existing categories to group related entries in a single category.
|
|
62
62
|
|
|
63
63
|
Args:
|
|
64
64
|
urls (list): A list of URLs to perform a category lookup on. Maximum 100 URLs per request.
|
|
@@ -104,7 +104,6 @@ class URLCategoriesAPI:
|
|
|
104
104
|
else:
|
|
105
105
|
return self.rest.put("urlCategories/review/domains", json=urls)
|
|
106
106
|
|
|
107
|
-
|
|
108
107
|
def list_categories(self, custom_only: bool = False, only_counts: bool = False) -> BoxList:
|
|
109
108
|
"""
|
|
110
109
|
Returns information on URL categories.
|
|
@@ -173,6 +173,49 @@ class SegmentGroupsAPI:
|
|
|
173
173
|
if not isinstance(resp, Response):
|
|
174
174
|
return self.get_group(group_id)
|
|
175
175
|
|
|
176
|
+
# REQUIRES DEPLOYMENT OF ET-76506 IN PRODUCTION BEFORE ENABLING IT.
|
|
177
|
+
def update_group_v2(self, group_id: str, **kwargs) -> Box:
|
|
178
|
+
"""
|
|
179
|
+
Updates an existing segment group using v2 endpoint.
|
|
180
|
+
|
|
181
|
+
Args:
|
|
182
|
+
group_id (str): The unique identifier for the segment group to be updated.
|
|
183
|
+
**kwargs: Optional keyword args.
|
|
184
|
+
|
|
185
|
+
Keyword Args:
|
|
186
|
+
name (str): The name of the new segment group.
|
|
187
|
+
enabled (bool): Enable the segment group.
|
|
188
|
+
application_ids (:obj:`list` of :obj:`dict`): Unique application IDs to associate with the segment group.
|
|
189
|
+
config_space (str): The config space for the segment group. Can either be DEFAULT or SIEM.
|
|
190
|
+
description (str): A description for the segment group.
|
|
191
|
+
policy_migrated (bool):
|
|
192
|
+
microtenant_id (str): The microtenant ID to be used for this request.
|
|
193
|
+
|
|
194
|
+
Returns:
|
|
195
|
+
:obj:`Box`: The resource record for the updated segment group.
|
|
196
|
+
|
|
197
|
+
Examples:
|
|
198
|
+
Updating the name of a segment group:
|
|
199
|
+
|
|
200
|
+
>>> zpa.segment_groups.update_group_v2('99999',
|
|
201
|
+
... name='updated_name')
|
|
202
|
+
|
|
203
|
+
"""
|
|
204
|
+
payload = {snake_to_camel(k): v for k, v in self.get_group(group_id).items()}
|
|
205
|
+
|
|
206
|
+
if kwargs.get("application_ids"):
|
|
207
|
+
payload["applications"] = [{"id": app_id} for app_id in kwargs.pop("application_ids")]
|
|
208
|
+
|
|
209
|
+
for key, value in kwargs.items():
|
|
210
|
+
payload[snake_to_camel(key)] = value
|
|
211
|
+
|
|
212
|
+
microtenant_id = kwargs.pop("microtenant_id", None)
|
|
213
|
+
params = {"microtenantId": microtenant_id} if microtenant_id else {}
|
|
214
|
+
|
|
215
|
+
resp = self.rest.put(f"segmentGroup/{group_id}", json=payload, params=params, api_version="v2").status_code
|
|
216
|
+
if not isinstance(resp, Response):
|
|
217
|
+
return self.get_group(group_id)
|
|
218
|
+
|
|
176
219
|
def delete_group(self, group_id: str, **kwargs) -> int:
|
|
177
220
|
"""
|
|
178
221
|
Deletes the specified segment group.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zcon/admin_and_role_management.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zia/admin_and_role_management.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zia/authentication_settings.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zpa/app_segments_inspection.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{zscaler_sdk_python-0.8.0 → zscaler_sdk_python-0.9.0}/zscaler/zpa/privileged_remote_access.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|