service_shared_accounts
Creates, updates, deletes, gets or lists a service_shared_accounts resource.
Overview​
| Name | service_shared_accounts |
| Type | Resource |
| Id | ovh.email_exchange.service_shared_accounts |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | integer | Shared account id |
task_pending_id | integer | Pending task for this shared account (wire: taskPendingId) |
display_name | string | Shared account display name (wire: displayName) |
first_name | string | Shared account first name (wire: firstName) |
last_name | string | Shared account last name (wire: lastName) |
creation_date | string (date-time) | Creation date (wire: creationDate) |
current_usage | integer | Shared mailbox usage (wire: currentUsage) |
hidden_from_gal | boolean | Hide shared account in Global Address List (wire: hiddenFromGAL) |
initials | string | Shared account initials |
last_logoff_date | string (date-time) | Last logoff (wire: lastLogoffDate) |
last_logon_date | string (date-time) | Last logon (wire: lastLogonDate) |
mailing_filter | array | Enable or disable anti-virus and anti-spam (wire: mailingFilter) |
quota | integer | Shared account maximum size |
shared_email_address | string | Default email for this shared mailbox (wire: sharedEmailAddress) |
spam_detected | boolean | Account was sending spam (wire: spamDetected) |
spam_ticket_number | integer | Ticket number of spam detection (wire: spamTicketNumber) |
state | string | Shared account state (creating, deleting, internalMigration, ok, reopening, suspended, suspending) |
Exchange shared mailbox
| Name | Datatype | Description |
|---|---|---|
id | integer | Shared account id |
task_pending_id | integer | Pending task for this shared account (wire: taskPendingId) |
display_name | string | Shared account display name (wire: displayName) |
first_name | string | Shared account first name (wire: firstName) |
last_name | string | Shared account last name (wire: lastName) |
creation_date | string (date-time) | Creation date (wire: creationDate) |
current_usage | integer | Shared mailbox usage (wire: currentUsage) |
hidden_from_gal | boolean | Hide shared account in Global Address List (wire: hiddenFromGAL) |
initials | string | Shared account initials |
last_logoff_date | string (date-time) | Last logoff (wire: lastLogoffDate) |
last_logon_date | string (date-time) | Last logon (wire: lastLogonDate) |
mailing_filter | array | Enable or disable anti-virus and anti-spam (wire: mailingFilter) |
quota | integer | Shared account maximum size |
shared_email_address | string | Default email for this shared mailbox (wire: sharedEmailAddress) |
spam_detected | boolean | Account was sending spam (wire: spamDetected) |
spam_ticket_number | integer | Ticket number of spam detection (wire: spamTicketNumber) |
state | string | Shared account 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, organization_name, shared_email_address | Get a shared account. Returns the email address, names, quota, usage, state and spam filter of the shared account. | |
list | select | exchange_service, organization_name | shared_email_address, x_pagination_mode | List shared accounts. Returns the email addresses of the shared accounts of the service. Filter them by sharedEmailAddress. |
create | insert | exchange_service, organization_name, quota, shared_email_address | Create a shared account. Creates a shared account from its sharedEmailAddress and its quota, and returns the task. | |
update | update | exchange_service, organization_name, shared_email_address | Update a shared account. Updates the email address, names, display name, quota, spam filter and Global Address List visibility of the shared account. | |
delete | delete | exchange_service, organization_name, shared_email_address | Delete a shared account. Deletes the shared account with its mailbox and its permissions, 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) |
organization_name | string | The internal name of your exchange organization (wire: organizationName) |
shared_email_address | string | Default email for this shared mailbox (wire: sharedEmailAddress) |
shared_email_address | string | Filter the value of sharedEmailAddress property (like) (wire: sharedEmailAddress) |
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 shared account. Returns the email address, names, quota, usage, state and spam filter of the shared account.
SELECT
id,
task_pending_id,
display_name,
first_name,
last_name,
creation_date,
current_usage,
hidden_from_gal,
initials,
last_logoff_date,
last_logon_date,
mailing_filter,
quota,
shared_email_address,
spam_detected,
spam_ticket_number,
state
FROM ovh.email_exchange.service_shared_accounts
WHERE exchange_service = '{{ exchange_service }}' -- required
AND organization_name = '{{ organization_name }}' -- required
AND shared_email_address = '{{ shared_email_address }}' -- required
;
List shared accounts. Returns the email addresses of the shared accounts of the service. Filter them by sharedEmailAddress.
SELECT
id,
task_pending_id,
display_name,
first_name,
last_name,
creation_date,
current_usage,
hidden_from_gal,
initials,
last_logoff_date,
last_logon_date,
mailing_filter,
quota,
shared_email_address,
spam_detected,
spam_ticket_number,
state
FROM ovh.email_exchange.service_shared_accounts
WHERE exchange_service = '{{ exchange_service }}' -- required
AND organization_name = '{{ organization_name }}' -- required
AND shared_email_address = '{{ shared_email_address }}'
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
Create a shared account. Creates a shared account from its sharedEmailAddress and its quota, and returns the task.
INSERT INTO ovh.email_exchange.service_shared_accounts (
display_name,
first_name,
hidden_from_gal,
initials,
last_name,
mailing_filter,
quota,
shared_email_address,
exchange_service,
organization_name
)
SELECT
'{{ display_name }}',
'{{ first_name }}',
{{ hidden_from_gal }},
'{{ initials }}',
'{{ last_name }}',
'{{ mailing_filter }}',
{{ quota }} /* required */,
'{{ shared_email_address }}' /* required */,
'{{ exchange_service }}',
'{{ organization_name }}'
RETURNING
id,
finish_date,
function,
status,
todo_date
;
# Description fields are for documentation purposes
- name: service_shared_accounts
props:
- name: exchange_service
value: "{{ exchange_service }}"
description: Required parameter for the service_shared_accounts resource.
- name: organization_name
value: "{{ organization_name }}"
description: Required parameter for the service_shared_accounts resource.
- name: display_name
value: "{{ display_name }}"
description: |
Shared account display name
- name: first_name
value: "{{ first_name }}"
description: |
Shared account first name
- name: hidden_from_gal
value: {{ hidden_from_gal }}
description: |
Hide the shared account in Global Address List
- name: initials
value: "{{ initials }}"
description: |
Shared account initials
- name: last_name
value: "{{ last_name }}"
description: |
Shared account last name
- name: mailing_filter
value:
- "{{ mailing_filter }}"
description: |
Enable mailing filtrering
- name: quota
value: {{ quota }}
description: |
Shared account maximum size
- name: shared_email_address
value: "{{ shared_email_address }}"
description: |
Shared account email address
UPDATE examples​
- update
Update a shared account. Updates the email address, names, display name, quota, spam filter and Global Address List visibility of the shared account.
UPDATE ovh.email_exchange.service_shared_accounts
SET
display_name = '{{ display_name }}',
first_name = '{{ first_name }}',
hidden_from_gal = {{ hidden_from_gal }},
initials = '{{ initials }}',
last_name = '{{ last_name }}',
mailing_filter = '{{ mailing_filter }}',
quota = {{ quota }},
shared_email_address = '{{ shared_email_address }}'
WHERE
exchange_service = '{{ exchange_service }}' --required
AND organization_name = '{{ organization_name }}' --required
AND shared_email_address = '{{ shared_email_address }}' --required;
DELETE examples​
- delete
Delete a shared account. Deletes the shared account with its mailbox and its permissions, and returns the task.
DELETE FROM ovh.email_exchange.service_shared_accounts
WHERE exchange_service = '{{ exchange_service }}' --required
AND organization_name = '{{ organization_name }}' --required
AND shared_email_address = '{{ shared_email_address }}' --required
;