# Public Cloud › Network › Load Balancer API

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

> 5 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/public-cloud/network/load-balancer/

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

## Operations

- `GET /publicCloud/project/{projectId}/loadbalancer` — List load balancers
- `GET /publicCloud/project/{projectId}/loadbalancer/{loadbalancerId}` — Get a load balancer
- `POST /publicCloud/project/{projectId}/loadbalancer` — Create a load balancer
- `DELETE /publicCloud/project/{projectId}/loadbalancer/{loadbalancerId}` — Delete a load balancer
- `PUT /publicCloud/project/{projectId}/loadbalancer/{loadbalancerId}` — Update a load balancer

## List load balancers

`GET /v2/publicCloud/project/{projectId}/loadbalancer`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/network/load-balancer/#getLoadBalancers

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

Returns the load balancers of the project.

### Filters
The optional `name`, `flavor` and `region` query parameters narrow the list. Each one can be repeated (for example `?flavor=SMALL&flavor=MEDIUM`): repeated values of the same parameter are combined with OR, and different parameters are combined with AND. An unknown `flavor` value, or an unavailable `region`, is rejected with a `400 InvalidParameter`. The `resourceStatus` is computed from the live state of each resource, so it is not a filter: a `status` query parameter is rejected with a `400 InvalidParameter`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `X-Pagination-Cursor` | header | string |  | Pagination cursor |
| `X-Pagination-Size` | header | integer |  | Pagination size |
| `flavor` | query | publicCloud.loadbalancer.LoadbalancerFlavorNameEnum[] |  | Filter by load balancer flavor name. Repeatable. |
| `name` | query | string[] |  | Filter by load balancer name (case-insensitive substring match). Repeatable. |
| `projectId` | path | string | yes | Project ID |
| `region` | query | string[] |  | Filter by load balancer region. An unavailable region is rejected. Repeatable. |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.loadbalancer.Loadbalancer[] | successful operation |
| 400 | object | Error 400 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string | read-only | Computed hash representing the current target specification value |
| `createdAt` | string (date-time) | read-only | Creation date of the load balancer |
| `currentState` | publicCloud.loadbalancer.LoadbalancerCurrentState | read-only | Current state of the load balancer |
| `currentState.description` | string | read-only | Load balancer description |
| `currentState.flavor` | publicCloud.loadbalancer.LoadbalancerFlavorRef | read-only | Octavia flavor |
| `currentState.flavor.name` | publicCloud.loadbalancer.LoadbalancerFlavorNameEnum | yes | Octavia flavor name — one of `LARGE`, `MEDIUM`, `SMALL`, `XL` |
| `currentState.location` | publicCloud.common.Location | read-only | Location details |
| `currentState.location.availabilityZone` | string |  | Availability zone within the region |
| `currentState.location.region` | string | yes | Region code |
| `currentState.name` | string | read-only | Load balancer name |
| `currentState.network` | publicCloud.loadbalancer.LoadbalancerNetwork | read-only | Frontend network the virtual IP port lives in, with every address the VIP is reachable at reported through its addresses list. The FIXED address of the port, plus a FLOATING entry when a floating IP is associated with it. |
| `currentState.network.addresses` | publicCloud.loadbalancer.LoadbalancerNetworkAddress[] | read-only | Addresses through which the virtual IP is reachable. Always contains the FIXED address of the VIP port, plus a FLOATING entry when a floating IP is associated with that port. |
| `currentState.network.id` | string (uuid) | read-only | Identifier of the private network the VIP port lives in |
| `currentState.network.subnetId` | string (uuid) | read-only | Identifier of the subnet the VIP port draws its fixed address from |
| `currentState.operatingStatus` | publicCloud.loadbalancer.LoadbalancerOperatingStatusEnum | read-only | Whether the load balancer is currently serving traffic, as observed on the platform. This is distinct from its provisioning status, which tracks whether your configuration has been applied. — one of `DEGRADED`, `DRAINING`, `ERROR`, `NO_MONITOR`, `OFFLINE`, `ONLINE` |
| `currentState.provisioningStatus` | publicCloud.loadbalancer.LoadbalancerProvisioningStatusEnum | read-only | Provisioning status in OpenStack — one of `ACTIVE`, `DELETED`, `ERROR`, `PENDING_CREATE`, `PENDING_DELETE`, `PENDING_UPDATE` |
| `currentTasks` | common.CurrentTask[] | read-only | Ongoing asynchronous tasks related to the load balancer |
| `currentTasks[].errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `currentTasks[].errors[].message` | string | read-only | Error description |
| `currentTasks[].id` | string (uuid) | read-only | Identifier of the current task |
| `currentTasks[].link` | string | read-only | Link to the task details |
| `currentTasks[].status` | common.CurrentTaskStatusEnum | read-only | Current global status of the current task — one of `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `currentTasks[].type` | string | read-only | Type of the current task |
| `id` | string (uuid) | read-only | Unique identifier of the load balancer |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Load balancer readiness in the system — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `targetSpec` | publicCloud.loadbalancer.LoadbalancerTargetSpec | read-only | Last target specification of the load balancer |
| `targetSpec.description` | string |  | Load balancer description |
| `targetSpec.flavor` | publicCloud.loadbalancer.LoadbalancerFlavorRef | yes | Octavia flavor reference |
| `targetSpec.flavor.name` | publicCloud.loadbalancer.LoadbalancerFlavorNameEnum | yes | Octavia flavor name — one of `LARGE`, `MEDIUM`, `SMALL`, `XL` |
| `targetSpec.location` | publicCloud.common.Location | yes | Target location |
| `targetSpec.location.availabilityZone` | string |  | Availability zone within the region |
| `targetSpec.location.region` | string | yes | Region code |
| `targetSpec.name` | string | yes | Load balancer name |
| `targetSpec.network` | publicCloud.loadbalancer.LoadbalancerNetworkRef | yes | Frontend network of the load balancer: the private network and subnet the virtual IP port is created in, and therefore the network its listeners are reachable from. The optional IP either pins the fixed VIP address (address inside the subnet CIDR) or designates an EXISTING floating IP to associate with the VIP port (address outside it). A public address requires the optional loadbalancer/usePublicIP IAM action. Immutable after creation. |
| `targetSpec.network.id` | string (uuid) |  | Identifier of the private network the VIP port is created in. This is the load balancer frontend network, from which its listeners are reachable. When omitted, the network of subnetId is used. Immutable after creation. |
| `targetSpec.network.ip` | ip |  | Address of the virtual IP, whose meaning depends on where it falls relative to the subnet CIDR. Inside the subnet CIDR: pins the fixed VIP address instead of letting IPAM assign it. The address must lie in the subnet allocation pool, must not be the subnet gateway address, and must not already be held by another port. Outside the subnet CIDR: designates an EXISTING floating IP of the project to associate with the VIP port. The floating IP is never created for you, must not already be associated with another port, and the subnet must be attached to a router with an external gateway. A public address requires the optional loadbalancer/usePublicIP IAM action. When omitted, the fixed VIP address is assigned by IPAM. Immutable after creation. |
| `targetSpec.network.subnetId` | string (uuid) | yes | Identifier of the subnet the VIP port draws its fixed address from. When id is given, the subnet must belong to that network. Immutable after creation. |
| `updatedAt` | string (date-time) | read-only | Last update date of the load balancer |

