app_segment_by_type¶
The following methods allow for interaction with the ZPA Application Segment By Type API endpoints.
Methods are accessible via zpa.app_segment_by_type
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 ApplicationSegmentByTypeAPI¶
Bases:
APIClientA client object for the Application Segment By Type resource.
- delete_segments_by_type(segment_id, application_type, microtenant_id=None)¶
Deletes the specified Application Segment from ZPA by type.
See the Deleting a Application Segment Using API reference: for further detail on optional keyword parameter structures.
- Parameters:
- Keyword Arguments:
microtenant_id (str, optional) – The optional ID of the microtenant if applicable.
- Returns:
A tuple containing the response and error (if any).
- Return type:
Examples
>>> _, _, err = client.zpa.app_segments.delete_segments_by_type( ... segment_id='999999', ... application_type='BROWSER_ACCESS' ... ) ... if err: ... print(f"Error deleting application segment type: {err}") ... return ... print(f"Application segment with ID 999999 deleted successfully.")
- get_segments_by_type(application_type, expand_all=False, query_params=None, **kwargs)¶
Retrieve all configured application segments of a specified type, optionally expanding all related data.
- Parameters:
- Keyword Arguments:
{dict} (query_params) – Map of query parameters for the request.
[query_params.page_size]{int}: Page size for pagination.[query_params.search]{str}: Search string for filtering results.[query_params.expand_all]{bool}: Additional information related to the applications[query_params.microtenant_id]{str}: ID of the microtenant, if applicable.- Returns:
List of application segments.
- Return type:
Examples
>>> app_type = 'BROWSER_ACCESS' >>> expand_all = True >>> search = "ba_server01" >>> app_segments = zpa.app_segments.get_segments_by_type(app_type, expand_all, search=search)