mailing_list_subscribers
Creates, updates, deletes, gets or lists a mailing_list_subscribers resource.
Overview​
| Name | mailing_list_subscribers |
| Type | Resource |
| Id | ovh.email_domain.mailing_list_subscribers |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
domain | string | |
email | string | |
mailinglist | string |
Subscribers List
| Name | Datatype | Description |
|---|---|---|
domain | string | |
email | string | |
mailinglist | string |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | domain, email, name | Get a subscriber. Returns the email address of the subscriber and the mailing list and domain it is subscribed to. | |
list | select | domain, name | email, x_pagination_mode | List subscribers. Returns the email addresses of the subscribers of the mailing list. Filter them by email. |
create | insert | domain, name, email | Add a subscriber. Subscribes the email address to the mailing list, so that it receives its messages, and returns the task. | |
delete | delete | domain, email, name | Remove a subscriber. Unsubscribes the email address from the mailing list, which it no longer receives, 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.
| 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"}}) |
domain | string | Name of your domain name |
email | string | |
name | string | Name of mailing list |
email | string | Subscriber email |
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 subscriber. Returns the email address of the subscriber and the mailing list and domain it is subscribed to.
SELECT
domain,
email,
mailinglist
FROM ovh.email_domain.mailing_list_subscribers
WHERE domain = '{{ domain }}' -- required
AND email = '{{ email }}' -- required
AND name = '{{ name }}' -- required
;
List subscribers. Returns the email addresses of the subscribers of the mailing list. Filter them by email.
SELECT
domain,
email,
mailinglist
FROM ovh.email_domain.mailing_list_subscribers
WHERE domain = '{{ domain }}' -- required
AND name = '{{ name }}' -- required
AND email = '{{ email }}'
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
Add a subscriber. Subscribes the email address to the mailing list, so that it receives its messages, and returns the task.
INSERT INTO ovh.email_domain.mailing_list_subscribers (
email,
domain,
name
)
SELECT
'{{ email }}' /* required */,
'{{ domain }}',
'{{ name }}'
RETURNING
id,
account,
action,
date,
domain,
language
;
# Description fields are for documentation purposes
- name: mailing_list_subscribers
props:
- name: domain
value: "{{ domain }}"
description: Required parameter for the mailing_list_subscribers resource.
- name: name
value: "{{ name }}"
description: Required parameter for the mailing_list_subscribers resource.
- name: email
value: "{{ email }}"
description: |
Email of subscriber
DELETE examples​
- delete
Remove a subscriber. Unsubscribes the email address from the mailing list, which it no longer receives, and returns the task.
DELETE FROM ovh.email_domain.mailing_list_subscribers
WHERE domain = '{{ domain }}' --required
AND email = '{{ email }}' --required
AND name = '{{ name }}' --required
;