Skip to main content

mitigation_profiles

Creates, updates, deletes, gets or lists a mitigation_profiles resource.

Overview​

Namemitigation_profiles
TypeResource
Idovh.ip.mitigation_profiles

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
auto_mitigation_time_outintegerDelay to wait before remove ip from auto mitigation after an attack (0, 15, 60, 360, 1560) (wire: autoMitigationTimeOut)
ip_mitigation_profilestring (ipv4)IPv4 address (e.g., 192.0.2.0) (example: 192.0.2.0) (wire: ipMitigationProfile)
statestringCurrent state of your mitigation profile (ok, tasksPending)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectip, ip_mitigation_profileGet an IP mitigation timeout. Returns the VAC mitigation timeout of a given IP address, in minutes, and its state: ok or tasksPending.
listselectipx_pagination_modeList 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.
createinsertip, auto_mitigation_time_out, ip_mitigation_profileCreate 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.
updateupdateip, ip_mitigation_profileUpdate 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.
deletedeleteip, ip_mitigation_profileDelete 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.

NameDatatypeDescription
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"}})
ipstring (ip-block)
ip_mitigation_profilestring (ipv4) (wire: ipMitigationProfile)
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 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
;

INSERT examples​

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
;

UPDATE examples​

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 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
;