Skip to main content

service_mailing_list_member_mailing_lists

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

Overview​

Nameservice_mailing_list_member_mailing_lists
TypeResource
Idovh.email_exchange.service_mailing_list_member_mailing_lists

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
member_account_idintegerMember account id (wire: memberAccountId)
member_contact_idintegerMember account id (wire: memberContactId)
member_mailing_list_idintegerMember mailing list id (wire: memberMailingListId)
task_pending_idintegerPending task id (wire: taskPendingId)
creation_datestring (date-time)Creation date (wire: creationDate)
member_email_addressstringMember account primaryEmailAddress (wire: memberEmailAddress)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectexchange_service, mailing_list_address, member_mailing_list_id, organization_nameGet a group member. Returns the email address and the ID of the member (account, contact or group), and the date it was added.
listselectexchange_service, mailing_list_address, organization_namex_pagination_modeList group members. Returns the IDs of the groups that are members of the group. Email accounts and external contacts are listed under member/account and member/contact.
createinsertexchange_service, mailing_list_address, organization_nameAdd a group member. Adds a member to the group and returns the task: an email account (memberAccountId) through member/account, an external contact (memberContactId) through member/contact, or a group (memberMailingListId) through member/mailingList.
deletedeleteexchange_service, mailing_list_address, member_mailing_list_id, organization_nameRemove a group member. Removes the account, contact or group from the members of the 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
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)
member_mailing_list_idintegerMember mailing list id (wire: memberMailingListId)
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 group member. Returns the email address and the ID of the member (account, contact or group), and the date it was added.

SELECT
member_account_id,
member_contact_id,
member_mailing_list_id,
task_pending_id,
creation_date,
member_email_address
FROM ovh.email_exchange.service_mailing_list_member_mailing_lists
WHERE exchange_service = '{{ exchange_service }}' -- required
AND mailing_list_address = '{{ mailing_list_address }}' -- required
AND member_mailing_list_id = '{{ member_mailing_list_id }}' -- required
AND organization_name = '{{ organization_name }}' -- required
;

INSERT examples​

Add a group member. Adds a member to the group and returns the task: an email account (memberAccountId) through member/account, an external contact (memberContactId) through member/contact, or a group (memberMailingListId) through member/mailingList.

INSERT INTO ovh.email_exchange.service_mailing_list_member_mailing_lists (
member_account_id,
member_contact_id,
member_mailing_list_id,
exchange_service,
mailing_list_address,
organization_name
)
SELECT
{{ member_account_id }},
{{ member_contact_id }},
{{ member_mailing_list_id }},
'{{ exchange_service }}',
'{{ mailing_list_address }}',
'{{ organization_name }}'
RETURNING
id,
finish_date,
function,
status,
todo_date
;

DELETE examples​

Remove a group member. Removes the account, contact or group from the members of the group, and returns the task.

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