Skip to main content

StaticIp

Static Ip resource for Zscaler Internet Access.

Resource operations

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​

NameTypeDescription
idstringUnique identifier

Actions​

create()​

Creates a new StaticIp. Set properties on the resource instance, then call create() — this method takes no arguments.

Properties for creation:

NameTypeRequiredDescription
cityEntityReferenceNo-
commentstringNo-
geo_overridebooleanNo-
idintegerNo-
ip_addressstringNo-
last_modification_timeintegerNo-
last_modified_byEntityReferenceNo-
latitudeintegerNo-
longitudeintegerNo-
managed_byEntityReferenceNo-
routable_IPbooleanNo-

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:

NameTypeRequiredDescription
cityEntityReferenceNo-
commentstringNo-
geo_overridebooleanNo-
idintegerYes-
ip_addressstringNo-
last_modification_timeintegerNo-
last_modified_byEntityReferenceNo-
latitudeintegerNo-
longitudeintegerNo-
managed_byEntityReferenceNo-
routable_IPbooleanNo-

Returns: StaticIp

Example:

resource = session.zia.StaticIp(id="your-resource-id")
resource.load()
resource.comment = "Updated value"
resource.update()

validate_static_IP_address()​

Parameters:

NameTypeRequiredDescription
cityEntityReferenceNo-
commentstringNo-
geo_overridebooleanNo-
idintegerNo-
ip_addressstringNo-
last_modification_timeintegerNo-
last_modified_byEntityReferenceNo-
latitudeintegerNo-
longitudeintegerNo-
managed_byEntityReferenceNo-
routable_IPbooleanNo-

Example:

resource = session.zia.StaticIp()
result = resource.validate_static_IP_address()
print(result)

Attributes​

NameTypeRequiredDescription
cityEntityReferenceNo-
commentstringNo-
geo_overridebooleanNo-
idintegerNo-
ip_addressstringNo-
last_modification_timeintegerNo-
last_modified_byEntityReferenceNo-
latitudeintegerNo-
longitudeintegerNo-
managed_byEntityReferenceNo-
routable_IPbooleanNo-