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