Skip to main content

loadbalancer_pool_members

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

Overview​

Nameloadbalancer_pool_members
TypeResource
Idovh.public_cloud_network.loadbalancer_pool_members

Fields​

The following fields are returned by SELECT queries:

successful operation

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

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectloadbalancer_id, member_id, pool_id, project_idReturns the pool member, including its address, port and weight.
listselectloadbalancer_id, pool_id, project_idx_pagination_cursor, x_pagination_size, address, nameReturns 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.
createinsertloadbalancer_id, pool_id, project_id, target_specAdds a backend server to the pool at a given address and port, with an optional weight and health-check override.
updateupdateloadbalancer_id, member_id, pool_id, project_id, target_specReplaces 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).
deletedeleteloadbalancer_id, member_id, pool_id, project_idDeletes 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.

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)
member_idstring (uuid)Member ID (wire: memberId)
pool_idstring (uuid)Pool ID (wire: poolId)
project_idstringThe Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set.
addressarrayFilter by member IP address (exact match). Repeatable.
namearrayFilter by member name (case-insensitive substring match). Repeatable.
x_pagination_cursorstringPagination cursor (wire: X-Pagination-Cursor)
x_pagination_sizeintegerPagination size (wire: X-Pagination-Size)

SELECT examples​

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
;

INSERT examples​

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
;

UPDATE examples​

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​

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
;