loadbalancer_pools
Creates, updates, deletes, gets or lists a loadbalancer_pools resource.
Overview​
| Name | loadbalancer_pools |
| Type | Resource |
| Id | ovh.public_cloud_network.loadbalancer_pools |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | Unique identifier of the pool |
checksum | string | Computed hash representing the current target specification value |
created_at | string (date-time) | Creation date of the pool (wire: createdAt) |
current_state | object | Current state of the pool (wire: currentState) |
current_tasks | array | Ongoing asynchronous tasks related to the pool (wire: currentTasks) |
resource_status | string | Pool readiness in the system (CREATING, CREATION_PLANNED, DELETING, ERROR, OUT_OF_SYNC, READY, SUSPENDED, UNKNOWN, UPDATING) (wire: resourceStatus) |
target_spec | object | Last target specification of the pool (wire: targetSpec) |
updated_at | string (date-time) | Last update date of the pool (wire: updatedAt) |
A Public Cloud load balancer pool
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | Unique identifier of the pool |
checksum | string | Computed hash representing the current target specification value |
created_at | string (date-time) | Creation date of the pool (wire: createdAt) |
current_state | object | Current state of the pool (wire: currentState) |
current_tasks | array | Ongoing asynchronous tasks related to the pool (wire: currentTasks) |
resource_status | string | Pool readiness in the system (CREATING, CREATION_PLANNED, DELETING, ERROR, OUT_OF_SYNC, READY, SUSPENDED, UNKNOWN, UPDATING) (wire: resourceStatus) |
target_spec | object | Last target specification of the pool (wire: targetSpec) |
updated_at | string (date-time) | Last update date of the pool (wire: updatedAt) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | loadbalancer_id, pool_id, project_id | Returns the pool, including its load-balancing algorithm and health monitor. | |
list | select | loadbalancer_id, project_id | x_pagination_cursor, x_pagination_size, algorithm, name, protocol | Returns 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. |
create | insert | loadbalancer_id, project_id, target_spec | Creates a pool with a load-balancing algorithm and protocol, optionally with a health monitor and session persistence. | |
update | update | loadbalancer_id, pool_id, project_id, target_spec | 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). | |
delete | delete | loadbalancer_id, pool_id, project_id | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
api_host | string | The 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_id | string (uuid) | Loadbalancer ID (wire: loadbalancerId) |
pool_id | string (uuid) | Pool ID (wire: poolId) |
project_id | string | The Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set. |
algorithm | array | Filter by pool load balancing algorithm. Repeatable. |
name | array | Filter by pool name (case-insensitive substring match). Repeatable. |
protocol | array | Filter by pool protocol. Repeatable. |
x_pagination_cursor | string | Pagination cursor (wire: X-Pagination-Cursor) |
x_pagination_size | integer | Pagination size (wire: X-Pagination-Size) |
SELECT examples​
- get
- list
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
;
Returns 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.
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 project_id = '{{ project_id }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
AND x_pagination_cursor = '{{ x_pagination_cursor }}'
AND x_pagination_size = '{{ x_pagination_size }}'
AND algorithm = '{{ algorithm }}'
AND name = '{{ name }}'
AND protocol = '{{ protocol }}'
;
INSERT examples​
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: loadbalancer_pools
props:
- name: loadbalancer_id
value: "{{ loadbalancer_id }}"
description: Required parameter for the loadbalancer_pools resource.
- name: project_id
value: "{{ project_id }}"
description: Required parameter for the loadbalancer_pools resource.
- name: target_spec
description: |
Desired target specification for the pool to create
value:
algorithm: "{{ algorithm }}"
description: "{{ description }}"
healthMonitor:
delay: {{ delay }}
domainName: "{{ domainName }}"
expectedCodes: "{{ expectedCodes }}"
httpMethod: "{{ httpMethod }}"
httpVersion: "{{ httpVersion }}"
maxRetries: {{ maxRetries }}
maxRetriesDown: {{ maxRetriesDown }}
name: "{{ name }}"
timeout: {{ timeout }}
type: "{{ type }}"
urlPath: "{{ urlPath }}"
name: "{{ name }}"
persistence:
cookieName: "{{ cookieName }}"
type: "{{ type }}"
protocol: "{{ protocol }}"
UPDATE examples​
- update
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​
- delete
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
;