Skip to main content

trunks

Creates, updates, deletes, gets or lists a trunks resource.

Overview​

Nametrunks
TypeResource
Idovh.telephony.trunks

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
service_namestringName of the service (wire: serviceName)
descriptionstringDescription of the service
service_typestringType of the service (alias, line) (wire: serviceType)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_by_service_nameselectbilling_account, service_nameGet a trunk
getselectservice_nameGet a line or trunk
list_by_billing_accountselectbilling_accountx_pagination_modeList trunks
listselectiam_tags, x_pagination_modeList trunks
change_contactexecserviceNameChange service contacts. Starts a procedure to change the admin, tech or billing contact of the service.

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)
serviceNamestringYour trunk number
service_namestringYour trunk number (wire: serviceName)
iam_tagsobjectFilter resources on IAM tags (wire: iamTags)
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 trunk

SELECT
service_name,
description,
service_type
FROM ovh.telephony.trunks
WHERE billing_account = '{{ billing_account }}' -- required
AND service_name = '{{ service_name }}' -- required
;

Lifecycle Methods​

EXEC variables use wire (API) names.

Change service contacts. Starts a procedure to change the admin, tech or billing contact of the service.

EXEC ovh.telephony.trunks.change_contact
@serviceName='{{ serviceName }}' --required
@@json=
'{
"contactAdmin": "{{ contactAdmin }}",
"contactBilling": "{{ contactBilling }}",
"contactTech": "{{ contactTech }}"
}'
;