controllers.scheduler_controller module¶
-
class
controllers.scheduler_controller.
SchedulerController
(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_scheduler_job
(body=None)[source]¶ Does a POST request to /public/scheduler.
Returns the created email report scheduler job. An email report scheduler job generates a report with the specified parameters and sends that report to the specified email accounts according to the defined schedule. This operation may also be used to send a report once (with no schedule), by setting the EnableRecurring field to false.
- Args:
- body (SchedulerProto_SchedulerJob, optional): update user quota
params.
- Returns:
SchedulerProto_SchedulerJob_ScheduleJobParameters_ReportJobParameter: Response from the API. Success SchedulerProto_SchedulerJob: 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_scheduler_jobs
(ids=None)[source]¶ Does a DELETE request to /public/scheduler.
Specify a list of email report schedule job ids to unschedule and delete.
- Args:
ids (list<object, int|long>): Array of ids
- 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_scheduler_jobs
(ids=None, tenant_ids=None, all_under_hierarchy=None)[source]¶ Does a GET request to /public/scheduler.
Returns all the email report scheduler jobs that are scheduled to run. An email report scheduler job generates a report with the specified parameters and sends that report to the specified email accounts according to the defined schedule.
- Args:
- ids (list of int|long, optional): Specifies ids of scheduler jobs
to fetch.
- tenant_ids (list of string, optional): TenantIds contains ids of
the tenants for which objects are to be returned.
- all_under_hierarchy (bool, optional): AllUnderHierarchy specifies
if objects of all the tenants under the hierarchy of the logged in user’s organization should be returned.
- Returns:
SchedulerProto: 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_scheduler_job
(body)[source]¶ Does a PUT request to /public/scheduler.
Returns the updated email report scheduler job.
- Args:
body (SchedulerProto_SchedulerJob): Update Job Parameter.
- Returns:
SchedulerProto_SchedulerJob: 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.
-