Skip to main content

loadbalancer_pools

Creates, updates, deletes, gets or lists a loadbalancer_pools resource.

Overview​

Nameloadbalancer_pools
TypeResource
Idovh.public_cloud_network.loadbalancer_pools

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idstring (uuid)Unique identifier of the pool
checksumstringComputed hash representing the current target specification value
created_atstring (date-time)Creation date of the pool (wire: createdAt)
current_stateobjectCurrent state of the pool (wire: currentState)
current_tasksarrayOngoing asynchronous tasks related to the pool (wire: currentTasks)
resource_statusstringPool readiness in the system (CREATING, CREATION_PLANNED, DELETING, ERROR, OUT_OF_SYNC, READY, SUSPENDED, UNKNOWN, UPDATING) (wire: resourceStatus)
target_specobjectLast target specification of the pool (wire: targetSpec)
updated_atstring (date-time)Last update date of the pool (wire: updatedAt)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectloadbalancer_id, pool_id, project_idReturns the pool, including its load-balancing algorithm and health monitor.
listselectloadbalancer_id, project_idx_pagination_cursor, x_pagination_size, algorithm, name, protocolReturns the pools of the load balancer.<br /><br />### Filters<br />The optional name, protocol and algorithm query parameters narrow the list. Each one can be repeated (for example ?protocol=HTTP&protocol=TCP): repeated values of the same parameter are combined with OR, and different parameters are combined with AND. An unknown protocol or algorithm value 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.
createinsertloadbalancer_id, project_id, target_specCreates a pool with a load-balancing algorithm and protocol, optionally with a health monitor and session persistence.
updateupdateloadbalancer_id, pool_id, project_id, target_specReplaces the pool's target specification as a whole. The body carries the complete desired state of every field publicCloud.loadbalancer.PoolUpdateTargetSpec exposes — algorithm, description, healthMonitor, name and persistence — so read the pool first and restate every value you want to keep: a field left out of targetSpec is cleared, not carried over from the stored specification. Leaving healthMonitor out deletes the pool's health monitor, and leaving persistence out disables session persistence.<br /><br />The create-only field protocol cannot be changed once the pool exists. It is deliberately absent from the update model, and sending it is rejected with a 400.<br /><br />algorithm is required. When a healthMonitor is sent, it is itself a complete specification: type, delay, timeout and maxRetries are all required — mirroring the create route — and every optional monitor field left out is cleared. The monitor type is immutable once the monitor exists, so restate the current type.<br /><br />The optional checksum guards against a lost update: when supplied it must match the pool's current checksum or the request is rejected with a 409 checksum mismatch. Omitting it skips the check and forces the write (last-write-wins).
deletedeleteloadbalancer_id, pool_id, project_idDeletes the pool.

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
api_hoststringThe OVHcloud API host. Selected by OVH_ENDPOINT (ovh-eu, ovh-ca or ovh-us; default ovh-eu). (default: api.eu.ovhcloud.com, x-stackQL-envVarSelector: {"envVar":"OVH_ENDPOINT","default":"ovh-eu","values":{"ovh-eu":"api.eu.ovhcloud.com","ovh-ca":"api.ca.ovhcloud.com","ovh-us":"api.us.ovhcloud.com"}})
loadbalancer_idstring (uuid)Loadbalancer ID (wire: loadbalancerId)
pool_idstring (uuid)Pool ID (wire: poolId)
project_idstringThe Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set.
algorithmarrayFilter by pool load balancing algorithm. Repeatable.
namearrayFilter by pool name (case-insensitive substring match). Repeatable.
protocolarrayFilter by pool protocol. Repeatable.
x_pagination_cursorstringPagination cursor (wire: X-Pagination-Cursor)
x_pagination_sizeintegerPagination size (wire: X-Pagination-Size)

SELECT examples​

Returns the pool, including its load-balancing algorithm and health monitor.

SELECT
id,
checksum,
created_at,
current_state,
current_tasks,
resource_status,
target_spec,
updated_at
FROM ovh.public_cloud_network.loadbalancer_pools
WHERE loadbalancer_id = '{{ loadbalancer_id }}' -- required
AND pool_id = '{{ pool_id }}' -- required
AND project_id = '{{ project_id }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
;

INSERT examples​

Creates a pool with a load-balancing algorithm and protocol, optionally with a health monitor and session persistence.

INSERT INTO ovh.public_cloud_network.loadbalancer_pools (
target_spec,
loadbalancer_id,
project_id
)
SELECT
'{{ target_spec }}' /* required */,
'{{ loadbalancer_id }}',
'{{ project_id }}'
RETURNING
id,
checksum,
created_at,
current_state,
current_tasks,
resource_status,
target_spec,
updated_at
;

UPDATE examples​

Replaces the pool's target specification as a whole. The body carries the complete desired state of every field publicCloud.loadbalancer.PoolUpdateTargetSpec exposes — algorithm, description, healthMonitor, name and persistence — so read the pool first and restate every value you want to keep: a field left out of targetSpec is cleared, not carried over from the stored specification. Leaving healthMonitor out deletes the pool's health monitor, and leaving persistence out disables session persistence.<br /><br />The create-only field protocol cannot be changed once the pool exists. It is deliberately absent from the update model, and sending it is rejected with a 400.<br /><br />algorithm is required. When a healthMonitor is sent, it is itself a complete specification: type, delay, timeout and maxRetries are all required — mirroring the create route — and every optional monitor field left out is cleared. The monitor type is immutable once the monitor exists, so restate the current type.<br /><br />The optional checksum guards against a lost update: when supplied it must match the pool's current checksum or the request is rejected with a 409 checksum mismatch. Omitting it skips the check and forces the write (last-write-wins).

UPDATE ovh.public_cloud_network.loadbalancer_pools
SET
checksum = '{{ checksum }}',
target_spec = '{{ target_spec }}'
WHERE
loadbalancer_id = '{{ loadbalancer_id }}' --required
AND pool_id = '{{ pool_id }}' --required
AND project_id = '{{ project_id }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
AND target_spec = '{{ target_spec }}' --required
RETURNING
id,
checksum,
created_at,
current_state,
current_tasks,
resource_status,
target_spec,
updated_at;

DELETE examples​

Deletes the pool.

DELETE FROM ovh.public_cloud_network.loadbalancer_pools
WHERE loadbalancer_id = '{{ loadbalancer_id }}' --required
AND pool_id = '{{ pool_id }}' --required
AND project_id = '{{ project_id }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
;