http_farms
Creates, updates, deletes, gets or lists a http_farms resource.
Overview​
| Name | http_farms |
| Type | Resource |
| Id | ovh.ip_loadbalancing.http_farms |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
farm_id | integer | Id of your farm (wire: farmId) |
vrack_network_id | integer | Internal Load Balancer identifier of the vRack private network attached to your farm, mandatory when your Load Balancer is attached to a vRack (wire: vrackNetworkId) |
display_name | string | Human readable name for your backend, this field is for you (wire: displayName) |
balance | string | Load balancing algorithm. 'roundrobin' if null (first, leastconn, roundrobin, source, uri) |
port | integer | Port attached to your farm. Inherited from frontend if null |
probe | object | Probe used to determine if a backend is alive and can handle requests. Defaults to tcp on the same port as the farm |
stickiness | string | Stickiness type. No stickiness if null (cookie, sourceIp) |
zone | string | Zone of you farm |
HTTP Farm
| Name | Datatype | Description |
|---|---|---|
farm_id | integer | Id of your farm (wire: farmId) |
vrack_network_id | integer | Internal Load Balancer identifier of the vRack private network attached to your farm, mandatory when your Load Balancer is attached to a vRack (wire: vrackNetworkId) |
display_name | string | Human readable name for your backend, this field is for you (wire: displayName) |
balance | string | Load balancing algorithm. 'roundrobin' if null (first, leastconn, roundrobin, source, uri) |
port | integer | Port attached to your farm. Inherited from frontend if null |
probe | object | Probe used to determine if a backend is alive and can handle requests. Defaults to tcp on the same port as the farm |
stickiness | string | Stickiness type. No stickiness if null (cookie, sourceIp) |
zone | string | Zone of you farm |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | farm_id, service_name | Get an HTTP farm | |
list | select | service_name | vrack_network_id, zone, x_pagination_mode | List HTTP farms |
create | insert | service_name, zone | Create an HTTP farm | |
update | update | farm_id, service_name | Update an HTTP farm | |
delete | delete | farm_id, service_name | Delete an HTTP farm |
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"}}) |
farm_id | integer | Id of your farm (wire: farmId) |
service_name | string | The internal name of your IP load balancing (wire: serviceName) |
vrack_network_id | integer | Filter the value of vrackNetworkId property (=) (wire: vrackNetworkId) |
x_pagination_mode | string | Sent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode) |
zone | string | Filter the value of zone property (=) |
SELECT examples​
- get
- list
Get an HTTP farm
SELECT
farm_id,
vrack_network_id,
display_name,
balance,
port,
probe,
stickiness,
zone
FROM ovh.ip_loadbalancing.http_farms
WHERE farm_id = '{{ farm_id }}' -- required
AND service_name = '{{ service_name }}' -- required
;
List HTTP farms
SELECT
farm_id,
vrack_network_id,
display_name,
balance,
port,
probe,
stickiness,
zone
FROM ovh.ip_loadbalancing.http_farms
WHERE service_name = '{{ service_name }}' -- required
AND vrack_network_id = '{{ vrack_network_id }}'
AND zone = '{{ zone }}'
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
Create an HTTP farm
INSERT INTO ovh.ip_loadbalancing.http_farms (
balance,
display_name,
port,
probe,
stickiness,
vrack_network_id,
zone,
service_name
)
SELECT
'{{ balance }}',
'{{ display_name }}',
{{ port }},
'{{ probe }}',
'{{ stickiness }}',
{{ vrack_network_id }},
'{{ zone }}' /* required */,
'{{ service_name }}'
RETURNING
farm_id,
vrack_network_id,
display_name,
balance,
port,
probe,
stickiness,
zone
;
# Description fields are for documentation purposes
- name: http_farms
props:
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the http_farms resource.
- name: balance
value: "{{ balance }}"
description: |
Load balancing algorithm. 'roundrobin' if null
valid_values: ['first', 'leastconn', 'roundrobin', 'source', 'uri']
- name: display_name
value: "{{ display_name }}"
description: |
Human readable name for your backend, this field is for you
- name: port
value: {{ port }}
description: |
Port attached to your farm ([1..49151]). Inherited from frontend if null
- name: probe
description: |
Probe used to determine if a backend is alive and can handle requests
value:
forceSsl: {{ forceSsl }}
interval: {{ interval }}
match: "{{ match }}"
method: "{{ method }}"
negate: {{ negate }}
pattern: "{{ pattern }}"
port: {{ port }}
type: "{{ type }}"
url: "{{ url }}"
- name: stickiness
value: "{{ stickiness }}"
description: |
Stickiness type. No stickiness if null
valid_values: ['cookie', 'sourceIp']
- name: vrack_network_id
value: {{ vrack_network_id }}
description: |
Internal Load Balancer identifier of the vRack private network to attach to your farm, mandatory when your Load Balancer is attached to a vRack
- name: zone
value: "{{ zone }}"
description: |
Zone of your farm
UPDATE examples​
- update
Update an HTTP farm
UPDATE ovh.ip_loadbalancing.http_farms
SET
balance = '{{ balance }}',
display_name = '{{ display_name }}',
port = {{ port }},
probe = '{{ probe }}',
stickiness = '{{ stickiness }}',
vrack_network_id = {{ vrack_network_id }}
WHERE
farm_id = '{{ farm_id }}' --required
AND service_name = '{{ service_name }}' --required;
DELETE examples​
- delete
Delete an HTTP farm
DELETE FROM ovh.ip_loadbalancing.http_farms
WHERE farm_id = '{{ farm_id }}' --required
AND service_name = '{{ service_name }}' --required
;