```json
[
  {
    "checksum": "string",
    "createdAt": "2024-01-01T12:00:00Z",
    "currentState": {
      "description": "string",
      "flavor": {
        "name": "LARGE"
      },
      "location": {
        "availabilityZone": "string",
        "region": "string"
      },
      "name": "string",
      "network": {
        "addresses": [
          {
            "ip": "192.0.2.0",
            "type": "FIXED"
          }
        ],
        "id": "00000000-0000-0000-0000-000000000000",
        "subnetId": "00000000-0000-0000-0000-000000000000"
      },
      "operatingStatus": "DEGRADED",
      "provisioningStatus": "ACTIVE"
    },
    "currentTasks": [
      {
        "errors": [
          {
            "message": "string"
          }
        ],
        "id": "00000000-0000-0000-0000-000000000000",
        "link": "string",
        "status": "ERROR",
        "type": "string"
      }
    ],
    "id": "00000000-0000-0000-0000-000000000000",
    "resourceStatus": "CREATING",
    "targetSpec": {
      "description": "string",
      "flavor": {
        "name": "LARGE"
      },
      "location": {
        "availabilityZone": "string",
        "region": "string"
      },
      "name": "string",
      "network": {
        "id": "00000000-0000-0000-0000-000000000000",
        "ip": "192.0.2.0",
        "subnetId": "00000000-0000-0000-0000-000000000000"
      }
    },
    "updatedAt": "2024-01-01T12:00:00Z"
  }
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/loadbalancer" \
  -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("/v2/publicCloud/project/{projectId}/loadbalancer")

# 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("/v2/publicCloud/project/{projectId}/loadbalancer");

print_r($result);
?>
```

## Get a load balancer

`GET /v2/publicCloud/project/{projectId}/loadbalancer/{loadbalancerId}`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/network/load-balancer/#getLoadBalancer

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

