ai_api_client_sdk.resource_clients.execution_schedule_client module

class ai_api_client_sdk.resource_clients.execution_schedule_client.ExecutionScheduleClient(rest_client: RestClient)

Bases: BaseClient

ExecutionScheduleClient is a class implemented for interacting with the execution schedules related endpoints of the server. It implements the base class ai_api_client_sdk.resource_clients.base_client.BaseClient

create(name: str, cron: str, configuration_id: str, start: datetime = None, end: datetime = None, resource_group: str = None) ExecutionScheduleCreateResponse

Creates an execution schedule.

Parameters:
  • name (str) – Name of the execution schedule

  • cron – Cron defining the schedule to run the executions

  • configuration_id (str) – ID of the configuration for the execution schedule

  • start (datetime, optional) – Start time of the execution schedule in UTC, defaults to None

  • end (datetime, optional) – End time of the execution schedule in UTC e.g., defaults to None

  • resource_group (str) – Resource Group which the request should be sent on behalf. Either this or a default resource group in the ai_api_client_sdk.ai_api_v2_client.AIAPIV2Client should be specified, defaults to None

Raises:

class:ai_api_client_sdk.exception.AIAPIInvalidRequestException if a 400 response is received from the server

Raises:

class:ai_api_client_sdk.exception.AIAPIAuthorizationException if a 401 response is received from the server

Raises:

class:ai_api_client_sdk.exception.AIAPIServerException if a non-2XX response is received from the server

Returns:

An object representing the response from the server

Return type:

class:ai_api_client_sdk.models.execution_schedule_create_response.ExecutionScheduleCreateResponse

delete(execution_schedule_id: str, resource_group: str = None) BasicResponse

Deletes the execution schedule.

Parameters:
  • execution_schedule_id (str) – ID of the execution schedule to be deleted

  • resource_group (str) – Resource Group which the request should be sent on behalf. Either this or a default resource group in the ai_api_client_sdk.ai_api_v2_client.AIAPIV2Client should be specified, defaults to None

Raises:

class:ai_api_client_sdk.exception.AIAPIInvalidRequestException if a 400 response is received from the server

Raises:

class:ai_api_client_sdk.exception.AIAPIAuthorizationException if a 401 response is received from the server

Raises:

class:ai_api_client_sdk.exception.AIAPINotFoundException if a 404 response is received from the server

Raises:

class:ai_api_client_sdk.exception.AIAPIPreconditionFailedException if a 412 response is received from the server

Raises:

class:ai_api_client_sdk.exception.AIAPIServerException if a non-2XX response is received from the server

Returns:

An object representing the response from the server

Return type:

class:ai_api_client_sdk.models.base_models.BasicResponse

get(execution_schedule_id: str, resource_group: str = None) ExecutionSchedule

Retrieves the execution schedule from the server.

Parameters:
  • execution_schedule_id (str) – ID of the execution schedule to be retrieved

  • resource_group (str) – Resource Group which the request should be sent on behalf. Either this or a default resource group in the ai_api_client_sdk.ai_api_v2_client.AIAPIV2Client should be specified, defaults to None

Raises:

class:ai_api_client_sdk.exception.AIAPIInvalidRequestException if a 400 response is received from the server

Raises:

class:ai_api_client_sdk.exception.AIAPIAuthorizationException if a 401 response is received from the server

Raises:

class:ai_api_client_sdk.exception.AIAPINotFoundException if a 404 response is received from the server

Raises:

class:ai_api_client_sdk.exception.AIAPIServerException if a non-2XX response is received from the server

Returns:

The retrieved execution

Return type:

class:ai_api_client_sdk.models.execution.Execution

modify(execution_schedule_id: str, cron: str = None, start: datetime = None, end: datetime = None, configurationId: str = None, status: ScheduleStatus = None, resource_group: str = None) BasicResponse

Modifies the execution schedule.

Parameters:
  • execution_schedule_id (str) – ID of the execution to be modified

  • cron (str, optional) – Cron defining the schedule to run the executions, defaults to None

  • configurationId (str, optional) – ID of the configuration for the execution schedule, defaults to None

  • start (datetime, optional) – Start time of the execution schedule in UTC, defaults to None

  • end (datetime, optional) – End time of the execution schedule in UTC, defaults to None

  • status (class:ai_api_client_sdk.models.status.ScheduleStatus, optional) – pause / resume Status of the execution schedule, defaults to None

  • resource_group (str) – Resource Group which the request should be sent on behalf. Either this or a default resource group in the ai_api_client_sdk.ai_api_v2_client.AIAPIV2Client should be specified, defaults to None

Raises:

class:ai_api_client_sdk.exception.AIAPIInvalidRequestException if a 400 response is received from the server

Raises:

class:ai_api_client_sdk.exception.AIAPIAuthorizationException if a 401 response is received from the server

Raises:

class:ai_api_client_sdk.exception.AIAPINotFoundException if a 404 response is received from the server

Raises:

class:ai_api_client_sdk.exception.AIAPIServerException if a non-2XX response is received from the server

Returns:

An object representing the response from the server

Return type:

class:ai_api_client_sdk.models.base_models.BasicResponse

query(configuration_id: str = None, status: ScheduleStatus = None, top: int = None, skip: int = None, resource_group: str = None) ExecutionScheduleQueryResponse

Queries the execution schedules.

Parameters:
  • configuration_id (str, optional) – ID of the configuration, the executions should be configured by, defaults to None

  • status (class:ai_api_client_sdk.models.schedule_status.ScheduleStatus, optional) – ScheduleStatus which the execution schedule should currently have

  • top (int, optional) – Number of executions to be retrieved, defaults to None

  • skip (int, optional) – Number of executions to be skipped, from the list of the queried executions, defaults to None

  • resource_group (str) – Resource Group which the request should be sent on behalf. Either this or a default resource group in the ai_api_client_sdk.ai_api_v2_client.AIAPIV2Client should be specified, defaults to None

Raises:

class:ai_api_client_sdk.exception.AIAPIInvalidRequestException if a 400 response is received from the server

Raises:

class:ai_api_client_sdk.exception.AIAPIAuthorizationException if a 401 response is received from the server

Raises:

class:ai_api_client_sdk.exception.AIAPIServerException if a non-2XX response is received from the server

Returns:

An object representing the response from the server

Return type:

class:ai_api_client_sdk.models.execution_query_response.ExecutionQueryResponse

count(configuration_id: str = None, status: ScheduleStatus = None, resource_group: str = None) int

Counts the number of executions schedules.

Parameters:
  • configuration_id (str, optional) – ID of the configuration, the executions should be configured by, defaults to None

  • status (class:ai_api_client_sdk.models.schedule_status.ScheduleStatus, optional) – ScheduleStatus which the execution schedule should currently have, defaults to None

  • resource_group (str) – Resource group which the request should be sent on behalf. Either this or a default resource group in the ai_api_client_sdk.ai_api_v2_client.AIAPIV2Client should be specified, defaults to None

Raises:

class:ai_api_client_sdk.exception.AIAPIInvalidRequestException if a 400 response is received from the server

Raises:

class:ai_api_client_sdk.exception.AIAPIAuthorizationException if a 401 response is received from the server

Raises:

class:ai_api_client_sdk.exception.AIAPIServerException if a non-2XX response is received from the server

Returns:

An object representing the response from the server

Return type:

int