# Network › IP addresses › VAC DDoS protection API

> Part of the OVHcloud developer hub. Index of every page and section: https://developers.eu.ovhcloud.com/llms.txt
> The Network product's sections: https://developers.eu.ovhcloud.com/reference/network/llms.txt
> Everything in one file: https://developers.eu.ovhcloud.com/llms-full.txt

> 9 operations of the OVHcloud API. Calls carry `authorization: Bearer $OVH_TOKEN`; the EU host is shown, Canada and the United States answer on api.ca.ovhcloud.com and api.us.ovhcloud.com.

Page: https://developers.eu.ovhcloud.com/reference/network/ip-addresses/vac-ddos-protection/

OpenAPI v1: https://api.eu.ovhcloud.com/1.0/__schemas/developer-hub-navigation/network/ip-addresses/vac-ddos-protection.json?format=openapi3
OpenAPI v2: https://api.eu.ovhcloud.com/v2/__schemas/developer-hub-navigation/network/ip-addresses/vac-ddos-protection.json?format=openapi3

## Operations

- `GET /ip/{ip}/mitigation` — List mitigation entries
- `GET /ip/{ip}/mitigationProfiles` — List IP mitigation timeouts
- `GET /ip/{ip}/mitigation/{ipOnMitigation}` — Get a mitigation entry
- `GET /ip/{ip}/mitigationProfiles/{ipMitigationProfile}` — Get an IP mitigation timeout
- `POST /ip/{ip}/mitigation` — Create a mitigation entry
- `POST /ip/{ip}/mitigationProfiles` — Create an IP mitigation timeout
- `DELETE /ip/{ip}/mitigation/{ipOnMitigation}` — Delete a mitigation entry
- `DELETE /ip/{ip}/mitigationProfiles/{ipMitigationProfile}` — Delete an IP mitigation timeout
- `PUT /ip/{ip}/mitigationProfiles/{ipMitigationProfile}` — Update an IP mitigation timeout

## List mitigation entries

`GET /1.0/ip/{ip}/mitigation`

Link: https://developers.eu.ovhcloud.com/reference/network/ip-addresses/vac-ddos-protection/#get-ip-ip-mitigation

**Status:** Stable production version  
**IAM actions:** `ip:apiovh:mitigation/get`

List mitigation entries. Returns the IP addresses of the block that have a VAC DDoS mitigation entry. Filterable by state or auto-mitigation.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `auto` | query | boolean |  | Filter the value of auto property (=) |
| `ip` | path | ipBlock | yes | IP (v4 or v6) CIDR notation (e.g., 192.0.2.0/24) |
| `state` | query | ip.MitigationStateEnum |  | Filter the value of state property (=) — one of `creationPending`, `ok`, `removalPending` |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | ipv4[] | successful operation |

```json
[
  "192.0.2.0"
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/ip/{ip}/mitigation" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/ip/{ip}/mitigation")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/ip/{ip}/mitigation");

print_r($result);
?>
```

## List IP mitigation timeouts

`GET /1.0/ip/{ip}/mitigationProfiles`

Link: https://developers.eu.ovhcloud.com/reference/network/ip-addresses/vac-ddos-protection/#get-ip-ip-mitigationprofiles

**Status:** Stable production version  
**IAM actions:** `ip:apiovh:mitigationProfiles/get`

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.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `ip` | path | ipBlock | yes | IP (v4 or v6) CIDR notation (e.g., 192.0.2.0/24) |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | ipv4[] | successful operation |

```json
[
  "192.0.2.0"
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/ip/{ip}/mitigationProfiles" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/ip/{ip}/mitigationProfiles")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/ip/{ip}/mitigationProfiles");

print_r($result);
?>
```

## Get a mitigation entry

`GET /1.0/ip/{ip}/mitigation/{ipOnMitigation}`

Link: https://developers.eu.ovhcloud.com/reference/network/ip-addresses/vac-ddos-protection/#get-ip-ip-mitigation-iponmitigation

**Status:** Stable production version  
**IAM actions:** `ip:apiovh:mitigation/get`

Get a mitigation entry. Returns whether a given IP address of the block is under VAC auto-mitigation, and its state: creationPending, ok or removalPending.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `ip` | path | ipBlock | yes | IP (v4 or v6) CIDR notation (e.g., 192.0.2.0/24) |
| `ipOnMitigation` | path | ipv4 | yes | IPv4 address (e.g., 192.0.2.0) |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | ip.MitigationIp | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `auto` | boolean | read-only | Set on true if your ip is on auto-mitigation |
| `ipOnMitigation` | ipv4 | read-only | IPv4 address (e.g., 192.0.2.0) |
| `permanent` | boolean |  | DEPRECATED: this field is kept for backward compatibility of the API, changing its value has no operational impact |
| `state` | ip.MitigationStateEnum | read-only | Current state of your ip on mitigation — one of `creationPending`, `ok`, `removalPending` |

```json
{
  "auto": true,
  "ipOnMitigation": "192.0.2.0",
  "permanent": true,
  "state": "creationPending"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/ip/{ip}/mitigation/{ipOnMitigation}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/ip/{ip}/mitigation/{ipOnMitigation}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/ip/{ip}/mitigation/{ipOnMitigation}");

print_r($result);
?>
```