Returns the load balancer, including its VIP network and operating status.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `loadbalancerId` | path | string (uuid) | yes | Loadbalancer ID |
| `projectId` | path | string | yes | Project ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.loadbalancer.Loadbalancer | successful operation |
| 404 | object | Error 404 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string | read-only | Computed hash representing the current target specification value |
| `createdAt` | string (date-time) | read-only | Creation date of the load balancer |
| `currentState` | publicCloud.loadbalancer.LoadbalancerCurrentState | read-only | Current state of the load balancer |
| `currentState.description` | string | read-only | Load balancer description |
| `currentState.flavor` | publicCloud.loadbalancer.LoadbalancerFlavorRef | read-only | Octavia flavor |
| `currentState.flavor.name` | publicCloud.loadbalancer.LoadbalancerFlavorNameEnum | yes | Octavia flavor name — one of `LARGE`, `MEDIUM`, `SMALL`, `XL` |
| `currentState.location` | publicCloud.common.Location | read-only | Location details |
| `currentState.location.availabilityZone` | string |  | Availability zone within the region |
| `currentState.location.region` | string | yes | Region code |
| `currentState.name` | string | read-only | Load balancer name |
| `currentState.network` | publicCloud.loadbalancer.LoadbalancerNetwork | read-only | Frontend network the virtual IP port lives in, with every address the VIP is reachable at reported through its addresses list. The FIXED address of the port, plus a FLOATING entry when a floating IP is associated with it. |
| `currentState.network.addresses` | publicCloud.loadbalancer.LoadbalancerNetworkAddress[] | read-only | Addresses through which the virtual IP is reachable. Always contains the FIXED address of the VIP port, plus a FLOATING entry when a floating IP is associated with that port. |
| `currentState.network.id` | string (uuid) | read-only | Identifier of the private network the VIP port lives in |
| `currentState.network.subnetId` | string (uuid) | read-only | Identifier of the subnet the VIP port draws its fixed address from |
| `currentState.operatingStatus` | publicCloud.loadbalancer.LoadbalancerOperatingStatusEnum | read-only | Whether the load balancer is currently serving traffic, as observed on the platform. This is distinct from its provisioning status, which tracks whether your configuration has been applied. — one of `DEGRADED`, `DRAINING`, `ERROR`, `NO_MONITOR`, `OFFLINE`, `ONLINE` |
| `currentState.provisioningStatus` | publicCloud.loadbalancer.LoadbalancerProvisioningStatusEnum | read-only | Provisioning status in OpenStack — one of `ACTIVE`, `DELETED`, `ERROR`, `PENDING_CREATE`, `PENDING_DELETE`, `PENDING_UPDATE` |
| `currentTasks` | common.CurrentTask[] | read-only | Ongoing asynchronous tasks related to the load balancer |
| `currentTasks[].errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `currentTasks[].errors[].message` | string | read-only | Error description |
| `currentTasks[].id` | string (uuid) | read-only | Identifier of the current task |
| `currentTasks[].link` | string | read-only | Link to the task details |
| `currentTasks[].status` | common.CurrentTaskStatusEnum | read-only | Current global status of the current task — one of `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `currentTasks[].type` | string | read-only | Type of the current task |
| `id` | string (uuid) | read-only | Unique identifier of the load balancer |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Load balancer readiness in the system — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `targetSpec` | publicCloud.loadbalancer.LoadbalancerTargetSpec | read-only | Last target specification of the load balancer |
| `targetSpec.description` | string |  | Load balancer description |
| `targetSpec.flavor` | publicCloud.loadbalancer.LoadbalancerFlavorRef | yes | Octavia flavor reference |
| `targetSpec.flavor.name` | publicCloud.loadbalancer.LoadbalancerFlavorNameEnum | yes | Octavia flavor name — one of `LARGE`, `MEDIUM`, `SMALL`, `XL` |
| `targetSpec.location` | publicCloud.common.Location | yes | Target location |
| `targetSpec.location.availabilityZone` | string |  | Availability zone within the region |
| `targetSpec.location.region` | string | yes | Region code |
| `targetSpec.name` | string | yes | Load balancer name |
| `targetSpec.network` | publicCloud.loadbalancer.LoadbalancerNetworkRef | yes | Frontend network of the load balancer: the private network and subnet the virtual IP port is created in, and therefore the network its listeners are reachable from. The optional IP either pins the fixed VIP address (address inside the subnet CIDR) or designates an EXISTING floating IP to associate with the VIP port (address outside it). A public address requires the optional loadbalancer/usePublicIP IAM action. Immutable after creation. |
| `targetSpec.network.id` | string (uuid) |  | Identifier of the private network the VIP port is created in. This is the load balancer frontend network, from which its listeners are reachable. When omitted, the network of subnetId is used. Immutable after creation. |
| `targetSpec.network.ip` | ip |  | Address of the virtual IP, whose meaning depends on where it falls relative to the subnet CIDR. Inside the subnet CIDR: pins the fixed VIP address instead of letting IPAM assign it. The address must lie in the subnet allocation pool, must not be the subnet gateway address, and must not already be held by another port. Outside the subnet CIDR: designates an EXISTING floating IP of the project to associate with the VIP port. The floating IP is never created for you, must not already be associated with another port, and the subnet must be attached to a router with an external gateway. A public address requires the optional loadbalancer/usePublicIP IAM action. When omitted, the fixed VIP address is assigned by IPAM. Immutable after creation. |
| `targetSpec.network.subnetId` | string (uuid) | yes | Identifier of the subnet the VIP port draws its fixed address from. When id is given, the subnet must belong to that network. Immutable after creation. |
| `updatedAt` | string (date-time) | read-only | Last update date of the load balancer |

```json
{
  "checksum": "string",
  "createdAt": "2024-01-01T12:00:00Z",
  "currentState": {
    "description": "string",
    "flavor": {
      "name": "LARGE"
    },
    "location": {
      "availabilityZone": "string",
      "region": "string"
    },
    "name": "string",
    "network": {
      "addresses": [
        {
          "ip": "192.0.2.0",
          "type": "FIXED"
        }
      ],
      "id": "00000000-0000-0000-0000-000000000000",
      "subnetId": "00000000-0000-0000-0000-000000000000"
    },
    "operatingStatus": "DEGRADED",
    "provisioningStatus": "ACTIVE"
  },
  "currentTasks": [
    {
      "errors": [
        {
          "message": "string"
        }
      ],
      "id": "00000000-0000-0000-0000-000000000000",
      "link": "string",
      "status": "ERROR",
      "type": "string"
    }
  ],
  "id": "00000000-0000-0000-0000-000000000000",
  "resourceStatus": "CREATING",
  "targetSpec": {
    "description": "string",
    "flavor": {
      "name": "LARGE"
    },
    "location": {
      "availabilityZone": "string",
      "region": "string"
    },
    "name": "string",
    "network": {
      "id": "00000000-0000-0000-0000-000000000000",
      "ip": "192.0.2.0",
      "subnetId": "00000000-0000-0000-0000-000000000000"
    }
  },
  "updatedAt": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/loadbalancer/{loadbalancerId}" \
  -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("/v2/publicCloud/project/{projectId}/loadbalancer/{loadbalancerId}")

# 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("/v2/publicCloud/project/{projectId}/loadbalancer/{loadbalancerId}");

print_r($result);
?>
```

## Create a load balancer

`POST /v2/publicCloud/project/{projectId}/loadbalancer`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/network/load-balancer/#createLoadBalancer

**Status:** Stable production version  
**IAM actions:** `publicCloudProject:apiovh:loadbalancer/create`, `publicCloudProject:apiovh:loadbalancer/usePublicIP`

