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

> 10 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/farms/tcp/

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

## Operations

- `GET /ipLoadbalancing/{serviceName}/tcp/farm` — List TCP farms
- `POST /ipLoadbalancing/{serviceName}/tcp/farm` — Create a TCP farm
- `GET /ipLoadbalancing/{serviceName}/tcp/farm/{farmId}` — Get a TCP farm
- `DELETE /ipLoadbalancing/{serviceName}/tcp/farm/{farmId}` — Delete a TCP farm
- `PUT /ipLoadbalancing/{serviceName}/tcp/farm/{farmId}` — Update a TCP farm
- `GET /ipLoadbalancing/{serviceName}/tcp/farm/{farmId}/server` — List farm servers
- `POST /ipLoadbalancing/{serviceName}/tcp/farm/{farmId}/server` — Create a farm server
- `GET /ipLoadbalancing/{serviceName}/tcp/farm/{farmId}/server/{serverId}` — Get a farm server
- `DELETE /ipLoadbalancing/{serviceName}/tcp/farm/{farmId}/server/{serverId}` — Delete a farm server
- `PUT /ipLoadbalancing/{serviceName}/tcp/farm/{farmId}/server/{serverId}` — Update a farm server

## List TCP farms

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

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

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your IP load balancing |
| `vrackNetworkId` | query | integer |  | Filter the value of vrackNetworkId property (=) |
| `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/farm" \
  -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/farm")

# 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/farm");

print_r($result);
?>
```

## Create a TCP farm

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

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

