posture_profiles#

The following methods allow for interaction with the ZPA Posture Profiles API endpoints.

Methods are accessible via zpa.posture_profiles

class PostureProfilesAPI#

Bases: object

get_name_by_posture_udid(search_udid, **kwargs)#

Searches for a posture profile by posture_udid and returns its name.

Parameters:

search_udid (str) – The posture_udid of the posture profile to search for.

Keyword Arguments:

**kwargs – Additional keyword arguments to pass to the list_profiles method.

Returns:

The name of the found posture profile, or None if not found.

Return type:

str

get_profile(profile_id)#

Returns information on the specified posture profiles.

Parameters:

profile_id (str) – The unique identifier for the posture profiles.

Returns:

The resource record for the posture profiles.

Return type:

Box

Examples

>>> pprint(zpa.posture_profiles.get_profile('99999'))
get_profile_by_name(name)#
get_udid_by_profile_name(search_name, **kwargs)#

Searches for a posture profile by name and returns its posture_udid.

Parameters:

search_name (str) – The name of the posture profile to search for.

Keyword Arguments:

**kwargs – Additional keyword arguments to pass to the list_profiles method.

Returns:

The posture_udid of the found posture profile, or None if not found.

Return type:

str

list_profiles(**kwargs)#

Returns a list of all configured posture profiles.

Keyword Arguments:
  • max_items (int) – The maximum number of items to request before stopping iteration.

  • max_pages (int) – The maximum number of pages to request before stopping iteration.

  • pagesize (int) – Specifies the page size. The default size is 20, but the maximum size is 500.

  • search (str, optional) – The search string used to match against features and fields.

Returns:

A list of all configured posture profiles.

Return type:

BoxList

Examples

>>> for posture_profile in zpa.posture_profiles.list_profiles():
...    pprint(posture_profile)