Skip to main content

loadbalancers

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

Overview​

Nameloadbalancers
TypeResource
Idovh.cloud_network.loadbalancers

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idstring (uuid)ID of the load balancer
namestringName of the load balancer
addressobjectAddress to reach the load balancer
configurationobjectInformation about version of the configuration
created_atstring (date-time)Creation date and time of the load balancer (wire: createdAt)
descriptionstringDescription of the load balancer
egress_addressobjectIPs used by the load balancer to contact backend's servers (wire: egressAddress)
networkingobjectNetworking definition
openstack_regionstringOpenstack region where the load balancer is hosted (wire: openstackRegion)
regionstringRegion where the load balancer is hosted
sizestringSize of the load balancer (L, M, S)
statusstringStatus of a load balancer (APPLYING, CREATED, DELETING, ERROR, FROZEN, RUNNING)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectload_balancer_id, service_nameGet a load balancer (Beta version)
listselectservice_namex_pagination_modeList all load balancer for a tenant (Beta version)
createinsertservice_name, regionCreate a load balancer (Beta version)
updateupdateload_balancer_id, service_nameUpdate a load balancer (Beta version)
deletedeleteload_balancer_id, service_nameDelete a load balancer (Beta version)

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"}})
load_balancer_idstring (uuid)Load balancer ID (wire: loadBalancerId)
service_namestringThe Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set.
x_pagination_modestringSent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode)

SELECT examples​

Get a load balancer (Beta version)

SELECT
id,
name,
address,
configuration,
created_at,
description,
egress_address,
networking,
openstack_region,
region,
size,
status
FROM ovh.cloud_network.loadbalancers
WHERE load_balancer_id = '{{ load_balancer_id }}' -- required
AND service_name = '{{ service_name }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
;

INSERT examples​

Create a load balancer (Beta version)

INSERT INTO ovh.cloud_network.loadbalancers (
description,
name,
networking,
openstack_region,
region,
size,
service_name
)
SELECT
'{{ description }}',
'{{ name }}',
'{{ networking }}',
'{{ openstack_region }}',
'{{ region }}' /* required */,
'{{ size }}',
'{{ service_name }}'
RETURNING
id,
name,
address,
configuration,
created_at,
description,
egress_address,
networking,
openstack_region,
region,
size,
status
;

UPDATE examples​

Update a load balancer (Beta version)

UPDATE ovh.cloud_network.loadbalancers
SET
description = '{{ description }}',
name = '{{ name }}',
size = '{{ size }}'
WHERE
load_balancer_id = '{{ load_balancer_id }}' --required
AND service_name = '{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
RETURNING
id,
name,
address,
configuration,
created_at,
description,
egress_address,
networking,
openstack_region,
region,
size,
status;

DELETE examples​

Delete a load balancer (Beta version)

DELETE FROM ovh.cloud_network.loadbalancers
WHERE load_balancer_id = '{{ load_balancer_id }}' --required
AND service_name = '{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
;