# Network › Load Balancer › Frontends › TCP 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

> 15 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/load-balancer/frontends/tcp/

OpenAPI v1: https://api.eu.ovhcloud.com/1.0/__schemas/developer-hub-navigation/network/load-balancer/frontends/tcp.json?format=openapi3
OpenAPI v2: https://api.eu.ovhcloud.com/v2/__schemas/developer-hub-navigation/network/load-balancer/frontends/tcp.json?format=openapi3

## Operations

- `GET /ipLoadbalancing/{serviceName}/tcp/frontend` — List TCP frontends
- `POST /ipLoadbalancing/{serviceName}/tcp/frontend` — Create a TCP frontend
- `GET /ipLoadbalancing/{serviceName}/tcp/frontend/{frontendId}` — Get a TCP frontend
- `DELETE /ipLoadbalancing/{serviceName}/tcp/frontend/{frontendId}` — Delete a TCP frontend
- `PUT /ipLoadbalancing/{serviceName}/tcp/frontend/{frontendId}` — Update a TCP frontend
- `GET /ipLoadbalancing/{serviceName}/tcp/route` — List TCP routes
- `POST /ipLoadbalancing/{serviceName}/tcp/route` — Create a TCP route
- `GET /ipLoadbalancing/{serviceName}/tcp/route/{routeId}` — Get a TCP route
- `DELETE /ipLoadbalancing/{serviceName}/tcp/route/{routeId}` — Delete a TCP route
- `PUT /ipLoadbalancing/{serviceName}/tcp/route/{routeId}` — Update a TCP route
- `GET /ipLoadbalancing/{serviceName}/tcp/route/{routeId}/rule` — List route rules
- `POST /ipLoadbalancing/{serviceName}/tcp/route/{routeId}/rule` — Create a route rule
- `GET /ipLoadbalancing/{serviceName}/tcp/route/{routeId}/rule/{ruleId}` — Get a route rule
- `DELETE /ipLoadbalancing/{serviceName}/tcp/route/{routeId}/rule/{ruleId}` — Delete a route rule
- `PUT /ipLoadbalancing/{serviceName}/tcp/route/{routeId}/rule/{ruleId}` — Update a route rule

## List TCP frontends

`GET /1.0/ipLoadbalancing/{serviceName}/tcp/frontend`

Link: https://developers.eu.ovhcloud.com/reference/network/load-balancer/frontends/tcp/#get-iploadbalancing-servicename-tcp-frontend

