anti_spams
Creates, updates, deletes, gets or lists an anti_spams resource.
Overview​
| Name | anti_spams |
| Type | Resource |
| Id | ovh.xdsl.anti_spams |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
date | string (date-time) | Detection date |
ip | string (ipv4) | IP which spam (example: 192.0.2.0) |
last_spam_detected | string (date-time) | Last spam detection date (wire: lastSpamDetected) |
status | string | AntiSpam status (block, done, new, unblock, warn) |
Spams detected from xdsl access
| Name | Datatype | Description |
|---|---|---|
date | string (date-time) | Detection date |
ip | string (ipv4) | IP which spam (example: 192.0.2.0) |
last_spam_detected | string (date-time) | Last spam detection date (wire: lastSpamDetected) |
status | string | AntiSpam status (block, done, new, unblock, warn) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | ip, service_name | Returns the anti-spam status of an IP of the access, with its detection date and last spam detection date. | |
list | select | service_name | x_pagination_mode | Returns the IPs of the access detected as sending spam. |
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"}}) |
ip | string (ipv4) | Ip |
service_name | string | Service name (wire: serviceName) |
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
Returns the anti-spam status of an IP of the access, with its detection date and last spam detection date.
SELECT
date,
ip,
last_spam_detected,
status
FROM ovh.xdsl.anti_spams
WHERE ip = '{{ ip }}' -- required
AND service_name = '{{ service_name }}' -- required
;
Returns the IPs of the access detected as sending spam.
SELECT
date,
ip,
last_spam_detected,
status
FROM ovh.xdsl.anti_spams
WHERE service_name = '{{ service_name }}' -- required
AND x_pagination_mode = '{{ x_pagination_mode }}'
;