Skip to main content

virtual_numbers

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

Overview​

Namevirtual_numbers
TypeResource
Idovh.sms.virtual_numbers

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
country_codestringThe ISO formated country code of the number (be, ch, de, es, fr, uk) (wire: countryCode)
numberstringThe virtual number

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_by_numberselectnumber, service_nameGet a virtual number. Returns the virtual number attached to the SMS account and the ISO code of its country.
getselectnumberGet a virtual number service. Returns the virtual number service, with the number and the ISO code of its country.
list_by_service_nameselectservice_namex_pagination_modeList virtual numbers. Returns the virtual numbers of the account. A virtual number receives SMS and lets receivers reply.
listselectiam_tags, x_pagination_modeList virtual numbers. Returns the virtual numbers of the customer, as services. A virtual number receives SMS and lets receivers reply to the messages sent.

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"}})
numberstringYour virtual number
service_namestringThe internal name of your SMS offer (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 virtual number. Returns the virtual number attached to the SMS account and the ISO code of its country.

SELECT
country_code,
number
FROM ovh.sms.virtual_numbers
WHERE number = '{{ number }}' -- required
AND service_name = '{{ service_name }}' -- required
;