users
Creates, updates, deletes, gets or lists a users resource.
Overview​
| Name | users |
| Type | Resource |
| Id | ovh.sms.users |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
alert_threshold_informations | object | A structure describing all information about alert threshold informations (wire: alertThresholdInformations) |
call_back | string | URL called when state of a sent SMS changes (wire: callBack) |
ip_restrictions | array | (wire: ipRestrictions) |
login | string | The sms user login |
password | string | |
quota_informations | object | A structure describing all information about quota informations (wire: quotaInformations) |
stop_call_back | string | URL called when a STOP is received after a receiver replied stop to a SMS (wire: stopCallBack) |
SMS users
| Name | Datatype | Description |
|---|---|---|
alert_threshold_informations | object | A structure describing all information about alert threshold informations (wire: alertThresholdInformations) |
call_back | string | URL called when state of a sent SMS changes (wire: callBack) |
ip_restrictions | array | (wire: ipRestrictions) |
login | string | The sms user login |
password | string | |
quota_informations | object | A structure describing all information about quota informations (wire: quotaInformations) |
stop_call_back | string | URL called when a STOP is received after a receiver replied stop to a SMS (wire: stopCallBack) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | login, service_name | Get a user. Returns the API user: login, callback URLs, quota left and status, alert threshold and the IP addresses allowed to send SMS. | |
list | select | service_name | x_pagination_mode | List users. Returns the logins of the API users of the SMS account. Each user sends SMS with its own login, callback URLs, quota and IP restrictions. |
create | insert | service_name, login, password | Create a user. Creates an API user with a login and a password, to send SMS with its own callback URLs, quota and IP restrictions. | |
update | update | login, service_name | Update a user. Updates the API user: password, callback URLs, quota, alert threshold and the IP addresses allowed to send SMS. | |
delete | delete | login, service_name | Delete a user. Deletes the API user of the SMS account. Its login and password can no longer 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"}}) |
login | string | The sms user login |
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 user. Returns the API user: login, callback URLs, quota left and status, alert threshold and the IP addresses allowed to send SMS.
SELECT
alert_threshold_informations,
call_back,
ip_restrictions,
login,
password,
quota_informations,
stop_call_back
FROM ovh.sms.users
WHERE login = '{{ login }}' -- required
AND service_name = '{{ service_name }}' -- required
;
List users. Returns the logins of the API users of the SMS account. Each user sends SMS with its own login, callback URLs, quota and IP restrictions.
SELECT
alert_threshold_informations,
call_back,
ip_restrictions,
login,
password,
quota_informations,
stop_call_back
FROM ovh.sms.users
WHERE service_name = '{{ service_name }}' -- required
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
Create a user. Creates an API user with a login and a password, to send SMS with its own callback URLs, quota and IP restrictions.
INSERT INTO ovh.sms.users (
login,
password,
service_name
)
SELECT
'{{ login }}' /* required */,
'{{ password }}' /* required */,
'{{ service_name }}'
;
# Description fields are for documentation purposes
- name: users
props:
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the users resource.
- name: login
value: "{{ login }}"
description: |
The sms login
- name: password
value: "{{ password }}"
description: |
The sms password
UPDATE examples​
- update
Update a user. Updates the API user: password, callback URLs, quota, alert threshold and the IP addresses allowed to send SMS.
UPDATE ovh.sms.users
SET
alert_threshold_informations = '{{ alert_threshold_informations }}',
call_back = '{{ call_back }}',
ip_restrictions = '{{ ip_restrictions }}',
password = '{{ password }}',
quota_informations = '{{ quota_informations }}',
stop_call_back = '{{ stop_call_back }}'
WHERE
login = '{{ login }}' --required
AND service_name = '{{ service_name }}' --required;
DELETE examples​
- delete
Delete a user. Deletes the API user of the SMS account. Its login and password can no longer be used to send SMS.
DELETE FROM ovh.sms.users
WHERE login = '{{ login }}' --required
AND service_name = '{{ service_name }}' --required
;