idp

The following methods allow for interaction with the ZPA IDP Controller API endpoints.

Methods are accessible via zpa.idp

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 IDPControllerAPI

Bases: APIClient

A Client object for the Identity Provider (IdP) resource.

get_idp(idp_id)

Returns information on the specified identity provider (IdP).

Parameters:

idp_id (str) – The unique identifier for the identity provider.

Returns:

The corresponding identity provider object.

Return type:

Tuple

Examples

>>> fetched_cert, _, err = client.zpa.certificates.get_enrolment('999999')
... if err:
...     print(f"Error fetching certificate by ID: {err}")
...     return
... print(fetched_cert.id)
list_idps(query_params=None)

Enumerates identity provider in your organization with pagination. A subset of identity provider can be returned that match a supported filter expression or query.

Parameters:

{dict} (query_params) –

Map of query parameters for the request.

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

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

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

[query_params.search] {str}: The search string used to support search by features and fields for the API.

[query_params.scim_enabled] {bool}: Returns all SCIM IdPs if set to true.

Returns all non SCIM IdPs if set to false.

[query_params.user_attributes] {bool}: Returns user attributes.

Returns:

A tuple containing (list of IDP instances, Response, error)

Return type:

Tuple

Examples

Retrieve enrollment certificates with pagination parameters:

>>> idp_list, _, err = client.zpa.idp.list_idps(
... query_params={'search': 'IDP01', 'page': '1', 'page_size': '100'})
... if err:
...     print(f"Error listing idps: {err}")
...     return
... print(f"Total certificates found: {len(idp_list)}")
... for idp in idp_list:
...     print(idp.as_dict())