accounts
Creates, updates, deletes, gets or lists an accounts resource.
Overview​
| Name | accounts |
| Type | Resource |
| Id | ovh.email_domain.accounts |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
account_name | string | Name of account (wire: accountName) |
description | string | Account description |
domain | string | Name of domain |
email | string | |
is_blocked | boolean | If true your account is blocked (wire: isBlocked) |
size | integer | Size of your account in bytes |
Account List
| Name | Datatype | Description |
|---|---|---|
account_name | string | Name of account (wire: accountName) |
description | string | Account description |
domain | string | Name of domain |
email | string | |
is_blocked | boolean | If true your account is blocked (wire: isBlocked) |
size | integer | Size of your account in bytes |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | account_name, domain | Get an email account. Returns the email address, description, size in bytes and blocked state of the email account. | |
list | select | domain | account_name, description, x_pagination_mode | List email accounts. Returns the names of the email accounts of the domain. Filter them by accountName or description. |
create | insert | domain, account_name, password | Create an email account. Creates an email account with a name, a password, and optionally a description and a size in bytes, and returns the task. The size is 5 GB by default; the allowed sizes are in allowedAccountSize of the email domain. The password needs 8 to 30 characters and no accents. | |
update | update | account_name, domain | Update an email account. Updates the description or the size in bytes of the email account. The allowed sizes are in allowedAccountSize of the email domain. | |
delete | delete | account_name, domain | Delete an email account. Deletes the email account of the domain and returns the task. Follow it under task/account/{id}. | |
change_password | exec | accountName, domain, password | Change an email account password. Sets a new password and returns the task. The password needs 8 to 30 characters and no accents. | |
update_usage | exec | accountName, domain | Refresh email account usage. Asks for the figures returned by usage to be recomputed; they are updated asynchronously. |
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 |
|---|---|---|
accountName | string | Name of account |
account_name | string | Name of account (wire: accountName) |
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"}}) |
domain | string | Name of your domain name |
account_name | string | Account name (wire: accountName) |
description | string | Account description |
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 an email account. Returns the email address, description, size in bytes and blocked state of the email account.
SELECT
account_name,
description,
domain,
email,
is_blocked,
size
FROM ovh.email_domain.accounts
WHERE account_name = '{{ account_name }}' -- required
AND domain = '{{ domain }}' -- required
;
List email accounts. Returns the names of the email accounts of the domain. Filter them by accountName or description.
SELECT
account_name,
description,
domain,
email,
is_blocked,
size
FROM ovh.email_domain.accounts
WHERE domain = '{{ domain }}' -- required
AND account_name = '{{ account_name }}'
AND description = '{{ description }}'
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
Create an email account. Creates an email account with a name, a password, and optionally a description and a size in bytes, and returns the task. The size is 5 GB by default; the allowed sizes are in allowedAccountSize of the email domain. The password needs 8 to 30 characters and no accents.
INSERT INTO ovh.email_domain.accounts (
account_name,
description,
password,
size,
domain
)
SELECT
'{{ account_name }}' /* required */,
'{{ description }}',
'{{ password }}' /* required */,
{{ size }},
'{{ domain }}'
RETURNING
id,
name,
action,
date,
domain
;
# Description fields are for documentation purposes
- name: accounts
props:
- name: domain
value: "{{ domain }}"
description: Required parameter for the accounts resource.
- name: account_name
value: "{{ account_name }}"
description: |
Account name
- name: description
value: "{{ description }}"
description: |
Description Account
- name: password
value: "{{ password }}"
description: |
Account password
- name: size
value: {{ size }}
description: |
Account size in bytes (default : 5000000000) (possible values : /email/domain/{domain}/allowedAccountSize )
UPDATE examples​
- update
Update an email account. Updates the description or the size in bytes of the email account. The allowed sizes are in allowedAccountSize of the email domain.
UPDATE ovh.email_domain.accounts
SET
description = '{{ description }}',
size = {{ size }}
WHERE
account_name = '{{ account_name }}' --required
AND domain = '{{ domain }}' --required;
DELETE examples​
- delete
Delete an email account. Deletes the email account of the domain and returns the task. Follow it under task/account/{id}.
DELETE FROM ovh.email_domain.accounts
WHERE account_name = '{{ account_name }}' --required
AND domain = '{{ domain }}' --required
;
Lifecycle Methods​
EXEC variables use wire (API) names.
- change_password
- update_usage
Change an email account password. Sets a new password and returns the task. The password needs 8 to 30 characters and no accents.
EXEC ovh.email_domain.accounts.change_password
@accountName='{{ accountName }}' --required,
@domain='{{ domain }}' --required
@@json=
'{
"password": "{{ password }}"
}'
;
Refresh email account usage. Asks for the figures returned by usage to be recomputed; they are updated asynchronously.
EXEC ovh.email_domain.accounts.update_usage
@accountName='{{ accountName }}' --required,
@domain='{{ domain }}' --required
;