delegated_account_filters
Creates, updates, deletes, gets or lists a delegated_account_filters resource.
Overview​
| Name | delegated_account_filters |
| Type | Resource |
| Id | ovh.email_domain.delegated_account_filters |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
name | string | Filter name |
action | string | Action of filter (accept, account, delete, redirect) |
action_param | string | Action parameter of filter (wire: actionParam) |
active | boolean | If true filter is active |
domain | string | Domain name of filter |
pop | string | Account name of filter |
priority | integer | Priority of filter |
Filter List
| Name | Datatype | Description |
|---|---|---|
name | string | Filter name |
action | string | Action of filter (accept, account, delete, redirect) |
action_param | string | Action parameter of filter (wire: actionParam) |
active | boolean | If true filter is active |
domain | string | Domain name of filter |
pop | string | Account name of filter |
priority | integer | Priority of filter |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | email, name | Get a filter. Returns the account, priority, active state, action (accept, account, delete or redirect) and action parameter of the filter. | |
list | select | email | x_pagination_mode | List filters. Returns the names of the filters of the delegated email account. Get one to read its action, priority and state. |
create | insert | email, action, active, header, name, operand, priority, value | Create a filter. Creates a filter with a rule on a header (operand and value), an action, a priority and an active state, and returns the task. | |
delete | delete | email, name | Delete a filter. Removes the filter and its rules from the email account, and returns the tasks. Incoming emails are no longer filtered by it. | |
change_activity | exec | email, name, activity | Enable or disable a filter. Set activity to true to apply the filter to incoming emails, or to false to suspend it. | |
change_priority | exec | email, name, priority | Change filter priority. Sets the priority of the filter, which gives the order the filters of the account are applied in. |
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"}}) |
email | string | |
name | string | Filter name |
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 filter. Returns the account, priority, active state, action (accept, account, delete or redirect) and action parameter of the filter.
SELECT
name,
action,
action_param,
active,
domain,
pop,
priority
FROM ovh.email_domain.delegated_account_filters
WHERE email = '{{ email }}' -- required
AND name = '{{ name }}' -- required
;
List filters. Returns the names of the filters of the delegated email account. Get one to read its action, priority and state.
SELECT
name,
action,
action_param,
active,
domain,
pop,
priority
FROM ovh.email_domain.delegated_account_filters
WHERE email = '{{ email }}' -- required
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
Create a filter. Creates a filter with a rule on a header (operand and value), an action, a priority and an active state, and returns the task.
INSERT INTO ovh.email_domain.delegated_account_filters (
action,
action_param,
active,
header,
name,
operand,
priority,
value,
email
)
SELECT
'{{ action }}' /* required */,
'{{ action_param }}',
{{ active }} /* required */,
'{{ header }}' /* required */,
'{{ name }}' /* required */,
'{{ operand }}' /* required */,
{{ priority }} /* required */,
'{{ value }}' /* required */,
'{{ email }}'
RETURNING
id,
account,
action,
domain,
timestamp
;
# Description fields are for documentation purposes
- name: delegated_account_filters
props:
- name: email
value: "{{ email }}"
description: Required parameter for the delegated_account_filters resource.
- name: action
value: "{{ action }}"
description: |
Action of filter
valid_values: ['accept', 'account', 'delete', 'redirect']
- name: action_param
value: "{{ action_param }}"
description: |
Action parameter of filter
- name: active
value: {{ active }}
description: |
If true filter is active
- name: header
value: "{{ header }}"
description: |
Header to be filtered
- name: name
value: "{{ name }}"
description: |
Filter name
- name: operand
value: "{{ operand }}"
description: |
Rule of filter
valid_values: ['checkspf', 'contains', 'noContains']
- name: priority
value: {{ priority }}
description: |
Priority of filter
- name: value
value: "{{ value }}"
description: |
Rule parameter of filter
DELETE examples​
- delete
Delete a filter. Removes the filter and its rules from the email account, and returns the tasks. Incoming emails are no longer filtered by it.
DELETE FROM ovh.email_domain.delegated_account_filters
WHERE email = '{{ email }}' --required
AND name = '{{ name }}' --required
;
Lifecycle Methods​
EXEC variables use wire (API) names.
- change_activity
- change_priority
Enable or disable a filter. Set activity to true to apply the filter to incoming emails, or to false to suspend it.
EXEC ovh.email_domain.delegated_account_filters.change_activity
@email='{{ email }}' --required,
@name='{{ name }}' --required
@@json=
'{
"activity": {{ activity }}
}'
;
Change filter priority. Sets the priority of the filter, which gives the order the filters of the account are applied in.
EXEC ovh.email_domain.delegated_account_filters.change_priority
@email='{{ email }}' --required,
@name='{{ name }}' --required
@@json=
'{
"priority": {{ priority }}
}'
;