Creates a load balancer with the given Octavia flavor, attaching its virtual IP to a private network and subnet.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `projectId` | path | string | yes | Project ID |

### Request body (required)

Type: `publicCloud.loadbalancer.LoadbalancerCreation`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `targetSpec` | publicCloud.loadbalancer.LoadbalancerTargetSpec | yes | Desired target specification for the load balancer to create |
| `targetSpec.description` | string |  | Load balancer description |
| `targetSpec.flavor` | publicCloud.loadbalancer.LoadbalancerFlavorRef | yes | Octavia flavor reference |
| `targetSpec.flavor.name` | publicCloud.loadbalancer.LoadbalancerFlavorNameEnum | yes | Octavia flavor name — one of `LARGE`, `MEDIUM`, `SMALL`, `XL` |
| `targetSpec.location` | publicCloud.common.Location | yes | Target location |
| `targetSpec.location.availabilityZone` | string |  | Availability zone within the region |
| `targetSpec.location.region` | string | yes | Region code |
| `targetSpec.name` | string | yes | Load balancer name |
| `targetSpec.network` | publicCloud.loadbalancer.LoadbalancerNetworkRef | yes | Frontend network of the load balancer: the private network and subnet the virtual IP port is created in, and therefore the network its listeners are reachable from. The optional IP either pins the fixed VIP address (address inside the subnet CIDR) or designates an EXISTING floating IP to associate with the VIP port (address outside it). A public address requires the optional loadbalancer/usePublicIP IAM action. Immutable after creation. |
| `targetSpec.network.id` | string (uuid) |  | Identifier of the private network the VIP port is created in. This is the load balancer frontend network, from which its listeners are reachable. When omitted, the network of subnetId is used. Immutable after creation. |
| `targetSpec.network.ip` | ip |  | Address of the virtual IP, whose meaning depends on where it falls relative to the subnet CIDR. Inside the subnet CIDR: pins the fixed VIP address instead of letting IPAM assign it. The address must lie in the subnet allocation pool, must not be the subnet gateway address, and must not already be held by another port. Outside the subnet CIDR: designates an EXISTING floating IP of the project to associate with the VIP port. The floating IP is never created for you, must not already be associated with another port, and the subnet must be attached to a router with an external gateway. A public address requires the optional loadbalancer/usePublicIP IAM action. When omitted, the fixed VIP address is assigned by IPAM. Immutable after creation. |
| `targetSpec.network.subnetId` | string (uuid) | yes | Identifier of the subnet the VIP port draws its fixed address from. When id is given, the subnet must belong to that network. Immutable after creation. |

