mitigation_profiles
Creates, updates, deletes, gets or lists a mitigation_profiles resource.
Overview​
| Name | mitigation_profiles |
| Type | Resource |
| Id | ovh.ip.mitigation_profiles |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
auto_mitigation_time_out | integer | Delay to wait before remove ip from auto mitigation after an attack (0, 15, 60, 360, 1560) (wire: autoMitigationTimeOut) |
ip_mitigation_profile | string (ipv4) | IPv4 address (e.g., 192.0.2.0) (example: 192.0.2.0) (wire: ipMitigationProfile) |
state | string | Current state of your mitigation profile (ok, tasksPending) |
Mitigation profile for your ip
| Name | Datatype | Description |
|---|---|---|
auto_mitigation_time_out | integer | Delay to wait before remove ip from auto mitigation after an attack (0, 15, 60, 360, 1560) (wire: autoMitigationTimeOut) |
ip_mitigation_profile | string (ipv4) | IPv4 address (e.g., 192.0.2.0) (example: 192.0.2.0) (wire: ipMitigationProfile) |
state | string | Current state of your mitigation profile (ok, tasksPending) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | ip, ip_mitigation_profile | Get an IP mitigation timeout. Returns the VAC mitigation timeout of a given IP address, in minutes, and its state: ok or tasksPending. | |
list | select | ip | x_pagination_mode | List IP mitigation timeouts. Returns the IPs of the block with a custom VAC mitigation timeout: how long each one stays in mitigation after an attack ends. |
create | insert | ip, auto_mitigation_time_out, ip_mitigation_profile | Create an IP mitigation timeout. Sets how long, in minutes: 0, 15, 60, 360 or 1560, a given IP address stays in VAC mitigation after an attack ends. | |
update | update | ip, ip_mitigation_profile | Update an IP mitigation timeout. Changes the VAC mitigation timeout of a given IP address, the only editable field, to 0, 15, 60, 360 or 1560 minutes. | |
delete | delete | ip, ip_mitigation_profile | Delete an IP mitigation timeout. Removes the custom VAC mitigation timeout of a given IP address; the default applies again. The call returns no content. |
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 (ip-block) | |
ip_mitigation_profile | string (ipv4) | (wire: ipMitigationProfile) |
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 an IP mitigation timeout. Returns the VAC mitigation timeout of a given IP address, in minutes, and its state: ok or tasksPending.
SELECT
auto_mitigation_time_out,
ip_mitigation_profile,
state
FROM ovh.ip.mitigation_profiles
WHERE ip = '{{ ip }}' -- required
AND ip_mitigation_profile = '{{ ip_mitigation_profile }}' -- required
;
List IP mitigation timeouts. Returns the IPs of the block with a custom VAC mitigation timeout: how long each one stays in mitigation after an attack ends.
SELECT
auto_mitigation_time_out,
ip_mitigation_profile,
state
FROM ovh.ip.mitigation_profiles
WHERE ip = '{{ ip }}' -- required
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
Create an IP mitigation timeout. Sets how long, in minutes: 0, 15, 60, 360 or 1560, a given IP address stays in VAC mitigation after an attack ends.
INSERT INTO ovh.ip.mitigation_profiles (
auto_mitigation_time_out,
ip_mitigation_profile,
ip
)
SELECT
{{ auto_mitigation_time_out }} /* required */,
'{{ ip_mitigation_profile }}' /* required */,
'{{ ip }}'
RETURNING
auto_mitigation_time_out,
ip_mitigation_profile,
state
;
# Description fields are for documentation purposes
- name: mitigation_profiles
props:
- name: ip
value: "{{ ip }}"
description: Required parameter for the mitigation_profiles resource.
- name: auto_mitigation_time_out
value: {{ auto_mitigation_time_out }}
description: |
Delay to wait before remove ip from auto mitigation after an attack
valid_values: ['0', '15', '60', '360', '1560']
- name: ip_mitigation_profile
value: "{{ ip_mitigation_profile }}"
description: |
IPv4 address (e.g., 192.0.2.0)
UPDATE examples​
- update
Update an IP mitigation timeout. Changes the VAC mitigation timeout of a given IP address, the only editable field, to 0, 15, 60, 360 or 1560 minutes.
UPDATE ovh.ip.mitigation_profiles
SET
auto_mitigation_time_out = {{ auto_mitigation_time_out }}
WHERE
ip = '{{ ip }}' --required
AND ip_mitigation_profile = '{{ ip_mitigation_profile }}' --required;
DELETE examples​
- delete
Delete an IP mitigation timeout. Removes the custom VAC mitigation timeout of a given IP address; the default applies again. The call returns no content.
DELETE FROM ovh.ip.mitigation_profiles
WHERE ip = '{{ ip }}' --required
AND ip_mitigation_profile = '{{ ip_mitigation_profile }}' --required
;