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

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

## Operations

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

## List UDP farms

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

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

**Status:** Beta version  
**IAM actions:** `loadbalancer:apiovh:udp/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}/udp/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}/udp/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}/udp/farm");

print_r($result);
?>
```

## Create a UDP farm

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

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

**Status:** Beta version  
**IAM actions:** `loadbalancer:apiovh:udp/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 |
| --- | --- | --- | --- |
| `displayName` | string |  | Human readable name for your backend, this field is for you |
| `port` | integer | yes | Port attached to your farm ([1..49151]). Inherited from frontend if null |
| `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
{
  "displayName": "string",
  "port": 0,
  "vrackNetworkId": 0,
  "zone": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | ipLoadbalancing.backendUdp.BackendUdp | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `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 |
| `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
{
  "displayName": "string",
  "farmId": 0,
  "port": 0,
  "vrackNetworkId": 0,
  "zone": "string"
}
```

### Example

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

result = client.post("/ipLoadbalancing/{serviceName}/udp/farm",
	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)
	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

$result = $ovh->post("/ipLoadbalancing/{serviceName}/udp/farm", array(
	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)
	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 UDP farm

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

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

**Status:** Beta version  
**IAM actions:** `loadbalancer:apiovh:udp/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.backendUdp.BackendUdp | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `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 |
| `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
{
  "displayName": "string",
  "farmId": 0,
  "port": 0,
  "vrackNetworkId": 0,
  "zone": "string"
}
```

### Example

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

print_r($result);
?>
```

## Delete a UDP farm

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

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

**Status:** Beta version  
**IAM actions:** `loadbalancer:apiovh:udp/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}/udp/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}/udp/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}/udp/farm/{farmId}");

print_r($result);
?>
```

## Update a UDP farm

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

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

**Status:** Beta version  
**IAM actions:** `loadbalancer:apiovh:udp/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.backendUdp.BackendUdp`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `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 |
| `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
{
  "displayName": "string",
  "port": 0,
  "vrackNetworkId": 0
}
```

### Responses

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

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/ipLoadbalancing/{serviceName}/udp/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.backendUdp.BackendUdp
result = client.put("/ipLoadbalancing/{serviceName}/udp/farm/{farmId}",
	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)
	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.backendUdp.BackendUdp
$result = $ovh->put("/ipLoadbalancing/{serviceName}/udp/farm/{farmId}", array(
	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)
	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}/udp/farm/{farmId}/server`

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

**Status:** Beta version  
**IAM actions:** `loadbalancer:apiovh:udp/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}/udp/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}/udp/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}/udp/farm/{farmId}/server");

print_r($result);
?>
```

## Create a farm server

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

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

**Status:** Beta version  
**IAM actions:** `loadbalancer:apiovh:udp/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 |
| `displayName` | string |  | Human readable name for your server, this field is for you |
| `port` | integer |  | Port attached to your server ([1..49151]). Inherited from farm if null |
| `status` | ipLoadbalancing.BackendCustomerServerStatusEnum | yes | Enable or disable your server — one of `active`, `inactive` |

```json
{
  "address": "192.0.2.0",
  "displayName": "string",
  "port": 0,
  "status": "active"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | ipLoadbalancing.backendUdpCustomerServer.BackendUDPServer | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `address` | ipv4 | read-only | Address of your server |
| `backendId` | integer | read-only | farm id |
| `displayName` | string |  | Human readable name for your server, this field is for you |
| `port` | integer |  | Port attached to your server. Inherited from farm if null |
| `serverId` | integer | read-only | Id of your server |
| `status` | ipLoadbalancing.BackendCustomerServerStatusEnum |  | Status attached to your server — one of `active`, `inactive` |

```json
{
  "address": "192.0.2.0",
  "backendId": 0,
  "displayName": "string",
  "port": 0,
  "serverId": 0,
  "status": "active"
}
```

### Example

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

result = client.post("/ipLoadbalancing/{serviceName}/udp/farm/{farmId}/server",
	address = None, # Address of your server (type: ipv4)
	displayName = None, # Human readable name for your server, this field is for you (type: string, nullable)
	port = None, # Port attached to your server ([1..49151]). Inherited from farm if null (type: long, nullable)
	status = None, # Enable or disable your server (type: ipLoadbalancing.BackendCustomerServerStatusEnum)
)

# 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}/udp/farm/{farmId}/server", array(
	address => null, // Address of your server (type: ipv4)
	displayName => null, // Human readable name for your server, this field is for you (type: string, nullable)
	port => null, // Port attached to your server ([1..49151]). Inherited from farm if null (type: long, nullable)
	status => null, // Enable or disable your server (type: ipLoadbalancing.BackendCustomerServerStatusEnum)
));

print_r($result);
?>
```

## Get a farm server

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

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

**Status:** Beta version  
**IAM actions:** `loadbalancer:apiovh:udp/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.backendUdpCustomerServer.BackendUDPServer | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `address` | ipv4 | read-only | Address of your server |
| `backendId` | integer | read-only | farm id |
| `displayName` | string |  | Human readable name for your server, this field is for you |
| `port` | integer |  | Port attached to your server. Inherited from farm if null |
| `serverId` | integer | read-only | Id of your server |
| `status` | ipLoadbalancing.BackendCustomerServerStatusEnum |  | Status attached to your server — one of `active`, `inactive` |

```json
{
  "address": "192.0.2.0",
  "backendId": 0,
  "displayName": "string",
  "port": 0,
  "serverId": 0,
  "status": "active"
}
```

### Example

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

print_r($result);
?>
```

## Delete a farm server

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

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

**Status:** Beta version  
**IAM actions:** `loadbalancer:apiovh:udp/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}/udp/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}/udp/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}/udp/farm/{farmId}/server/{serverId}");

print_r($result);
?>
```

## Update a farm server

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

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

**Status:** Beta version  
**IAM actions:** `loadbalancer:apiovh:udp/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.backendUdpCustomerServer.BackendUDPServer`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `address` | ipv4 | read-only | Address of your server |
| `backendId` | integer | read-only | farm id |
| `displayName` | string |  | Human readable name for your server, this field is for you |
| `port` | integer |  | Port attached to your server. Inherited from farm if null |
| `serverId` | integer | read-only | Id of your server |
| `status` | ipLoadbalancing.BackendCustomerServerStatusEnum |  | Status attached to your server — one of `active`, `inactive` |

```json
{
  "displayName": "string",
  "port": 0,
  "status": "active"
}
```

### Responses

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

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/ipLoadbalancing/{serviceName}/udp/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.backendUdpCustomerServer.BackendUDPServer
result = client.put("/ipLoadbalancing/{serviceName}/udp/farm/{farmId}/server/{serverId}",
	displayName = None, # Human readable name for your server, this field is for you (type: string, nullable)
	port = None, # Port attached to your server. Inherited from farm if null (type: integer, nullable)
	status = None, # Status attached to your server (type: ipLoadbalancing.BackendCustomerServerStatusEnum)
)

# 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.backendUdpCustomerServer.BackendUDPServer
$result = $ovh->put("/ipLoadbalancing/{serviceName}/udp/farm/{farmId}/server/{serverId}", array(
	displayName => null, // Human readable name for your server, this field is for you (type: string, nullable)
	port => null, // Port attached to your server. Inherited from farm if null (type: integer, nullable)
	status => null, // Status attached to your server (type: ipLoadbalancing.BackendCustomerServerStatusEnum)
));

print_r($result);
?>
```