**Status:** Stable production version  
**IAM actions:** `loadbalancer:apiovh:tcp/farm/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 |
| --- | --- | --- | --- |
| `balance` | ipLoadbalancing.BalanceTCPEnum |  | Load balancing algorithm. 'roundrobin' if null — one of `first`, `leastconn`, `roundrobin`, `source` |
| `displayName` | string |  | Human readable name for your backend, this field is for you |
| `port` | integer |  | Port attached to your farm ([1..49151]). Inherited from frontend if null |
| `probe` | ipLoadbalancing.BackendProbe |  | Probe used to determine if a backend is alive and can handle requests |
| `probe.forceSsl` | boolean |  | Force probe to run over a SSL layer. Defaults to false |
| `probe.interval` | integer |  | Seconds between each probe check. Must be > 30sec. Defaults to 30 |
| `probe.match` | ipLoadbalancing.ProbeExpectMatchEnum |  | Matcher to use to valide "expect". "default" uses HAProxy's default behavior for this type of check. "status" is only supported for HTTP probes — one of `contains`, `default`, `internal`, `matches`, `status` |
| `probe.method` | ipLoadbalancing.ProbeMethodEnum |  | HTTP method to use with "http" probe. Consider using HEAD to save bandwidth when possible. Defaults to "GET" — one of `GET`, `HEAD`, `OPTIONS`, `internal` |
| `probe.negate` | boolean |  | Invert the matching operator effect |
| `probe.pattern` | string |  | Server response expected when UP. Empty for "default", comma delimited list of statuses for "status", string for "contains", regex for "matches" |
| `probe.port` | integer |  | Port used to probe your backend. Equal to farm port if null. Ignored for oco probe type |
| `probe.type` | ipLoadbalancing.ProbeTypeEnum |  | Probe type. "tcp" if null — one of `http`, `internal`, `mysql`, `oco`, `pgsql`, `smtp`, `tcp` |
| `probe.url` | string |  | URL to use for HTTP probes of the form [www.example.com]/path/to/check. Protocol will be ignored. Defaults to "/" |
| `stickiness` | ipLoadbalancing.StickinessTCPEnum |  | Stickiness type. No stickiness if null — one of `sourceIp` |
| `vrackNetworkId` | integer |  | Internal Load Balancer identifier of the vRack private network to attach to your farm, mandatory when your Load Balancer is attached to a vRack |
| `zone` | string | yes | Zone of your farm |

```json
{
  "balance": "first",
  "displayName": "string",
  "port": 0,
  "probe": {
    "forceSsl": true,
    "interval": 0,
    "match": "contains",
    "method": "GET",
    "negate": true,
    "pattern": "string",
    "port": 0,
    "type": "http",
    "url": "string"
  },
  "stickiness": "sourceIp",
  "vrackNetworkId": 0,
  "zone": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | ipLoadbalancing.backendTcp.BackendTcp | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `balance` | ipLoadbalancing.BalanceTCPEnum |  | Load balancing algorithm. 'roundrobin' if null — one of `first`, `leastconn`, `roundrobin`, `source` |
| `displayName` | string |  | Human readable name for your backend, this field is for you |
| `farmId` | integer | read-only | Id of your farm |
| `port` | integer |  | Port attached to your farm. Inherited from frontend if null |
| `probe` | ipLoadbalancing.BackendProbe |  | Probe used to determine if a backend is alive and can handle requests. Defaults to tcp on the same port as the farm |
| `probe.forceSsl` | boolean |  | Force probe to run over a SSL layer. Defaults to false |
| `probe.interval` | integer |  | Seconds between each probe check. Must be > 30sec. Defaults to 30 |
| `probe.match` | ipLoadbalancing.ProbeExpectMatchEnum |  | Matcher to use to valide "expect". "default" uses HAProxy's default behavior for this type of check. "status" is only supported for HTTP probes — one of `contains`, `default`, `internal`, `matches`, `status` |
| `probe.method` | ipLoadbalancing.ProbeMethodEnum |  | HTTP method to use with "http" probe. Consider using HEAD to save bandwidth when possible. Defaults to "GET" — one of `GET`, `HEAD`, `OPTIONS`, `internal` |
| `probe.negate` | boolean |  | Invert the matching operator effect |
| `probe.pattern` | string |  | Server response expected when UP. Empty for "default", comma delimited list of statuses for "status", string for "contains", regex for "matches" |
| `probe.port` | integer |  | Port used to probe your backend. Equal to farm port if null. Ignored for oco probe type |
| `probe.type` | ipLoadbalancing.ProbeTypeEnum |  | Probe type. "tcp" if null — one of `http`, `internal`, `mysql`, `oco`, `pgsql`, `smtp`, `tcp` |
| `probe.url` | string |  | URL to use for HTTP probes of the form [www.example.com]/path/to/check. Protocol will be ignored. Defaults to "/" |
| `stickiness` | ipLoadbalancing.StickinessTCPEnum |  | Stickiness type. No stickiness if null — one of `sourceIp` |
| `vrackNetworkId` | integer |  | Internal Load Balancer identifier of the vRack private network attached to your farm, mandatory when your Load Balancer is attached to a vRack |
| `zone` | string | read-only | Zone of you farm |

```json
{
  "balance": "first",
  "displayName": "string",
  "farmId": 0,
  "port": 0,
  "probe": {
    "forceSsl": true,
    "interval": 0,
    "match": "contains",
    "method": "GET",
    "negate": true,
    "pattern": "string",
    "port": 0,
    "type": "http",
    "url": "string"
  },
  "stickiness": "sourceIp",
  "vrackNetworkId": 0,
  "zone": "string"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/ipLoadbalancing/{serviceName}/tcp/farm" \
  -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/farm",
	balance = None, # Load balancing algorithm. 'roundrobin' if null (type: ipLoadbalancing.BalanceTCPEnum, nullable)
	displayName = None, # Human readable name for your backend, this field is for you (type: string, nullable)
	port = None, # Port attached to your farm ([1..49151]). Inherited from frontend if null (type: long, nullable)
	probe = None, # Probe used to determine if a backend is alive and can handle requests (type: ipLoadbalancing.BackendProbe, nullable)
	stickiness = None, # Stickiness type. No stickiness if null (type: ipLoadbalancing.StickinessTCPEnum, nullable)
	vrackNetworkId = None, # Internal Load Balancer identifier of the vRack private network to attach to your farm, mandatory when your Load Balancer is attached to a vRack (type: long, nullable)
	zone = None, # Zone of your farm (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/farm", array(
	balance => null, // Load balancing algorithm. 'roundrobin' if null (type: ipLoadbalancing.BalanceTCPEnum, nullable)
	displayName => null, // Human readable name for your backend, this field is for you (type: string, nullable)
	port => null, // Port attached to your farm ([1..49151]). Inherited from frontend if null (type: long, nullable)
	probe => null, // Probe used to determine if a backend is alive and can handle requests (type: ipLoadbalancing.BackendProbe, nullable)
	stickiness => null, // Stickiness type. No stickiness if null (type: ipLoadbalancing.StickinessTCPEnum, nullable)
	vrackNetworkId => null, // Internal Load Balancer identifier of the vRack private network to attach to your farm, mandatory when your Load Balancer is attached to a vRack (type: long, nullable)
	zone => null, // Zone of your farm (type: string)
));

print_r($result);
?>
```

## Get a TCP farm

`GET /1.0/ipLoadbalancing/{serviceName}/tcp/farm/{farmId}`

Link: https://developers.eu.ovhcloud.com/reference/network/load-balancer/farms/tcp/#get-iploadbalancing-servicename-tcp-farm-farmid

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

### Parameters

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

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | ipLoadbalancing.backendTcp.BackendTcp | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `balance` | ipLoadbalancing.BalanceTCPEnum |  | Load balancing algorithm. 'roundrobin' if null — one of `first`, `leastconn`, `roundrobin`, `source` |
| `displayName` | string |  | Human readable name for your backend, this field is for you |
| `farmId` | integer | read-only | Id of your farm |
| `port` | integer |  | Port attached to your farm. Inherited from frontend if null |
| `probe` | ipLoadbalancing.BackendProbe |  | Probe used to determine if a backend is alive and can handle requests. Defaults to tcp on the same port as the farm |
| `probe.forceSsl` | boolean |  | Force probe to run over a SSL layer. Defaults to false |
| `probe.interval` | integer |  | Seconds between each probe check. Must be > 30sec. Defaults to 30 |
| `probe.match` | ipLoadbalancing.ProbeExpectMatchEnum |  | Matcher to use to valide "expect". "default" uses HAProxy's default behavior for this type of check. "status" is only supported for HTTP probes — one of `contains`, `default`, `internal`, `matches`, `status` |
| `probe.method` | ipLoadbalancing.ProbeMethodEnum |  | HTTP method to use with "http" probe. Consider using HEAD to save bandwidth when possible. Defaults to "GET" — one of `GET`, `HEAD`, `OPTIONS`, `internal` |
| `probe.negate` | boolean |  | Invert the matching operator effect |
| `probe.pattern` | string |  | Server response expected when UP. Empty for "default", comma delimited list of statuses for "status", string for "contains", regex for "matches" |
| `probe.port` | integer |  | Port used to probe your backend. Equal to farm port if null. Ignored for oco probe type |
| `probe.type` | ipLoadbalancing.ProbeTypeEnum |  | Probe type. "tcp" if null — one of `http`, `internal`, `mysql`, `oco`, `pgsql`, `smtp`, `tcp` |
| `probe.url` | string |  | URL to use for HTTP probes of the form [www.example.com]/path/to/check. Protocol will be ignored. Defaults to "/" |
| `stickiness` | ipLoadbalancing.StickinessTCPEnum |  | Stickiness type. No stickiness if null — one of `sourceIp` |
| `vrackNetworkId` | integer |  | Internal Load Balancer identifier of the vRack private network attached to your farm, mandatory when your Load Balancer is attached to a vRack |
| `zone` | string | read-only | Zone of you farm |

```json
{
  "balance": "first",
  "displayName": "string",
  "farmId": 0,
  "port": 0,
  "probe": {
    "forceSsl": true,
    "interval": 0,
    "match": "contains",
    "method": "GET",
    "negate": true,
    "pattern": "string",
    "port": 0,
    "type": "http",
    "url": "string"
  },
  "stickiness": "sourceIp",
  "vrackNetworkId": 0,
  "zone": "string"
}
```

### Example

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

# 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/farm/{farmId}");

print_r($result);
?>
```

## Delete a TCP farm

`DELETE /1.0/ipLoadbalancing/{serviceName}/tcp/farm/{farmId}`

Link: https://developers.eu.ovhcloud.com/reference/network/load-balancer/farms/tcp/#delete-iploadbalancing-servicename-tcp-farm-farmid

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `farmId` | path | integer | yes | Id of your farm |
| `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/farm/{farmId}" \
  -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/farm/{farmId}")

