task_available_timeslots
Creates, updates, deletes, gets or lists a task_available_timeslots resource.
Overview​
| Name | task_available_timeslots |
| Type | Resource |
| Id | ovh.dedicated_server.task_available_timeslots |
Fields​
The following fields are returned by SELECT queries:
- list
A time slot for a planned intervention
| Name | Datatype | Description |
|---|---|---|
end_date | string (date-time) | End date for the planned intervention (wire: endDate) |
start_date | string (date-time) | Start date for the planned intervention (wire: startDate) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | period_end, period_start, service_name, task_id | List available time slots. Returns the time slots available for the planned intervention of a task, between periodStart and periodEnd. Only a task whose needSchedule is true has slots; any other task returns an error. (Beta version) |
Parameters​
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
api_host | string | The OVHcloud API host. Selected by OVH_ENDPOINT (ovh-eu, ovh-ca or ovh-us; default ovh-eu). (default: api.eu.ovhcloud.com, x-stackQL-envVarSelector: {"envVar":"OVH_ENDPOINT","default":"ovh-eu","values":{"ovh-eu":"api.eu.ovhcloud.com","ovh-ca":"api.ca.ovhcloud.com","ovh-us":"api.us.ovhcloud.com"}}) |
period_end | string (date) | End of the period to query (wire: periodEnd) |
period_start | string (date) | Begining of the period to query (wire: periodStart) |
service_name | string | The internal name of your dedicated server (wire: serviceName) |
task_id | integer | the id of the task (wire: taskId) |
SELECT examples​
- list
List available time slots. Returns the time slots available for the planned intervention of a task, between periodStart and periodEnd. Only a task whose needSchedule is true has slots; any other task returns an error. (Beta version)
SELECT
end_date,
start_date
FROM ovh.dedicated_server.task_available_timeslots
WHERE period_end = '{{ period_end }}' -- required
AND period_start = '{{ period_start }}' -- required
AND service_name = '{{ service_name }}' -- required
AND task_id = '{{ task_id }}' -- required
;