Skip to main content

ovh_pabx_dialplan_extension_condition_times

Creates, updates, deletes, gets or lists an ovh_pabx_dialplan_extension_condition_times resource.

Overview​

Nameovh_pabx_dialplan_extension_condition_times
TypeResource
Idovh.telephony.ovh_pabx_dialplan_extension_condition_times

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
condition_idinteger (wire: conditionId)
time_fromstring (time)The time of the day when the extension will start to be executed (example: 15:04:05) (wire: timeFrom)
time_tostring (time)The time of the day when the extension will stop to be executed (example: 15:04:05) (wire: timeTo)
week_daystringThe day of the week when the extension will be executed (friday, monday, saturday, sunday, thursday, tuesday, wednesday) (wire: weekDay)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectbilling_account, condition_id, dialplan_id, extension_id, service_nameGet a time condition
listselectbilling_account, dialplan_id, extension_id, service_namex_pagination_modeList time conditions
createinsertbilling_account, dialplan_id, extension_id, service_name, time_from, time_to, week_dayCreate a time condition
updateupdatebilling_account, condition_id, dialplan_id, extension_id, service_nameUpdate a time condition
deletedeletebilling_account, condition_id, dialplan_id, extension_id, service_nameDelete 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.

NameDatatypeDescription
api_hoststringThe 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_accountstringThe name of your billingAccount (wire: billingAccount)
condition_idinteger (wire: conditionId)
dialplan_idinteger (wire: dialplanId)
extension_idinteger (wire: extensionId)
service_namestring (wire: serviceName)
x_pagination_modestringSent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode)

SELECT examples​

Get a time condition

SELECT
condition_id,
time_from,
time_to,
week_day
FROM ovh.telephony.ovh_pabx_dialplan_extension_condition_times
WHERE billing_account = '{{ billing_account }}' -- required
AND condition_id = '{{ condition_id }}' -- required
AND dialplan_id = '{{ dialplan_id }}' -- required
AND extension_id = '{{ extension_id }}' -- required
AND service_name = '{{ service_name }}' -- required
;

INSERT examples​

Create a time condition

INSERT INTO ovh.telephony.ovh_pabx_dialplan_extension_condition_times (
time_from,
time_to,
week_day,
billing_account,
dialplan_id,
extension_id,
service_name
)
SELECT
'{{ time_from }}' /* required */,
'{{ time_to }}' /* required */,
'{{ week_day }}' /* required */,
'{{ billing_account }}',
'{{ dialplan_id }}',
'{{ extension_id }}',
'{{ service_name }}'
RETURNING
condition_id,
time_from,
time_to,
week_day
;

UPDATE examples​

Update a time condition

UPDATE ovh.telephony.ovh_pabx_dialplan_extension_condition_times
SET
time_from = '{{ time_from }}',
time_to = '{{ time_to }}',
week_day = '{{ week_day }}'
WHERE
billing_account = '{{ billing_account }}' --required
AND condition_id = '{{ condition_id }}' --required
AND dialplan_id = '{{ dialplan_id }}' --required
AND extension_id = '{{ extension_id }}' --required
AND service_name = '{{ service_name }}' --required;

DELETE examples​

Delete a time condition

DELETE FROM ovh.telephony.ovh_pabx_dialplan_extension_condition_times
WHERE billing_account = '{{ billing_account }}' --required
AND condition_id = '{{ condition_id }}' --required
AND dialplan_id = '{{ dialplan_id }}' --required
AND extension_id = '{{ extension_id }}' --required
AND service_name = '{{ service_name }}' --required
;