controllers.antivirus_service_group_controller module

class controllers.antivirus_service_group_controller.AntivirusServiceGroupController(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_antivirus_service_group(body)[source]

Does a POST request to /public/antivirusGroups.

Returns the created Antivirus service group.

Args:
body (AntivirusServiceGroupParams): Request to create an Antivirus

Service Group.

Returns:

AntivirusServiceGroup: 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_antivirus_service_group(id)[source]

Does a DELETE request to /public/antivirusGroups/{id}.

Returns delete status upon completion.

Args:

id (long|int): Specifies the AntivirusServiceGroup 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.

delete_infected_files(body)[source]

Does a DELETE request to /public/infectedFiles.

Returns the list of delete succeeded and delete failed infected files.

Args:
body (DeleteInfectedFileParams): Request to delete the list of

infected files.

Returns:

DeleteInfectedFileResponse: 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_antivirus_service_group()[source]

Does a GET request to /public/antivirusGroups.

Returns all the antivirus service group.

Returns:

list of AntivirusServiceGroup: 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_icap_connection_status(icap_uris=None)[source]

Does a GET request to /public/icapConnectionStatus.

Returns the list of succeeded and failed connection statuses of Icap servers.

Args:
icap_uris (list of string, optional): Specifies the list of icap

uri.

Returns:

IcapConnectionStatusResponse: 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_infected_files(view_names=None, include_quarantined_files=None, include_unquarantined_files=None, file_path=None, page_count=None, pagination_cookie=None)[source]

Does a GET request to /public/infectedFiles.

Returns all the infected files matching with query parameters.

Args:
view_names (list of string, optional): Filter by a list of View

names.

include_quarantined_files (bool, optional): Specifies whether to

include quarantined files in the result.

include_unquarantined_files (bool, optional): Specifies whether to

include unquarantined files in the result.

file_path (string, optional): Specifies the path of a file. If

this is provided, infected file list would contain the scan and infection state of the file and pagination cookie will be ignored.

page_count (long|int, optional): Specifies the number of items to

return in the response for pagination purposes. Default value is 1000.

pagination_cookie (string, optional): Pagination cookie should be

used from previous call to list infected files. It resumes (or gives the next set of values) from the result of the previous call.

Returns:

InfectedFiles: 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_antivirus_service_group(body)[source]

Does a PUT request to /public/antivirusGroups.

Returns the updated antivirus service group.

Args:
body (UpdateAntivirusServiceGroupParams): Request to update an

Antivirus Service Group.

Returns:

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

Does a PUT request to /public/antivirusGroups/states.

Returns the state of an antivirus service group upon completion.

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

description here. Example:

Returns:

AntivirusServiceGroupStateParams: 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_infected_files(body)[source]

Does a PUT request to /public/infectedFiles.

Returns the list of update succeeded and update failed infected files.

Args:
body (UpdateInfectedFileParams): Request to update the list of

infected files.

Returns:

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