customer_region_handling¶
The following methods allow for interaction with the ZCell Customer Region Handling API endpoints. Includes listing regions, updating enabled regions, and retrieving region operational status.
Methods are accessible via zcell.customer_region_handling
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 CustomerRegionHandlingAPI¶
Bases:
APIClient- list_regions(id=None, query_params=None)¶
Gets the available and configured regions for the logged-in customer.
- Parameters:
- Returns:
(result, Response, error)
- Return type:
The returned response supports
resp.search(<jmespath>)for client-side filtering/projection of the current page.Examples
>>> results, response, error = client.zcell.customer_region_handling.list_regions(id='...') >>> if error: ... print(f"Error: {error}") ... return >>> for item in results: ... print(item.as_dict())
- list_regions_operational_status(id=None, query_params=None)¶
Gets the configured regions and their operational status for the logged-in customer.
- Parameters:
- Returns:
(result, Response, error)
- Return type:
The returned response supports
resp.search(<jmespath>)for client-side filtering/projection of the current page.Examples
>>> results, response, error = client.zcell.customer_region_handling.list_regions_operational_status( ... id='...', ... ) >>> if error: ... print(f"Error: {error}") ... return >>> for item in results: ... print(item.as_dict())
- update_regions(id=None, regions=None)¶
Configure customer regions.
The API expects a raw JSON array of region codes (e.g.
["AMER"]) as the request body. Although the request is sent viaPUT, the endpoint responds with201 Createdand a raw scalar value (e.g.1) rather than a JSON object — so the raw response body is returned as the result.- Parameters:
- Returns:
(result, Response, error)
- Return type:
Examples
Configure the regions for a customer:
>>> result, _, error = client.zcell.customer_region_handling.update_regions( ... id='gi754cvqb07r0', ... regions=['AMER'], ... ) >>> if error: ... print(f"Error configuring regions: {error}") ... return >>> print(f"Regions configured successfully. Response: {result}")