Skip to main content

account_aliases

Creates, updates, deletes, gets or lists an account_aliases resource.

Overview​

Nameaccount_aliases
TypeResource
Idovh.email_mxplan.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, email, serviceGet an account alias. Returns the alias address, its creation date and the ID of its pending task, if any (taskPendingId).
listselectemail, servicex_pagination_modeList account aliases. Returns the aliases of the email account: extra addresses that deliver to the same mailbox.
createinsertemail, service, aliasCreate an account alias. Adds the alias address to the email account, so that it receives its emails, and returns the task.
deletedeletealias, email, serviceDelete 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"}})
emailstringDefault email for this mailbox
servicestringThe internal name of your mxplan organization
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_mxplan.account_aliases
WHERE alias = '{{ alias }}' -- required
AND email = '{{ email }}' -- required
AND service = '{{ service }}' -- 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_mxplan.account_aliases (
alias,
email,
service
)
SELECT
'{{ alias }}' /* required */,
'{{ email }}',
'{{ service }}'
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_mxplan.account_aliases
WHERE alias = '{{ alias }}' --required
AND email = '{{ email }}' --required
AND service = '{{ service }}' --required
;