external_contacts
Creates, updates, deletes, gets or lists an external_contacts resource.
Overview​
| Name | external_contacts |
| Type | Resource |
| Id | ovh.email_mxplan.external_contacts |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | integer | Contact id |
task_pending_id | integer | Task pending id (wire: taskPendingId) |
display_name | string | Contact display name (wire: displayName) |
first_name | string | Contact first name (wire: firstName) |
last_name | string | Contact last name (wire: lastName) |
creation_date | string (date-time) | Creation date (wire: creationDate) |
external_email_address | string | Contact email (wire: externalEmailAddress) |
hidden_from_gal | boolean | Hide the contact in Global Address List (wire: hiddenFromGAL) |
initials | string | Contact initals |
state | string | Contact state (creating, deleting, ok, reopening, suspended, suspending, unknown) |
External contact for this mxplan service
| Name | Datatype | Description |
|---|---|---|
id | integer | Contact id |
task_pending_id | integer | Task pending id (wire: taskPendingId) |
display_name | string | Contact display name (wire: displayName) |
first_name | string | Contact first name (wire: firstName) |
last_name | string | Contact last name (wire: lastName) |
creation_date | string (date-time) | Creation date (wire: creationDate) |
external_email_address | string | Contact email (wire: externalEmailAddress) |
hidden_from_gal | boolean | Hide the contact in Global Address List (wire: hiddenFromGAL) |
initials | string | Contact initals |
state | string | Contact state (creating, deleting, ok, reopening, suspended, suspending, unknown) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | external_email_address, service | Get an external contact. Returns the email address, names, state and Global Address List visibility of the external contact. | |
list | select | service | display_name, external_email_address, first_name, id, last_name, x_pagination_mode | List external contacts. Returns the email addresses of the external contacts of the service. Filter them by externalEmailAddress, firstName, lastName, displayName or id. |
create | insert | service, external_email_address | Create an external contact. Creates a contact with an external email address in the service, and returns the task. Set hiddenFromGAL to true to hide it from the Global Address List. | |
update | update | external_email_address, service | Update an external contact. Updates the email address, names, initials and Global Address List visibility of the external contact. | |
delete | delete | external_email_address, service | Delete an external contact. Removes the external contact from the address book of the MX Plan service and returns the task. |
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"}}) |
external_email_address | string | Contact email (wire: externalEmailAddress) |
service | string | The internal name of your mxplan organization |
display_name | string | Filter the value of displayName property (like) (wire: displayName) |
external_email_address | string | Filter the value of externalEmailAddress property (like) (wire: externalEmailAddress) |
first_name | string | Filter the value of firstName property (like) (wire: firstName) |
id | integer | Filter the value of id property (like) |
last_name | string | Filter the value of lastName property (like) (wire: lastName) |
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 an external contact. Returns the email address, names, state and Global Address List visibility of the external contact.
SELECT
id,
task_pending_id,
display_name,
first_name,
last_name,
creation_date,
external_email_address,
hidden_from_gal,
initials,
state
FROM ovh.email_mxplan.external_contacts
WHERE external_email_address = '{{ external_email_address }}' -- required
AND service = '{{ service }}' -- required
;
List external contacts. Returns the email addresses of the external contacts of the service. Filter them by externalEmailAddress, firstName, lastName, displayName or id.
SELECT
id,
task_pending_id,
display_name,
first_name,
last_name,
creation_date,
external_email_address,
hidden_from_gal,
initials,
state
FROM ovh.email_mxplan.external_contacts
WHERE service = '{{ service }}' -- required
AND display_name = '{{ display_name }}'
AND external_email_address = '{{ external_email_address }}'
AND first_name = '{{ first_name }}'
AND id = '{{ id }}'
AND last_name = '{{ last_name }}'
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
Create an external contact. Creates a contact with an external email address in the service, and returns the task. Set hiddenFromGAL to true to hide it from the Global Address List.
INSERT INTO ovh.email_mxplan.external_contacts (
display_name,
external_email_address,
first_name,
hidden_from_gal,
initials,
last_name,
service
)
SELECT
'{{ display_name }}',
'{{ external_email_address }}' /* required */,
'{{ first_name }}',
{{ hidden_from_gal }},
'{{ initials }}',
'{{ last_name }}',
'{{ service }}'
RETURNING
id,
finish_date,
function,
status,
todo_date
;
# Description fields are for documentation purposes
- name: external_contacts
props:
- name: service
value: "{{ service }}"
description: Required parameter for the external_contacts resource.
- name: display_name
value: "{{ display_name }}"
description: |
Contact display name
- name: external_email_address
value: "{{ external_email_address }}"
description: |
Contact email address
- name: first_name
value: "{{ first_name }}"
description: |
Contact first name
- name: hidden_from_gal
value: {{ hidden_from_gal }}
description: |
Hide the contact in Global Address List
- name: initials
value: "{{ initials }}"
description: |
Contact initials
- name: last_name
value: "{{ last_name }}"
description: |
Contact last name
UPDATE examples​
- update
Update an external contact. Updates the email address, names, initials and Global Address List visibility of the external contact.
UPDATE ovh.email_mxplan.external_contacts
SET
display_name = '{{ display_name }}',
external_email_address = '{{ external_email_address }}',
first_name = '{{ first_name }}',
hidden_from_gal = {{ hidden_from_gal }},
initials = '{{ initials }}',
last_name = '{{ last_name }}'
WHERE
external_email_address = '{{ external_email_address }}' --required
AND service = '{{ service }}' --required;
DELETE examples​
- delete
Delete an external contact. Removes the external contact from the address book of the MX Plan service and returns the task.
DELETE FROM ovh.email_mxplan.external_contacts
WHERE external_email_address = '{{ external_email_address }}' --required
AND service = '{{ service }}' --required
;