virtual_numbers
Creates, updates, deletes, gets or lists a virtual_numbers resource.
Overview​
| Name | virtual_numbers |
| Type | Resource |
| Id | ovh.sms.virtual_numbers |
Fields​
The following fields are returned by SELECT queries:
- get_by_number
- get
- list_by_service_name
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
country_code | string | The ISO formated country code of the number (be, ch, de, es, fr, uk) (wire: countryCode) |
number | string | The virtual number |
successful operation
| Name | Datatype | Description |
|---|---|---|
country_code | string | The ISO formated country code of the number (be, ch, de, es, fr, uk) (wire: countryCode) |
iam | object | IAM resource metadata |
number | string | The virtual number |
Virtual numbers
| Name | Datatype | Description |
|---|---|---|
country_code | string | The ISO formated country code of the number (be, ch, de, es, fr, uk) (wire: countryCode) |
number | string | The virtual number |
Virtual numbers
| Name | Datatype | Description |
|---|---|---|
country_code | string | The ISO formated country code of the number (be, ch, de, es, fr, uk) (wire: countryCode) |
iam | object | IAM resource metadata |
number | string | The virtual number |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_by_number | select | number, service_name | Get a virtual number. Returns the virtual number attached to the SMS account and the ISO code of its country. | |
get | select | number | Get a virtual number service. Returns the virtual number service, with the number and the ISO code of its country. | |
list_by_service_name | select | service_name | x_pagination_mode | List virtual numbers. Returns the virtual numbers of the account. A virtual number receives SMS and lets receivers reply. |
list | select | iam_tags, x_pagination_mode | List 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.
| 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"}}) |
number | string | Your virtual number |
service_name | string | The internal name of your SMS offer (wire: serviceName) |
iam_tags | object | Filter resources on IAM tags (wire: iamTags) |
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_by_number
- get
- list_by_service_name
- list
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
;
Get a virtual number service. Returns the virtual number service, with the number and the ISO code of its country.
SELECT
country_code,
iam,
number
FROM ovh.sms.virtual_numbers
WHERE number = '{{ number }}' -- required
;
List virtual numbers. Returns the virtual numbers of the account. A virtual number receives SMS and lets receivers reply.
SELECT
country_code,
number
FROM ovh.sms.virtual_numbers
WHERE service_name = '{{ service_name }}' -- required
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
List virtual numbers. Returns the virtual numbers of the customer, as services. A virtual number receives SMS and lets receivers reply to the messages sent.
SELECT
country_code,
iam,
number
FROM ovh.sms.virtual_numbers
WHERE iam_tags = '{{ iam_tags }}'
AND x_pagination_mode = '{{ x_pagination_mode }}'
;