Skip to content

Load Balancer

All operations require authentication.

5 operationsv2/publicCloud/project
Agent setup

List load balancersProduction

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

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.

Path parameters

projectId
required
string

Project ID

Query parameters

flavor
LoadbalancerFlavorNameEnum[]

Filter by load balancer flavor name. Repeatable.

ValuesLARGEMEDIUMSMALLXL
name
string[]

Filter by load balancer name (case-insensitive substring match). Repeatable.

region
string[]

Filter by load balancer region. An unavailable region is rejected. Repeatable.

Headers

X-Pagination-Cursor
string

Pagination cursor

X-Pagination-Size
integer

Pagination size

Response

200Loadbalancer[]successful operation
checksum
read-only
string

Computed hash representing the current target specification value

createdAt
read-only
stringdate-time

Creation date of the load balancer

currentState
read-only
LoadbalancerCurrentState

Current state of the load balancer

currentTasks
read-only
CurrentTask[]

Ongoing asynchronous tasks related to the load balancer

id
read-only
stringuuid

Unique identifier of the load balancer

resourceStatus
read-only
ResourceStatusEnum

Load balancer readiness in the system

ValuesCREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATING
targetSpec
read-only
LoadbalancerTargetSpec

Last target specification of the load balancer

updatedAt
read-only
stringdate-time

Last update date of the load balancer

400objectError 400 response

Example uses projectId = string

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/loadbalancer \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ { "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" }]

Get a load balancerProduction

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

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

Path parameters

loadbalancerId
required
stringuuid

Loadbalancer ID

projectId
required
string

Project ID

Response

200Loadbalancersuccessful operation
checksum
read-only
string

Computed hash representing the current target specification value

createdAt
read-only
stringdate-time

Creation date of the load balancer

currentState
read-only
LoadbalancerCurrentState

Current state of the load balancer

currentTasks
read-only
CurrentTask[]

Ongoing asynchronous tasks related to the load balancer

id
read-only
stringuuid

Unique identifier of the load balancer

resourceStatus
read-only
ResourceStatusEnum

Load balancer readiness in the system

ValuesCREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATING
targetSpec
read-only
LoadbalancerTargetSpec

Last target specification of the load balancer

updatedAt
read-only
stringdate-time

Last update date of the load balancer

404objectError 404 response

Example uses loadbalancerId = 00000000-0000-0000-0000-000000000000, projectId = string

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/loadbalancer/{loadbalancerId} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "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"}

Create a load balancerProduction

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

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

Path parameters

projectId
required
string

Project ID

Request body (required)

targetSpec
required
LoadbalancerTargetSpec

Desired target specification for the load balancer to create

Response

200Loadbalancersuccessful operation
checksum
read-only
string

Computed hash representing the current target specification value

createdAt
read-only
stringdate-time

Creation date of the load balancer

currentState
read-only
LoadbalancerCurrentState

Current state of the load balancer

currentTasks
read-only
CurrentTask[]

Ongoing asynchronous tasks related to the load balancer

id
read-only
stringuuid

Unique identifier of the load balancer

resourceStatus
read-only
ResourceStatusEnum

Load balancer readiness in the system

ValuesCREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATING
targetSpec
read-only
LoadbalancerTargetSpec

Last target specification of the load balancer

updatedAt
read-only
stringdate-time

Last update date of the load balancer

400objectError 400 response
404objectError 404 response
409objectError 409 response

Example uses projectId = string

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/loadbalancer \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "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"}

Delete a load balancerProduction

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

Deletes the load balancer.

Path parameters

loadbalancerId
required
stringuuid

Loadbalancer ID

projectId
required
string

Project ID

Response

200Loadbalancersuccessful operation
checksum
read-only
string

Computed hash representing the current target specification value

createdAt
read-only
stringdate-time

Creation date of the load balancer

currentState
read-only
LoadbalancerCurrentState

Current state of the load balancer

currentTasks
read-only
CurrentTask[]

Ongoing asynchronous tasks related to the load balancer

id
read-only
stringuuid

Unique identifier of the load balancer

resourceStatus
read-only
ResourceStatusEnum

Load balancer readiness in the system

ValuesCREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATING
targetSpec
read-only
LoadbalancerTargetSpec

Last target specification of the load balancer

updatedAt
read-only
stringdate-time

Last update date of the load balancer

404objectError 404 response
409objectError 409 response

Example uses loadbalancerId = 00000000-0000-0000-0000-000000000000, projectId = string

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/loadbalancer/{loadbalancerId} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "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"}

Update a load balancerProduction

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

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.

Path parameters

loadbalancerId
required
stringuuid

Loadbalancer ID

projectId
required
string

Project ID

Request body (required)

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
required
LoadbalancerPutTargetSpec

Desired target specification for the load balancer

Response

200Loadbalancersuccessful operation
checksum
read-only
string

Computed hash representing the current target specification value

createdAt
read-only
stringdate-time

Creation date of the load balancer

currentState
read-only
LoadbalancerCurrentState

Current state of the load balancer

currentTasks
read-only
CurrentTask[]

Ongoing asynchronous tasks related to the load balancer

id
read-only
stringuuid

Unique identifier of the load balancer

resourceStatus
read-only
ResourceStatusEnum

Load balancer readiness in the system

ValuesCREATINGCREATION_PLANNEDDELETINGERROROUT_OF_SYNCREADYSUSPENDEDUNKNOWNUPDATING
targetSpec
read-only
LoadbalancerTargetSpec

Last target specification of the load balancer

updatedAt
read-only
stringdate-time

Last update date of the load balancer

400objectError 400 response
404objectError 404 response
409objectError 409 response

Example uses loadbalancerId = 00000000-0000-0000-0000-000000000000, projectId = string

$ curl https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/loadbalancer/{loadbalancerId} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "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"}