# 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/farm/{farmId}");

print_r($result);
?>
```

## Update a TCP farm

`PUT /1.0/ipLoadbalancing/{serviceName}/tcp/farm/{farmId}`

Link: https://developers.eu.ovhcloud.com/reference/network/load-balancer/farms/tcp/#put-iploadbalancing-servicename-tcp-farm-farmid

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

### Parameters

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

### Request body (required)

Type: `ipLoadbalancing.backendTcp.BackendTcp`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `balance` | ipLoadbalancing.BalanceTCPEnum |  | Load balancing algorithm. 'roundrobin' if null — one of `first`, `leastconn`, `roundrobin`, `source` |
| `displayName` | string |  | Human readable name for your backend, this field is for you |
| `farmId` | integer | read-only | Id of your farm |
| `port` | integer |  | Port attached to your farm. Inherited from frontend if null |
| `probe` | ipLoadbalancing.BackendProbe |  | Probe used to determine if a backend is alive and can handle requests. Defaults to tcp on the same port as the farm |
| `probe.forceSsl` | boolean |  | Force probe to run over a SSL layer. Defaults to false |
| `probe.interval` | integer |  | Seconds between each probe check. Must be > 30sec. Defaults to 30 |
| `probe.match` | ipLoadbalancing.ProbeExpectMatchEnum |  | Matcher to use to valide "expect". "default" uses HAProxy's default behavior for this type of check. "status" is only supported for HTTP probes — one of `contains`, `default`, `internal`, `matches`, `status` |
| `probe.method` | ipLoadbalancing.ProbeMethodEnum |  | HTTP method to use with "http" probe. Consider using HEAD to save bandwidth when possible. Defaults to "GET" — one of `GET`, `HEAD`, `OPTIONS`, `internal` |
| `probe.negate` | boolean |  | Invert the matching operator effect |
| `probe.pattern` | string |  | Server response expected when UP. Empty for "default", comma delimited list of statuses for "status", string for "contains", regex for "matches" |
| `probe.port` | integer |  | Port used to probe your backend. Equal to farm port if null. Ignored for oco probe type |
| `probe.type` | ipLoadbalancing.ProbeTypeEnum |  | Probe type. "tcp" if null — one of `http`, `internal`, `mysql`, `oco`, `pgsql`, `smtp`, `tcp` |
| `probe.url` | string |  | URL to use for HTTP probes of the form [www.example.com]/path/to/check. Protocol will be ignored. Defaults to "/" |
| `stickiness` | ipLoadbalancing.StickinessTCPEnum |  | Stickiness type. No stickiness if null — one of `sourceIp` |
| `vrackNetworkId` | integer |  | Internal Load Balancer identifier of the vRack private network attached to your farm, mandatory when your Load Balancer is attached to a vRack |
| `zone` | string | read-only | Zone of you farm |

```json
{
  "balance": "first",
  "displayName": "string",
  "port": 0,
  "probe": {
    "forceSsl": true,
    "interval": 0,
    "match": "contains",
    "method": "GET",
    "negate": true,
    "pattern": "string",
    "port": 0,
    "type": "http",
    "url": "string"
  },
  "stickiness": "sourceIp",
  "vrackNetworkId": 0
}
```

### Responses

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

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/ipLoadbalancing/{serviceName}/tcp/farm/{farmId}" \
  -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.backendTcp.BackendTcp
result = client.put("/ipLoadbalancing/{serviceName}/tcp/farm/{farmId}",
	balance = None, # Load balancing algorithm. 'roundrobin' if null (type: ipLoadbalancing.BalanceTCPEnum, nullable)
	displayName = None, # Human readable name for your backend, this field is for you (type: string, nullable)
	port = None, # Port attached to your farm. Inherited from frontend if null (type: integer, nullable)
	probe = None, # Probe used to determine if a backend is alive and can handle requests. Defaults to tcp on the same port as the farm (type: ipLoadbalancing.BackendProbe, nullable)
	stickiness = None, # Stickiness type. No stickiness if null (type: ipLoadbalancing.StickinessTCPEnum, nullable)
	vrackNetworkId = None, # Internal Load Balancer identifier of the vRack private network attached to your farm, mandatory when your Load Balancer is attached to a vRack (type: integer, 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.backendTcp.BackendTcp
$result = $ovh->put("/ipLoadbalancing/{serviceName}/tcp/farm/{farmId}", array(
	balance => null, // Load balancing algorithm. 'roundrobin' if null (type: ipLoadbalancing.BalanceTCPEnum, nullable)
	displayName => null, // Human readable name for your backend, this field is for you (type: string, nullable)
	port => null, // Port attached to your farm. Inherited from frontend if null (type: integer, nullable)
	probe => null, // Probe used to determine if a backend is alive and can handle requests. Defaults to tcp on the same port as the farm (type: ipLoadbalancing.BackendProbe, nullable)
	stickiness => null, // Stickiness type. No stickiness if null (type: ipLoadbalancing.StickinessTCPEnum, nullable)
	vrackNetworkId => null, // Internal Load Balancer identifier of the vRack private network attached to your farm, mandatory when your Load Balancer is attached to a vRack (type: integer, nullable)
));

print_r($result);
?>
```

