activate

The following methods allow for interaction with the ZIA Activation Management API endpoints.

Methods are accessible via zscaler.zia.activate

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 ActivationAPI

Bases: APIClient

A Client object for the Activation resource.

activate()

Activates configuration changes.

Returns:

Activation, response object, and error if any.

Examples

>>> config_activate, response, error = zia.activate.activate()
get_eusa_status()

Retrieves the End User Subscription Agreement (EUSA) acceptance status. If the status does not exist, it returns a status object with no ID.

Parameters:

N/A

Returns:

A tuple containing (Eusa status instance, Response, error).

Return type:

tuple

Examples

Print latest Eusa status

>>> fetched_eusa, _, error = client.zia.activate.get_eusa_status()
>>> if error:
...     print(f"Error fetching Eusa status: {error}")
...     return
... print(f"Fetched Eusa status by ID: {fetched_eusa.as_dict()}")
status()

Returns the activation status for a configuration change.

Returns:

Activation, response object, and error if any.

Examples

>>> config_status, response, error = zia.config.status()
update_eusa_status(status_id, **kwargs)

Updates the EUSA status based on the specified status ID

Parameters:
  • status_id (int) – The unique ID for the EUSA status.

  • version (dict) – Specifies the EUSA info ID version. This field is for Zscaler internal use only.

  • acceptedStatus (bool) – A Boolean value that specifies the EUSA status. If set to true, the EUSA is accepted. If set to false, the EUSA is in an ‘agreement pending’ state.

Returns:

A tuple containing the updated EUSA status, response, and error.

Return type:

tuple

Examples

Update an existing EUSA status :

>>> updated_eusa_status, _, error = client.zia.activate.update_eusa_status(
... status_id='1524566'
... )
>>> if error:
...     print(f"Error updating EUSA status: {error}")
...     return
... print(f"EUSA status updated successfully: {updated_eusa_status.as_dict()}")