http_farm_servers
Creates, updates, deletes, gets or lists a http_farm_servers resource.
Overview​
| Name | http_farm_servers |
| Type | Resource |
| Id | ovh.ip_loadbalancing.http_farm_servers |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
backend_id | integer | farm id (wire: backendId) |
server_id | integer | Id of your server (wire: serverId) |
display_name | string | Human readable name for your server, this field is for you (wire: displayName) |
address | string (ipv4) | Address of your server (example: 192.0.2.0) |
backup | boolean | Backup state. Default: 'false' |
chain | string | Certificate chain. Allow server certificate verification (Avoid man-in-the-middle attacks) |
cookie | string | Server cookie value configured for cookie stickiness |
on_marked_down | string | Set action when backend marked down. (No action if null) (shutdown-sessions) (wire: onMarkedDown) |
port | integer | Port attached to your server. Inherited from farm if null |
probe | boolean | Probe state. Default: 'false' |
proxy_protocol_version | string | Disabled if null. Send PROXY protocol header. Requires a compatible server. (v1, v2, v2-ssl, v2-ssl-cn) (wire: proxyProtocolVersion) |
server_state | array | Server state (wire: serverState) |
ssl | boolean | SSL ciphering. Probes will also be sent ciphered. Default: 'false' |
status | string | Status attached to your server (active, inactive) |
weight | integer | Weight value. Defaults to 1. 0 if not used in load balancing. Servers with higher weight get more requests. |
HTTP Farm's Server
| Name | Datatype | Description |
|---|---|---|
backend_id | integer | farm id (wire: backendId) |
server_id | integer | Id of your server (wire: serverId) |
display_name | string | Human readable name for your server, this field is for you (wire: displayName) |
address | string (ipv4) | Address of your server (example: 192.0.2.0) |
backup | boolean | Backup state. Default: 'false' |
chain | string | Certificate chain. Allow server certificate verification (Avoid man-in-the-middle attacks) |
cookie | string | Server cookie value configured for cookie stickiness |
on_marked_down | string | Set action when backend marked down. (No action if null) (shutdown-sessions) (wire: onMarkedDown) |
port | integer | Port attached to your server. Inherited from farm if null |
probe | boolean | Probe state. Default: 'false' |
proxy_protocol_version | string | Disabled if null. Send PROXY protocol header. Requires a compatible server. (v1, v2, v2-ssl, v2-ssl-cn) (wire: proxyProtocolVersion) |
server_state | array | Server state (wire: serverState) |
ssl | boolean | SSL ciphering. Probes will also be sent ciphered. Default: 'false' |
status | string | Status attached to your server (active, inactive) |
weight | integer | Weight value. Defaults to 1. 0 if not used in load balancing. Servers with higher weight get more requests. |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | farm_id, server_id, service_name | Get a farm server | |
list | select | farm_id, service_name | address, cookie, status, x_pagination_mode | List farm servers |
create | insert | farm_id, service_name, address, status | Create a farm server | |
update | update | farm_id, server_id, service_name | Update a farm server | |
delete | delete | farm_id, server_id, service_name | Delete a farm server |
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) |
server_id | integer | Id of your server (wire: serverId) |
service_name | string | The internal name of your IP load balancing (wire: serviceName) |
address | string (ipv4) | Filter the value of address property (=) |
cookie | string | Filter the value of cookie property (like) |
status | string | Filter the value of status property (=) |
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) |
SELECT examples​
- get
- list
Get a farm server
SELECT
backend_id,
server_id,
display_name,
address,
backup,
chain,
cookie,
on_marked_down,
port,
probe,
proxy_protocol_version,
server_state,
ssl,
status,
weight
FROM ovh.ip_loadbalancing.http_farm_servers
WHERE farm_id = '{{ farm_id }}' -- required
AND server_id = '{{ server_id }}' -- required
AND service_name = '{{ service_name }}' -- required
;
List farm servers
SELECT
backend_id,
server_id,
display_name,
address,
backup,
chain,
cookie,
on_marked_down,
port,
probe,
proxy_protocol_version,
server_state,
ssl,
status,
weight
FROM ovh.ip_loadbalancing.http_farm_servers
WHERE farm_id = '{{ farm_id }}' -- required
AND service_name = '{{ service_name }}' -- required
AND address = '{{ address }}'
AND cookie = '{{ cookie }}'
AND status = '{{ status }}'
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
Create a farm server
INSERT INTO ovh.ip_loadbalancing.http_farm_servers (
address,
backup,
chain,
cookie,
display_name,
on_marked_down,
port,
probe,
proxy_protocol_version,
ssl,
status,
weight,
farm_id,
service_name
)
SELECT
'{{ address }}' /* required */,
{{ backup }},
'{{ chain }}',
'{{ cookie }}',
'{{ display_name }}',
'{{ on_marked_down }}',
{{ port }},
{{ probe }},
'{{ proxy_protocol_version }}',
{{ ssl }},
'{{ status }}' /* required */,
{{ weight }},
'{{ farm_id }}',
'{{ service_name }}'
RETURNING
backend_id,
server_id,
display_name,
address,
backup,
chain,
cookie,
on_marked_down,
port,
probe,
proxy_protocol_version,
server_state,
ssl,
status,
weight
;
# Description fields are for documentation purposes
- name: http_farm_servers
props:
- name: farm_id
value: {{ farm_id }}
description: Required parameter for the http_farm_servers resource.
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the http_farm_servers resource.
- name: address
value: "{{ address }}"
description: |
IPv4 address (e.g., 192.0.2.0)
- name: backup
value: {{ backup }}
description: |
Set server as backup. Default: 'false'
- name: chain
value: "{{ chain }}"
description: |
Certificate chain. Allow server certificate verification (Avoid man-in-the-middle attacks)
- name: cookie
value: "{{ cookie }}"
description: |
Set the cookie value used when 'cookie' stickiness is set in the farm. Auto generate the cookie if none provided and required.
- name: display_name
value: "{{ display_name }}"
description: |
Human readable name for your server, this field is for you
- name: on_marked_down
value: "{{ on_marked_down }}"
description: |
Enable action when backend marked down. (No action if null)
valid_values: ['shutdown-sessions']
- name: port
value: {{ port }}
description: |
Port attached to your server ([1..49151]). Inherited from farm if null
- name: probe
value: {{ probe }}
description: |
Enable/disable probe. Default: 'false'
- name: proxy_protocol_version
value: "{{ proxy_protocol_version }}"
description: |
Disabled if null. Send PROXY protocol header. Requires a compatible server.
valid_values: ['v1', 'v2', 'v2-ssl', 'v2-ssl-cn']
- name: ssl
value: {{ ssl }}
description: |
SSL ciphering. Probes will also be sent ciphered. Default: 'false'
- name: status
value: "{{ status }}"
description: |
Possible values for server status
valid_values: ['active', 'inactive']
- name: weight
value: {{ weight }}
description: |
Set weight on that server [1..256]. 0 if not used in load balancing. 1 if left null. Servers with higher weight get more requests.
UPDATE examples​
- update
Update a farm server
UPDATE ovh.ip_loadbalancing.http_farm_servers
SET
backup = {{ backup }},
chain = '{{ chain }}',
cookie = '{{ cookie }}',
display_name = '{{ display_name }}',
on_marked_down = '{{ on_marked_down }}',
port = {{ port }},
probe = {{ probe }},
proxy_protocol_version = '{{ proxy_protocol_version }}',
ssl = {{ ssl }},
status = '{{ status }}',
weight = {{ weight }}
WHERE
farm_id = '{{ farm_id }}' --required
AND server_id = '{{ server_id }}' --required
AND service_name = '{{ service_name }}' --required;
DELETE examples​
- delete
Delete a farm server
DELETE FROM ovh.ip_loadbalancing.http_farm_servers
WHERE farm_id = '{{ farm_id }}' --required
AND server_id = '{{ server_id }}' --required
AND service_name = '{{ service_name }}' --required
;