loadbalancer_pool_members
Creates, updates, deletes, gets or lists a loadbalancer_pool_members resource.
Overview​
| Name | loadbalancer_pool_members |
| Type | Resource |
| Id | ovh.public_cloud_network.loadbalancer_pool_members |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | Unique identifier of the member |
checksum | string | Computed hash representing the current target specification value |
created_at | string (date-time) | Creation date of the member (wire: createdAt) |
current_state | object | Current state of the member (wire: currentState) |
current_tasks | array | Ongoing asynchronous tasks related to the member (wire: currentTasks) |
resource_status | string | Member 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 member (wire: targetSpec) |
updated_at | string (date-time) | Last update date of the member (wire: updatedAt) |
A Public Cloud load balancer pool member
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | Unique identifier of the member |
checksum | string | Computed hash representing the current target specification value |
created_at | string (date-time) | Creation date of the member (wire: createdAt) |
current_state | object | Current state of the member (wire: currentState) |
current_tasks | array | Ongoing asynchronous tasks related to the member (wire: currentTasks) |
resource_status | string | Member 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 member (wire: targetSpec) |
updated_at | string (date-time) | Last update date of the member (wire: updatedAt) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | loadbalancer_id, member_id, pool_id, project_id | Returns the pool member, including its address, port and weight. | |
list | select | loadbalancer_id, pool_id, project_id | x_pagination_cursor, x_pagination_size, address, name | Returns the members of the pool.<br /><br />### Filters<br />The optional name and address query parameters narrow the list. Each one can be repeated (for example ?name=web&name=api): repeated values of the same parameter are combined with OR, and different parameters are combined with AND. An invalid address 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, pool_id, project_id, target_spec | Adds a backend server to the pool at a given address and port, with an optional weight and health-check override. | |
update | update | loadbalancer_id, member_id, pool_id, project_id, target_spec | Replaces the member's target specification as a whole. The body carries the complete desired state of every field publicCloud.loadbalancer.MemberUpdateTargetSpec exposes — backup, monitor, name and weight — so read the member first and restate every value you want to keep: a field left out of targetSpec is cleared, not carried over from the stored specification.<br /><br />monitor is replaced as a whole, and so are the fields inside it. Leaving monitor out clears the health-monitoring override, and health monitoring falls back to the member's own address and protocol port. Sending a monitor that omits address or port clears just that one, and the member's own value is used for it.<br /><br />The create-only fields address, protocolPort and subnet cannot be changed once the member exists. They are deliberately absent from the update model, and sending one is rejected with a 400.<br /><br />The optional checksum guards against a lost update: when supplied it must match the member'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, member_id, pool_id, project_id | Deletes the pool member. |
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) |
member_id | string (uuid) | Member ID (wire: memberId) |
pool_id | string (uuid) | Pool ID (wire: poolId) |
project_id | string | The Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set. |
address | array | Filter by member IP address (exact match). Repeatable. |
name | array | Filter by member name (case-insensitive substring match). 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 member, including its address, port and weight.
SELECT
id,
checksum,
created_at,
current_state,
current_tasks,
resource_status,
target_spec,
updated_at
FROM ovh.public_cloud_network.loadbalancer_pool_members
WHERE loadbalancer_id = '{{ loadbalancer_id }}' -- required
AND member_id = '{{ member_id }}' -- required
AND pool_id = '{{ pool_id }}' -- required
AND project_id = '{{ project_id }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
;
Returns the members of the pool.<br /><br />### Filters<br />The optional name and address query parameters narrow the list. Each one can be repeated (for example ?name=web&name=api): repeated values of the same parameter are combined with OR, and different parameters are combined with AND. An invalid address 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_pool_members
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 x_pagination_cursor = '{{ x_pagination_cursor }}'
AND x_pagination_size = '{{ x_pagination_size }}'
AND address = '{{ address }}'
AND name = '{{ name }}'
;
INSERT examples​
- create
- Manifest
Adds a backend server to the pool at a given address and port, with an optional weight and health-check override.
INSERT INTO ovh.public_cloud_network.loadbalancer_pool_members (
target_spec,
loadbalancer_id,
pool_id,
project_id
)
SELECT
'{{ target_spec }}' /* required */,
'{{ loadbalancer_id }}',
'{{ pool_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_pool_members
props:
- name: loadbalancer_id
value: "{{ loadbalancer_id }}"
description: Required parameter for the loadbalancer_pool_members resource.
- name: pool_id
value: "{{ pool_id }}"
description: Required parameter for the loadbalancer_pool_members resource.
- name: project_id
value: "{{ project_id }}"
description: Required parameter for the loadbalancer_pool_members resource.
- name: target_spec
description: |
Desired target specification for the member to create
value:
address: "{{ address }}"
backup: {{ backup }}
monitor:
address: "{{ address }}"
port: {{ port }}
name: "{{ name }}"
protocolPort: {{ protocolPort }}
subnet:
id: "{{ id }}"
weight: {{ weight }}
UPDATE examples​
- update
Replaces the member's target specification as a whole. The body carries the complete desired state of every field publicCloud.loadbalancer.MemberUpdateTargetSpec exposes — backup, monitor, name and weight — so read the member first and restate every value you want to keep: a field left out of targetSpec is cleared, not carried over from the stored specification.<br /><br />monitor is replaced as a whole, and so are the fields inside it. Leaving monitor out clears the health-monitoring override, and health monitoring falls back to the member's own address and protocol port. Sending a monitor that omits address or port clears just that one, and the member's own value is used for it.<br /><br />The create-only fields address, protocolPort and subnet cannot be changed once the member exists. They are deliberately absent from the update model, and sending one is rejected with a 400.<br /><br />The optional checksum guards against a lost update: when supplied it must match the member'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_pool_members
SET
checksum = '{{ checksum }}',
target_spec = '{{ target_spec }}'
WHERE
loadbalancer_id = '{{ loadbalancer_id }}' --required
AND member_id = '{{ member_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 member.
DELETE FROM ovh.public_cloud_network.loadbalancer_pool_members
WHERE loadbalancer_id = '{{ loadbalancer_id }}' --required
AND member_id = '{{ member_id }}' --required
AND pool_id = '{{ pool_id }}' --required
AND project_id = '{{ project_id }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
;