client_settings

The following methods allow for interaction with the ZPA Client Settings API endpoints.

Methods are accessible via zpa.client_settings

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 ClientSettingsAPI

Bases: APIClient

A Client object for the Client Setting resource.

add_client_setting(**kwargs)

Ccreate Client Setting for a customer. ClientCertType defaults to CLIENT_CONNECTOR

Parameters:
  • name (str)

  • enrollment_cert_id (str)

  • client_certificate_type (str)

Returns:

ClientSettings: The created client setting object.

Return type:

Tuple

Example

# Basic example: Add a new client setting >>> added_client_setting, _, err = client.zpa.client_settings.add_client_setting( … name=”NewClientSetting”, … enrollment_cert_id=’245675’, … client_certificate_type=’ZAPP_CLIENT’ … )

delete_client_setting()

Deletes the specified client setting.

Args:

Returns:

Status code of the delete operation.

Return type:

int

Example

# Delete a client setting >>> _, _, err = client.zpa.client settings.delete_client_setting() … if err: … print(f”Error client setting: {err}”) … return … print(f”Client setting with ID deleted successfully.”)

get_all_client_settings()

Returns all client setting details. ClientCertType defaults to CLIENT_CONNECTOR

Returns:

A tuple containing a list of ClientSettings instances, response object, and error if any.

Return type:

Tuple

Examples

>>> fetched_settings, _, err = client.zpa.client_settings.get_all_client_settings()
>>> if err:
...     print(f"Error fetching settings: {err}")
...     return
... for setting in fetched_settings:
...     print(setting.as_dict())
get_client_settings(query_params=None)

Returns a list of client setting details. ClientCertType defaults to CLIENT_CONNECTOR

Parameters:

{dict} (query_params) – Map of query parameters for the request. [query_params.type] {str}: Available values: ZAPP_CLIENT, ISOLATION_CLIENT, APP_PROTECTION

Returns:

A tuple containing a list of ClientSettings instances, response object, and error if any.

Return type:

Tuple

Examples

Return all client setting types

>>> client_settings, _, err = client.zpa.client_settings.get_client_settings()
... if err:
...     print(f"Error listing client settings: {err}")
...     return
... for setting in client_settings:
...     print(setting.as_dict())

Return a specific client setting type

>>> client_settings, _, err = client.zpa.client_settings.get_client_settings(
... query_params={'type': 'ZAPP_CLIENT'}
)
... if err:
...     print(f"Error listing client settings: {err}")
...     return
... for setting in client_settings:
...     print(setting.as_dict())