ec_groups¶
The following methods allow for interaction with the ZTW Edge Connector Group API endpoints.
Methods are accessible via ztw.ec_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 ECGroupsAPI¶
Bases:
APIClientA Client object for the ECGroupsAPI resource.
- delete_ec_group_vm(group_id, vm_id)¶
Deletes a VM specified by Cloud or Branch Connector group ID and VM ID.
- Parameters:
template_id (str) – The ID of the VM to delete.
- Returns:
The status code of the operation.
- Return type:
Examples
Delete a ec group VM:
print(ztw.ecgroups.delete_ec_group_vm("123456789"))
- get_ec_group(group_id, query_params=None)¶
Get details for a specific Cloud or Branch Connector group by ID.
- Parameters:
group_id (str) – ID of Cloud or Branch Connector group.
- Keyword Arguments:
{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. The default size is 250.- Returns:
The ec group details.
- Return type:
Tuple
Examples
Get details of a specific ec group:
print(ztw.ecgroups.get_ec_group(“123456789”))
- get_ec_group_vm(group_id, vm_id)¶
Gets a VM by specified Cloud or Branch Connector group ID and VM ID
- Parameters:
- Returns:
The ec group VM details.
- Return type:
Tuple
Examples
Get details of a specific ec group VM:
print(ztw.ecgroups.get_ec_group_vm(“123456789”))
- list_ec_group_lite(query_params=None)¶
Returns the list of a subset of Cloud & Branch Connector group information.
- Keyword Arguments:
{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. The default size is 20.- Returns:
A subset of Cloud & Branch Connector group information.
- Return type:
Tuple
Examples
List subset of Cloud & Branch Connector group information:
>>> for group in ztw.ecgroups.list_ec_group_lite(): ... print(group)
- list_ec_groups(query_params=None)¶
List all Cloud & Branch Connector groups.
- 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. The default size is 250.- Returns:
The list of ec groups.
- Return type:
Tuple
Examples
List all ec groups:
for group in ztw.ecgroups.list_ec_group(): print(group)
- list_ec_instance_lite()¶
Returns the list of a subset of Cloud & Branch Connector instance information.
- Keyword Arguments:
**max_items (int, optional) – The maximum number of items to request before stopping iteration.
**max_pages (int, optional) – The maximum number of pages to request before stopping iteration.
**page_size (int, optional) – Specifies the page size. The default size is 100, but the maximum size is 1000.
**search (str, optional) – The search string used to partially match against a location’s name and port attributes.
- Returns:
A subset of Cloud & Branch Connector instance information.
- Return type:
Tuple
Examples
List subset of Cloud & Branch Connector instance information:
>>> for instance in ztw.ecgroups.list_ec_instance_lite(): ... print(instance)