accounts
Creates, updates, deletes, gets or lists an accounts resource.
Overview​
| Name | accounts |
| Type | Resource |
| Id | ovh.email_mxplan.accounts |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | integer | Account id |
task_pending_id | integer | Pending tasks for this account (wire: taskPendingId) |
display_name | string | Account display name (wire: displayName) |
first_name | string | Account first name (wire: firstName) |
last_name | string | Account last name (wire: lastName) |
sam_account_name | string | SAM account name (wire: SAMAccountName) |
configured | boolean | Indicates if the account is configured |
creation_date | string (date-time) | Creation date (wire: creationDate) |
current_usage | integer | Mailbox usage (wire: currentUsage) |
delete_at_expiration | boolean | delete at expiration (wire: deleteAtExpiration) |
domain | string | Email domain |
expiration_date | string (date-time) | expiration date (wire: expirationDate) |
expiration_outlook_date | string (date-time) | expiration date (wire: expirationOutlookDate) |
hidden_from_gal | boolean | Hide account in Global Address List (wire: hiddenFromGAL) |
initial | string | Account initials |
last_logoff_date | string (date-time) | Last logoff (wire: lastLogoffDate) |
last_logon_date | string (date-time) | Last logon (wire: lastLogonDate) |
last_update_date | string (date-time) | Last update (wire: lastUpdateDate) |
login | string | Account login |
mailing_filter | array | Enable or disable anti-virus and anti-spam (wire: mailingFilter) |
password_last_update | string (date-time) | Time of account's password last update (wire: passwordLastUpdate) |
primary_email_address | string | Default email for this mailbox (wire: primaryEmailAddress) |
quota | number | Account maximum size |
renew_period | string | change the renew period (monthly, yearly) (wire: renewPeriod) |
spam_and_virus_configuration | object | Spam and Antivirus configuration (wire: spamAndVirusConfiguration) |
spam_detected | boolean | Account was sending spam (wire: spamDetected) |
spam_ticket_number | integer | Ticket number of spam detection (wire: spamTicketNumber) |
state | string | Account state (creating, deleting, ok, reopening, suspended, suspending, unknown) |
Mailbox
| Name | Datatype | Description |
|---|---|---|
id | integer | Account id |
task_pending_id | integer | Pending tasks for this account (wire: taskPendingId) |
display_name | string | Account display name (wire: displayName) |
first_name | string | Account first name (wire: firstName) |
last_name | string | Account last name (wire: lastName) |
sam_account_name | string | SAM account name (wire: SAMAccountName) |
configured | boolean | Indicates if the account is configured |
creation_date | string (date-time) | Creation date (wire: creationDate) |
current_usage | integer | Mailbox usage (wire: currentUsage) |
delete_at_expiration | boolean | delete at expiration (wire: deleteAtExpiration) |
domain | string | Email domain |
expiration_date | string (date-time) | expiration date (wire: expirationDate) |
expiration_outlook_date | string (date-time) | expiration date (wire: expirationOutlookDate) |
hidden_from_gal | boolean | Hide account in Global Address List (wire: hiddenFromGAL) |
initial | string | Account initials |
last_logoff_date | string (date-time) | Last logoff (wire: lastLogoffDate) |
last_logon_date | string (date-time) | Last logon (wire: lastLogonDate) |
last_update_date | string (date-time) | Last update (wire: lastUpdateDate) |
login | string | Account login |
mailing_filter | array | Enable or disable anti-virus and anti-spam (wire: mailingFilter) |
password_last_update | string (date-time) | Time of account's password last update (wire: passwordLastUpdate) |
primary_email_address | string | Default email for this mailbox (wire: primaryEmailAddress) |
quota | number | Account maximum size |
renew_period | string | change the renew period (monthly, yearly) (wire: renewPeriod) |
spam_and_virus_configuration | object | Spam and Antivirus configuration (wire: spamAndVirusConfiguration) |
spam_detected | boolean | Account was sending spam (wire: spamDetected) |
spam_ticket_number | integer | Ticket number of spam detection (wire: spamTicketNumber) |
state | string | Account state (creating, deleting, ok, reopening, suspended, suspending, unknown) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | email, service | Get an email account. Returns the login, names, domain, state, quota and usage of the email account, its renewal and expiration settings, and its spam and virus configuration. | |
list | select | service | id, primary_email_address, x_pagination_mode | List email accounts. Returns the email addresses of the email accounts of the service. Filter them by primaryEmailAddress or id. |
update | update | email, service | Update an email account. Updates the login, names, domain, quota, renewal period, deletion at expiration, Global Address List visibility and spam and virus configuration of the email account. | |
delete | delete | email, service | Delete an email account. Deletes the email account of the MX Plan service and returns the task. Follow it under task/{id}. | |
change_password | exec | email, service, password | Change an email account password. Sets the new password of the email account and returns the task that applies it. |
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 |
|---|---|---|
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 mxplan organization |
id | integer | Filter the value of id property (like) |
primary_email_address | string | Filter the value of primaryEmailAddress property (like) (wire: primaryEmailAddress) |
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 login, names, domain, state, quota and usage of the email account, its renewal and expiration settings, and its spam and virus configuration.
SELECT
id,
task_pending_id,
display_name,
first_name,
last_name,
sam_account_name,
configured,
creation_date,
current_usage,
delete_at_expiration,
domain,
expiration_date,
expiration_outlook_date,
hidden_from_gal,
initial,
last_logoff_date,
last_logon_date,
last_update_date,
login,
mailing_filter,
password_last_update,
primary_email_address,
quota,
renew_period,
spam_and_virus_configuration,
spam_detected,
spam_ticket_number,
state
FROM ovh.email_mxplan.accounts
WHERE email = '{{ email }}' -- required
AND service = '{{ service }}' -- required
;
List email accounts. Returns the email addresses of the email accounts of the service. Filter them by primaryEmailAddress or id.
SELECT
id,
task_pending_id,
display_name,
first_name,
last_name,
sam_account_name,
configured,
creation_date,
current_usage,
delete_at_expiration,
domain,
expiration_date,
expiration_outlook_date,
hidden_from_gal,
initial,
last_logoff_date,
last_logon_date,
last_update_date,
login,
mailing_filter,
password_last_update,
primary_email_address,
quota,
renew_period,
spam_and_virus_configuration,
spam_detected,
spam_ticket_number,
state
FROM ovh.email_mxplan.accounts
WHERE service = '{{ service }}' -- required
AND id = '{{ id }}'
AND primary_email_address = '{{ primary_email_address }}'
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
UPDATE examples​
- update
Update an email account. Updates the login, names, domain, quota, renewal period, deletion at expiration, Global Address List visibility and spam and virus configuration of the email account.
UPDATE ovh.email_mxplan.accounts
SET
delete_at_expiration = {{ delete_at_expiration }},
display_name = '{{ display_name }}',
domain = '{{ domain }}',
first_name = '{{ first_name }}',
hidden_from_gal = {{ hidden_from_gal }},
initial = '{{ initial }}',
last_name = '{{ last_name }}',
login = '{{ login }}',
mailing_filter = '{{ mailing_filter }}',
quota = {{ quota }},
renew_period = '{{ renew_period }}',
spam_and_virus_configuration = '{{ spam_and_virus_configuration }}'
WHERE
email = '{{ email }}' --required
AND service = '{{ service }}' --required;
DELETE examples​
- delete
Delete an email account. Deletes the email account of the MX Plan service and returns the task. Follow it under task/{id}.
DELETE FROM ovh.email_mxplan.accounts
WHERE email = '{{ email }}' --required
AND service = '{{ service }}' --required
;
Lifecycle Methods​
EXEC variables use wire (API) names.
- change_password
Change an email account password. Sets the new password of the email account and returns the task that applies it.
EXEC ovh.email_mxplan.accounts.change_password
@email='{{ email }}' --required,
@service='{{ service }}' --required
@@json=
'{
"password": "{{ password }}"
}'
;