## List farm servers

`GET /1.0/ipLoadbalancing/{serviceName}/tcp/farm/{farmId}/server`

Link: https://developers.eu.ovhcloud.com/reference/network/load-balancer/farms/tcp/#get-iploadbalancing-servicename-tcp-farm-farmid-server

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `address` | query | ipv4 |  | Filter the value of address property (=) |
| `farmId` | path | integer | yes | Id of your farm |
| `serviceName` | path | string | yes | The internal name of your IP load balancing |
| `status` | query | ipLoadbalancing.BackendCustomerServerStatusEnum |  | Filter the value of status property (=) — one of `active`, `inactive` |

### 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/farm/{farmId}/server" \
  -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/farm/{farmId}/server")

# 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/farm/{farmId}/server");

print_r($result);
?>
```

## Create a farm server

`POST /1.0/ipLoadbalancing/{serviceName}/tcp/farm/{farmId}/server`

Link: https://developers.eu.ovhcloud.com/reference/network/load-balancer/farms/tcp/#post-iploadbalancing-servicename-tcp-farm-farmid-server

**Status:** Stable production version  
**IAM actions:** `loadbalancer:apiovh:tcp/farm/server/create`, `ip:apiovh:loadbalancer/allowAsBackend`

### Parameters

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

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `address` | ipv4 | yes | Address of your server |
| `backup` | boolean |  | Set server as backup. Default: 'false' |
| `chain` | string |  | Certificate chain. Allow server certificate verification (Avoid man-in-the-middle attacks) |
| `displayName` | string |  | Human readable name for your server, this field is for you |
| `onMarkedDown` | ipLoadbalancing.OnMarkedDownEnum |  | Enable action when backend marked down. (No action if null) — one of `shutdown-sessions` |
| `port` | integer |  | Port attached to your server ([1..49151]). Inherited from farm if null |
| `probe` | boolean |  | Enable/disable probe. Default: 'false' |
| `proxyProtocolVersion` | ipLoadbalancing.ProxyProtocolVersionEnum |  | Disabled if null. Send PROXY protocol header. Requires a compatible server. — one of `v1`, `v2`, `v2-ssl`, `v2-ssl-cn` |
| `ssl` | boolean |  | SSL ciphering. Probes will also be sent ciphered. Default: 'false' |
| `status` | ipLoadbalancing.BackendCustomerServerStatusEnum | yes | Enable or disable your server — one of `active`, `inactive` |
| `weight` | integer |  | Set weight on that server [1..256]. 0 if not used in load balancing. 1 if left null. Servers with higher weight get more requests. |

```json
{
  "address": "192.0.2.0",
  "backup": true,
  "chain": "string",
  "displayName": "string",
  "onMarkedDown": "shutdown-sessions",
  "port": 0,
  "probe": true,
  "proxyProtocolVersion": "v1",
  "ssl": true,
  "status": "active",
  "weight": 0
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | ipLoadbalancing.backendTcpCustomerServer.BackendTCPServer | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `address` | ipv4 | read-only | Address of your server |
| `backendId` | integer | read-only | Farm id |
| `backup` | boolean |  | Backup state. Default: 'false' |
| `chain` | string |  | Certificate chain. Allow server certificate verification (Avoid man-in-the-middle attacks) |
| `displayName` | string |  | Human readable name for your server, this field is for you |
| `onMarkedDown` | ipLoadbalancing.OnMarkedDownEnum |  | Set action when backend marked down. (No action if null) — one of `shutdown-sessions` |
| `port` | integer |  | Port attached to your server. Inherited from farm if null |
| `probe` | boolean |  | Probe state. Default: 'false' |
| `proxyProtocolVersion` | ipLoadbalancing.ProxyProtocolVersionEnum |  | Disabled if null. Send PROXY protocol header. Requires a compatible server. — one of `v1`, `v2`, `v2-ssl`, `v2-ssl-cn` |
| `serverId` | integer | read-only | Id of your server |
| `serverState` | ipLoadbalancing.ServerState[] | read-only | Server state |
| `serverState[].checkCode` | string |  | Layer5-7 code, if available |
| `serverState[].checkStatus` | string |  | Status of last health check |
| `serverState[].checkTime` | string (date-time) |  | Time of last health check |
| `serverState[].instanceId` | integer |  | Id of your instance |
| `serverState[].lastCheckContent` | string |  | Last health check contents or textual error |
| `serverState[].status` | string |  | Status |
| `ssl` | boolean |  | SSL ciphering. Probes will also be sent ciphered |
| `status` | ipLoadbalancing.BackendCustomerServerStatusEnum |  | Status attached to your server — one of `active`, `inactive` |
| `weight` | integer |  | Weight value. Defaults to 1. 0 if not used in load balancing. Servers with higher weight get more requests. |

```json
{
  "address": "192.0.2.0",
  "backendId": 0,
  "backup": true,
  "chain": "string",
  "displayName": "string",
  "onMarkedDown": "shutdown-sessions",
  "port": 0,
  "probe": true,
  "proxyProtocolVersion": "v1",
  "serverId": 0,
  "serverState": [
    {
      "checkCode": "string",
      "checkStatus": "string",
      "checkTime": "2024-01-01T12:00:00Z",
      "instanceId": 0,
      "lastCheckContent": "string",
      "status": "string"
    }
  ],
  "ssl": true,
  "status": "active",
  "weight": 0
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/ipLoadbalancing/{serviceName}/tcp/farm/{farmId}/server" \
  -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: long
result = client.post("/ipLoadbalancing/{serviceName}/tcp/farm/{farmId}/server",
	address = None, # Address of your server (type: ipv4)
	backup = None, # Set server as backup. Default: 'false' (type: boolean, nullable)
	chain = None, # Certificate chain. Allow server certificate verification (Avoid man-in-the-middle attacks) (type: text, nullable)
	displayName = None, # Human readable name for your server, this field is for you (type: string, nullable)
	onMarkedDown = None, # Enable action when backend marked down. (No action if null) (type: ipLoadbalancing.OnMarkedDownEnum, nullable)
	port = None, # Port attached to your server ([1..49151]). Inherited from farm if null (type: long, nullable)
	probe = None, # Enable/disable probe. Default: 'false' (type: boolean, nullable)
	proxyProtocolVersion = None, # Disabled if null. Send PROXY protocol header. Requires a compatible server. (type: ipLoadbalancing.ProxyProtocolVersionEnum, nullable)
	ssl = None, # SSL ciphering. Probes will also be sent ciphered. Default: 'false' (type: boolean, nullable)
	status = None, # Enable or disable your server (type: ipLoadbalancing.BackendCustomerServerStatusEnum)
	weight = None, # Set weight on that server [1..256]. 0 if not used in load balancing. 1 if left null. Servers with higher weight get more requests. (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

// Request body type: long
$result = $ovh->post("/ipLoadbalancing/{serviceName}/tcp/farm/{farmId}/server", array(
	address => null, // Address of your server (type: ipv4)
	backup => null, // Set server as backup. Default: 'false' (type: boolean, nullable)
	chain => null, // Certificate chain. Allow server certificate verification (Avoid man-in-the-middle attacks) (type: text, nullable)
	displayName => null, // Human readable name for your server, this field is for you (type: string, nullable)
	onMarkedDown => null, // Enable action when backend marked down. (No action if null) (type: ipLoadbalancing.OnMarkedDownEnum, nullable)
	port => null, // Port attached to your server ([1..49151]). Inherited from farm if null (type: long, nullable)
	probe => null, // Enable/disable probe. Default: 'false' (type: boolean, nullable)
	proxyProtocolVersion => null, // Disabled if null. Send PROXY protocol header. Requires a compatible server. (type: ipLoadbalancing.ProxyProtocolVersionEnum, nullable)
	ssl => null, // SSL ciphering. Probes will also be sent ciphered. Default: 'false' (type: boolean, nullable)
	status => null, // Enable or disable your server (type: ipLoadbalancing.BackendCustomerServerStatusEnum)
	weight => null, // Set weight on that server [1..256]. 0 if not used in load balancing. 1 if left null. Servers with higher weight get more requests. (type: long, nullable)
));

print_r($result);
?>
```

## Get a farm server

`GET /1.0/ipLoadbalancing/{serviceName}/tcp/farm/{farmId}/server/{serverId}`

Link: https://developers.eu.ovhcloud.com/reference/network/load-balancer/farms/tcp/#get-iploadbalancing-servicename-tcp-farm-farmid-server-serverid

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `farmId` | path | integer | yes | Id of your farm |
| `serverId` | path | integer | yes | Id of your server |
| `serviceName` | path | string | yes | The internal name of your IP load balancing |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | ipLoadbalancing.backendTcpCustomerServer.BackendTCPServer | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `address` | ipv4 | read-only | Address of your server |
| `backendId` | integer | read-only | Farm id |
| `backup` | boolean |  | Backup state. Default: 'false' |
| `chain` | string |  | Certificate chain. Allow server certificate verification (Avoid man-in-the-middle attacks) |
| `displayName` | string |  | Human readable name for your server, this field is for you |
| `onMarkedDown` | ipLoadbalancing.OnMarkedDownEnum |  | Set action when backend marked down. (No action if null) — one of `shutdown-sessions` |
| `port` | integer |  | Port attached to your server. Inherited from farm if null |
| `probe` | boolean |  | Probe state. Default: 'false' |
| `proxyProtocolVersion` | ipLoadbalancing.ProxyProtocolVersionEnum |  | Disabled if null. Send PROXY protocol header. Requires a compatible server. — one of `v1`, `v2`, `v2-ssl`, `v2-ssl-cn` |
| `serverId` | integer | read-only | Id of your server |
| `serverState` | ipLoadbalancing.ServerState[] | read-only | Server state |
| `serverState[].checkCode` | string |  | Layer5-7 code, if available |
| `serverState[].checkStatus` | string |  | Status of last health check |
| `serverState[].checkTime` | string (date-time) |  | Time of last health check |
| `serverState[].instanceId` | integer |  | Id of your instance |
| `serverState[].lastCheckContent` | string |  | Last health check contents or textual error |
| `serverState[].status` | string |  | Status |
| `ssl` | boolean |  | SSL ciphering. Probes will also be sent ciphered |
| `status` | ipLoadbalancing.BackendCustomerServerStatusEnum |  | Status attached to your server — one of `active`, `inactive` |
| `weight` | integer |  | Weight value. Defaults to 1. 0 if not used in load balancing. Servers with higher weight get more requests. |

```json
{
  "address": "192.0.2.0",
  "backendId": 0,
  "backup": true,
  "chain": "string",
  "displayName": "string",
  "onMarkedDown": "shutdown-sessions",
  "port": 0,
  "probe": true,
  "proxyProtocolVersion": "v1",
  "serverId": 0,
  "serverState": [
    {
      "checkCode": "string",
      "checkStatus": "string",
      "checkTime": "2024-01-01T12:00:00Z",
      "instanceId": 0,
      "lastCheckContent": "string",
      "status": "string"
    }
  ],
  "ssl": true,
  "status": "active",
  "weight": 0
}
```

### Example

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

# 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/farm/{farmId}/server/{serverId}");

print_r($result);
?>
```

## Delete a farm server

`DELETE /1.0/ipLoadbalancing/{serviceName}/tcp/farm/{farmId}/server/{serverId}`

Link: https://developers.eu.ovhcloud.com/reference/network/load-balancer/farms/tcp/#delete-iploadbalancing-servicename-tcp-farm-farmid-server-serverid

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `farmId` | path | integer | yes | Id of your farm |
| `serverId` | path | integer | yes | Id of your server |
| `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/farm/{farmId}/server/{serverId}" \
  -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/farm/{farmId}/server/{serverId}")

