app_connector_groups¶
The following methods allow for interaction with the ZPA ZPA Connector Groups API endpoints.
Methods are accessible via zpa.app_connector_groups
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 AppConnectorGroupAPI¶
Bases:
APIClientA Client object for the App Connector Groups resource.
- add_connector_group(**kwargs)¶
Adds a new ZPA App Connector Group.
- Parameters:
- Keyword Arguments:
**connector_ids (list) – The unique ids for the App Connectors that will be added to this App Connector Group.
**city_country (str) –
The City and Country for where the App Connectors are located. Format is:
<City>, <Country Code>e.g.Sydney, AU**country_code (str) – The ISO<std> Country Code that represents the country where the App Connectors are located.
**description (str) – Additional information about the App Connector Group.
**dns_query_type (str) – The type of DNS queries that are enabled for this App Connector Group. Accepted values are:
IPV4_IPV6,IPV4andIPV6**enabled (bool) – Is the App Connector Group enabled? Defaults to
True.**override_version_profile (bool) – Override the local App Connector version according to
version_profile. Defaults toFalse.**server_group_ids (list) – The unique ids of the Server Groups that are associated with this App Connector Group
**lss_app_connector_group (bool)
**upgrade_day (str) – The day of the week that upgrades will be pushed to the App Connector.
**upgrade_time_in_secs (str) – The time of the day that upgrades will be pushed to the App Connector.
**version_profile (str) – The version profile to use. This will automatically set
override_version_profileto True. Accepted values are:default,previous_defaultandnew_release
- Returns:
A tuple containing (AppConnectorGroup, Response, error)
- Return type:
Tuple
Examples
>>> added_group, _, err = client.zpa.app_connector_groups.add_connector_group( ... name=f"NewAppConnectorgroup_{random.randint(1000, 10000)}", ... description=f"NewAppConnectorgroup_{random.randint(1000, 10000)}", ... enabled= True, ... city_country= "San Jose, US", ... country_code= "US", ... latitude= "37.3382082", ... longitude= "-121.8863286", ... location= "San Jose, CA, USA", ... upgrade_day= "SUNDAY", ... dns_query_type= "IPV4_IPV6", ... ) ... if err: ... print(f"Error creating connector group: {err}") ... return ... print(f"connector group created successfully: {added_group.as_dict()}")
- delete_connector_group(group_id, microtenant_id=None)¶
Deletes the specified App Connector Group from ZPA.
- Parameters:
- Returns:
A tuple containing the response and error (if any).
- Return type:
Examples
>>> _, _, err = client.zpa.app_connector_groups.delete_connector_group( ... group_id='999999' ... ) ... if err: ... print(f"Error deleting app connector group: {err}") ... return ... print(f"app connector group with ID {'999999'} deleted successfully.")
- get_connector_group(group_id, query_params=None)¶
Fetches a specific connector group by ID.
- Parameters:
- Returns:
A tuple containing (AppConnectorGroup instance, Response, error).
- Return type:
Tuple
Examples
>>> fetched_group, _, err = client.zpa.app_connector_groups.get_connector_group('999999') ... if err: ... print(f"Error fetching group by ID: {err}") ... return ... print(f"Fetched group by ID: {fetched_group.as_dict()}")
- get_connector_group_sg(group_id, query_params=None)¶
Fetches a specific connector group by ID with server group details
- Parameters:
- Returns:
A tuple containing (AppConnectorGroup instance, Response, error).
- Return type:
Tuple
Examples
>>> fetched_group, _, err = client.zpa.app_connector_groups.get_connector_group_sg('999999') ... if err: ... print(f"Error fetching group by ID: {err}") ... return ... print(f"Fetched group by ID: {fetched_group.as_dict()}")
- list_connector_groups(query_params=None)¶
Enumerates connector groups in your organization with pagination. A subset of connector groups can be returned that match a supported filter expression or query.
- Parameters:
{dict} (query_params) –
Map of query parameters for the request.
[query_params.page]{str}: Specifies the page number.[query_params.page_size]{str}: Specifies the page size.If not provided, the default page size is 20. The max page size is 500.
[query_params.search]{str}: Search string for filtering results.[query_params.microtenant_id]{str}: The unique identifier of the microtenant of ZPA tenant.- Returns:
A tuple containing (list of AppConnectorGroup instances, Response, error)
- Return type:
Tuple
Examples
>>> group_list, _, err = client.zpa.app_connector_groups.list_connector_groups( ... query_params={'search': 'ConnectorGRP01', 'page': '1', 'page_size': '100'}) ... if err: ... print(f"Error listing app connector group: {err}") ... return ... print(f"Total app connector groups found: {len(group_list)}") ... for group in groups: ... print(group.as_dict())
- list_connector_groups_summary(query_params=None)¶
Retrieves all configured app connector groups Name and IDs
- Parameters:
{dict} (query_params) –
Map of query parameters for the request.
[query_params.page]{str}: Specifies the page number.[query_params.page_size]{int}: Specifies the page size.If not provided, the default page size is 20. The max page size is 500.
[query_params.search]{str}: The search string used to support search by features and fields for the API.[query_params.microtenant_id]{str}: The unique identifier of the microtenant of ZPA tenant.- Returns:
A tuple containing (list of AppConnectorGroups instances, Response, error)
- Return type:
Tuple
Examples
>>> group_list, _, err = client.zpa.app_connector_groups.list_connector_groups_summary( ... query_params={'search': 'Group01', 'page': '1', 'page_size': '100'}) ... if err: ... print(f"Error listing app connector groups: {err}") ... return ... print(f"Total app connector groups found: {len(group_list)}") ... for group in group_list: ... print(group.as_dict())
- update_connector_group(group_id, **kwargs)¶
Updates an existing ZPA App Connector Group.
- Parameters:
group_id (str) – The unique id for the App Connector Group in ZPA.
- Keyword Arguments:
**connector_ids (list) – The unique ids for the App Connectors that will be added to this App Connector Group.
**city_country (str) –
The City and Country for where the App Connectors are located. Format is:
<City>, <Country Code>e.g.Sydney, AU**country_code (str) – The ISO<std> Country Code that represents the country where the App Connectors are located.
**description (str) – Additional information about the App Connector Group.
**dns_query_type (str) – The type of DNS queries that are enabled for this App Connector Group. Accepted values are:
IPV4_IPV6,IPV4andIPV6**enabled (bool) – Is the App Connector Group enabled? Defaults to
True.**name (str) – The name of the App Connector Group.
**latitude (int) – The latitude representing the App Connector’s physical location.
**location (str) – The name of the location that the App Connector Group represents.
**longitude (int) – The longitude representing the App Connector’s physical location.
**override_version_profile (bool) – Override the local App Connector version according to
version_profile. Defaults toFalse.**server_group_ids (list) – The unique ids of the Server Groups that are associated with this App Connector Group
**lss_app_connector_group (bool)
**upgrade_day (str) – The day of the week that upgrades will be pushed to the App Connector.
**upgrade_time_in_secs (str) – The time of the day that upgrades will be pushed to the App Connector.
**version_profile (str) –
The version profile to use. This will automatically set
override_version_profileto True. Accepted values are:default,previous_defaultandnew_release
- Returns:
A tuple containing (AppConnectorGroup, Response, error)
>>> update_group, _, err = client.zpa.app_connector_groups.update_connector_group( ... name=f"UpdateAppConnectorgroup_{random.randint(1000, 10000)}", ... description=f"UpdateAppConnectorgroup_{random.randint(1000, 10000)}", ... enabled= True, ... city_country= "San Jose, US", ... country_code= "US", ... latitude= "37.3382082", ... longitude= "-121.8863286", ... location= "San Jose, CA, USA", ... upgrade_day= "SUNDAY", ... dns_query_type= "IPV4_IPV6", ... ) ... if err: ... print(f"Error creating connector group: {err}") ... return ... print(f"connector group created successfully: {new_portal.as_dict()}")
- Return type: