controllers.protection_objects_controller module

class controllers.protection_objects_controller.ProtectionObjectsController(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_protect_object(body=None)[source]

Does a POST request to /public/protectionObjects.

Returns the Protected Object and its corresponding Protection Job information.

Args:
body (ProtectObjectParameters, optional): TODO: type description

here. Example:

Returns:

list of ProtectedObject: 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_unprotect_object(body=None)[source]

Does a DELETE request to /public/protectionObjects.

Unprotect a Protected Object.

Args:
body (UnprotectObjectParams, optional): TODO: type description

here. Example:

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_protection_object_summary(protection_source_id)[source]

Does a GET request to /public/protectionObjects/summary.

Returns the Protected Object and its corresponding Protection Job information.

Args:
protection_source_id (long|int): Specifies the id of the

Protection Source.

Returns:

ProtectionObjectSummary: 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_protection_object(body=None)[source]

Does a PUT request to /public/protectionObjects.

Returns the Updated Protected Object.

Args:
body (UpdateProtectionObjectParameters, optional): TODO: type

description here. Example:

Returns:
ProtectionJob: Response from the API.

UpdateProtectionObjectRequest is the response of updating a Protection

Object. 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.