## Get an IP mitigation timeout

`GET /1.0/ip/{ip}/mitigationProfiles/{ipMitigationProfile}`

Link: https://developers.eu.ovhcloud.com/reference/network/ip-addresses/vac-ddos-protection/#get-ip-ip-mitigationprofiles-ipmitigationprofile

**Status:** Stable production version  
**IAM actions:** `ip:apiovh:mitigationProfiles/get`

Get an IP mitigation timeout. Returns the VAC mitigation timeout of a given IP address, in minutes, and its state: ok or tasksPending.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `ip` | path | ipBlock | yes | IP (v4 or v6) CIDR notation (e.g., 192.0.2.0/24) |
| `ipMitigationProfile` | path | ipv4 | yes | IPv4 address (e.g., 192.0.2.0) |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | ip.MitigationProfile | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `autoMitigationTimeOut` | ip.MitigationProfileAutoMitigationTimeOutEnum |  | Delay to wait before remove ip from auto mitigation after an attack — one of `0`, `15`, `60`, `360`, `1560` |
| `ipMitigationProfile` | ipv4 | read-only | IPv4 address (e.g., 192.0.2.0) |
| `state` | ip.MitigationProfileStateEnum | read-only | Current state of your mitigation profile — one of `ok`, `tasksPending` |

```json
{
  "autoMitigationTimeOut": 0,
  "ipMitigationProfile": "192.0.2.0",
  "state": "ok"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/ip/{ip}/mitigationProfiles/{ipMitigationProfile}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/ip/{ip}/mitigationProfiles/{ipMitigationProfile}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/ip/{ip}/mitigationProfiles/{ipMitigationProfile}");

print_r($result);
?>
```

## Create a mitigation entry

`POST /1.0/ip/{ip}/mitigation`

Link: https://developers.eu.ovhcloud.com/reference/network/ip-addresses/vac-ddos-protection/#post-ip-ip-mitigation

**Status:** Stable production version  
**IAM actions:** `ip:apiovh:mitigation/create`

Create a mitigation entry. Creates a VAC DDoS mitigation entry for an IP address of the block. No longer needed: entries are created automatically during an attack.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `ip` | path | ipBlock | yes | IP (v4 or v6) CIDR notation (e.g., 192.0.2.0/24) |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `ipOnMitigation` | ipv4 | yes | IPv4 address (e.g., 192.0.2.0) |

