region_loadbalancing_loadbalancers
Creates, updates, deletes, gets or lists a region_loadbalancing_loadbalancers resource.
Overview​
| Name | region_loadbalancing_loadbalancers |
| Type | Resource |
| Id | ovh.cloud_network.region_loadbalancing_loadbalancers |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | ID of the resource |
name | string | Name of the resource |
flavor_id | string (uuid) | ID of the flavor (wire: flavorId) |
vip_network_id | string (uuid) | Openstack ID of the network for the Virtual IP (wire: vipNetworkId) |
vip_subnet_id | string (uuid) | ID of the subnet for the Virtual IP (wire: vipSubnetId) |
created_at | string (date-time) | The UTC date and timestamp when the resource was created (wire: createdAt) |
floating_ip | object | Information about floating IP (wire: floatingIp) |
operating_status | string | Operating status of the resource (degraded, draining, error, noMonitor, offline, online) (wire: operatingStatus) |
provisioning_status | string | Provisioning status of the resource (active, creating, deleted, deleting, error, updating) (wire: provisioningStatus) |
region | string | Region of the resource |
updated_at | string (date-time) | UTC date and timestamp when the resource was created (wire: updatedAt) |
vip_address | string (ipv4) | IP address of the Virtual IP (example: 192.0.2.0) (wire: vipAddress) |
LoadBalancer
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | ID of the resource |
name | string | Name of the resource |
flavor_id | string (uuid) | ID of the flavor (wire: flavorId) |
vip_network_id | string (uuid) | Openstack ID of the network for the Virtual IP (wire: vipNetworkId) |
vip_subnet_id | string (uuid) | ID of the subnet for the Virtual IP (wire: vipSubnetId) |
created_at | string (date-time) | The UTC date and timestamp when the resource was created (wire: createdAt) |
floating_ip | object | Information about floating IP (wire: floatingIp) |
operating_status | string | Operating status of the resource (degraded, draining, error, noMonitor, offline, online) (wire: operatingStatus) |
provisioning_status | string | Provisioning status of the resource (active, creating, deleted, deleting, error, updating) (wire: provisioningStatus) |
region | string | Region of the resource |
updated_at | string (date-time) | UTC date and timestamp when the resource was created (wire: updatedAt) |
vip_address | string (ipv4) | IP address of the Virtual IP (example: 192.0.2.0) (wire: vipAddress) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | load_balancer_id, region_name, service_name | Get details about a load balancer | |
list | select | region_name, service_name | List your load balancers | |
create | insert | region_name, service_name, flavor_id, network | Create a loadbalancer | |
update | update | load_balancer_id, region_name, service_name | Edit a loadbalancer | |
delete | delete | load_balancer_id, region_name, service_name | Delete loadbalancer | |
associate_floating_ip | exec | loadBalancerId, regionName, service_name, floatingIpId, ip | Associate an existing floating IP to a loadbalancer | |
floating_ip | exec | loadBalancerId, regionName, service_name, ip | Create a floating IP and attach it to a loadbalancer | |
log_url | exec | loadBalancerId, regionName, service_name, kind | Generates 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.
| 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"}}) |
loadBalancerId | string (uuid) | Load balancer ID |
load_balancer_id | string (uuid) | Load balancer ID (wire: loadBalancerId) |
regionName | string | Region name |
region_name | string | Region name (wire: regionName) |
service_name | string | The Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set. |
SELECT examples​
- get
- list
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
;
List your load balancers
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 region_name = '{{ region_name }}' -- required
AND service_name = '{{ service_name }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
;
INSERT examples​
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: region_loadbalancing_loadbalancers
props:
- name: region_name
value: "{{ region_name }}"
description: Required parameter for the region_loadbalancing_loadbalancers resource.
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the region_loadbalancing_loadbalancers resource.
- name: flavor_id
value: "{{ flavor_id }}"
description: |
Loadbalancer flavor id
- name: listeners
description: |
Listeners to create with the loadbalancer
value:
- allowedCidrs: "{{ allowedCidrs }}"
description: "{{ description }}"
name: "{{ name }}"
pool:
algorithm: "{{ algorithm }}"
healthMonitor:
delay: {{ delay }}
httpConfiguration:
domainName: "{{ domainName }}"
expectedCodes: "{{ expectedCodes }}"
httpMethod: "{{ httpMethod }}"
httpVersion: "{{ httpVersion }}"
urlPath: "{{ urlPath }}"
maxRetries: {{ maxRetries }}
maxRetriesDown: {{ maxRetriesDown }}
monitorType: "{{ monitorType }}"
name: "{{ name }}"
operatingStatus: "{{ operatingStatus }}"
provisioningStatus: "{{ provisioningStatus }}"
timeout: {{ timeout }}
members:
- address: "{{ address }}"
name: "{{ name }}"
protocolPort: {{ protocolPort }}
weight: {{ weight }}
name: "{{ name }}"
protocol: "{{ protocol }}"
sessionPersistence:
cookieName: "{{ cookieName }}"
type: "{{ type }}"
port: {{ port }}
protocol: "{{ protocol }}"
secretId: "{{ secretId }}"
timeoutClientData: {{ timeoutClientData }}
timeoutMemberData: {{ timeoutMemberData }}
tlsVersions: "{{ tlsVersions }}"
- name: name
value: "{{ name }}"
description: |
Name of the member
- name: network
description: |
Network information to create the loadbalancer
value:
private:
floatingIp:
id: "{{ id }}"
floatingIpCreate:
description: "{{ description }}"
gateway:
id: "{{ id }}"
gatewayCreate:
model: "{{ model }}"
name: "{{ name }}"
network:
id: "{{ id }}"
subnetId: "{{ subnetId }}"
UPDATE examples​
- update
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
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_floating_ip
- floating_ip
- log_url
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 }}"
}'
;
Create a floating IP and attach it to a loadbalancer
EXEC ovh.cloud_network.region_loadbalancing_loadbalancers.floating_ip
@loadBalancerId='{{ loadBalancerId }}' --required,
@regionName='{{ regionName }}' --required,
@service_name='{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
@@json=
'{
"gateway": "{{ gateway }}",
"ip": "{{ ip }}"
}'
;
Generates a temporary URL to read the logs of one kind. The URL expires.
EXEC ovh.cloud_network.region_loadbalancing_loadbalancers.log_url
@loadBalancerId='{{ loadBalancerId }}' --required,
@regionName='{{ regionName }}' --required,
@service_name='{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
@@json=
'{
"kind": "{{ kind }}"
}'
;