Skip to main content

service_mailing_lists

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

Overview​

Nameservice_mailing_lists
TypeResource
Idovh.email_exchange.service_mailing_lists

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idintegerMailing list id
task_pending_idintegerTask pending id (wire: taskPendingId)
display_namestringName displayed in Global Access List (wire: displayName)
companystringCompany name
creation_datestring (date-time)Creation date (wire: creationDate)
depart_restrictionstringDepart restriction policy (closed, open) (wire: departRestriction)
hidden_from_galbooleanIf true mailing list is hiddend in Global Address List (wire: hiddenFromGAL)
join_restrictionstringJoin restriction policy (approvalRequired, closed, open) (wire: joinRestriction)
last_update_datestring (date-time)Update date (wire: lastUpdateDate)
mailing_list_addressstringThe mailing list address (wire: mailingListAddress)
max_receive_sizeintegerMaximum receive email size in MB (wire: maxReceiveSize)
max_send_sizeintegerMaximum send email size in MB (wire: maxSendSize)
sender_authentificationbooleanIf true sender has to authenticate (wire: senderAuthentification)
spam_detectedbooleanAccount was sending spam (wire: spamDetected)
spam_ticket_numberintegerTicket number of spam detection (wire: spamTicketNumber)
statestringMailing list state (creating, deleting, internalMigration, ok, reopening, suspended, suspending)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectexchange_service, mailing_list_address, organization_nameGet a group. Returns the address, display name, join and depart restrictions, size limits, sender authentication and state of the group.
listselectexchange_service, organization_namecompany, mailing_list_address, x_pagination_modeList groups. Returns the email addresses of the groups (distribution lists) of the service. Filter them by mailingListAddress or company.
createinsertexchange_service, organization_name, depart_restriction, join_restriction, mailing_list_addressCreate a group. Creates a group from its mailingListAddress and its join and depart restrictions, and returns the task.
updateupdateexchange_service, mailing_list_address, organization_nameUpdate a group. Updates the address, display name, join and depart restrictions, size limits, sender authentication and Global Address List visibility of the group.
deletedeleteexchange_service, mailing_list_address, organization_nameDelete a group. Deletes the group with its aliases and permissions, and returns the task. Its members keep their own accounts.

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)
organization_namestringThe internal name of your exchange organization (wire: organizationName)
companystringFilter the value of company property (like)
mailing_list_addressstringFilter the value of mailingListAddress property (like) (wire: mailingListAddress)
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. Returns the address, display name, join and depart restrictions, size limits, sender authentication and state of the group.

SELECT
id,
task_pending_id,
display_name,
company,
creation_date,
depart_restriction,
hidden_from_gal,
join_restriction,
last_update_date,
mailing_list_address,
max_receive_size,
max_send_size,
sender_authentification,
spam_detected,
spam_ticket_number,
state
FROM ovh.email_exchange.service_mailing_lists
WHERE exchange_service = '{{ exchange_service }}' -- required
AND mailing_list_address = '{{ mailing_list_address }}' -- required
AND organization_name = '{{ organization_name }}' -- required
;

INSERT examples​

Create a group. Creates a group from its mailingListAddress and its join and depart restrictions, and returns the task.

INSERT INTO ovh.email_exchange.service_mailing_lists (
company,
depart_restriction,
display_name,
hidden_from_gal,
join_restriction,
mailing_list_address,
max_receive_size,
max_send_size,
sender_authentification,
exchange_service,
organization_name
)
SELECT
'{{ company }}',
'{{ depart_restriction }}' /* required */,
'{{ display_name }}',
{{ hidden_from_gal }},
'{{ join_restriction }}' /* required */,
'{{ mailing_list_address }}' /* required */,
{{ max_receive_size }},
{{ max_send_size }},
{{ sender_authentification }},
'{{ exchange_service }}',
'{{ organization_name }}'
RETURNING
id,
finish_date,
function,
status,
todo_date
;

UPDATE examples​

Update a group. Updates the address, display name, join and depart restrictions, size limits, sender authentication and Global Address List visibility of the group.

UPDATE ovh.email_exchange.service_mailing_lists
SET
company = '{{ company }}',
depart_restriction = '{{ depart_restriction }}',
display_name = '{{ display_name }}',
hidden_from_gal = {{ hidden_from_gal }},
join_restriction = '{{ join_restriction }}',
mailing_list_address = '{{ mailing_list_address }}',
max_receive_size = {{ max_receive_size }},
max_send_size = {{ max_send_size }},
sender_authentification = {{ sender_authentification }}
WHERE
exchange_service = '{{ exchange_service }}' --required
AND mailing_list_address = '{{ mailing_list_address }}' --required
AND organization_name = '{{ organization_name }}' --required;

DELETE examples​

Delete a group. Deletes the group with its aliases and permissions, and returns the task. Its members keep their own accounts.

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