**Status:** Stable production version  
**IAM actions:** `loadbalancer:apiovh:tcp/frontend/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `defaultFarmId` | query | integer |  | Filter the value of defaultFarmId property (=) |
| `defaultSslId` | query | integer |  | Filter the value of defaultSslId property (=) |
| `port` | query | string |  | Filter the value of port property (like) |
| `serviceName` | path | string | yes | The internal name of your IP load balancing |
| `zone` | query | string |  | Filter the value of zone property (=) |

### Responses

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

```json
[
  0
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/ipLoadbalancing/{serviceName}/tcp/frontend" \
  -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("/ipLoadbalancing/{serviceName}/tcp/frontend")

# 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("/ipLoadbalancing/{serviceName}/tcp/frontend");

print_r($result);
?>
```

## Create a TCP frontend

`POST /1.0/ipLoadbalancing/{serviceName}/tcp/frontend`

Link: https://developers.eu.ovhcloud.com/reference/network/load-balancer/frontends/tcp/#post-iploadbalancing-servicename-tcp-frontend

**Status:** Stable production version  
**IAM actions:** `loadbalancer:apiovh:tcp/frontend/create`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your IP load balancing |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `allowedSource` | ipBlock[] |  | Restrict IP Load Balancing access to these ip block. No restriction if null. You cannot specify allowedSource and deniedSource both at the same time |
| `dedicatedIpfo` | ipBlock[] |  | Only attach frontend on these ip. No restriction if null |
| `defaultFarmId` | integer |  | Default TCP Farm of your frontend |
| `defaultSslId` | integer |  | Default ssl served to your customer |
| `deniedSource` | ipBlock[] |  | Deny IP Load Balancing access to these ip block. No restriction if null. You cannot specify allowedSource and deniedSource both at the same time |
| `disabled` | boolean |  | Disable your frontend. Default: 'false' |
| `displayName` | string |  | Human readable name for your frontend, this field is for you |
| `forceSni` | boolean |  | block all SSL connection request without SNI. Default: 'false' |
| `port` | string | yes | Port(s) attached to your frontend. Supports single port (numerical value), range (2 dash-delimited increasing ports) and comma-separated list of 'single port' and/or 'range'. Each port must be in the [1;49151] range. |
| `ssl` | boolean |  | SSL deciphering. Default: 'false' |
| `zone` | string | yes | Zone of your frontend. Use "all" for all owned zone. |

```json
{
  "allowedSource": [
    "192.0.2.0/24"
  ],
  "dedicatedIpfo": [
    "192.0.2.0/24"
  ],
  "defaultFarmId": 0,
  "defaultSslId": 0,
  "deniedSource": [
    "192.0.2.0/24"
  ],
  "disabled": true,
  "displayName": "string",
  "forceSni": true,
  "port": "string",
  "ssl": true,
  "zone": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | ipLoadbalancing.frontendTcp.FrontendTcp | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `allowedSource` | ipBlock[] |  | Restrict IP Load Balancing access to these ip block. No restriction if null. You cannot specify allowedSource and deniedSource both at the same time |
| `dedicatedIpfo` | ipBlock[] |  | Only attach frontend on these ip. No restriction if null |
| `defaultFarmId` | integer |  | Default TCP Farm of your frontend |
| `defaultSslId` | integer |  | Default ssl served to your customer |
| `deniedSource` | ipBlock[] |  | Deny IP Load Balancing access to these ip block. No restriction if null. You cannot specify allowedSource and deniedSource both at the same time |
| `disabled` | boolean |  | Disable frontend. Default: 'false' |
| `displayName` | string |  | Human readable name for your frontend, this field is for you |
| `forceSni` | boolean |  | block all SSL connection request without SNI. Default: 'false' |
| `frontendId` | integer | read-only | Id of your frontend |
| `port` | string |  | Listening port(s) on the server |
| `ssl` | boolean |  | SSL deciphering. Default: 'false' |
| `vrackNetworkId` | integer | read-only | Internal Load Balancer identifier of the vRack private network attached to your frontend. |
| `vrackVrouterId` | integer | read-only | Virtual Router Identifier. 1-255 |
| `zone` | string |  | Zone of you frontend |

```json
{
  "allowedSource": [
    "192.0.2.0/24"
  ],
  "dedicatedIpfo": [
    "192.0.2.0/24"
  ],
  "defaultFarmId": 0,
  "defaultSslId": 0,
  "deniedSource": [
    "192.0.2.0/24"
  ],
  "disabled": true,
  "displayName": "string",
  "forceSni": true,
  "frontendId": 0,
  "port": "string",
  "ssl": true,
  "vrackNetworkId": 0,
  "vrackVrouterId": 0,
  "zone": "string"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/ipLoadbalancing/{serviceName}/tcp/frontend" \
  -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: string
result = client.post("/ipLoadbalancing/{serviceName}/tcp/frontend",
	allowedSource = None, # Restrict IP Load Balancing access to these ip block. No restriction if null. You cannot specify allowedSource and deniedSource both at the same time (type: ipBlock[], nullable)
	dedicatedIpfo = None, # Only attach frontend on these ip. No restriction if null (type: ipBlock[], nullable)
	defaultFarmId = None, # Default TCP Farm of your frontend (type: long, nullable)
	defaultSslId = None, # Default ssl served to your customer (type: long, nullable)
	deniedSource = None, # Deny IP Load Balancing access to these ip block. No restriction if null. You cannot specify allowedSource and deniedSource both at the same time (type: ipBlock[], nullable)
	disabled = None, # Disable your frontend. Default: 'false' (type: boolean, nullable)
	displayName = None, # Human readable name for your frontend, this field is for you (type: string, nullable)
	forceSni = None, # block all SSL connection request without SNI. Default: 'false' (type: boolean, nullable)
	port = None, # Port(s) attached to your frontend. Supports single port (numerical value), range (2 dash-delimited increasing ports) and comma-separated list of 'single port' and/or 'range'. Each port must be in the [1;49151] range. (type: string)
	ssl = None, # SSL deciphering. Default: 'false' (type: boolean, nullable)
	zone = None, # Zone of your frontend. Use "all" for all owned zone. (type: string)
)

# 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: string
$result = $ovh->post("/ipLoadbalancing/{serviceName}/tcp/frontend", array(
	allowedSource => null, // Restrict IP Load Balancing access to these ip block. No restriction if null. You cannot specify allowedSource and deniedSource both at the same time (type: ipBlock[], nullable)
	dedicatedIpfo => null, // Only attach frontend on these ip. No restriction if null (type: ipBlock[], nullable)
	defaultFarmId => null, // Default TCP Farm of your frontend (type: long, nullable)
	defaultSslId => null, // Default ssl served to your customer (type: long, nullable)
	deniedSource => null, // Deny IP Load Balancing access to these ip block. No restriction if null. You cannot specify allowedSource and deniedSource both at the same time (type: ipBlock[], nullable)
	disabled => null, // Disable your frontend. Default: 'false' (type: boolean, nullable)
	displayName => null, // Human readable name for your frontend, this field is for you (type: string, nullable)
	forceSni => null, // block all SSL connection request without SNI. Default: 'false' (type: boolean, nullable)
	port => null, // Port(s) attached to your frontend. Supports single port (numerical value), range (2 dash-delimited increasing ports) and comma-separated list of 'single port' and/or 'range'. Each port must be in the [1;49151] range. (type: string)
	ssl => null, // SSL deciphering. Default: 'false' (type: boolean, nullable)
	zone => null, // Zone of your frontend. Use "all" for all owned zone. (type: string)
));

print_r($result);
?>
```

## Get a TCP frontend

`GET /1.0/ipLoadbalancing/{serviceName}/tcp/frontend/{frontendId}`

Link: https://developers.eu.ovhcloud.com/reference/network/load-balancer/frontends/tcp/#get-iploadbalancing-servicename-tcp-frontend-frontendid

**Status:** Stable production version  
**IAM actions:** `loadbalancer:apiovh:tcp/frontend/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `frontendId` | path | integer | yes | Id of your frontend |
| `serviceName` | path | string | yes | The internal name of your IP load balancing |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | ipLoadbalancing.frontendTcp.FrontendTcp | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `allowedSource` | ipBlock[] |  | Restrict IP Load Balancing access to these ip block. No restriction if null. You cannot specify allowedSource and deniedSource both at the same time |
| `dedicatedIpfo` | ipBlock[] |  | Only attach frontend on these ip. No restriction if null |
| `defaultFarmId` | integer |  | Default TCP Farm of your frontend |
| `defaultSslId` | integer |  | Default ssl served to your customer |
| `deniedSource` | ipBlock[] |  | Deny IP Load Balancing access to these ip block. No restriction if null. You cannot specify allowedSource and deniedSource both at the same time |
| `disabled` | boolean |  | Disable frontend. Default: 'false' |
| `displayName` | string |  | Human readable name for your frontend, this field is for you |
| `forceSni` | boolean |  | block all SSL connection request without SNI. Default: 'false' |
| `frontendId` | integer | read-only | Id of your frontend |
| `port` | string |  | Listening port(s) on the server |
| `ssl` | boolean |  | SSL deciphering. Default: 'false' |
| `vrackNetworkId` | integer | read-only | Internal Load Balancer identifier of the vRack private network attached to your frontend. |
| `vrackVrouterId` | integer | read-only | Virtual Router Identifier. 1-255 |
| `zone` | string |  | Zone of you frontend |

```json
{
  "allowedSource": [
    "192.0.2.0/24"
  ],
  "dedicatedIpfo": [
    "192.0.2.0/24"
  ],
  "defaultFarmId": 0,
  "defaultSslId": 0,
  "deniedSource": [
    "192.0.2.0/24"
  ],
  "disabled": true,
  "displayName": "string",
  "forceSni": true,
  "frontendId": 0,
  "port": "string",
  "ssl": true,
  "vrackNetworkId": 0,
  "vrackVrouterId": 0,
  "zone": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/ipLoadbalancing/{serviceName}/tcp/frontend/{frontendId}" \
  -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("/ipLoadbalancing/{serviceName}/tcp/frontend/{frontendId}")

# 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("/ipLoadbalancing/{serviceName}/tcp/frontend/{frontendId}");

print_r($result);
?>
```

## Delete a TCP frontend

`DELETE /1.0/ipLoadbalancing/{serviceName}/tcp/frontend/{frontendId}`

Link: https://developers.eu.ovhcloud.com/reference/network/load-balancer/frontends/tcp/#delete-iploadbalancing-servicename-tcp-frontend-frontendid

**Status:** Stable production version  
**IAM actions:** `loadbalancer:apiovh:tcp/frontend/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `frontendId` | path | integer | yes | Id of your frontend |
| `serviceName` | path | string | yes | The internal name of your IP load balancing |

### Responses

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

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/ipLoadbalancing/{serviceName}/tcp/frontend/{frontendId}" \
  -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("/ipLoadbalancing/{serviceName}/tcp/frontend/{frontendId}")

# 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("/ipLoadbalancing/{serviceName}/tcp/frontend/{frontendId}");

print_r($result);
?>
```

## Update a TCP frontend

`PUT /1.0/ipLoadbalancing/{serviceName}/tcp/frontend/{frontendId}`

Link: https://developers.eu.ovhcloud.com/reference/network/load-balancer/frontends/tcp/#put-iploadbalancing-servicename-tcp-frontend-frontendid

**Status:** Stable production version  
**IAM actions:** `loadbalancer:apiovh:tcp/frontend/edit`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `frontendId` | path | integer | yes | Id of your frontend |
| `serviceName` | path | string | yes | The internal name of your IP load balancing |

### Request body (required)

Type: `ipLoadbalancing.frontendTcp.FrontendTcp`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `allowedSource` | ipBlock[] |  | Restrict IP Load Balancing access to these ip block. No restriction if null. You cannot specify allowedSource and deniedSource both at the same time |
| `dedicatedIpfo` | ipBlock[] |  | Only attach frontend on these ip. No restriction if null |
| `defaultFarmId` | integer |  | Default TCP Farm of your frontend |
| `defaultSslId` | integer |  | Default ssl served to your customer |
| `deniedSource` | ipBlock[] |  | Deny IP Load Balancing access to these ip block. No restriction if null. You cannot specify allowedSource and deniedSource both at the same time |
| `disabled` | boolean |  | Disable frontend. Default: 'false' |
| `displayName` | string |  | Human readable name for your frontend, this field is for you |
| `forceSni` | boolean |  | block all SSL connection request without SNI. Default: 'false' |
| `frontendId` | integer | read-only | Id of your frontend |
| `port` | string |  | Listening port(s) on the server |
| `ssl` | boolean |  | SSL deciphering. Default: 'false' |
| `vrackNetworkId` | integer | read-only | Internal Load Balancer identifier of the vRack private network attached to your frontend. |
| `vrackVrouterId` | integer | read-only | Virtual Router Identifier. 1-255 |
| `zone` | string |  | Zone of you frontend |

```json
{
  "allowedSource": [
    "192.0.2.0/24"
  ],
  "dedicatedIpfo": [
    "192.0.2.0/24"
  ],
  "defaultFarmId": 0,
  "defaultSslId": 0,
  "deniedSource": [
    "192.0.2.0/24"
  ],
  "disabled": true,
  "displayName": "string",
  "forceSni": true,
  "port": "string",
  "ssl": true,
  "zone": "string"
}
```

### Responses

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

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/ipLoadbalancing/{serviceName}/tcp/frontend/{frontendId}" \
  -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: ipLoadbalancing.frontendTcp.FrontendTcp
result = client.put("/ipLoadbalancing/{serviceName}/tcp/frontend/{frontendId}",
	allowedSource = None, # Restrict IP Load Balancing access to these ip block. No restriction if null. You cannot specify allowedSource and deniedSource both at the same time (type: array, nullable)
	dedicatedIpfo = None, # Only attach frontend on these ip. No restriction if null (type: array, nullable)
	defaultFarmId = None, # Default TCP Farm of your frontend (type: integer, nullable)
	defaultSslId = None, # Default ssl served to your customer (type: integer, nullable)
	deniedSource = None, # Deny IP Load Balancing access to these ip block. No restriction if null. You cannot specify allowedSource and deniedSource both at the same time (type: array, nullable)
	disabled = None, # Disable frontend. Default: 'false' (type: boolean)
	displayName = None, # Human readable name for your frontend, this field is for you (type: string, nullable)
	forceSni = None, # block all SSL connection request without SNI. Default: 'false' (type: boolean)
	port = None, # Listening port(s) on the server (type: string)
	ssl = None, # SSL deciphering. Default: 'false' (type: boolean)
	zone = None, # Zone of you frontend (type: string)
)

# 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: ipLoadbalancing.frontendTcp.FrontendTcp
$result = $ovh->put("/ipLoadbalancing/{serviceName}/tcp/frontend/{frontendId}", array(
	allowedSource => null, // Restrict IP Load Balancing access to these ip block. No restriction if null. You cannot specify allowedSource and deniedSource both at the same time (type: array, nullable)
	dedicatedIpfo => null, // Only attach frontend on these ip. No restriction if null (type: array, nullable)
	defaultFarmId => null, // Default TCP Farm of your frontend (type: integer, nullable)
	defaultSslId => null, // Default ssl served to your customer (type: integer, nullable)
	deniedSource => null, // Deny IP Load Balancing access to these ip block. No restriction if null. You cannot specify allowedSource and deniedSource both at the same time (type: array, nullable)
	disabled => null, // Disable frontend. Default: 'false' (type: boolean)
	displayName => null, // Human readable name for your frontend, this field is for you (type: string, nullable)
	forceSni => null, // block all SSL connection request without SNI. Default: 'false' (type: boolean)
	port => null, // Listening port(s) on the server (type: string)
	ssl => null, // SSL deciphering. Default: 'false' (type: boolean)
	zone => null, // Zone of you frontend (type: string)
));

print_r($result);
?>
```

## List TCP routes

`GET /1.0/ipLoadbalancing/{serviceName}/tcp/route`

Link: https://developers.eu.ovhcloud.com/reference/network/load-balancer/frontends/tcp/#get-iploadbalancing-servicename-tcp-route

**Status:** Stable production version  
**IAM actions:** `loadbalancer:apiovh:tcp/route/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `frontendId` | query | integer |  | Filter the value of frontendId property (=) |
| `serviceName` | path | string | yes | The internal name of your IP load balancing |

### Responses

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

```json
[
  0
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/ipLoadbalancing/{serviceName}/tcp/route" \
  -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("/ipLoadbalancing/{serviceName}/tcp/route")

# 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("/ipLoadbalancing/{serviceName}/tcp/route");

print_r($result);
?>
```

## Create a TCP route

`POST /1.0/ipLoadbalancing/{serviceName}/tcp/route`

Link: https://developers.eu.ovhcloud.com/reference/network/load-balancer/frontends/tcp/#post-iploadbalancing-servicename-tcp-route

**Status:** Stable production version  
**IAM actions:** `loadbalancer:apiovh:tcp/route/create`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your IP load balancing |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | ipLoadbalancing.RouteTcpAction | yes | Action triggered when all rules match |
| `action.target` | string |  | Farm ID for "farm" action type, empty for others |
| `action.type` | string |  | Action to trigger if all the rules of this route matches |
| `displayName` | string |  | Human readable name for your route, this field is for you |
| `frontendId` | integer |  | Route traffic for this frontend |
| `weight` | integer |  | Route priority ([0..255]). 0 if null. Highest priority routes are evaluated last. Only the first matching route will trigger an action |

```json
{
  "action": {
    "target": "string",
    "type": "string"
  },
  "displayName": "string",
  "frontendId": 0,
  "weight": 0
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | ipLoadbalancing.RouteTcp.RouteTcp | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | ipLoadbalancing.RouteTcpAction |  | Action triggered when all rules match |
| `action.target` | string |  | Farm ID for "farm" action type, empty for others |
| `action.type` | string |  | Action to trigger if all the rules of this route matches |
| `displayName` | string |  | Human readable name for your route, this field is for you |
| `frontendId` | integer |  | Route traffic for this frontend |
| `routeId` | integer | read-only | Id of your route |
| `rules` | ipLoadbalancing.RouteRule[] | read-only | List of rules to match to trigger action |
| `rules[].field` | string |  | Name of the field to match like "protocol" or "host". See "/ipLoadbalancing/{serviceName}/route/availableRules" for a list of available rules |
| `rules[].match` | ipLoadbalancing.RouteRuleMatchesEnum |  | Matching operator. Not all operators are available for all fields. See "/availableRules" — one of `contains`, `endswith`, `exists`, `in`, `internal`, `is`, `matches`, `startswith` |
| `rules[].negate` | boolean |  | Invert the matching operator effect |
| `rules[].pattern` | string |  | Value to match against this match. Interpretation if this field depends on the match and field |
| `rules[].ruleId` | integer |  | Id of your rule |
| `rules[].subField` | string |  | Name of sub-field, if applicable. This may be a Cookie or Header name for instance |
| `status` | ipLoadbalancing.RouteStatusEnum | read-only | Route status. Routes in "ok" state are ready to operate — one of `creating`, `deleting`, `internal`, `ok`, `updating` |
| `weight` | integer |  | Route priority ([0..255]). 0 if null. Highest priority routes are evaluated last. Only the first matching route will trigger an action |

```json
{
  "action": {
    "target": "string",
    "type": "string"
  },
  "displayName": "string",
  "frontendId": 0,
  "routeId": 0,
  "rules": [
    {
      "field": "string",
      "match": "contains",
      "negate": true,
      "pattern": "string",
      "ruleId": 0,
      "subField": "string"
    }
  ],
  "status": "creating",
  "weight": 0
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/ipLoadbalancing/{serviceName}/tcp/route" \
  -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("/ipLoadbalancing/{serviceName}/tcp/route",
	action = None, # Action triggered when all rules match (type: ipLoadbalancing.RouteTcpAction)
	displayName = None, # Human readable name for your route, this field is for you (type: string, nullable)
	frontendId = None, # Route traffic for this frontend (type: long, nullable)
	weight = None, # Route priority ([0..255]). 0 if null. Highest priority routes are evaluated last. Only the first matching route will trigger an action (type: long, nullable)
)

# 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("/ipLoadbalancing/{serviceName}/tcp/route", array(
	action => null, // Action triggered when all rules match (type: ipLoadbalancing.RouteTcpAction)
	displayName => null, // Human readable name for your route, this field is for you (type: string, nullable)
	frontendId => null, // Route traffic for this frontend (type: long, nullable)
	weight => null, // Route priority ([0..255]). 0 if null. Highest priority routes are evaluated last. Only the first matching route will trigger an action (type: long, nullable)
));

print_r($result);
?>
```

## Get a TCP route

`GET /1.0/ipLoadbalancing/{serviceName}/tcp/route/{routeId}`

Link: https://developers.eu.ovhcloud.com/reference/network/load-balancer/frontends/tcp/#get-iploadbalancing-servicename-tcp-route-routeid

**Status:** Stable production version  
**IAM actions:** `loadbalancer:apiovh:tcp/route/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `routeId` | path | integer | yes | Id of your route |
| `serviceName` | path | string | yes | The internal name of your IP load balancing |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | ipLoadbalancing.RouteTcp.RouteTcp | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | ipLoadbalancing.RouteTcpAction |  | Action triggered when all rules match |
| `action.target` | string |  | Farm ID for "farm" action type, empty for others |
| `action.type` | string |  | Action to trigger if all the rules of this route matches |
| `displayName` | string |  | Human readable name for your route, this field is for you |
| `frontendId` | integer |  | Route traffic for this frontend |
| `routeId` | integer | read-only | Id of your route |
| `rules` | ipLoadbalancing.RouteRule[] | read-only | List of rules to match to trigger action |
| `rules[].field` | string |  | Name of the field to match like "protocol" or "host". See "/ipLoadbalancing/{serviceName}/route/availableRules" for a list of available rules |
| `rules[].match` | ipLoadbalancing.RouteRuleMatchesEnum |  | Matching operator. Not all operators are available for all fields. See "/availableRules" — one of `contains`, `endswith`, `exists`, `in`, `internal`, `is`, `matches`, `startswith` |
| `rules[].negate` | boolean |  | Invert the matching operator effect |
| `rules[].pattern` | string |  | Value to match against this match. Interpretation if this field depends on the match and field |
| `rules[].ruleId` | integer |  | Id of your rule |
| `rules[].subField` | string |  | Name of sub-field, if applicable. This may be a Cookie or Header name for instance |
| `status` | ipLoadbalancing.RouteStatusEnum | read-only | Route status. Routes in "ok" state are ready to operate — one of `creating`, `deleting`, `internal`, `ok`, `updating` |
| `weight` | integer |  | Route priority ([0..255]). 0 if null. Highest priority routes are evaluated last. Only the first matching route will trigger an action |

```json
{
  "action": {
    "target": "string",
    "type": "string"
  },
  "displayName": "string",
  "frontendId": 0,
  "routeId": 0,
  "rules": [
    {
      "field": "string",
      "match": "contains",
      "negate": true,
      "pattern": "string",
      "ruleId": 0,
      "subField": "string"
    }
  ],
  "status": "creating",
  "weight": 0
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/ipLoadbalancing/{serviceName}/tcp/route/{routeId}" \
  -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("/ipLoadbalancing/{serviceName}/tcp/route/{routeId}")

# 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("/ipLoadbalancing/{serviceName}/tcp/route/{routeId}");

print_r($result);
?>
```

## Delete a TCP route

`DELETE /1.0/ipLoadbalancing/{serviceName}/tcp/route/{routeId}`

Link: https://developers.eu.ovhcloud.com/reference/network/load-balancer/frontends/tcp/#delete-iploadbalancing-servicename-tcp-route-routeid

**Status:** Stable production version  
**IAM actions:** `loadbalancer:apiovh:tcp/route/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `routeId` | path | integer | yes | Id of your route |
| `serviceName` | path | string | yes | The internal name of your IP load balancing |

### Responses

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

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/ipLoadbalancing/{serviceName}/tcp/route/{routeId}" \
  -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("/ipLoadbalancing/{serviceName}/tcp/route/{routeId}")

# 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("/ipLoadbalancing/{serviceName}/tcp/route/{routeId}");

print_r($result);
?>
```

## Update a TCP route

`PUT /1.0/ipLoadbalancing/{serviceName}/tcp/route/{routeId}`

Link: https://developers.eu.ovhcloud.com/reference/network/load-balancer/frontends/tcp/#put-iploadbalancing-servicename-tcp-route-routeid

**Status:** Stable production version  
**IAM actions:** `loadbalancer:apiovh:tcp/route/edit`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `routeId` | path | integer | yes | Id of your route |
| `serviceName` | path | string | yes | The internal name of your IP load balancing |

### Request body (required)

Type: `ipLoadbalancing.RouteTcp.RouteTcp`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | ipLoadbalancing.RouteTcpAction |  | Action triggered when all rules match |
| `action.target` | string |  | Farm ID for "farm" action type, empty for others |
| `action.type` | string |  | Action to trigger if all the rules of this route matches |
| `displayName` | string |  | Human readable name for your route, this field is for you |
| `frontendId` | integer |  | Route traffic for this frontend |
| `routeId` | integer | read-only | Id of your route |
| `rules` | ipLoadbalancing.RouteRule[] | read-only | List of rules to match to trigger action |
| `rules[].field` | string |  | Name of the field to match like "protocol" or "host". See "/ipLoadbalancing/{serviceName}/route/availableRules" for a list of available rules |
| `rules[].match` | ipLoadbalancing.RouteRuleMatchesEnum |  | Matching operator. Not all operators are available for all fields. See "/availableRules" — one of `contains`, `endswith`, `exists`, `in`, `internal`, `is`, `matches`, `startswith` |
| `rules[].negate` | boolean |  | Invert the matching operator effect |
| `rules[].pattern` | string |  | Value to match against this match. Interpretation if this field depends on the match and field |
| `rules[].ruleId` | integer |  | Id of your rule |
| `rules[].subField` | string |  | Name of sub-field, if applicable. This may be a Cookie or Header name for instance |
| `status` | ipLoadbalancing.RouteStatusEnum | read-only | Route status. Routes in "ok" state are ready to operate — one of `creating`, `deleting`, `internal`, `ok`, `updating` |
| `weight` | integer |  | Route priority ([0..255]). 0 if null. Highest priority routes are evaluated last. Only the first matching route will trigger an action |

```json
{
  "action": {
    "target": "string",
    "type": "string"
  },
  "displayName": "string",
  "frontendId": 0,
  "weight": 0
}
```

### Responses

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

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/ipLoadbalancing/{serviceName}/tcp/route/{routeId}" \
  -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: ipLoadbalancing.RouteTcp.RouteTcp
result = client.put("/ipLoadbalancing/{serviceName}/tcp/route/{routeId}",
	action = None, # Action triggered when all rules match (type: ipLoadbalancing.RouteTcpAction)
	displayName = None, # Human readable name for your route, this field is for you (type: string, nullable)
	frontendId = None, # Route traffic for this frontend (type: integer, nullable)
	weight = None, # Route priority ([0..255]). 0 if null. Highest priority routes are evaluated last. Only the first matching route will trigger an action (type: integer)
)

# 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: ipLoadbalancing.RouteTcp.RouteTcp
$result = $ovh->put("/ipLoadbalancing/{serviceName}/tcp/route/{routeId}", array(
	action => null, // Action triggered when all rules match (type: ipLoadbalancing.RouteTcpAction)
	displayName => null, // Human readable name for your route, this field is for you (type: string, nullable)
	frontendId => null, // Route traffic for this frontend (type: integer, nullable)
	weight => null, // Route priority ([0..255]). 0 if null. Highest priority routes are evaluated last. Only the first matching route will trigger an action (type: integer)
));

print_r($result);
?>
```

## List route rules

`GET /1.0/ipLoadbalancing/{serviceName}/tcp/route/{routeId}/rule`

Link: https://developers.eu.ovhcloud.com/reference/network/load-balancer/frontends/tcp/#get-iploadbalancing-servicename-tcp-route-routeid-rule

**Status:** Stable production version  
**IAM actions:** `loadbalancer:apiovh:tcp/route/rule/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `routeId` | path | integer | yes | Id of your route |
| `serviceName` | path | string | yes | The internal name of your IP load balancing |

### Responses

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

```json
[
  0
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/ipLoadbalancing/{serviceName}/tcp/route/{routeId}/rule" \
  -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("/ipLoadbalancing/{serviceName}/tcp/route/{routeId}/rule")

# 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("/ipLoadbalancing/{serviceName}/tcp/route/{routeId}/rule");

print_r($result);
?>
```

## Create a route rule

`POST /1.0/ipLoadbalancing/{serviceName}/tcp/route/{routeId}/rule`

Link: https://developers.eu.ovhcloud.com/reference/network/load-balancer/frontends/tcp/#post-iploadbalancing-servicename-tcp-route-routeid-rule

**Status:** Stable production version  
**IAM actions:** `loadbalancer:apiovh:tcp/route/rule/create`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `routeId` | path | integer | yes | Id of your route |
| `serviceName` | path | string | yes | The internal name of your IP load balancing |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `displayName` | string |  | Human readable name for your rule |
| `field` | string | yes | Name of the field to match like "protocol" or "host". See "/ipLoadbalancing/{serviceName}/availableRouteRules" for a list of available rules |
| `match` | ipLoadbalancing.RouteRuleMatchesEnum | yes | Matching operator. Not all operators are available for all fields. See "/ipLoadbalancing/{serviceName}/availableRouteRules" — one of `contains`, `endswith`, `exists`, `in`, `internal`, `is`, `matches`, `startswith` |
| `negate` | boolean |  | Invert the matching operator effect |
| `pattern` | string |  | Value to match against this match. Interpretation if this field depends on the match and field |
| `subField` | string |  | Name of sub-field, if applicable. This may be a Cookie or Header name for instance |

```json
{
  "displayName": "string",
  "field": "string",
  "match": "contains",
  "negate": true,
  "pattern": "string",
  "subField": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | ipLoadbalancing.RouteRule.RouteRule | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `displayName` | string |  | Human readable name for your rule |
| `field` | string |  | Name of the field to match like "protocol" or "host". See "/ipLoadbalancing/{serviceName}/availableRouteRules" for a list of available rules |
| `match` | ipLoadbalancing.RouteRuleMatchesEnum |  | Matching operator. Not all operators are available for all fields. See "/ipLoadbalancing/{serviceName}/availableRouteRules" — one of `contains`, `endswith`, `exists`, `in`, `internal`, `is`, `matches`, `startswith` |
| `negate` | boolean |  | Invert the matching operator effect |
| `pattern` | string |  | Value to match against this match. Interpretation if this field depends on the match and field |
| `ruleId` | integer | read-only | Id of your rule |
| `subField` | string |  | Name of sub-field, if applicable. This may be a Cookie or Header name for instance |

```json
{
  "displayName": "string",
  "field": "string",
  "match": "contains",
  "negate": true,
  "pattern": "string",
  "ruleId": 0,
  "subField": "string"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/ipLoadbalancing/{serviceName}/tcp/route/{routeId}/rule" \
  -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("/ipLoadbalancing/{serviceName}/tcp/route/{routeId}/rule",
	displayName = None, # Human readable name for your rule (type: string, nullable)
	field = None, # Name of the field to match like "protocol" or "host". See "/ipLoadbalancing/{serviceName}/availableRouteRules" for a list of available rules (type: string)
	match = None, # Matching operator. Not all operators are available for all fields. See "/ipLoadbalancing/{serviceName}/availableRouteRules" (type: ipLoadbalancing.RouteRuleMatchesEnum)
	negate = None, # Invert the matching operator effect (type: boolean, nullable)
	pattern = None, # Value to match against this match. Interpretation if this field depends on the match and field (type: string, nullable)
	subField = None, # Name of sub-field, if applicable. This may be a Cookie or Header name for instance (type: string, nullable)
)

# 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("/ipLoadbalancing/{serviceName}/tcp/route/{routeId}/rule", array(
	displayName => null, // Human readable name for your rule (type: string, nullable)
	field => null, // Name of the field to match like "protocol" or "host". See "/ipLoadbalancing/{serviceName}/availableRouteRules" for a list of available rules (type: string)
	match => null, // Matching operator. Not all operators are available for all fields. See "/ipLoadbalancing/{serviceName}/availableRouteRules" (type: ipLoadbalancing.RouteRuleMatchesEnum)
	negate => null, // Invert the matching operator effect (type: boolean, nullable)
	pattern => null, // Value to match against this match. Interpretation if this field depends on the match and field (type: string, nullable)
	subField => null, // Name of sub-field, if applicable. This may be a Cookie or Header name for instance (type: string, nullable)
));

print_r($result);
?>
```

## Get a route rule

`GET /1.0/ipLoadbalancing/{serviceName}/tcp/route/{routeId}/rule/{ruleId}`

Link: https://developers.eu.ovhcloud.com/reference/network/load-balancer/frontends/tcp/#get-iploadbalancing-servicename-tcp-route-routeid-rule-ruleid

**Status:** Stable production version  
**IAM actions:** `loadbalancer:apiovh:tcp/route/rule/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `routeId` | path | integer | yes | Id of your route |
| `ruleId` | path | integer | yes | Id of your rule |
| `serviceName` | path | string | yes | The internal name of your IP load balancing |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | ipLoadbalancing.RouteRule.RouteRule | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `displayName` | string |  | Human readable name for your rule |
| `field` | string |  | Name of the field to match like "protocol" or "host". See "/ipLoadbalancing/{serviceName}/availableRouteRules" for a list of available rules |
| `match` | ipLoadbalancing.RouteRuleMatchesEnum |  | Matching operator. Not all operators are available for all fields. See "/ipLoadbalancing/{serviceName}/availableRouteRules" — one of `contains`, `endswith`, `exists`, `in`, `internal`, `is`, `matches`, `startswith` |
| `negate` | boolean |  | Invert the matching operator effect |
| `pattern` | string |  | Value to match against this match. Interpretation if this field depends on the match and field |
| `ruleId` | integer | read-only | Id of your rule |
| `subField` | string |  | Name of sub-field, if applicable. This may be a Cookie or Header name for instance |

```json
{
  "displayName": "string",
  "field": "string",
  "match": "contains",
  "negate": true,
  "pattern": "string",
  "ruleId": 0,
  "subField": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/ipLoadbalancing/{serviceName}/tcp/route/{routeId}/rule/{ruleId}" \
  -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("/ipLoadbalancing/{serviceName}/tcp/route/{routeId}/rule/{ruleId}")

# 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("/ipLoadbalancing/{serviceName}/tcp/route/{routeId}/rule/{ruleId}");

print_r($result);
?>
```

## Delete a route rule

`DELETE /1.0/ipLoadbalancing/{serviceName}/tcp/route/{routeId}/rule/{ruleId}`

Link: https://developers.eu.ovhcloud.com/reference/network/load-balancer/frontends/tcp/#delete-iploadbalancing-servicename-tcp-route-routeid-rule-ruleid

**Status:** Stable production version  
**IAM actions:** `loadbalancer:apiovh:tcp/route/rule/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `routeId` | path | integer | yes | Id of your route |
| `ruleId` | path | integer | yes | Id of your rule |
| `serviceName` | path | string | yes | The internal name of your IP load balancing |

### Responses

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

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/ipLoadbalancing/{serviceName}/tcp/route/{routeId}/rule/{ruleId}" \
  -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("/ipLoadbalancing/{serviceName}/tcp/route/{routeId}/rule/{ruleId}")

# 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("/ipLoadbalancing/{serviceName}/tcp/route/{routeId}/rule/{ruleId}");

print_r($result);
?>
```

## Update a route rule

`PUT /1.0/ipLoadbalancing/{serviceName}/tcp/route/{routeId}/rule/{ruleId}`

Link: https://developers.eu.ovhcloud.com/reference/network/load-balancer/frontends/tcp/#put-iploadbalancing-servicename-tcp-route-routeid-rule-ruleid

**Status:** Stable production version  
**IAM actions:** `loadbalancer:apiovh:tcp/route/rule/edit`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `routeId` | path | integer | yes | Id of your route |
| `ruleId` | path | integer | yes | Id of your rule |
| `serviceName` | path | string | yes | The internal name of your IP load balancing |

### Request body (required)

Type: `ipLoadbalancing.RouteRule.RouteRule`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `displayName` | string |  | Human readable name for your rule |
| `field` | string |  | Name of the field to match like "protocol" or "host". See "/ipLoadbalancing/{serviceName}/availableRouteRules" for a list of available rules |
| `match` | ipLoadbalancing.RouteRuleMatchesEnum |  | Matching operator. Not all operators are available for all fields. See "/ipLoadbalancing/{serviceName}/availableRouteRules" — one of `contains`, `endswith`, `exists`, `in`, `internal`, `is`, `matches`, `startswith` |
| `negate` | boolean |  | Invert the matching operator effect |
| `pattern` | string |  | Value to match against this match. Interpretation if this field depends on the match and field |
| `ruleId` | integer | read-only | Id of your rule |
| `subField` | string |  | Name of sub-field, if applicable. This may be a Cookie or Header name for instance |

```json
{
  "displayName": "string",
  "field": "string",
  "match": "contains",
  "negate": true,
  "pattern": "string",
  "subField": "string"
}
```

### Responses

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

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/ipLoadbalancing/{serviceName}/tcp/route/{routeId}/rule/{ruleId}" \
  -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: ipLoadbalancing.RouteRule.RouteRule
result = client.put("/ipLoadbalancing/{serviceName}/tcp/route/{routeId}/rule/{ruleId}",
	displayName = None, # Human readable name for your rule (type: string, nullable)
	field = None, # Name of the field to match like "protocol" or "host". See "/ipLoadbalancing/{serviceName}/availableRouteRules" for a list of available rules (type: string)
	match = None, # Matching operator. Not all operators are available for all fields. See "/ipLoadbalancing/{serviceName}/availableRouteRules" (type: ipLoadbalancing.RouteRuleMatchesEnum)
	negate = None, # Invert the matching operator effect (type: boolean)
	pattern = None, # Value to match against this match. Interpretation if this field depends on the match and field (type: string, nullable)
	subField = None, # Name of sub-field, if applicable. This may be a Cookie or Header name for instance (type: string, nullable)
)

# 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: ipLoadbalancing.RouteRule.RouteRule
$result = $ovh->put("/ipLoadbalancing/{serviceName}/tcp/route/{routeId}/rule/{ruleId}", array(
	displayName => null, // Human readable name for your rule (type: string, nullable)
	field => null, // Name of the field to match like "protocol" or "host". See "/ipLoadbalancing/{serviceName}/availableRouteRules" for a list of available rules (type: string)
	match => null, // Matching operator. Not all operators are available for all fields. See "/ipLoadbalancing/{serviceName}/availableRouteRules" (type: ipLoadbalancing.RouteRuleMatchesEnum)
	negate => null, // Invert the matching operator effect (type: boolean)
	pattern => null, // Value to match against this match. Interpretation if this field depends on the match and field (type: string, nullable)
	subField => null, // Name of sub-field, if applicable. This may be a Cookie or Header name for instance (type: string, nullable)
));

print_r($result);
?>
```
