phonebook_phonebook_contacts
Creates, updates, deletes, gets or lists a phonebook_phonebook_contacts resource.
Overview​
| Name | phonebook_phonebook_contacts |
| Type | Resource |
| Id | ovh.telephony.phonebook_phonebook_contacts |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | integer | Contact identifier |
name | string | Contact name |
group | string | Group name of the phonebook |
home_mobile | string (phone-number) | Home mobile phone number of the contact (wire: homeMobile) |
home_phone | string (phone-number) | Home landline phone number of the contact (wire: homePhone) |
surname | string | Contact surname |
work_mobile | string (phone-number) | Mobile phone office number of the contact (wire: workMobile) |
work_phone | string (phone-number) | Landline phone office number of the contact (wire: workPhone) |
Phone book contact
| Name | Datatype | Description |
|---|---|---|
id | integer | Contact identifier |
name | string | Contact name |
group | string | Group name of the phonebook |
home_mobile | string (phone-number) | Home mobile phone number of the contact (wire: homeMobile) |
home_phone | string (phone-number) | Home landline phone number of the contact (wire: homePhone) |
surname | string | Contact surname |
work_mobile | string (phone-number) | Mobile phone office number of the contact (wire: workMobile) |
work_phone | string (phone-number) | Landline phone office number of the contact (wire: workPhone) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | billing_account, book_key, id | Get a contact | |
list | select | billing_account, book_key | x_pagination_mode | List contacts |
create | insert | billing_account, book_key, group, name, surname | Create a contact | |
update | update | billing_account, book_key, id | Update a contact | |
delete | delete | billing_account, book_key, id | Delete a contact |
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"}}) |
billing_account | string | The name of your billingAccount (wire: billingAccount) |
book_key | string | Identifier of the phonebook (wire: bookKey) |
id | integer | Contact identifier |
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 contact
SELECT
id,
name,
group,
home_mobile,
home_phone,
surname,
work_mobile,
work_phone
FROM ovh.telephony.phonebook_phonebook_contacts
WHERE billing_account = '{{ billing_account }}' -- required
AND book_key = '{{ book_key }}' -- required
AND id = '{{ id }}' -- required
;
List contacts
SELECT
id,
name,
group,
home_mobile,
home_phone,
surname,
work_mobile,
work_phone
FROM ovh.telephony.phonebook_phonebook_contacts
WHERE billing_account = '{{ billing_account }}' -- required
AND book_key = '{{ book_key }}' -- required
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
Create a contact
INSERT INTO ovh.telephony.phonebook_phonebook_contacts (
group,
home_mobile,
home_phone,
name,
surname,
work_mobile,
work_phone,
billing_account,
book_key
)
SELECT
'{{ group }}' /* required */,
'{{ home_mobile }}',
'{{ home_phone }}',
'{{ name }}' /* required */,
'{{ surname }}' /* required */,
'{{ work_mobile }}',
'{{ work_phone }}',
'{{ billing_account }}',
'{{ book_key }}'
;
# Description fields are for documentation purposes
- name: phonebook_phonebook_contacts
props:
- name: billing_account
value: "{{ billing_account }}"
description: Required parameter for the phonebook_phonebook_contacts resource.
- name: book_key
value: "{{ book_key }}"
description: Required parameter for the phonebook_phonebook_contacts resource.
- name: group
value: "{{ group }}"
description: |
Group name of the phonebook
- name: home_mobile
value: "{{ home_mobile }}"
description: |
Phone number
- name: home_phone
value: "{{ home_phone }}"
description: |
Phone number
- name: name
value: "{{ name }}"
description: |
Name of the contact
- name: surname
value: "{{ surname }}"
description: |
Contact surname
- name: work_mobile
value: "{{ work_mobile }}"
description: |
Phone number
- name: work_phone
value: "{{ work_phone }}"
description: |
Phone number
UPDATE examples​
- update
Update a contact
UPDATE ovh.telephony.phonebook_phonebook_contacts
SET
group = '{{ group }}',
home_mobile = '{{ home_mobile }}',
home_phone = '{{ home_phone }}',
name = '{{ name }}',
surname = '{{ surname }}',
work_mobile = '{{ work_mobile }}',
work_phone = '{{ work_phone }}'
WHERE
billing_account = '{{ billing_account }}' --required
AND book_key = '{{ book_key }}' --required
AND id = '{{ id }}' --required;
DELETE examples​
- delete
Delete a contact
DELETE FROM ovh.telephony.phonebook_phonebook_contacts
WHERE billing_account = '{{ billing_account }}' --required
AND book_key = '{{ book_key }}' --required
AND id = '{{ id }}' --required
;