Skip to main content

service_shared_accounts

Creates, updates, deletes, gets or lists a service_shared_accounts resource.

Overview​

Nameservice_shared_accounts
TypeResource
Idovh.email_exchange.service_shared_accounts

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idintegerShared account id
task_pending_idintegerPending task for this shared account (wire: taskPendingId)
display_namestringShared account display name (wire: displayName)
first_namestringShared account first name (wire: firstName)
last_namestringShared account last name (wire: lastName)
creation_datestring (date-time)Creation date (wire: creationDate)
current_usageintegerShared mailbox usage (wire: currentUsage)
hidden_from_galbooleanHide shared account in Global Address List (wire: hiddenFromGAL)
initialsstringShared account initials
last_logoff_datestring (date-time)Last logoff (wire: lastLogoffDate)
last_logon_datestring (date-time)Last logon (wire: lastLogonDate)
mailing_filterarrayEnable or disable anti-virus and anti-spam (wire: mailingFilter)
quotaintegerShared account maximum size
shared_email_addressstringDefault email for this shared mailbox (wire: sharedEmailAddress)
spam_detectedbooleanAccount was sending spam (wire: spamDetected)
spam_ticket_numberintegerTicket number of spam detection (wire: spamTicketNumber)
statestringShared account state (creating, deleting, internalMigration, ok, reopening, suspended, suspending)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectexchange_service, organization_name, shared_email_addressGet a shared account. Returns the email address, names, quota, usage, state and spam filter of the shared account.
listselectexchange_service, organization_nameshared_email_address, x_pagination_modeList shared accounts. Returns the email addresses of the shared accounts of the service. Filter them by sharedEmailAddress.
createinsertexchange_service, organization_name, quota, shared_email_addressCreate a shared account. Creates a shared account from its sharedEmailAddress and its quota, and returns the task.
updateupdateexchange_service, organization_name, shared_email_addressUpdate a shared account. Updates the email address, names, display name, quota, spam filter and Global Address List visibility of the shared account.
deletedeleteexchange_service, organization_name, shared_email_addressDelete 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.

NameDatatypeDescription
api_hoststringThe 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_servicestringThe internal name of your exchange service (wire: exchangeService)
organization_namestringThe internal name of your exchange organization (wire: organizationName)
shared_email_addressstringDefault email for this shared mailbox (wire: sharedEmailAddress)
shared_email_addressstringFilter the value of sharedEmailAddress property (like) (wire: sharedEmailAddress)
x_pagination_modestringSent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode)

SELECT examples​

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
;

INSERT examples​

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
;

UPDATE examples​

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 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
;