EcGroup
Ec Group resource for Zscaler Cloud & Branch Connector.
This resource supports the following standard methods: create(), load(), update(), delete(). They operate on the instance state — set properties with dot notation, then call the method with no arguments. Any other action listed below is a custom action that takes explicit keyword arguments and returns a value.
Quick Start
import zssdk
import logging
# Enable debug logging for EcGroup
logging.getLogger('zssdk.ztw').setLevel(logging.DEBUG)
logging.basicConfig(level=logging.DEBUG)
session = zssdk.Session(
vanity_domain="your-vanity-domain",
client_id="your-client-id",
client_secret="your-client-secret",
)
# Get a specific EcGroup
resource = session.ztw.EcGroup(id="your-resource-id")
resource.load()
print(resource)
# Debug output shows HTTP request/response details
Identifiers
| Name | Type | Description |
|---|---|---|
id | string | Unique identifier |
Actions
change_vm_status()
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
vm_id | integer | Yes | - |
status | string | Yes | - |
Example:
resource = session.ztw.EcGroup(id="your-resource-id")
result = resource.change_vm_status(vm_id=3600, status="value")
print(result)
create()
Creates a new EcGroup. Set properties on the resource instance, then call create() — this method takes no arguments.
Properties for creation:
| Name | Type | Required | Description |
|---|---|---|---|
auto_scale | boolean | No | - |
aws_availability_zone | string | No | - |
aws_region | string | No | - |
azure_availability_zone | string | No | - |
azure_region | string | No | - |
cellular_deployment | EntityReference | No | - |
cellular_deployment_mode | string | No | - |
deploy_type | string | No | - |
desc | string | No | - |
vms | EcVMWrapperCollection | No | - |
fall_back_to_tls | boolean | No | - |
gcp_region | string | No | - |
location | EntityReference | No | - |
max_ec_count | integer | No | - |
max_user_per_MTunnel | integer | No | - |
meta_config | EcGroupMetaConfig | No | - |
name | string | Yes | - |
platform | string | No | - |
prov_template | EntityReference | No | - |
status | GroupFlagsCollection | No | - |
tunnel_mode | string | No | - |
zero_trust_gateway | EntityReference | No | - |
zero_trust_group | boolean | No | - |
zpa_user_tunnel | boolean | No | - |
namespace | string | No | - |
Returns: EcGroup
Example:
resource = session.ztw.EcGroup()
resource.name = "example-name"
resource.create()
print(f"Created with ID: {resource.id}")
delete()
Deletes a EcGroup by id. Only the id identifier is required; delete() takes no other arguments.
Example:
resource = session.ztw.EcGroup(id="your-resource-id")
resource.delete()
get_groups_count()
Example:
resource = session.ztw.EcGroup()
result = resource.get_groups_count()
print(result)
load()
Fetches an existing EcGroup by id. Only the id identifier is required; load() takes no other arguments.
Returns: EcGroup
Example:
resource = session.ztw.EcGroup(id="your-resource-id")
resource.load()
print(resource.name)
update()
Updates an existing EcGroup. Call load() first, modify properties, then call update() — this method takes no arguments.
Properties for update:
| Name | Type | Required | Description |
|---|---|---|---|
auto_scale | boolean | No | - |
aws_availability_zone | string | No | - |
aws_region | string | No | - |
azure_availability_zone | string | No | - |
azure_region | string | No | - |
cellular_deployment | EntityReference | No | - |
cellular_deployment_mode | string | No | - |
deploy_type | string | No | - |
desc | string | No | - |
vms | EcVMWrapperCollection | No | - |
fall_back_to_tls | boolean | No | - |
gcp_region | string | No | - |
location | EntityReference | No | - |
max_ec_count | integer | No | - |
max_user_per_MTunnel | integer | No | - |
meta_config | EcGroupMetaConfig | No | - |
name | string | Yes | - |
platform | string | No | - |
prov_template | EntityReference | No | - |
status | GroupFlagsCollection | No | - |
tunnel_mode | string | No | - |
zero_trust_gateway | EntityReference | No | - |
zero_trust_group | boolean | No | - |
zpa_user_tunnel | boolean | No | - |
namespace | string | No | - |
Returns: EcGroup
Example:
resource = session.ztw.EcGroup(id="your-resource-id")
resource.load()
resource.name = "Updated value"
resource.update()
update_schedule_upgrade_time()
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
day_of_week | integer | No | - |
end_time | integer | No | - |
start_time | integer | No | - |
vm_group_ids | int32Collection | No | - |
vm_ids | int32Collection | No | - |
Example:
resource = session.ztw.EcGroup()
result = resource.update_schedule_upgrade_time()
print(result)
update_vm_upgrade_status()
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
vm_id | integer | Yes | - |
status_id | integer | No | - |
timestamp | integer | No | - |
Returns: EcVM
Example:
resource = session.ztw.EcGroup(id="your-resource-id")
result = resource.update_vm_upgrade_status(vm_id=3600)
print(result)
create_ec_vm()
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
auto_scale | boolean | No | - |
build_version | boolean | No | - |
cc_role_name | boolean | No | - |
city_geo_id | integer | No | - |
deploy_as_gateway | boolean | No | - |
dns_cache | boolean | No | - |
ec_instances | EcInstanceWrapperCollection | No | - |
fail_open | boolean | No | - |
form_factor | string | No | - |
ha_status | string | No | - |
hardware_info | HardwareInfo | No | - |
lan_dns | EcDns | No | - |
last_template_config_push_failed | boolean | No | - |
last_upgrade_time | integer | No | - |
management_nw | EcNetwork | No | - |
meta_config | EcVmMetaConfig | No | - |
name | string | Yes | - |
nat_ip | string | No | - |
operational_status | string | No | - |
prov_template | EntityReference | No | - |
status | VmFlagsCollection | No | - |
traffic_distribution | string | No | - |
upgrade_day_of_week | integer | No | - |
upgrade_end_time | integer | No | - |
upgrade_start_time | integer | No | - |
upgrade_status | integer | No | - |
use_wan_dns | boolean | No | - |
used_for_ztp | boolean | No | - |
zero_trust_vm | boolean | No | - |
zia_gateway | string | No | - |
zia_gateways | stringCollection | No | - |
zpa_broker | string | No | - |
zpa_brokers | stringCollection | No | - |
Returns: EcVM
Example:
resource = session.ztw.EcGroup(id="your-resource-id")
result = resource.create_ec_vm(name="example-name")
print(result)
get_ec_vm()
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
vm_id | integer | Yes | - |
Returns: EcVM
Example:
resource = session.ztw.EcGroup(id="your-resource-id")
result = resource.get_ec_vm(vm_id=3600)
print(result)
update_ec_VM()
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
vm_id | integer | No | - |
auto_scale | boolean | No | - |
build_version | boolean | No | - |
cc_role_name | boolean | No | - |
city_geo_id | integer | No | - |
deploy_as_gateway | boolean | No | - |
dns_cache | boolean | No | - |
ec_instances | EcInstanceWrapperCollection | No | - |
fail_open | boolean | No | - |
form_factor | string | No | - |
ha_status | string | No | - |
hardware_info | HardwareInfo | No | - |
lan_dns | EcDns | No | - |
last_template_config_push_failed | boolean | No | - |
last_upgrade_time | integer | No | - |
management_nw | EcNetwork | No | - |
meta_config | EcVmMetaConfig | No | - |
name | string | Yes | - |
nat_ip | string | No | - |
operational_status | string | No | - |
prov_template | EntityReference | No | - |
status | VmFlagsCollection | No | - |
traffic_distribution | string | No | - |
upgrade_day_of_week | integer | No | - |
upgrade_end_time | integer | No | - |
upgrade_start_time | integer | No | - |
upgrade_status | integer | No | - |
use_wan_dns | boolean | No | - |
used_for_ztp | boolean | No | - |
zero_trust_vm | boolean | No | - |
zia_gateway | string | No | - |
zia_gateways | stringCollection | No | - |
zpa_broker | string | No | - |
zpa_brokers | stringCollection | No | - |
Returns: EcVM
Example:
resource = session.ztw.EcGroup(id="your-resource-id")
result = resource.update_ec_VM(name="example-name")
print(result)
delete_ec_vm()
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
vm_id | integer | Yes | - |
Example:
resource = session.ztw.EcGroup(id="your-resource-id")
result = resource.delete_ec_vm(vm_id=3600)
print(result)
Attributes
| Name | Type | Required | Description |
|---|---|---|---|
auto_scale | boolean | No | - |
aws_availability_zone | string | No | - |
aws_region | string | No | - |
azure_availability_zone | string | No | - |
azure_region | string | No | - |
cellular_deployment | EntityReference | No | - |
cellular_deployment_mode | string | No | - |
deploy_type | string | No | - |
desc | string | No | - |
vms | EcVMWrapperCollection | No | - |
fall_back_to_tls | boolean | No | - |
gcp_region | string | No | - |
id | integer | Yes | - |
location | EntityReference | No | - |
max_ec_count | integer | No | - |
max_user_per_MTunnel | integer | No | - |
meta_config | EcGroupMetaConfig | No | - |
name | string | Yes | - |
platform | string | No | - |
prov_template | EntityReference | No | - |
status | GroupFlagsCollection | No | - |
tunnel_mode | string | No | - |
zero_trust_gateway | EntityReference | No | - |
zero_trust_group | boolean | No | - |
zpa_user_tunnel | boolean | No | - |
namespace | string | No | - |
Related
- EcGroup - Data structure definition
- Logging guide - enable verbose logs while debugging this resource