emergency_access#

The following methods allow for interaction with the ZPA ZPA Emergency Access API endpoints.

Methods are accessible via zpa.emergency_access

class EmergencyAccessAPI#

Bases: object

activate_user(user_id, send_email=False)#

Activates the emergency access user.

Parameters:

user_id (str) – The unique identifier of the emergency access user to be activated.

Returns:

Examples

>>> zpa.emergency_access.activate_user('99999', send_email=True)
add_user(email_id, first_name, last_name, user_id, activate_now=True, **kwargs)#

Add an emergency access user.

Parameters:
  • email_id (str) – The email address of the emergency access user, as provided by the admin.

  • first_name (str) – The first name of the emergency access user.

  • last_name (str) – The last name of the emergency access user, as provided by the admin.

  • user_id (str) – The unique identifier of the emergency access user.

  • activate_now (bool, optional) – Indicates if the emergency access user is activated upon creation. Defaults to True.

  • **kwargs – Optional keyword args for additional attributes.

Returns:

The resource record for the newly created user or an error message.

Return type:

Box

Examples

>>> zpa.emergency_access.add_user(
...   email_id='user1Access@acme.com',
...   first_name='User1',
...   last_name='Access',
...   user_id='user1',
...   activate_now=True,
)
deactivate_user(user_id)#

Deactivates the emergency access user.

Parameters:

user_id (str) – The unique identifier of the emergency access user to be deactivated.

Returns:

Examples

>>> zpa.emergency_access.deactivate_user('99999')
get_user(user_id)#

Returns information on the specified emergency access user.

Parameters:

portal_id (str) – The unique identifier for the emergency access user.

Returns:

The resource record for the emergency access user.

Return type:

Box

Examples

>>> pprint(zpa.emergency_access.get_user('99999'))
update_user(user_id, **kwargs)#

Updates the specified emergency access user.

Parameters:

user_id (str) – The unique identifier of the emergency access user.

Keyword Arguments:
  • email_id (str) – The email address of the emergency access user, as provided by the admin.

  • first_name (str) – The first name of the emergency access user.

  • last_name (str) – The last name of the emergency access user, as provided by the admin.

  • user_id (str) – The unique identifier of the emergency access user.

Returns:

A Box object containing the details of the emergency access user.

Return type:

Box

Examples

>>> zpa.emergency_access.update_user(
...     user_id='99999',
...     first_name='User1',
...     last_name='Access')