controllers.smb_file_opens_controller module

class controllers.smb_file_opens_controller.SMBFileOpensController(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_close_smb_file_open(body)[source]

Does a POST request to /public/smbFileOpens.

Returns nothing upon success.

Args:
body (CloseSmbFileOpenParameters): Request to close an active SMB

file open.

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_smb_file_opens(file_path=None, view_name=None, page_count=None, cookie=None)[source]

Does a GET request to /public/smbFileOpens.

If no parameters are specified, all active SMB file opens currently on the Cohesity Cluster are returned. Specifying parameters filters the results that are returned.

Args:
file_path (string, optional): Specifies the filepath in the view

relative to the root filesystem. If this field is specified, viewName field must also be specified.

view_name (string, optional): Specifies the name of the View in

which to search. If a view name is not specified, all the views in the Cluster is searched. This field is mandatory if filePath field is specified.

page_count (int, optional): Specifies the maximum number of active

opens to return in the response. This field cannot be set above 1000. If this is not set, maximum of 1000 entries are returned.

cookie (string, optional): Specifies the opaque string returned in

the previous response. If this is set, next set of active opens just after the previous response are returned. If this is not set, first set of active opens are returned.

Returns:

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