controllers_v2.stats_controller module

class controllers_v2.stats_controller.StatsController(config=None, client=None, call_back=None)[source]

Bases: cohesity_management_sdk.controllers_v2.base_controller.BaseController

A Controller to access Endpoints in the cohesity_management_sdk API.

get_protection_runs_stats(start_time_usecs=None, end_time_usecs=None, run_status=None)[source]

Does a GET request to /stats/protection-runs.

Get statistics of protection runs.

Args:
start_time_usecs (long|int, optional): Specify the start time as a

Unix epoch Timestamp (in microseconds), only runs executing after this time will be counted. By default it is current time minus a day.

end_time_usecs (long|int, optional): Specify the end time as a

Unix epoch Timestamp (in microseconds), only runs executing before this time will be counted. By default it is current time.

run_status (list of RunStatus1Enum, optional): Specifies a list of

status, runs matching the status will be returned. ‘Running’ indicates that the run is still running. ‘Canceled’ indicates that the run has been canceled. ‘Failed’ indicates that the run has failed. ‘Succeeded’ indicates that the run has finished successfully. ‘SucceededWithWarning’ indicates that the run finished successfully, but there were some warning messages.

Returns:
GetProtectionRunsStatusResponseBody: 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.