controllers.ldap_provider_controller module¶
-
class
controllers.ldap_provider_controller.
LdapProviderController
(config=None, client=None, call_back=None)[source]¶ Bases:
cohesity_management_sdk.controllers.base_controller.BaseController
A Controller to access Endpoints in the cohesity_management_sdk API.
-
create_ldap_provider
(body)[source]¶ Does a POST request to /public/ldapProvider.
Returns the created LDAP provider.
- Args:
body (LdapProvider): Request to configure a LDAP provider.
- Returns:
LdapProviderResponse: Response from the API. Success
- Raises:
- APIException: When an error occurs while fetching the data from
the remote API. This exception includes the HTTP Response code, an error message, and the HTTP body that was received in the request.
-
delete_ldap_provider
(id)[source]¶ Does a DELETE request to /public/ldapProvider/{id}.
Delete an LDAP provider.
- Args:
id (long|int): Specifies the LDAP Id.
- Returns:
void: Response from the API. No Content
- Raises:
- APIException: When an error occurs while fetching the data from
the remote API. This exception includes the HTTP Response code, an error message, and the HTTP body that was received in the request.
-
get_ldap_provider
(ids=None, tenant_ids=None, all_under_hierarchy=None)[source]¶ Does a GET request to /public/ldapProvider.
Lists the LDAP providers.
- Args:
- ids (list of long|int, optional): Specifies the ids of the LDAP
providers to fetch.
- tenant_ids (list of string, optional): TenantIds contains ids of
the tenants for which objects are to be returned.
- all_under_hierarchy (bool, optional): AllUnderHierarchy specifies
if objects of all the tenants under the hierarchy of the logged in user’s organization should be returned.
- Returns:
list of LdapProviderResponse: Response from the API. Success
- Raises:
- APIException: When an error occurs while fetching the data from
the remote API. This exception includes the HTTP Response code, an error message, and the HTTP body that was received in the request.
-
get_ldap_provider_status
(id)[source]¶ Does a GET request to /public/ldapProvider/{id}/status.
Get the connection status of an LDAP provider.
- Args:
id (long|int): Specifies the LDAP Id.
- Returns:
void: Response from the API. No Content
- Raises:
- APIException: When an error occurs while fetching the data from
the remote API. This exception includes the HTTP Response code, an error message, and the HTTP body that was received in the request.
-
update_ldap_provider
(body)[source]¶ Does a PUT request to /public/ldapProvider.
Returns the updated LDAP provider.
- Args:
- body (UpdateLdapProviderParam): Request to update a LDAP
provider.
- Returns:
LdapProviderResponse: Response from the API. Success
- Raises:
- APIException: When an error occurs while fetching the data from
the remote API. This exception includes the HTTP Response code, an error message, and the HTTP body that was received in the request.
-