```json
{
  "targetSpec": {
    "description": "string",
    "flavor": {
      "name": "LARGE"
    },
    "location": {
      "availabilityZone": "string",
      "region": "string"
    },
    "name": "string",
    "network": {
      "id": "00000000-0000-0000-0000-000000000000",
      "ip": "192.0.2.0",
      "subnetId": "00000000-0000-0000-0000-000000000000"
    }
  }
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.loadbalancer.Loadbalancer | successful operation |
| 400 | object | Error 400 response |
| 404 | object | Error 404 response |
| 409 | object | Error 409 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string | read-only | Computed hash representing the current target specification value |
| `createdAt` | string (date-time) | read-only | Creation date of the load balancer |
| `currentState` | publicCloud.loadbalancer.LoadbalancerCurrentState | read-only | Current state of the load balancer |
| `currentState.description` | string | read-only | Load balancer description |
| `currentState.flavor` | publicCloud.loadbalancer.LoadbalancerFlavorRef | read-only | Octavia flavor |
| `currentState.flavor.name` | publicCloud.loadbalancer.LoadbalancerFlavorNameEnum | yes | Octavia flavor name — one of `LARGE`, `MEDIUM`, `SMALL`, `XL` |
| `currentState.location` | publicCloud.common.Location | read-only | Location details |
| `currentState.location.availabilityZone` | string |  | Availability zone within the region |
| `currentState.location.region` | string | yes | Region code |
| `currentState.name` | string | read-only | Load balancer name |
| `currentState.network` | publicCloud.loadbalancer.LoadbalancerNetwork | read-only | Frontend network the virtual IP port lives in, with every address the VIP is reachable at reported through its addresses list. The FIXED address of the port, plus a FLOATING entry when a floating IP is associated with it. |
| `currentState.network.addresses` | publicCloud.loadbalancer.LoadbalancerNetworkAddress[] | read-only | Addresses through which the virtual IP is reachable. Always contains the FIXED address of the VIP port, plus a FLOATING entry when a floating IP is associated with that port. |
| `currentState.network.id` | string (uuid) | read-only | Identifier of the private network the VIP port lives in |
| `currentState.network.subnetId` | string (uuid) | read-only | Identifier of the subnet the VIP port draws its fixed address from |
| `currentState.operatingStatus` | publicCloud.loadbalancer.LoadbalancerOperatingStatusEnum | read-only | Whether the load balancer is currently serving traffic, as observed on the platform. This is distinct from its provisioning status, which tracks whether your configuration has been applied. — one of `DEGRADED`, `DRAINING`, `ERROR`, `NO_MONITOR`, `OFFLINE`, `ONLINE` |
| `currentState.provisioningStatus` | publicCloud.loadbalancer.LoadbalancerProvisioningStatusEnum | read-only | Provisioning status in OpenStack — one of `ACTIVE`, `DELETED`, `ERROR`, `PENDING_CREATE`, `PENDING_DELETE`, `PENDING_UPDATE` |
| `currentTasks` | common.CurrentTask[] | read-only | Ongoing asynchronous tasks related to the load balancer |
| `currentTasks[].errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `currentTasks[].errors[].message` | string | read-only | Error description |
| `currentTasks[].id` | string (uuid) | read-only | Identifier of the current task |
| `currentTasks[].link` | string | read-only | Link to the task details |
| `currentTasks[].status` | common.CurrentTaskStatusEnum | read-only | Current global status of the current task — one of `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `currentTasks[].type` | string | read-only | Type of the current task |
| `id` | string (uuid) | read-only | Unique identifier of the load balancer |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Load balancer readiness in the system — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `targetSpec` | publicCloud.loadbalancer.LoadbalancerTargetSpec | read-only | Last target specification of the load balancer |
| `targetSpec.description` | string |  | Load balancer description |
| `targetSpec.flavor` | publicCloud.loadbalancer.LoadbalancerFlavorRef | yes | Octavia flavor reference |
| `targetSpec.flavor.name` | publicCloud.loadbalancer.LoadbalancerFlavorNameEnum | yes | Octavia flavor name — one of `LARGE`, `MEDIUM`, `SMALL`, `XL` |
| `targetSpec.location` | publicCloud.common.Location | yes | Target location |
| `targetSpec.location.availabilityZone` | string |  | Availability zone within the region |
| `targetSpec.location.region` | string | yes | Region code |
| `targetSpec.name` | string | yes | Load balancer name |
| `targetSpec.network` | publicCloud.loadbalancer.LoadbalancerNetworkRef | yes | Frontend network of the load balancer: the private network and subnet the virtual IP port is created in, and therefore the network its listeners are reachable from. The optional IP either pins the fixed VIP address (address inside the subnet CIDR) or designates an EXISTING floating IP to associate with the VIP port (address outside it). A public address requires the optional loadbalancer/usePublicIP IAM action. Immutable after creation. |
| `targetSpec.network.id` | string (uuid) |  | Identifier of the private network the VIP port is created in. This is the load balancer frontend network, from which its listeners are reachable. When omitted, the network of subnetId is used. Immutable after creation. |
| `targetSpec.network.ip` | ip |  | Address of the virtual IP, whose meaning depends on where it falls relative to the subnet CIDR. Inside the subnet CIDR: pins the fixed VIP address instead of letting IPAM assign it. The address must lie in the subnet allocation pool, must not be the subnet gateway address, and must not already be held by another port. Outside the subnet CIDR: designates an EXISTING floating IP of the project to associate with the VIP port. The floating IP is never created for you, must not already be associated with another port, and the subnet must be attached to a router with an external gateway. A public address requires the optional loadbalancer/usePublicIP IAM action. When omitted, the fixed VIP address is assigned by IPAM. Immutable after creation. |
| `targetSpec.network.subnetId` | string (uuid) | yes | Identifier of the subnet the VIP port draws its fixed address from. When id is given, the subnet must belong to that network. Immutable after creation. |
| `updatedAt` | string (date-time) | read-only | Last update date of the load balancer |

```json
{
  "checksum": "string",
  "createdAt": "2024-01-01T12:00:00Z",
  "currentState": {
    "description": "string",
    "flavor": {
      "name": "LARGE"
    },
    "location": {
      "availabilityZone": "string",
      "region": "string"
    },
    "name": "string",
    "network": {
      "addresses": [
        {
          "ip": "192.0.2.0",
          "type": "FIXED"
        }
      ],
      "id": "00000000-0000-0000-0000-000000000000",
      "subnetId": "00000000-0000-0000-0000-000000000000"
    },
    "operatingStatus": "DEGRADED",
    "provisioningStatus": "ACTIVE"
  },
  "currentTasks": [
    {
      "errors": [
        {
          "message": "string"
        }
      ],
      "id": "00000000-0000-0000-0000-000000000000",
      "link": "string",
      "status": "ERROR",
      "type": "string"
    }
  ],
  "id": "00000000-0000-0000-0000-000000000000",
  "resourceStatus": "CREATING",
  "targetSpec": {
    "description": "string",
    "flavor": {
      "name": "LARGE"
    },
    "location": {
      "availabilityZone": "string",
      "region": "string"
    },
    "name": "string",
    "network": {
      "id": "00000000-0000-0000-0000-000000000000",
      "ip": "192.0.2.0",
      "subnetId": "00000000-0000-0000-0000-000000000000"
    }
  },
  "updatedAt": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/loadbalancer" \
  -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: publicCloud.loadbalancer.LoadbalancerCreation
result = client.post("/v2/publicCloud/project/{projectId}/loadbalancer",
	targetSpec = None, # Desired target specification for the load balancer to create (type: publicCloud.loadbalancer.LoadbalancerTargetSpec)
)

# 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: publicCloud.loadbalancer.LoadbalancerCreation
$result = $ovh->post("/v2/publicCloud/project/{projectId}/loadbalancer", array(
	targetSpec => null, // Desired target specification for the load balancer to create (type: publicCloud.loadbalancer.LoadbalancerTargetSpec)
));

print_r($result);
?>
```

## Delete a load balancer

`DELETE /v2/publicCloud/project/{projectId}/loadbalancer/{loadbalancerId}`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/network/load-balancer/#deleteLoadBalancer

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

Deletes the load balancer.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `loadbalancerId` | path | string (uuid) | yes | Loadbalancer ID |
| `projectId` | path | string | yes | Project ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.loadbalancer.Loadbalancer | successful operation |
| 404 | object | Error 404 response |
| 409 | object | Error 409 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string | read-only | Computed hash representing the current target specification value |
| `createdAt` | string (date-time) | read-only | Creation date of the load balancer |
| `currentState` | publicCloud.loadbalancer.LoadbalancerCurrentState | read-only | Current state of the load balancer |
| `currentState.description` | string | read-only | Load balancer description |
| `currentState.flavor` | publicCloud.loadbalancer.LoadbalancerFlavorRef | read-only | Octavia flavor |
| `currentState.flavor.name` | publicCloud.loadbalancer.LoadbalancerFlavorNameEnum | yes | Octavia flavor name — one of `LARGE`, `MEDIUM`, `SMALL`, `XL` |
| `currentState.location` | publicCloud.common.Location | read-only | Location details |
| `currentState.location.availabilityZone` | string |  | Availability zone within the region |
| `currentState.location.region` | string | yes | Region code |
| `currentState.name` | string | read-only | Load balancer name |
| `currentState.network` | publicCloud.loadbalancer.LoadbalancerNetwork | read-only | Frontend network the virtual IP port lives in, with every address the VIP is reachable at reported through its addresses list. The FIXED address of the port, plus a FLOATING entry when a floating IP is associated with it. |
| `currentState.network.addresses` | publicCloud.loadbalancer.LoadbalancerNetworkAddress[] | read-only | Addresses through which the virtual IP is reachable. Always contains the FIXED address of the VIP port, plus a FLOATING entry when a floating IP is associated with that port. |
| `currentState.network.id` | string (uuid) | read-only | Identifier of the private network the VIP port lives in |
| `currentState.network.subnetId` | string (uuid) | read-only | Identifier of the subnet the VIP port draws its fixed address from |
| `currentState.operatingStatus` | publicCloud.loadbalancer.LoadbalancerOperatingStatusEnum | read-only | Whether the load balancer is currently serving traffic, as observed on the platform. This is distinct from its provisioning status, which tracks whether your configuration has been applied. — one of `DEGRADED`, `DRAINING`, `ERROR`, `NO_MONITOR`, `OFFLINE`, `ONLINE` |
| `currentState.provisioningStatus` | publicCloud.loadbalancer.LoadbalancerProvisioningStatusEnum | read-only | Provisioning status in OpenStack — one of `ACTIVE`, `DELETED`, `ERROR`, `PENDING_CREATE`, `PENDING_DELETE`, `PENDING_UPDATE` |
| `currentTasks` | common.CurrentTask[] | read-only | Ongoing asynchronous tasks related to the load balancer |
| `currentTasks[].errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `currentTasks[].errors[].message` | string | read-only | Error description |
| `currentTasks[].id` | string (uuid) | read-only | Identifier of the current task |
| `currentTasks[].link` | string | read-only | Link to the task details |
| `currentTasks[].status` | common.CurrentTaskStatusEnum | read-only | Current global status of the current task — one of `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `currentTasks[].type` | string | read-only | Type of the current task |
| `id` | string (uuid) | read-only | Unique identifier of the load balancer |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Load balancer readiness in the system — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `targetSpec` | publicCloud.loadbalancer.LoadbalancerTargetSpec | read-only | Last target specification of the load balancer |
| `targetSpec.description` | string |  | Load balancer description |
| `targetSpec.flavor` | publicCloud.loadbalancer.LoadbalancerFlavorRef | yes | Octavia flavor reference |
| `targetSpec.flavor.name` | publicCloud.loadbalancer.LoadbalancerFlavorNameEnum | yes | Octavia flavor name — one of `LARGE`, `MEDIUM`, `SMALL`, `XL` |
| `targetSpec.location` | publicCloud.common.Location | yes | Target location |
| `targetSpec.location.availabilityZone` | string |  | Availability zone within the region |
| `targetSpec.location.region` | string | yes | Region code |
| `targetSpec.name` | string | yes | Load balancer name |
| `targetSpec.network` | publicCloud.loadbalancer.LoadbalancerNetworkRef | yes | Frontend network of the load balancer: the private network and subnet the virtual IP port is created in, and therefore the network its listeners are reachable from. The optional IP either pins the fixed VIP address (address inside the subnet CIDR) or designates an EXISTING floating IP to associate with the VIP port (address outside it). A public address requires the optional loadbalancer/usePublicIP IAM action. Immutable after creation. |
| `targetSpec.network.id` | string (uuid) |  | Identifier of the private network the VIP port is created in. This is the load balancer frontend network, from which its listeners are reachable. When omitted, the network of subnetId is used. Immutable after creation. |
| `targetSpec.network.ip` | ip |  | Address of the virtual IP, whose meaning depends on where it falls relative to the subnet CIDR. Inside the subnet CIDR: pins the fixed VIP address instead of letting IPAM assign it. The address must lie in the subnet allocation pool, must not be the subnet gateway address, and must not already be held by another port. Outside the subnet CIDR: designates an EXISTING floating IP of the project to associate with the VIP port. The floating IP is never created for you, must not already be associated with another port, and the subnet must be attached to a router with an external gateway. A public address requires the optional loadbalancer/usePublicIP IAM action. When omitted, the fixed VIP address is assigned by IPAM. Immutable after creation. |
| `targetSpec.network.subnetId` | string (uuid) | yes | Identifier of the subnet the VIP port draws its fixed address from. When id is given, the subnet must belong to that network. Immutable after creation. |
| `updatedAt` | string (date-time) | read-only | Last update date of the load balancer |

```json
{
  "checksum": "string",
  "createdAt": "2024-01-01T12:00:00Z",
  "currentState": {
    "description": "string",
    "flavor": {
      "name": "LARGE"
    },
    "location": {
      "availabilityZone": "string",
      "region": "string"
    },
    "name": "string",
    "network": {
      "addresses": [
        {
          "ip": "192.0.2.0",
          "type": "FIXED"
        }
      ],
      "id": "00000000-0000-0000-0000-000000000000",
      "subnetId": "00000000-0000-0000-0000-000000000000"
    },
    "operatingStatus": "DEGRADED",
    "provisioningStatus": "ACTIVE"
  },
  "currentTasks": [
    {
      "errors": [
        {
          "message": "string"
        }
      ],
      "id": "00000000-0000-0000-0000-000000000000",
      "link": "string",
      "status": "ERROR",
      "type": "string"
    }
  ],
  "id": "00000000-0000-0000-0000-000000000000",
  "resourceStatus": "CREATING",
  "targetSpec": {
    "description": "string",
    "flavor": {
      "name": "LARGE"
    },
    "location": {
      "availabilityZone": "string",
      "region": "string"
    },
    "name": "string",
    "network": {
      "id": "00000000-0000-0000-0000-000000000000",
      "ip": "192.0.2.0",
      "subnetId": "00000000-0000-0000-0000-000000000000"
    }
  },
  "updatedAt": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/loadbalancer/{loadbalancerId}" \
  -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("/v2/publicCloud/project/{projectId}/loadbalancer/{loadbalancerId}")

# 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("/v2/publicCloud/project/{projectId}/loadbalancer/{loadbalancerId}");

print_r($result);
?>
```

## Update a load balancer

`PUT /v2/publicCloud/project/{projectId}/loadbalancer/{loadbalancerId}`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/network/load-balancer/#editLoadBalancer

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

Updates the load balancer's name, description or flavor. A flavor other than the current one resizes the load balancer in place: it is failed over onto amphorae of the new flavor, which takes several minutes and can briefly interrupt traffic. The VIP network is immutable after creation.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `loadbalancerId` | path | string (uuid) | yes | Loadbalancer ID |
| `projectId` | path | string | yes | Project ID |

### Request body (required)

Type: `publicCloud.loadbalancer.LoadbalancerUpdate`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string |  | Optional concurrency-control checksum. When supplied, it must match the resource's current checksum or the request is rejected with a 409 checksum-mismatch conflict. When omitted or empty, the concurrency check is skipped and the write is forced (last-write-wins). |
| `targetSpec` | publicCloud.loadbalancer.LoadbalancerPutTargetSpec | yes | Desired target specification for the load balancer |
| `targetSpec.description` | string |  | Load balancer description |
| `targetSpec.flavor` | publicCloud.loadbalancer.LoadbalancerFlavorRef |  | Octavia flavor reference. Size of the load balancer. When it differs from the current flavor, the load balancer is resized: Octavia fails it over onto amphorae of the new flavor, which can briefly interrupt traffic. When omitted, the current flavor is kept. |
| `targetSpec.flavor.name` | publicCloud.loadbalancer.LoadbalancerFlavorNameEnum | yes | Octavia flavor name — one of `LARGE`, `MEDIUM`, `SMALL`, `XL` |
| `targetSpec.name` | string | yes | Load balancer name |

```json
{
  "checksum": "string",
  "targetSpec": {
    "description": "string",
    "flavor": {
      "name": "LARGE"
    },
    "name": "string"
  }
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.loadbalancer.Loadbalancer | successful operation |
| 400 | object | Error 400 response |
| 404 | object | Error 404 response |
| 409 | object | Error 409 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string | read-only | Computed hash representing the current target specification value |
| `createdAt` | string (date-time) | read-only | Creation date of the load balancer |
| `currentState` | publicCloud.loadbalancer.LoadbalancerCurrentState | read-only | Current state of the load balancer |
| `currentState.description` | string | read-only | Load balancer description |
| `currentState.flavor` | publicCloud.loadbalancer.LoadbalancerFlavorRef | read-only | Octavia flavor |
| `currentState.flavor.name` | publicCloud.loadbalancer.LoadbalancerFlavorNameEnum | yes | Octavia flavor name — one of `LARGE`, `MEDIUM`, `SMALL`, `XL` |
| `currentState.location` | publicCloud.common.Location | read-only | Location details |
| `currentState.location.availabilityZone` | string |  | Availability zone within the region |
| `currentState.location.region` | string | yes | Region code |
| `currentState.name` | string | read-only | Load balancer name |
| `currentState.network` | publicCloud.loadbalancer.LoadbalancerNetwork | read-only | Frontend network the virtual IP port lives in, with every address the VIP is reachable at reported through its addresses list. The FIXED address of the port, plus a FLOATING entry when a floating IP is associated with it. |
| `currentState.network.addresses` | publicCloud.loadbalancer.LoadbalancerNetworkAddress[] | read-only | Addresses through which the virtual IP is reachable. Always contains the FIXED address of the VIP port, plus a FLOATING entry when a floating IP is associated with that port. |
| `currentState.network.id` | string (uuid) | read-only | Identifier of the private network the VIP port lives in |
| `currentState.network.subnetId` | string (uuid) | read-only | Identifier of the subnet the VIP port draws its fixed address from |
| `currentState.operatingStatus` | publicCloud.loadbalancer.LoadbalancerOperatingStatusEnum | read-only | Whether the load balancer is currently serving traffic, as observed on the platform. This is distinct from its provisioning status, which tracks whether your configuration has been applied. — one of `DEGRADED`, `DRAINING`, `ERROR`, `NO_MONITOR`, `OFFLINE`, `ONLINE` |
| `currentState.provisioningStatus` | publicCloud.loadbalancer.LoadbalancerProvisioningStatusEnum | read-only | Provisioning status in OpenStack — one of `ACTIVE`, `DELETED`, `ERROR`, `PENDING_CREATE`, `PENDING_DELETE`, `PENDING_UPDATE` |
| `currentTasks` | common.CurrentTask[] | read-only | Ongoing asynchronous tasks related to the load balancer |
| `currentTasks[].errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `currentTasks[].errors[].message` | string | read-only | Error description |
| `currentTasks[].id` | string (uuid) | read-only | Identifier of the current task |
| `currentTasks[].link` | string | read-only | Link to the task details |
| `currentTasks[].status` | common.CurrentTaskStatusEnum | read-only | Current global status of the current task — one of `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `currentTasks[].type` | string | read-only | Type of the current task |
| `id` | string (uuid) | read-only | Unique identifier of the load balancer |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Load balancer readiness in the system — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `targetSpec` | publicCloud.loadbalancer.LoadbalancerTargetSpec | read-only | Last target specification of the load balancer |
| `targetSpec.description` | string |  | Load balancer description |
| `targetSpec.flavor` | publicCloud.loadbalancer.LoadbalancerFlavorRef | yes | Octavia flavor reference |
| `targetSpec.flavor.name` | publicCloud.loadbalancer.LoadbalancerFlavorNameEnum | yes | Octavia flavor name — one of `LARGE`, `MEDIUM`, `SMALL`, `XL` |
| `targetSpec.location` | publicCloud.common.Location | yes | Target location |
| `targetSpec.location.availabilityZone` | string |  | Availability zone within the region |
| `targetSpec.location.region` | string | yes | Region code |
| `targetSpec.name` | string | yes | Load balancer name |
| `targetSpec.network` | publicCloud.loadbalancer.LoadbalancerNetworkRef | yes | Frontend network of the load balancer: the private network and subnet the virtual IP port is created in, and therefore the network its listeners are reachable from. The optional IP either pins the fixed VIP address (address inside the subnet CIDR) or designates an EXISTING floating IP to associate with the VIP port (address outside it). A public address requires the optional loadbalancer/usePublicIP IAM action. Immutable after creation. |
| `targetSpec.network.id` | string (uuid) |  | Identifier of the private network the VIP port is created in. This is the load balancer frontend network, from which its listeners are reachable. When omitted, the network of subnetId is used. Immutable after creation. |
| `targetSpec.network.ip` | ip |  | Address of the virtual IP, whose meaning depends on where it falls relative to the subnet CIDR. Inside the subnet CIDR: pins the fixed VIP address instead of letting IPAM assign it. The address must lie in the subnet allocation pool, must not be the subnet gateway address, and must not already be held by another port. Outside the subnet CIDR: designates an EXISTING floating IP of the project to associate with the VIP port. The floating IP is never created for you, must not already be associated with another port, and the subnet must be attached to a router with an external gateway. A public address requires the optional loadbalancer/usePublicIP IAM action. When omitted, the fixed VIP address is assigned by IPAM. Immutable after creation. |
| `targetSpec.network.subnetId` | string (uuid) | yes | Identifier of the subnet the VIP port draws its fixed address from. When id is given, the subnet must belong to that network. Immutable after creation. |
| `updatedAt` | string (date-time) | read-only | Last update date of the load balancer |

```json
{
  "checksum": "string",
  "createdAt": "2024-01-01T12:00:00Z",
  "currentState": {
    "description": "string",
    "flavor": {
      "name": "LARGE"
    },
    "location": {
      "availabilityZone": "string",
      "region": "string"
    },
    "name": "string",
    "network": {
      "addresses": [
        {
          "ip": "192.0.2.0",
          "type": "FIXED"
        }
      ],
      "id": "00000000-0000-0000-0000-000000000000",
      "subnetId": "00000000-0000-0000-0000-000000000000"
    },
    "operatingStatus": "DEGRADED",
    "provisioningStatus": "ACTIVE"
  },
  "currentTasks": [
    {
      "errors": [
        {
          "message": "string"
        }
      ],
      "id": "00000000-0000-0000-0000-000000000000",
      "link": "string",
      "status": "ERROR",
      "type": "string"
    }
  ],
  "id": "00000000-0000-0000-0000-000000000000",
  "resourceStatus": "CREATING",
  "targetSpec": {
    "description": "string",
    "flavor": {
      "name": "LARGE"
    },
    "location": {
      "availabilityZone": "string",
      "region": "string"
    },
    "name": "string",
    "network": {
      "id": "00000000-0000-0000-0000-000000000000",
      "ip": "192.0.2.0",
      "subnetId": "00000000-0000-0000-0000-000000000000"
    }
  },
  "updatedAt": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/loadbalancer/{loadbalancerId}" \
  -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: publicCloud.loadbalancer.LoadbalancerUpdate
result = client.put("/v2/publicCloud/project/{projectId}/loadbalancer/{loadbalancerId}",
	checksum = None, # Optional concurrency-control checksum. When supplied, it must match the resource's current checksum or the request is rejected with a 409 checksum-mismatch conflict. When omitted or empty, the concurrency check is skipped and the write is forced (last-write-wins). (type: string, nullable)
	targetSpec = None, # Desired target specification for the load balancer (type: publicCloud.loadbalancer.LoadbalancerPutTargetSpec)
)

# 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: publicCloud.loadbalancer.LoadbalancerUpdate
$result = $ovh->put("/v2/publicCloud/project/{projectId}/loadbalancer/{loadbalancerId}", array(
	checksum => null, // Optional concurrency-control checksum. When supplied, it must match the resource's current checksum or the request is rejected with a 409 checksum-mismatch conflict. When omitted or empty, the concurrency check is skipped and the write is forced (last-write-wins). (type: string, nullable)
	targetSpec => null, // Desired target specification for the load balancer (type: publicCloud.loadbalancer.LoadbalancerPutTargetSpec)
));

print_r($result);
?>
```
