account_aliases
Creates, updates, deletes, gets or lists an account_aliases resource.
Overview​
| Name | account_aliases |
| Type | Resource |
| Id | ovh.email_pro.account_aliases |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
task_pending_id | integer | Pending task id (wire: taskPendingId) |
alias | string | Alias |
creation_date | string (date-time) | Creation date (wire: creationDate) |
Aliases on this mailbox
| Name | Datatype | Description |
|---|---|---|
task_pending_id | integer | Pending task id (wire: taskPendingId) |
alias | string | Alias |
creation_date | string (date-time) | Creation date (wire: creationDate) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | alias, email, service | Returns the alias address, its creation date and the ID of its pending task, if any (taskPendingId). (Alpha version) | |
list | select | email, service | x_pagination_mode | Returns the aliases of the email account: extra addresses that deliver to the same mailbox. (Alpha version) |
create | insert | email, service, alias | Create an account alias. Adds the alias address to the email account, so that it receives its emails, and returns the task. | |
delete | delete | alias, email, service | Delete 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.
| Name | Datatype | Description |
|---|---|---|
alias | string | Alias |
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"}}) |
email | string | Default email for this mailbox |
service | string | The internal name of your pro organization |
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
Returns the alias address, its creation date and the ID of its pending task, if any (taskPendingId). (Alpha version)
SELECT
task_pending_id,
alias,
creation_date
FROM ovh.email_pro.account_aliases
WHERE alias = '{{ alias }}' -- required
AND email = '{{ email }}' -- required
AND service = '{{ service }}' -- required
;
Returns the aliases of the email account: extra addresses that deliver to the same mailbox. (Alpha version)
SELECT
task_pending_id,
alias,
creation_date
FROM ovh.email_pro.account_aliases
WHERE email = '{{ email }}' -- required
AND service = '{{ service }}' -- required
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
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_pro.account_aliases (
alias,
email,
service
)
SELECT
'{{ alias }}' /* required */,
'{{ email }}',
'{{ service }}'
RETURNING
id,
finish_date,
function,
status,
todo_date
;
# Description fields are for documentation purposes
- name: account_aliases
props:
- name: email
value: "{{ email }}"
description: Required parameter for the account_aliases resource.
- name: service
value: "{{ service }}"
description: Required parameter for the account_aliases resource.
- name: alias
value: "{{ alias }}"
description: |
Alias
DELETE examples​
- delete
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_pro.account_aliases
WHERE alias = '{{ alias }}' --required
AND email = '{{ email }}' --required
AND service = '{{ service }}' --required
;