Skip to main content

mailing_list_moderators

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

Overview​

Namemailing_list_moderators
TypeResource
Idovh.email_domain.mailing_list_moderators

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
domainstring
emailstring
mailingliststring

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectdomain, email, nameGet a moderator. Returns the email address of the moderator and the mailing list and domain it moderates.
listselectdomain, nameemail, x_pagination_modeList moderators. Returns the email addresses of the moderators of the mailing list. Filter them by email.
createinsertdomain, name, emailAdd a moderator. Makes the email address a moderator of the mailing list, who approves the messages, and returns the task.
deletedeletedomain, email, nameRemove a moderator. Withdraws the moderator role from the email address on the mailing list, 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
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"}})
domainstringName of your domain name
emailstring
namestringName of mailing list
emailstringModerator email
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 moderator. Returns the email address of the moderator and the mailing list and domain it moderates.

SELECT
domain,
email,
mailinglist
FROM ovh.email_domain.mailing_list_moderators
WHERE domain = '{{ domain }}' -- required
AND email = '{{ email }}' -- required
AND name = '{{ name }}' -- required
;

INSERT examples​

Add a moderator. Makes the email address a moderator of the mailing list, who approves the messages, and returns the task.

INSERT INTO ovh.email_domain.mailing_list_moderators (
email,
domain,
name
)
SELECT
'{{ email }}' /* required */,
'{{ domain }}',
'{{ name }}'
RETURNING
id,
account,
action,
date,
domain,
language
;

DELETE examples​

Remove a moderator. Withdraws the moderator role from the email address on the mailing list, and returns the task.

DELETE FROM ovh.email_domain.mailing_list_moderators
WHERE domain = '{{ domain }}' --required
AND email = '{{ email }}' --required
AND name = '{{ name }}' --required
;