```json
{
  "ipOnMitigation": "192.0.2.0"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | ip.MitigationIp | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `auto` | boolean | read-only | Set on true if your ip is on auto-mitigation |
| `ipOnMitigation` | ipv4 | read-only | IPv4 address (e.g., 192.0.2.0) |
| `permanent` | boolean |  | DEPRECATED: this field is kept for backward compatibility of the API, changing its value has no operational impact |
| `state` | ip.MitigationStateEnum | read-only | Current state of your ip on mitigation — one of `creationPending`, `ok`, `removalPending` |

```json
{
  "auto": true,
  "ipOnMitigation": "192.0.2.0",
  "permanent": true,
  "state": "creationPending"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/ip/{ip}/mitigation" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: ipv4
result = client.post("/ip/{ip}/mitigation",
	ipOnMitigation = None, #  (type: ipv4)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: ipv4
$result = $ovh->post("/ip/{ip}/mitigation", array(
	ipOnMitigation => null, //  (type: ipv4)
));

print_r($result);
?>
```

## Create an IP mitigation timeout

`POST /1.0/ip/{ip}/mitigationProfiles`

Link: https://developers.eu.ovhcloud.com/reference/network/ip-addresses/vac-ddos-protection/#post-ip-ip-mitigationprofiles

**Status:** Stable production version  
**IAM actions:** `ip:apiovh:mitigationProfiles/create`

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.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `ip` | path | ipBlock | yes | IP (v4 or v6) CIDR notation (e.g., 192.0.2.0/24) |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `autoMitigationTimeOut` | ip.MitigationProfileAutoMitigationTimeOutEnum | yes | Delay to wait before remove ip from auto mitigation after an attack — one of `0`, `15`, `60`, `360`, `1560` |
| `ipMitigationProfile` | ipv4 | yes | IPv4 address (e.g., 192.0.2.0) |

```json
{
  "autoMitigationTimeOut": 0,
  "ipMitigationProfile": "192.0.2.0"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | ip.MitigationProfile | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `autoMitigationTimeOut` | ip.MitigationProfileAutoMitigationTimeOutEnum |  | Delay to wait before remove ip from auto mitigation after an attack — one of `0`, `15`, `60`, `360`, `1560` |
| `ipMitigationProfile` | ipv4 | read-only | IPv4 address (e.g., 192.0.2.0) |
| `state` | ip.MitigationProfileStateEnum | read-only | Current state of your mitigation profile — one of `ok`, `tasksPending` |

```json
{
  "autoMitigationTimeOut": 0,
  "ipMitigationProfile": "192.0.2.0",
  "state": "ok"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/ip/{ip}/mitigationProfiles" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.post("/ip/{ip}/mitigationProfiles",
	autoMitigationTimeOut = None, # Delay to wait before remove ip from auto mitigation after an attack (type: ip.MitigationProfileAutoMitigationTimeOutEnum)
	ipMitigationProfile = None, #  (type: ipv4)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->post("/ip/{ip}/mitigationProfiles", array(
	autoMitigationTimeOut => null, // Delay to wait before remove ip from auto mitigation after an attack (type: ip.MitigationProfileAutoMitigationTimeOutEnum)
	ipMitigationProfile => null, //  (type: ipv4)
));

print_r($result);
?>
```

## Delete a mitigation entry

`DELETE /1.0/ip/{ip}/mitigation/{ipOnMitigation}`

Link: https://developers.eu.ovhcloud.com/reference/network/ip-addresses/vac-ddos-protection/#delete-ip-ip-mitigation-iponmitigation

**Status:** Stable production version  
**IAM actions:** `ip:apiovh:mitigation/delete`

Delete a mitigation entry. Removes a given IP address of the block from VAC mitigation, and returns its mitigation entry with its state.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `ip` | path | ipBlock | yes | IP (v4 or v6) CIDR notation (e.g., 192.0.2.0/24) |
| `ipOnMitigation` | path | ipv4 | yes | IPv4 address (e.g., 192.0.2.0) |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | ip.MitigationIp | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `auto` | boolean | read-only | Set on true if your ip is on auto-mitigation |
| `ipOnMitigation` | ipv4 | read-only | IPv4 address (e.g., 192.0.2.0) |
| `permanent` | boolean |  | DEPRECATED: this field is kept for backward compatibility of the API, changing its value has no operational impact |
| `state` | ip.MitigationStateEnum | read-only | Current state of your ip on mitigation — one of `creationPending`, `ok`, `removalPending` |

```json
{
  "auto": true,
  "ipOnMitigation": "192.0.2.0",
  "permanent": true,
  "state": "creationPending"
}
```

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/ip/{ip}/mitigation/{ipOnMitigation}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/ip/{ip}/mitigation/{ipOnMitigation}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/ip/{ip}/mitigation/{ipOnMitigation}");

print_r($result);
?>
```

## Delete an IP mitigation timeout

`DELETE /1.0/ip/{ip}/mitigationProfiles/{ipMitigationProfile}`

Link: https://developers.eu.ovhcloud.com/reference/network/ip-addresses/vac-ddos-protection/#delete-ip-ip-mitigationprofiles-ipmitigationprofile

**Status:** Stable production version  
**IAM actions:** `ip:apiovh:mitigationProfiles/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.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `ip` | path | ipBlock | yes | IP (v4 or v6) CIDR notation (e.g., 192.0.2.0/24) |
| `ipMitigationProfile` | path | ipv4 | yes | IPv4 address (e.g., 192.0.2.0) |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/ip/{ip}/mitigationProfiles/{ipMitigationProfile}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/ip/{ip}/mitigationProfiles/{ipMitigationProfile}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/ip/{ip}/mitigationProfiles/{ipMitigationProfile}");

print_r($result);
?>
```

## Update an IP mitigation timeout

`PUT /1.0/ip/{ip}/mitigationProfiles/{ipMitigationProfile}`

Link: https://developers.eu.ovhcloud.com/reference/network/ip-addresses/vac-ddos-protection/#put-ip-ip-mitigationprofiles-ipmitigationprofile

**Status:** Stable production version  
**IAM actions:** `ip:apiovh:mitigationProfiles/edit`

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.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `ip` | path | ipBlock | yes | IP (v4 or v6) CIDR notation (e.g., 192.0.2.0/24) |
| `ipMitigationProfile` | path | ipv4 | yes | IPv4 address (e.g., 192.0.2.0) |

### Request body (required)

Type: `ip.MitigationProfile`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `autoMitigationTimeOut` | ip.MitigationProfileAutoMitigationTimeOutEnum |  | Delay to wait before remove ip from auto mitigation after an attack — one of `0`, `15`, `60`, `360`, `1560` |
| `ipMitigationProfile` | ipv4 | read-only | IPv4 address (e.g., 192.0.2.0) |
| `state` | ip.MitigationProfileStateEnum | read-only | Current state of your mitigation profile — one of `ok`, `tasksPending` |

```json
{
  "autoMitigationTimeOut": 0
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/ip/{ip}/mitigationProfiles/{ipMitigationProfile}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: ip.MitigationProfile
result = client.put("/ip/{ip}/mitigationProfiles/{ipMitigationProfile}",
	autoMitigationTimeOut = None, # Delay to wait before remove ip from auto mitigation after an attack (type: ip.MitigationProfileAutoMitigationTimeOutEnum)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: ip.MitigationProfile
$result = $ovh->put("/ip/{ip}/mitigationProfiles/{ipMitigationProfile}", array(
	autoMitigationTimeOut => null, // Delay to wait before remove ip from auto mitigation after an attack (type: ip.MitigationProfileAutoMitigationTimeOutEnum)
));

print_r($result);
?>
```
