security_policy_settings¶
The following methods allow for interaction with the ZIA Security Policy Settings API endpoints.
Methods are accessible via zia.security_policy_settings
Copyright (c) 2023, Zscaler Inc.
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- class SecurityPolicyAPI¶
Bases:
APIClientA Client object for the Security Policy Settings resource.
- add_urls_to_blacklist(url_list)¶
Adds the provided URLs to the blacklist.
- Parameters:
- Returns:
A tuple containing (updated SecurityPolicySettings instance, Response, error)
- Return type:
Examples
>>> blacklist, response, error = zia.security.add_urls_to_blacklist(['example.com'])
- add_urls_to_whitelist(url_list)¶
Adds the provided URLs to the whitelist.
- Parameters:
- Returns:
A tuple containing (updated SecurityPolicySettings instance, Response, error)
- Return type:
Examples
>>> whitelist, response, error = zia.security.add_urls_to_whitelist(['example.com'])
- delete_urls_from_blacklist(url_list)¶
Deletes the provided URLs from the blacklist.
- Parameters:
- Returns:
A tuple containing (updated SecurityPolicySettings instance, Response, error)
- Return type:
Examples
>>> blacklist, response, error = zia.security.delete_urls_from_blacklist(['example.com'])
- delete_urls_from_whitelist(url_list)¶
Deletes the provided URLs from the whitelist.
- Parameters:
- Returns:
A tuple containing (updated SecurityPolicySettings instance, Response, error)
- Return type:
Examples
>>> whitelist, response, error = zia.security.delete_urls_from_whitelist(['example.com'])
- erase_blacklist()¶
Erases all URLs in the blacklist.
- Returns:
A tuple containing (updated SecurityPolicySettings instance, Response, error)
- Return type:
Examples
>>> blacklist, response, error = zia.security.erase_blacklist()
- erase_whitelist()¶
Erases all URLs in the whitelist.
- Returns:
A tuple containing (updated SecurityPolicySettings instance, Response, error)
- Return type:
Examples
>>> whitelist, response, error = zia.security.erase_whitelist()
- get_blacklist()¶
Returns a list of blacklisted URLs.
- Returns:
A tuple containing (SecurityPolicySettings instance, Response, error)
- Return type:
Examples
>>> blacklist, response, error = zia.security.get_blacklist()
- get_whitelist()¶
Returns a list of whitelisted URLs.
- Returns:
A tuple containing (SecurityPolicySettings instance, Response, error)
- Return type:
Examples
>>> whitelist, response, error = zia.security.get_whitelist()
- replace_blacklist(url_list)¶
Replaces the existing blacklist with the URLs provided.
- Parameters:
url_list (
listofstr) – The list of URLs for the new blacklist.- Returns:
A tuple containing (updated SecurityPolicySettings instance, Response, error)
- Return type:
Examples
>>> blacklist, response, error = zia.security.replace_blacklist(['example.com'])
- replace_whitelist(url_list)¶
Replaces the existing whitelist with the URLs provided.
- Parameters:
url_list (
listofstr) – The list of URLs for the new whitelist.- Returns:
A tuple containing (updated SecurityPolicySettings instance, Response, error)
- Return type:
Examples
>>> whitelist, response, error = zia.security.replace_whitelist(['example.com'])