fail_open_policy¶
The following methods allow for interaction with the ZCC Fail Open Policy API endpoints.
Methods are accessible via zcc.fail_open_policy
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 FailOpenPolicyAPI¶
Bases:
APIClient- list_by_company(query_params=None)¶
Returns the list of Fail Open Policy By Company in the Client Connector Portal.
- Parameters:
{dict} (query_params) – Map of query parameters for the request.
[query_params.page]{int}: Specifies the page offset.[query_params.page_size]{int}: Specifies the page size.- Returns:
A list containing Fail Open Policy By Company in the Client Connector Portal.
- Return type:
Examples
List all Fail Open Policies:
>>> policy_list, response, error = client.zcc.fail_open_policy.list_by_company() >>> if error: ... print(f"Error listing trusted networks: {error}") ... return ... for policy in policy_list: ... print(policy.as_dict())
- update_failopen_policy(**kwargs)¶
Update Fail Open Policy
- Parameters:
device_type – (int):
policy_id – (int):
- Returns:
A tuple containing the Updated Fail Open Policy, response, and error.
- Return type:
Examples
Updates a fail open policy.
>>> updated_policy, _, error = client.zcc.fail_open_policy.update_failopen_policy( ... id='4441', ... active='1', ... captive_portal_web_sec_disable_minutes='10', ... enable_captive_portal_detection='1', ... enable_fail_open='1', ... enable_strict_enforcement_prompt='0', ... enable_web_sec_on_proxy_unreachable='0', ... enable_web_sec_on_tunnel_failure='0', ... strict_enforcement_prompt_delay_minutes='2', ... strict_enforcement_prompt_message='', ... tunnel_failure_retry_count='25', ... ) >>> if error: ... print(f"Error updating Fail Open Policy: {error}") ... return ... print(f"Fail Open Policy updated successfully: {updated_policy.as_dict()}")