# 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/farm/{farmId}/server/{serverId}");

print_r($result);
?>
```

## Update a farm server

`PUT /1.0/ipLoadbalancing/{serviceName}/tcp/farm/{farmId}/server/{serverId}`

Link: https://developers.eu.ovhcloud.com/reference/network/load-balancer/farms/tcp/#put-iploadbalancing-servicename-tcp-farm-farmid-server-serverid

**Status:** Stable production version  
**IAM actions:** `loadbalancer:apiovh:tcp/farm/server/edit`, `ip:apiovh:loadbalancer/allowAsBackend`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `farmId` | path | integer | yes | Id of your farm |
| `serverId` | path | integer | yes | Id of your server |
| `serviceName` | path | string | yes | The internal name of your IP load balancing |

### Request body (required)

Type: `ipLoadbalancing.backendTcpCustomerServer.BackendTCPServer`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `address` | ipv4 | read-only | Address of your server |
| `backendId` | integer | read-only | Farm id |
| `backup` | boolean |  | Backup state. Default: 'false' |
| `chain` | string |  | Certificate chain. Allow server certificate verification (Avoid man-in-the-middle attacks) |
| `displayName` | string |  | Human readable name for your server, this field is for you |
| `onMarkedDown` | ipLoadbalancing.OnMarkedDownEnum |  | Set action when backend marked down. (No action if null) — one of `shutdown-sessions` |
| `port` | integer |  | Port attached to your server. Inherited from farm if null |
| `probe` | boolean |  | Probe state. Default: 'false' |
| `proxyProtocolVersion` | ipLoadbalancing.ProxyProtocolVersionEnum |  | Disabled if null. Send PROXY protocol header. Requires a compatible server. — one of `v1`, `v2`, `v2-ssl`, `v2-ssl-cn` |
| `serverId` | integer | read-only | Id of your server |
| `serverState` | ipLoadbalancing.ServerState[] | read-only | Server state |
| `serverState[].checkCode` | string |  | Layer5-7 code, if available |
| `serverState[].checkStatus` | string |  | Status of last health check |
| `serverState[].checkTime` | string (date-time) |  | Time of last health check |
| `serverState[].instanceId` | integer |  | Id of your instance |
| `serverState[].lastCheckContent` | string |  | Last health check contents or textual error |
| `serverState[].status` | string |  | Status |
| `ssl` | boolean |  | SSL ciphering. Probes will also be sent ciphered |
| `status` | ipLoadbalancing.BackendCustomerServerStatusEnum |  | Status attached to your server — one of `active`, `inactive` |
| `weight` | integer |  | Weight value. Defaults to 1. 0 if not used in load balancing. Servers with higher weight get more requests. |

```json
{
  "backup": true,
  "chain": "string",
  "displayName": "string",
  "onMarkedDown": "shutdown-sessions",
  "port": 0,
  "probe": true,
  "proxyProtocolVersion": "v1",
  "ssl": true,
  "status": "active",
  "weight": 0
}
```

### Responses

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

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/ipLoadbalancing/{serviceName}/tcp/farm/{farmId}/server/{serverId}" \
  -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.backendTcpCustomerServer.BackendTCPServer
result = client.put("/ipLoadbalancing/{serviceName}/tcp/farm/{farmId}/server/{serverId}",
	backup = None, # Backup state. Default: 'false' (type: boolean)
	chain = None, # Certificate chain. Allow server certificate verification (Avoid man-in-the-middle attacks) (type: string, nullable)
	displayName = None, # Human readable name for your server, this field is for you (type: string, nullable)
	onMarkedDown = None, # Set action when backend marked down. (No action if null) (type: ipLoadbalancing.OnMarkedDownEnum, nullable)
	port = None, # Port attached to your server. Inherited from farm if null (type: integer, nullable)
	probe = None, # Probe state. Default: 'false' (type: boolean)
	proxyProtocolVersion = None, # Disabled if null. Send PROXY protocol header. Requires a compatible server. (type: ipLoadbalancing.ProxyProtocolVersionEnum, nullable)
	ssl = None, # SSL ciphering. Probes will also be sent ciphered (type: boolean)
	status = None, # Status attached to your server (type: ipLoadbalancing.BackendCustomerServerStatusEnum)
	weight = None, # Weight value. Defaults to 1. 0 if not used in load balancing. Servers with higher weight get more requests. (type: integer, 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.backendTcpCustomerServer.BackendTCPServer
$result = $ovh->put("/ipLoadbalancing/{serviceName}/tcp/farm/{farmId}/server/{serverId}", array(
	backup => null, // Backup state. Default: 'false' (type: boolean)
	chain => null, // Certificate chain. Allow server certificate verification (Avoid man-in-the-middle attacks) (type: string, nullable)
	displayName => null, // Human readable name for your server, this field is for you (type: string, nullable)
	onMarkedDown => null, // Set action when backend marked down. (No action if null) (type: ipLoadbalancing.OnMarkedDownEnum, nullable)
	port => null, // Port attached to your server. Inherited from farm if null (type: integer, nullable)
	probe => null, // Probe state. Default: 'false' (type: boolean)
	proxyProtocolVersion => null, // Disabled if null. Send PROXY protocol header. Requires a compatible server. (type: ipLoadbalancing.ProxyProtocolVersionEnum, nullable)
	ssl => null, // SSL ciphering. Probes will also be sent ciphered (type: boolean)
	status => null, // Status attached to your server (type: ipLoadbalancing.BackendCustomerServerStatusEnum)
	weight => null, // Weight value. Defaults to 1. 0 if not used in load balancing. Servers with higher weight get more requests. (type: integer, nullable)
));

print_r($result);
?>
```
