Skip to main content

region_loadbalancing_loadbalancers

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

Overview​

Nameregion_loadbalancing_loadbalancers
TypeResource
Idovh.cloud_network.region_loadbalancing_loadbalancers

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idstring (uuid)ID of the resource
namestringName of the resource
flavor_idstring (uuid)ID of the flavor (wire: flavorId)
vip_network_idstring (uuid)Openstack ID of the network for the Virtual IP (wire: vipNetworkId)
vip_subnet_idstring (uuid)ID of the subnet for the Virtual IP (wire: vipSubnetId)
created_atstring (date-time)The UTC date and timestamp when the resource was created (wire: createdAt)
floating_ipobjectInformation about floating IP (wire: floatingIp)
operating_statusstringOperating status of the resource (degraded, draining, error, noMonitor, offline, online) (wire: operatingStatus)
provisioning_statusstringProvisioning status of the resource (active, creating, deleted, deleting, error, updating) (wire: provisioningStatus)
regionstringRegion of the resource
updated_atstring (date-time)UTC date and timestamp when the resource was created (wire: updatedAt)
vip_addressstring (ipv4)IP address of the Virtual IP (example: 192.0.2.0) (wire: vipAddress)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectload_balancer_id, region_name, service_nameGet details about a load balancer
listselectregion_name, service_nameList your load balancers
createinsertregion_name, service_name, flavor_id, networkCreate a loadbalancer
updateupdateload_balancer_id, region_name, service_nameEdit a loadbalancer
deletedeleteload_balancer_id, region_name, service_nameDelete loadbalancer
associate_floating_ipexecloadBalancerId, regionName, service_name, floatingIpId, ipAssociate an existing floating IP to a loadbalancer
floating_ipexecloadBalancerId, regionName, service_name, ipCreate a floating IP and attach it to a loadbalancer
log_urlexecloadBalancerId, regionName, service_name, kindGenerates a temporary URL to read the logs of one kind. The URL expires.

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"}})
loadBalancerIdstring (uuid)Load balancer ID
load_balancer_idstring (uuid)Load balancer ID (wire: loadBalancerId)
regionNamestringRegion name
region_namestringRegion name (wire: regionName)
service_namestringThe Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set.

SELECT examples​

Get details about a load balancer

SELECT
id,
name,
flavor_id,
vip_network_id,
vip_subnet_id,
created_at,
floating_ip,
operating_status,
provisioning_status,
region,
updated_at,
vip_address
FROM ovh.cloud_network.region_loadbalancing_loadbalancers
WHERE load_balancer_id = '{{ load_balancer_id }}' -- required
AND region_name = '{{ region_name }}' -- required
AND service_name = '{{ service_name }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
;

INSERT examples​

Create a loadbalancer

INSERT INTO ovh.cloud_network.region_loadbalancing_loadbalancers (
flavor_id,
listeners,
name,
network,
region_name,
service_name
)
SELECT
'{{ flavor_id }}' /* required */,
'{{ listeners }}',
'{{ name }}',
'{{ network }}' /* required */,
'{{ region_name }}',
'{{ service_name }}'
RETURNING
id,
resource_id,
action,
completed_at,
created_at,
progress,
regions,
started_at,
status,
sub_operations
;

UPDATE examples​

Edit a loadbalancer

UPDATE ovh.cloud_network.region_loadbalancing_loadbalancers
SET
description = '{{ description }}',
flavor_id = '{{ flavor_id }}',
name = '{{ name }}'
WHERE
load_balancer_id = '{{ load_balancer_id }}' --required
AND region_name = '{{ region_name }}' --required
AND service_name = '{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
RETURNING
id,
name,
flavor_id,
operation_id,
vip_network_id,
vip_subnet_id,
created_at,
floating_ip,
operating_status,
provisioning_status,
region,
updated_at,
vip_address;

DELETE examples​

Delete loadbalancer

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

Lifecycle Methods​

EXEC variables use wire (API) names.

Associate an existing floating IP to a loadbalancer

EXEC ovh.cloud_network.region_loadbalancing_loadbalancers.associate_floating_ip
@loadBalancerId='{{ loadBalancerId }}' --required,
@regionName='{{ regionName }}' --required,
@service_name='{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
@@json=
'{
"floatingIpId": "{{ floatingIpId }}",
"gateway": "{{ gateway }}",
"ip": "{{ ip }}"
}'
;