controllers.preferences_controller module

class controllers.preferences_controller.PreferencesController(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.

get_user_preferences()[source]

Does a GET request to /public/sessionUser/preferences.

List the preferences of the session user.

Returns:

UserPreferencesResult: 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.

patch_user_preferences(preferences=None)[source]

Does a PATCH request to /public/sessionUser/preferences.

Returns the updated user preferences.

Args:
preferences (dict<object, string>, optional): Request to create or

update User Preferences.

Returns:

UserPreferencesResult: 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.

update_user_preferences(preferences=None)[source]

Does a PUT request to /public/sessionUser/preferences.

Returns the updated user preferences.

Args:
preferences (dict<object, string>, optional): Request to create or

update User Preferences.

Returns:

UserPreferencesResult: 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.