Skip to main content

account_filter_rules

Creates, updates, deletes, gets or lists an account_filter_rules resource.

Overview​

Nameaccount_filter_rules
TypeResource
Idovh.email_domain.account_filter_rules

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idinteger
headerstringHeader to be filtered
operandstringRule of filter (checkspf, contains, noContains)
valuestringRule parameter of filter

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectaccount_name, domain, id, nameGet a filter rule. Returns the header, the operand (checkspf, contains or noContains) and the value of the rule.
listselectaccount_name, domain, namex_pagination_modeList filter rules. Returns the IDs of the rules of the filter. Get one to read the header it checks, its operand and its value.
createinsertaccount_name, domain, name, header, operand, valueCreate a filter rule. Adds a rule to the filter on a header, with an operand (checkspf, contains or noContains) and a value, and returns the task.
deletedeleteaccount_name, domain, id, nameDelete a filter rule. Removes the rule from the filter and returns the tasks. The filter keeps applying its other rules.

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
account_namestringName of account (wire: accountName)
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"}})
domainstringName of your domain name
idinteger
namestringFilter name
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 filter rule. Returns the header, the operand (checkspf, contains or noContains) and the value of the rule.

SELECT
id,
header,
operand,
value
FROM ovh.email_domain.account_filter_rules
WHERE account_name = '{{ account_name }}' -- required
AND domain = '{{ domain }}' -- required
AND id = '{{ id }}' -- required
AND name = '{{ name }}' -- required
;

INSERT examples​

Create a filter rule. Adds a rule to the filter on a header, with an operand (checkspf, contains or noContains) and a value, and returns the task.

INSERT INTO ovh.email_domain.account_filter_rules (
header,
operand,
value,
account_name,
domain,
name
)
SELECT
'{{ header }}' /* required */,
'{{ operand }}' /* required */,
'{{ value }}' /* required */,
'{{ account_name }}',
'{{ domain }}',
'{{ name }}'
RETURNING
id,
account,
action,
domain,
timestamp
;

DELETE examples​

Delete a filter rule. Removes the rule from the filter and returns the tasks. The filter keeps applying its other rules.

DELETE FROM ovh.email_domain.account_filter_rules
WHERE account_name = '{{ account_name }}' --required
AND domain = '{{ domain }}' --required
AND id = '{{ id }}' --required
AND name = '{{ name }}' --required
;