StaticIp
Static Ip resource for Zscaler Internet Access.
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 StaticIp
logging.getLogger('zssdk.zia').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 StaticIp
resource = session.zia.StaticIp(id="your-resource-id")
resource.load()
print(resource)
# Debug output shows HTTP request/response details
Identifiers
| Name | Type | Description |
|---|---|---|
id | string | Unique identifier |
Actions
create()
Creates a new StaticIp. Set properties on the resource instance, then call create() — this method takes no arguments.
Properties for creation:
| Name | Type | Required | Description |
|---|---|---|---|
city | EntityReference | No | - |
comment | string | No | - |
geo_override | boolean | No | - |
id | integer | No | - |
ip_address | string | No | - |
last_modification_time | integer | No | - |
last_modified_by | EntityReference | No | - |
latitude | integer | No | - |
longitude | integer | No | - |
managed_by | EntityReference | No | - |
routable_IP | boolean | No | - |
Returns: StaticIp
Example:
resource = session.zia.StaticIp()
resource.city = {"association_time": 3600, "deleted": True, "extensions": {"key1": "value", "key2": "value"}, "external_id": "resource-id"}
resource.comment = "value"
resource.geo_override = True
resource.create()
print(f"Created with ID: {resource.id}")
delete()
Deletes a StaticIp by id. Only the id identifier is required; delete() takes no other arguments.
Example:
resource = session.zia.StaticIp(id="your-resource-id")
resource.delete()
load()
Fetches an existing StaticIp by id. Only the id identifier is required; load() takes no other arguments.
Returns: StaticIp
Example:
resource = session.zia.StaticIp(id="your-resource-id")
resource.load()
print(resource.comment)
update()
Updates an existing StaticIp. Call load() first, modify properties, then call update() — this method takes no arguments.
Properties for update:
| Name | Type | Required | Description |
|---|---|---|---|
city | EntityReference | No | - |
comment | string | No | - |
geo_override | boolean | No | - |
id | integer | Yes | - |
ip_address | string | No | - |
last_modification_time | integer | No | - |
last_modified_by | EntityReference | No | - |
latitude | integer | No | - |
longitude | integer | No | - |
managed_by | EntityReference | No | - |
routable_IP | boolean | No | - |
Returns: StaticIp
Example:
resource = session.zia.StaticIp(id="your-resource-id")
resource.load()
resource.comment = "Updated value"
resource.update()
validate_static_IP_address()
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
city | EntityReference | No | - |
comment | string | No | - |
geo_override | boolean | No | - |
id | integer | No | - |
ip_address | string | No | - |
last_modification_time | integer | No | - |
last_modified_by | EntityReference | No | - |
latitude | integer | No | - |
longitude | integer | No | - |
managed_by | EntityReference | No | - |
routable_IP | boolean | No | - |
Example:
resource = session.zia.StaticIp()
result = resource.validate_static_IP_address()
print(result)
Attributes
| Name | Type | Required | Description |
|---|---|---|---|
city | EntityReference | No | - |
comment | string | No | - |
geo_override | boolean | No | - |
id | integer | No | - |
ip_address | string | No | - |
last_modification_time | integer | No | - |
last_modified_by | EntityReference | No | - |
latitude | integer | No | - |
longitude | integer | No | - |
managed_by | EntityReference | No | - |
routable_IP | boolean | No | - |
Related
- StaticIp - Data structure definition
- Logging guide - enable verbose logs while debugging this resource