service_mailing_lists
Creates, updates, deletes, gets or lists a service_mailing_lists resource.
Overview​
| Name | service_mailing_lists |
| Type | Resource |
| Id | ovh.email_exchange.service_mailing_lists |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | integer | Mailing list id |
task_pending_id | integer | Task pending id (wire: taskPendingId) |
display_name | string | Name displayed in Global Access List (wire: displayName) |
company | string | Company name |
creation_date | string (date-time) | Creation date (wire: creationDate) |
depart_restriction | string | Depart restriction policy (closed, open) (wire: departRestriction) |
hidden_from_gal | boolean | If true mailing list is hiddend in Global Address List (wire: hiddenFromGAL) |
join_restriction | string | Join restriction policy (approvalRequired, closed, open) (wire: joinRestriction) |
last_update_date | string (date-time) | Update date (wire: lastUpdateDate) |
mailing_list_address | string | The mailing list address (wire: mailingListAddress) |
max_receive_size | integer | Maximum receive email size in MB (wire: maxReceiveSize) |
max_send_size | integer | Maximum send email size in MB (wire: maxSendSize) |
sender_authentification | boolean | If true sender has to authenticate (wire: senderAuthentification) |
spam_detected | boolean | Account was sending spam (wire: spamDetected) |
spam_ticket_number | integer | Ticket number of spam detection (wire: spamTicketNumber) |
state | string | Mailing list state (creating, deleting, internalMigration, ok, reopening, suspended, suspending) |
Mailing list
| Name | Datatype | Description |
|---|---|---|
id | integer | Mailing list id |
task_pending_id | integer | Task pending id (wire: taskPendingId) |
display_name | string | Name displayed in Global Access List (wire: displayName) |
company | string | Company name |
creation_date | string (date-time) | Creation date (wire: creationDate) |
depart_restriction | string | Depart restriction policy (closed, open) (wire: departRestriction) |
hidden_from_gal | boolean | If true mailing list is hiddend in Global Address List (wire: hiddenFromGAL) |
join_restriction | string | Join restriction policy (approvalRequired, closed, open) (wire: joinRestriction) |
last_update_date | string (date-time) | Update date (wire: lastUpdateDate) |
mailing_list_address | string | The mailing list address (wire: mailingListAddress) |
max_receive_size | integer | Maximum receive email size in MB (wire: maxReceiveSize) |
max_send_size | integer | Maximum send email size in MB (wire: maxSendSize) |
sender_authentification | boolean | If true sender has to authenticate (wire: senderAuthentification) |
spam_detected | boolean | Account was sending spam (wire: spamDetected) |
spam_ticket_number | integer | Ticket number of spam detection (wire: spamTicketNumber) |
state | string | Mailing list state (creating, deleting, internalMigration, ok, reopening, suspended, suspending) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | exchange_service, mailing_list_address, organization_name | Get a group. Returns the address, display name, join and depart restrictions, size limits, sender authentication and state of the group. | |
list | select | exchange_service, organization_name | company, mailing_list_address, x_pagination_mode | List groups. Returns the email addresses of the groups (distribution lists) of the service. Filter them by mailingListAddress or company. |
create | insert | exchange_service, organization_name, depart_restriction, join_restriction, mailing_list_address | Create a group. Creates a group from its mailingListAddress and its join and depart restrictions, and returns the task. | |
update | update | exchange_service, mailing_list_address, organization_name | Update a group. Updates the address, display name, join and depart restrictions, size limits, sender authentication and Global Address List visibility of the group. | |
delete | delete | exchange_service, mailing_list_address, organization_name | Delete 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.
| Name | Datatype | Description |
|---|---|---|
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) |
mailing_list_address | string | The mailing list address (wire: mailingListAddress) |
organization_name | string | The internal name of your exchange organization (wire: organizationName) |
company | string | Filter the value of company property (like) |
mailing_list_address | string | Filter the value of mailingListAddress property (like) (wire: mailingListAddress) |
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 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
;
List groups. Returns the email addresses of the groups (distribution lists) of the service. Filter them by mailingListAddress or company.
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 organization_name = '{{ organization_name }}' -- required
AND company = '{{ company }}'
AND mailing_list_address = '{{ mailing_list_address }}'
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: service_mailing_lists
props:
- name: exchange_service
value: "{{ exchange_service }}"
description: Required parameter for the service_mailing_lists resource.
- name: organization_name
value: "{{ organization_name }}"
description: Required parameter for the service_mailing_lists resource.
- name: company
value: "{{ company }}"
description: |
Company name
- name: depart_restriction
value: "{{ depart_restriction }}"
description: |
Depart restriction policy
valid_values: ['closed', 'open']
- name: display_name
value: "{{ display_name }}"
description: |
Name displayed in Global Access List
- name: hidden_from_gal
value: {{ hidden_from_gal }}
description: |
If true mailing list is hiddend in Global Address List
- name: join_restriction
value: "{{ join_restriction }}"
description: |
Join restriction policy
valid_values: ['approvalRequired', 'closed', 'open']
- name: mailing_list_address
value: "{{ mailing_list_address }}"
description: |
The mailing list address
- name: max_receive_size
value: {{ max_receive_size }}
description: |
Maximum receive email size in MB
- name: max_send_size
value: {{ max_send_size }}
description: |
Maximum send email size in MB
- name: sender_authentification
value: {{ sender_authentification }}
description: |
If true sender has to authenticate
UPDATE examples​
- update
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
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
;