forwarding_profile¶
The following methods allow for interaction with the ZCC Web Forwarding Profile API endpoints.
Methods are accessible via zcc.forwarding_profile
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 ForwardingProfileAPI¶
Bases:
APIClient- delete_forwarding_profile(profile_id)¶
Deletes the specified Forwarding Profile.
- Parameters:
profile_id (str) – The unique identifier of the Forwarding Profile.
- Returns:
A tuple containing the response object and error (if any).
- Return type:
Examples
Delete an existing Forwarding Profile:
>>> _, _, error = client.zcc.forwarding_profile.delete_forwarding_profile('541244') >>> if error: ... print(f"Error deleting Forwarding Profile: {error}") ... return ... print(f"Forwarding Profile with ID '541244' deleted successfully.")
- list_by_company(query_params=None)¶
Returns the list of Forwarding Profiles By Company ID 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.[query_params.search]{str}: The search string used to partially match.- Returns:
A list containing Forwarding Profiles By Company ID in the Client Connector Portal.
- Return type:
Examples
List all Forwarding Profile:
>>> profile_list, response, error = client.zcc.forwarding_profile.list_by_company() >>> if error: ... print(f"Error listing forwarding profiles: {error}") ... return ... for profile in profile_list: ... print(profile.as_dict())
- update_forwarding_profile(**kwargs)¶
Updates a forwarding profile.
- Args:
N/A
- Returns:
tuple: A tuple containing the Create Forwarding Profile, response, and error.
- Examples:
Updates a forwarding profile.
>>> updated_profile, response, error = client.zcc.forwarding_profile.update_forwarding_profile( ... name=ForwardingProfile01, ... hostname='server.acme.com', ... Resolved_ips_for_hostname='8.8.8.8', ... ) >>> if error: ... print(f"Error adding forwwarding profile: {error}") ... return ... print(f"Forwwarding profile added successfully: {updated_profile.as_dict()}")