Skip to main content

service_account_aliases

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

Overview​

Nameservice_account_aliases
TypeResource
Idovh.email_exchange.service_account_aliases

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
task_pending_idintegerPending task id (wire: taskPendingId)
aliasstringAlias
creation_datestring (date-time)Creation date (wire: creationDate)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectalias, exchange_service, organization_name, primary_email_addressGet an account alias. Returns the alias address, its creation date and the ID of its pending task, if any (taskPendingId).
listselectexchange_service, organization_name, primary_email_addressx_pagination_modeList account aliases. Returns the aliases of the email account: extra addresses that deliver to the same mailbox.
createinsertexchange_service, organization_name, primary_email_address, aliasCreate an account alias. Adds the alias address to the email account, so that it receives its emails, and returns the task.
deletedeletealias, exchange_service, organization_name, primary_email_addressDelete an account alias. Removes the alias address from the email account, which no longer receives its emails, 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
aliasstringAlias
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)
primary_email_addressstringDefault email for this mailbox (wire: primaryEmailAddress)
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 an account alias. Returns the alias address, its creation date and the ID of its pending task, if any (taskPendingId).

SELECT
task_pending_id,
alias,
creation_date
FROM ovh.email_exchange.service_account_aliases
WHERE alias = '{{ alias }}' -- required
AND exchange_service = '{{ exchange_service }}' -- required
AND organization_name = '{{ organization_name }}' -- required
AND primary_email_address = '{{ primary_email_address }}' -- required
;

INSERT examples​

Create an account alias. Adds the alias address to the email account, so that it receives its emails, and returns the task.

INSERT INTO ovh.email_exchange.service_account_aliases (
alias,
exchange_service,
organization_name,
primary_email_address
)
SELECT
'{{ alias }}' /* required */,
'{{ exchange_service }}',
'{{ organization_name }}',
'{{ primary_email_address }}'
RETURNING
id,
finish_date,
function,
status,
todo_date
;

DELETE examples​

Delete an account alias. Removes the alias address from the email account, which no longer receives its emails, and returns the task.

DELETE FROM ovh.email_exchange.service_account_aliases
WHERE alias = '{{ alias }}' --required
AND exchange_service = '{{ exchange_service }}' --required
AND organization_name = '{{ organization_name }}' --required
AND primary_email_address = '{{ primary_email_address }}' --required
;