account_send_as
Creates, updates, deletes, gets or lists an account_send_as resource.
Overview​
| Name | account_send_as |
| Type | Resource |
| Id | ovh.email_mxplan.account_send_as |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
allowed_account_id | integer | Account id to give send as (wire: allowedAccountId) |
task_pending_id | integer | Pending task id (wire: taskPendingId) |
creation_date | string (date-time) | Creation date (wire: creationDate) |
Users authorized to send mails from this mailbox
| Name | Datatype | Description |
|---|---|---|
allowed_account_id | integer | Account id to give send as (wire: allowedAccountId) |
task_pending_id | integer | Pending task id (wire: taskPendingId) |
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 | allowed_account_id, email, service | Get a send as permission. Returns the ID of the account allowed to send emails as the email account, and the creation date of the permission. | |
list | select | email, service | x_pagination_mode | List send as permissions. Returns the IDs of the accounts allowed to send emails as the email account. |
create | insert | email, service, allow_account_id | Add a send as permission. Allows the account allowAccountId to send emails as the email account, and returns the task. | |
delete | delete | allowed_account_id, email, service | Remove a send as permission. Withdraws the right of the allowed account to send emails as this email account, 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 |
|---|---|---|
allowed_account_id | integer | Account id to give send as (wire: allowedAccountId) |
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 |
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 a send as permission. Returns the ID of the account allowed to send emails as the email account, and the creation date of the permission.
SELECT
allowed_account_id,
task_pending_id,
creation_date
FROM ovh.email_mxplan.account_send_as
WHERE allowed_account_id = '{{ allowed_account_id }}' -- required
AND email = '{{ email }}' -- required
AND service = '{{ service }}' -- required
;
List send as permissions. Returns the IDs of the accounts allowed to send emails as the email account.
SELECT
allowed_account_id,
task_pending_id,
creation_date
FROM ovh.email_mxplan.account_send_as
WHERE email = '{{ email }}' -- required
AND service = '{{ service }}' -- required
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
Add a send as permission. Allows the account allowAccountId to send emails as the email account, and returns the task.
INSERT INTO ovh.email_mxplan.account_send_as (
allow_account_id,
email,
service
)
SELECT
{{ allow_account_id }} /* required */,
'{{ email }}',
'{{ service }}'
RETURNING
id,
finish_date,
function,
status,
todo_date
;
# Description fields are for documentation purposes
- name: account_send_as
props:
- name: email
value: "{{ email }}"
description: Required parameter for the account_send_as resource.
- name: service
value: "{{ service }}"
description: Required parameter for the account_send_as resource.
- name: allow_account_id
value: {{ allow_account_id }}
description: |
Account id to allow to send mails from this mailbox
DELETE examples​
- delete
Remove a send as permission. Withdraws the right of the allowed account to send emails as this email account, and returns the task.
DELETE FROM ovh.email_mxplan.account_send_as
WHERE allowed_account_id = '{{ allowed_account_id }}' --required
AND email = '{{ email }}' --required
AND service = '{{ service }}' --required
;