service_account_send_on_behalf_tos
Creates, updates, deletes, gets or lists a service_account_send_on_behalf_tos resource.
Overview​
| Name | service_account_send_on_behalf_tos |
| Type | Resource |
| Id | ovh.email_exchange.service_account_send_on_behalf_tos |
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 on behalf to (wire: allowedAccountId) |
task_pending_id | integer | Pending task id (wire: taskPendingId) |
creation_date | string (date-time) | Creation date (wire: creationDate) |
Get users authorized to Send On Behalf To mails from this mailbox
| Name | Datatype | Description |
|---|---|---|
allowed_account_id | integer | Account id to give send on behalf to (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, exchange_service, organization_name, primary_email_address | Get a send on behalf permission. Returns the ID of the account allowed to send emails on behalf of this email account, and the creation date of the right. | |
list | select | exchange_service, organization_name, primary_email_address | x_pagination_mode | List send on behalf permissions. Returns the IDs of the accounts allowed to send emails on behalf of the email account. |
create | insert | exchange_service, organization_name, primary_email_address, allow_account_id | Add a send on behalf permission. Allows the account given by allowAccountId to send emails on behalf of the email account, and returns the task. | |
delete | delete | allowed_account_id, exchange_service, organization_name, primary_email_address | Remove a send on behalf permission. Withdraws the right of the allowed account to send emails on behalf of 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 on behalf to (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"}}) |
exchange_service | string | The internal name of your exchange service (wire: exchangeService) |
organization_name | string | The internal name of your exchange organization (wire: organizationName) |
primary_email_address | string | Default email for this mailbox (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 a send on behalf permission. Returns the ID of the account allowed to send emails on behalf of this email account, and the creation date of the right.
SELECT
allowed_account_id,
task_pending_id,
creation_date
FROM ovh.email_exchange.service_account_send_on_behalf_tos
WHERE allowed_account_id = '{{ allowed_account_id }}' -- required
AND exchange_service = '{{ exchange_service }}' -- required
AND organization_name = '{{ organization_name }}' -- required
AND primary_email_address = '{{ primary_email_address }}' -- required
;
List send on behalf permissions. Returns the IDs of the accounts allowed to send emails on behalf of the email account.
SELECT
allowed_account_id,
task_pending_id,
creation_date
FROM ovh.email_exchange.service_account_send_on_behalf_tos
WHERE exchange_service = '{{ exchange_service }}' -- required
AND organization_name = '{{ organization_name }}' -- required
AND primary_email_address = '{{ primary_email_address }}' -- required
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
Add a send on behalf permission. Allows the account given by allowAccountId to send emails on behalf of the email account, and returns the task.
INSERT INTO ovh.email_exchange.service_account_send_on_behalf_tos (
allow_account_id,
exchange_service,
organization_name,
primary_email_address
)
SELECT
{{ allow_account_id }} /* required */,
'{{ exchange_service }}',
'{{ organization_name }}',
'{{ primary_email_address }}'
RETURNING
id,
finish_date,
function,
status,
todo_date
;
# Description fields are for documentation purposes
- name: service_account_send_on_behalf_tos
props:
- name: exchange_service
value: "{{ exchange_service }}"
description: Required parameter for the service_account_send_on_behalf_tos resource.
- name: organization_name
value: "{{ organization_name }}"
description: Required parameter for the service_account_send_on_behalf_tos resource.
- name: primary_email_address
value: "{{ primary_email_address }}"
description: Required parameter for the service_account_send_on_behalf_tos resource.
- name: allow_account_id
value: {{ allow_account_id }}
description: |
Account id to allow to send On Behalf To mails from this mailbox
DELETE examples​
- delete
Remove a send on behalf permission. Withdraws the right of the allowed account to send emails on behalf of this email account, and returns the task.
DELETE FROM ovh.email_exchange.service_account_send_on_behalf_tos
WHERE allowed_account_id = '{{ allowed_account_id }}' --required
AND exchange_service = '{{ exchange_service }}' --required
AND organization_name = '{{ organization_name }}' --required
AND primary_email_address = '{{ primary_email_address }}' --required
;