service_external_contacts
Creates, updates, deletes, gets or lists a service_external_contacts resource.
Overview​
| Name | service_external_contacts |
| Type | Resource |
| Id | ovh.email_exchange.service_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 |
organization_2010 | string | If specified, indicates to which organization this external contact belongs (Exchange 2010 only) (wire: organization2010) |
state | string | Contact state (creating, deleting, internalMigration, ok, reopening, suspended, suspending) |
External contact for this exchange 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 |
organization_2010 | string | If specified, indicates to which organization this external contact belongs (Exchange 2010 only) (wire: organization2010) |
state | string | Contact state (creating, deleting, internalMigration, ok, reopening, suspended, suspending) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | exchange_service, external_email_address, organization_name | Get an external contact. Returns the email address, names, display name, state and Global Address List visibility of the external contact. | |
list | select | exchange_service, organization_name | display_name, external_email_address, first_name, id, last_name, x_pagination_mode | List external contacts. Returns the email addresses of the external contacts. Filter them by externalEmailAddress, firstName, lastName, displayName or id. |
create | insert | exchange_service, organization_name, external_email_address | Create an external contact. Creates an external contact from its externalEmailAddress, with optional names and display name, and returns the task. | |
update | update | exchange_service, external_email_address, organization_name | Update an external contact. Updates the email address, names, display name and Global Address List visibility of the external contact. | |
delete | delete | exchange_service, external_email_address, organization_name | Delete an external contact. Removes the external contact from the address book of the Exchange 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"}}) |
exchange_service | string | The internal name of your exchange service (wire: exchangeService) |
external_email_address | string | Contact email (wire: externalEmailAddress) |
organization_name | string | The internal name of your exchange organization (wire: organizationName) |
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, display name, 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,
organization_2010,
state
FROM ovh.email_exchange.service_external_contacts
WHERE exchange_service = '{{ exchange_service }}' -- required
AND external_email_address = '{{ external_email_address }}' -- required
AND organization_name = '{{ organization_name }}' -- required
;
List external contacts. Returns the email addresses of the external contacts. 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,
organization_2010,
state
FROM ovh.email_exchange.service_external_contacts
WHERE exchange_service = '{{ exchange_service }}' -- required
AND organization_name = '{{ organization_name }}' -- 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 an external contact from its externalEmailAddress, with optional names and display name, and returns the task.
INSERT INTO ovh.email_exchange.service_external_contacts (
display_name,
external_email_address,
first_name,
hidden_from_gal,
initials,
last_name,
organization_2010,
exchange_service,
organization_name
)
SELECT
'{{ display_name }}',
'{{ external_email_address }}' /* required */,
'{{ first_name }}',
{{ hidden_from_gal }},
'{{ initials }}',
'{{ last_name }}',
'{{ organization_2010 }}',
'{{ exchange_service }}',
'{{ organization_name }}'
RETURNING
id,
finish_date,
function,
status,
todo_date
;
# Description fields are for documentation purposes
- name: service_external_contacts
props:
- name: exchange_service
value: "{{ exchange_service }}"
description: Required parameter for the service_external_contacts resource.
- name: organization_name
value: "{{ organization_name }}"
description: Required parameter for the service_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
- name: organization_2010
value: "{{ organization_2010 }}"
description: |
Indicates to which organization this newly created external contact will belongs (Exchange 2010 only)
UPDATE examples​
- update
Update an external contact. Updates the email address, names, display name and Global Address List visibility of the external contact.
UPDATE ovh.email_exchange.service_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
exchange_service = '{{ exchange_service }}' --required
AND external_email_address = '{{ external_email_address }}' --required
AND organization_name = '{{ organization_name }}' --required;
DELETE examples​
- delete
Delete an external contact. Removes the external contact from the address book of the Exchange service and returns the task.
DELETE FROM ovh.email_exchange.service_external_contacts
WHERE exchange_service = '{{ exchange_service }}' --required
AND external_email_address = '{{ external_email_address }}' --required
AND organization_name = '{{ organization_name }}' --required
;