Skip to main content

service_mailing_list_send_as

Creates, updates, deletes, gets or lists a service_mailing_list_send_as resource.

Overview​

Nameservice_mailing_list_send_as
TypeResource
Idovh.email_exchange.service_mailing_list_send_as

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
allowed_account_idintegerAccount id to give send on behalf to (wire: allowedAccountId)
task_pending_idintegerPending task id (wire: taskPendingId)
creation_datestring (date-time)Creation date (wire: creationDate)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectallowed_account_id, exchange_service, mailing_list_address, organization_nameGet a send as permission. Returns the ID of the account allowed to send emails as this group, and the creation date of the right.
listselectexchange_service, mailing_list_address, organization_namex_pagination_modeList send as permissions. Returns the IDs of the accounts allowed to send emails as the group, from the group address.
createinsertexchange_service, mailing_list_address, organization_name, allow_account_idAdd a send as permission. Allows the account given by allowAccountId to send emails as the group, and returns the task.
deletedeleteallowed_account_id, exchange_service, mailing_list_address, organization_nameRemove a send as permission. Withdraws the right of the allowed account to send emails as this group, 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.

NameDatatypeDescription
allowed_account_idintegerAccount id to give send on behalf to (wire: allowedAccountId)
api_hoststringThe 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_servicestringThe internal name of your exchange service (wire: exchangeService)
mailing_list_addressstringThe mailing list address (wire: mailingListAddress)
organization_namestringThe internal name of your exchange organization (wire: organizationName)
x_pagination_modestringSent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode)

SELECT examples​

Get a send as permission. Returns the ID of the account allowed to send emails as this group, and the creation date of the right.

SELECT
allowed_account_id,
task_pending_id,
creation_date
FROM ovh.email_exchange.service_mailing_list_send_as
WHERE allowed_account_id = '{{ allowed_account_id }}' -- required
AND exchange_service = '{{ exchange_service }}' -- required
AND mailing_list_address = '{{ mailing_list_address }}' -- required
AND organization_name = '{{ organization_name }}' -- required
;

INSERT examples​

Add a send as permission. Allows the account given by allowAccountId to send emails as the group, and returns the task.

INSERT INTO ovh.email_exchange.service_mailing_list_send_as (
allow_account_id,
exchange_service,
mailing_list_address,
organization_name
)
SELECT
{{ allow_account_id }} /* required */,
'{{ exchange_service }}',
'{{ mailing_list_address }}',
'{{ organization_name }}'
RETURNING
id,
finish_date,
function,
status,
todo_date
;

DELETE examples​

Remove a send as permission. Withdraws the right of the allowed account to send emails as this group, and returns the task.

DELETE FROM ovh.email_exchange.service_mailing_list_send_as
WHERE allowed_account_id = '{{ allowed_account_id }}' --required
AND exchange_service = '{{ exchange_service }}' --required
AND mailing_list_address = '{{ mailing_list_address }}' --required
AND organization_name = '{{ organization_name }}' --required
;