phonebooks
Creates, updates, deletes, gets or lists a phonebooks resource.
Overview​
| Name | phonebooks |
| Type | Resource |
| Id | ovh.telephony.phonebooks |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
name | string | Phone book name |
book_key | string | Identifier of the phonebook (wire: bookKey) |
Phone book on group
| Name | Datatype | Description |
|---|---|---|
name | string | Phone book name |
book_key | string | Identifier of the phonebook (wire: bookKey) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | billing_account, book_key | Get a phonebook | |
list | select | billing_account | x_pagination_mode | List phonebooks |
create | insert | billing_account, name | Create a phonebook | |
update | update | billing_account, book_key | Update a phonebook | |
delete | delete | billing_account, book_key | Delete a phonebook | |
import | exec | billingAccount, bookKey, documentId | Import contacts |
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"}}) |
billingAccount | string | The name of your billingAccount |
billing_account | string | The name of your billingAccount (wire: billingAccount) |
bookKey | string | Identifier of the phonebook |
book_key | string | Identifier of the phonebook (wire: bookKey) |
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 phonebook
SELECT
name,
book_key
FROM ovh.telephony.phonebooks
WHERE billing_account = '{{ billing_account }}' -- required
AND book_key = '{{ book_key }}' -- required
;
List phonebooks
SELECT
name,
book_key
FROM ovh.telephony.phonebooks
WHERE billing_account = '{{ billing_account }}' -- required
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
Create a phonebook
INSERT INTO ovh.telephony.phonebooks (
name,
billing_account
)
SELECT
'{{ name }}' /* required */,
'{{ billing_account }}'
;
# Description fields are for documentation purposes
- name: phonebooks
props:
- name: billing_account
value: "{{ billing_account }}"
description: Required parameter for the phonebooks resource.
- name: name
value: "{{ name }}"
description: |
Name of the wanted phonebook
UPDATE examples​
- update
Update a phonebook
UPDATE ovh.telephony.phonebooks
SET
name = '{{ name }}'
WHERE
billing_account = '{{ billing_account }}' --required
AND book_key = '{{ book_key }}' --required;
DELETE examples​
- delete
Delete a phonebook
DELETE FROM ovh.telephony.phonebooks
WHERE billing_account = '{{ billing_account }}' --required
AND book_key = '{{ book_key }}' --required
;
Lifecycle Methods​
EXEC variables use wire (API) names.
- import
Import contacts
EXEC ovh.telephony.phonebooks.import
@billingAccount='{{ billingAccount }}' --required,
@bookKey='{{ bookKey }}' --required
@@json=
'{
"documentId": "{{ documentId }}"
}'
;