time_condition_conditions
Creates, updates, deletes, gets or lists a time_condition_conditions resource.
Overview​
| Name | time_condition_conditions |
| Type | Resource |
| Id | ovh.telephony.time_condition_conditions |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | integer | |
day | string | Day of the time condition (friday, holiday, monday, saturday, sunday, thursday, tuesday, wednesday) |
hour_begin | string | (wire: hourBegin) |
hour_end | string | (wire: hourEnd) |
policy | string | Policy of the time condition (available, slot1, slot2, slot3) |
status | string |
Time conditions
| Name | Datatype | Description |
|---|---|---|
id | integer | |
day | string | Day of the time condition (friday, holiday, monday, saturday, sunday, thursday, tuesday, wednesday) |
hour_begin | string | (wire: hourBegin) |
hour_end | string | (wire: hourEnd) |
policy | string | Policy of the time condition (available, slot1, slot2, slot3) |
status | string |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | billing_account, id, service_name | Get a time condition | |
list | select | billing_account, service_name | x_pagination_mode | List time conditions |
create | insert | billing_account, service_name, day, hour_begin, hour_end, policy | Create a time condition | |
update | update | billing_account, id, service_name | Update a time condition | |
delete | delete | billing_account, id, service_name | Delete a time condition |
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"}}) |
billing_account | string | The name of your billingAccount (wire: billingAccount) |
id | integer | Id of the object |
service_name | string | (wire: serviceName) |
x_pagination_mode | string | Sent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode) |
SELECT examples​
- get
- list
Get a time condition
SELECT
id,
day,
hour_begin,
hour_end,
policy,
status
FROM ovh.telephony.time_condition_conditions
WHERE billing_account = '{{ billing_account }}' -- required
AND id = '{{ id }}' -- required
AND service_name = '{{ service_name }}' -- required
;
List time conditions
SELECT
id,
day,
hour_begin,
hour_end,
policy,
status
FROM ovh.telephony.time_condition_conditions
WHERE billing_account = '{{ billing_account }}' -- required
AND service_name = '{{ service_name }}' -- required
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
Create a time condition
INSERT INTO ovh.telephony.time_condition_conditions (
day,
hour_begin,
hour_end,
policy,
billing_account,
service_name
)
SELECT
'{{ day }}' /* required */,
'{{ hour_begin }}' /* required */,
'{{ hour_end }}' /* required */,
'{{ policy }}' /* required */,
'{{ billing_account }}',
'{{ service_name }}'
RETURNING
id,
day,
hour_begin,
hour_end,
policy,
status
;
# Description fields are for documentation purposes
- name: time_condition_conditions
props:
- name: billing_account
value: "{{ billing_account }}"
description: Required parameter for the time_condition_conditions resource.
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the time_condition_conditions resource.
- name: day
value: "{{ day }}"
description: |
Day of the time condition
valid_values: ['friday', 'holiday', 'monday', 'saturday', 'sunday', 'thursday', 'tuesday', 'wednesday']
- name: hour_begin
value: "{{ hour_begin }}"
description: |
The hour where the time condition begins (format : hhmm)
- name: hour_end
value: "{{ hour_end }}"
description: |
The hour where the time condition ends (format : hhmm)
- name: policy
value: "{{ policy }}"
description: |
Policy of the time condition
valid_values: ['available', 'slot1', 'slot2', 'slot3']
UPDATE examples​
- update
Update a time condition
UPDATE ovh.telephony.time_condition_conditions
SET
day = '{{ day }}',
hour_begin = '{{ hour_begin }}',
hour_end = '{{ hour_end }}',
policy = '{{ policy }}',
status = '{{ status }}'
WHERE
billing_account = '{{ billing_account }}' --required
AND id = '{{ id }}' --required
AND service_name = '{{ service_name }}' --required;
DELETE examples​
- delete
Delete a time condition
DELETE FROM ovh.telephony.time_condition_conditions
WHERE billing_account = '{{ billing_account }}' --required
AND id = '{{ id }}' --required
AND service_name = '{{ service_name }}' --required
;