senders
Creates, updates, deletes, gets or lists a senders resource.
Overview​
| Name | senders |
| Type | Resource |
| Id | ovh.sms.senders |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
comment | string | Message sent by the moderator |
description | string | Sender description |
referer | string | Specify if the sender is custom or not (custom, domain, line, nic, owner, virtual) |
sender | string | The sms sender |
status | string | Sender status (disable, enable, refused, waitingValidation) |
type | string | Specify the kind of sender (alpha, numeric, shortcode, time2chat, virtual) |
validation_media | string | Validation media identifier (wire: validationMedia) |
SMS senders
| Name | Datatype | Description |
|---|---|---|
comment | string | Message sent by the moderator |
description | string | Sender description |
referer | string | Specify if the sender is custom or not (custom, domain, line, nic, owner, virtual) |
sender | string | The sms sender |
status | string | Sender status (disable, enable, refused, waitingValidation) |
type | string | Specify the kind of sender (alpha, numeric, shortcode, time2chat, virtual) |
validation_media | string | Validation media identifier (wire: validationMedia) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | sender, service_name | Get a sender. Returns the sender: status (enable, disable, waitingValidation or refused), type, description and the comment of the moderator. | |
list | select | service_name | x_pagination_mode | List senders. Returns the senders of the account. A sender is the name or number shown to receivers, and must be validated before it can be used. |
create | insert | service_name, sender | Create a sender. Creates a sender (alphanumeric or phone number). The sender is moderated before it can be used. | |
update | update | sender, service_name | Update a sender. Updates the sender description and its status, to enable or disable a validated sender. | |
delete | delete | sender, service_name | Delete a sender. Deletes the sender. It can no longer be used as the name or number shown to the receivers of the SMS sent. | |
validate | exec | sender, serviceName, code | Validate a sender. Validates the sender with the validation code received. Once validated, the sender can be used to send SMS. |
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"}}) |
sender | string | The sms sender |
serviceName | string | The internal name of your SMS offer |
service_name | string | The internal name of your SMS offer (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 sender. Returns the sender: status (enable, disable, waitingValidation or refused), type, description and the comment of the moderator.
SELECT
comment,
description,
referer,
sender,
status,
type,
validation_media
FROM ovh.sms.senders
WHERE sender = '{{ sender }}' -- required
AND service_name = '{{ service_name }}' -- required
;
List senders. Returns the senders of the account. A sender is the name or number shown to receivers, and must be validated before it can be used.
SELECT
comment,
description,
referer,
sender,
status,
type,
validation_media
FROM ovh.sms.senders
WHERE service_name = '{{ service_name }}' -- required
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
Create a sender. Creates a sender (alphanumeric or phone number). The sender is moderated before it can be used.
INSERT INTO ovh.sms.senders (
description,
reason,
sender,
service_name
)
SELECT
'{{ description }}',
'{{ reason }}',
'{{ sender }}' /* required */,
'{{ service_name }}'
;
# Description fields are for documentation purposes
- name: senders
props:
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the senders resource.
- name: description
value: "{{ description }}"
description: |
Sender description
- name: reason
value: "{{ reason }}"
description: |
Message seen by the moderator
- name: sender
value: "{{ sender }}"
description: |
The sender (alpha or phone number)
UPDATE examples​
- update
Update a sender. Updates the sender description and its status, to enable or disable a validated sender.
UPDATE ovh.sms.senders
SET
description = '{{ description }}',
status = '{{ status }}'
WHERE
sender = '{{ sender }}' --required
AND service_name = '{{ service_name }}' --required;
DELETE examples​
- delete
Delete a sender. Deletes the sender. It can no longer be used as the name or number shown to the receivers of the SMS sent.
DELETE FROM ovh.sms.senders
WHERE sender = '{{ sender }}' --required
AND service_name = '{{ service_name }}' --required
;
Lifecycle Methods​
EXEC variables use wire (API) names.
- validate
Validate a sender. Validates the sender with the validation code received. Once validated, the sender can be used to send SMS.
EXEC ovh.sms.senders.validate
@sender='{{ sender }}' --required,
@serviceName='{{ serviceName }}' --required
@@json=
'{
"code": "{{ code }}"
}'
;