customer_version_profile

The following methods allow for interaction with the ZPA ZPA Customer Version Profile for App Connector Groups API endpoints.

Methods are accessible via zpa.customer_version_profile

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 CustomerVersionProfileAPI

Bases: APIClient

A Client object for the Customer Version Profile resource.

get_associated_version_profile()

Get associated version profile for a customer.

This endpoint retrieves the version profile associated with the customer. The API does not require any parameters.

Returns:

A tuple containing (CustomerVersionProfile instance, Response, error)

Return type:

Tuple

Examples

Get associated version profile for a customer:

>>> version_profile, _, err = client.zpa.customer_version_profile.get_associated_version_profile()
... if err:
...     print(f"Error getting associated version profile: {err}")
...     return
... print(version_profile.as_dict())
list_version_profiles(query_params=None)

Returns a list of all visible version profiles.

Parameters:
  • **kwargs – Optional keyword args.

  • {dict} (query_params) –

    Map of query parameters for the request.

    [query_params.page] {str}: Specifies the page number.

    [query_params.page_size] {str}: Specifies the page size.

    If not provided, the default page size is 20. The max page size is 500.

    [query_params.search] {str}: Search string for filtering results.

Returns:

A tuple containing (list of Customer Profiles instances, Response, error)

Return type:

tuple

Examples

List all visibile version profiles:

Examples

>>> version_list, _, err = client.zpa.customer_version_profile.list_version_profiles(
... query_params={'search': 'Default', 'page': '1', 'page_size': '100'})
... if err:
...     print(f"Error listing version profiles: {err}")
...     return
... print(f"Total version profiles found: {len(version_list)}")
... for pra in version_list:
...     print(pra.as_dict())
update_version_profile(profile_id, remove_override_flag)

Update the version profile for a given customer.

This endpoint allows you to update the version profile for a given customer. The API requires the remove_override_flag attribute to be passed in the body.

Parameters:
  • profile_id (str) – The unique identifier for the version profile.

  • remove_override_flag (bool) – Whether to remove the override flag for the version profile.

Returns:

A tuple containing None (API returns 204 No Content), response object, and error if any.

Note: This API returns 204 No Content on success, so the result will be None. To get the updated version profile, call get_associated_version_profile() after this operation.

Return type:

Tuple

Examples

>>> updated_profile, _, err = client.zpa.customer_version_profile.update_version_profile(
...     profile_id='0',
...     remove_override_flag=True
... )
... if err:
...     print(f"Error updating version profile: {err}")
...     return
... print(f"Version profile updated: {updated_profile.as_dict()}")