Skip to main content

http_frontends

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

Overview​

Namehttp_frontends
TypeResource
Idovh.ip_loadbalancing.http_frontends

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
default_farm_idintegerDefault HTTP Farm of your frontend (wire: defaultFarmId)
default_ssl_idintegerDefault ssl served to your customer (wire: defaultSslId)
frontend_idintegerId of your frontend (wire: frontendId)
vrack_network_idintegerInternal Load Balancer identifier of the vRack private network attached to your frontend. (wire: vrackNetworkId)
vrack_vrouter_idintegerVirtual Router Identifier. 1-255 (wire: vrackVrouterId)
display_namestringHuman readable name for your frontend, this field is for you (wire: displayName)
allowed_sourcearrayRestrict IP Load Balancing access to these ip block. No restriction if null. You cannot specify allowedSource and deniedSource both at the same time (wire: allowedSource)
dedicated_ipfoarrayOnly attach frontend on these ip. No restriction if null (wire: dedicatedIpfo)
denied_sourcearrayDeny IP Load Balancing access to these ip block. No restriction if null. You cannot specify allowedSource and deniedSource both at the same time (wire: deniedSource)
disabledbooleanDisable frontend. Default: 'false'
force_snibooleanblock all SSL connection request without SNI. Default: 'false' (wire: forceSni)
hstsbooleanHTTP Strict Transport Security. Default: 'false'
http_headerarrayAdd header to your frontend. Useful variables admitted : %ci <=> client_ip, %cp <=> client_port (wire: httpHeader)
portstringListening port(s) on the server
redirect_locationstringHTTP redirection (Ex : http:​//www.ovh.com) (wire: redirectLocation)
sslbooleanSSL deciphering. Default: 'false'
zonestringZone of you frontend

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectfrontend_id, service_nameGet an HTTP frontend
listselectservice_namedefault_farm_id, default_ssl_id, port, zone, x_pagination_modeList HTTP frontends
createinsertservice_name, port, zoneCreate an HTTP frontend
updateupdatefrontend_id, service_nameUpdate an HTTP frontend
deletedeletefrontend_id, service_nameDelete an HTTP frontend

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"}})
frontend_idintegerId of your frontend (wire: frontendId)
service_namestringThe internal name of your IP load balancing (wire: serviceName)
default_farm_idintegerFilter the value of defaultFarmId property (=) (wire: defaultFarmId)
default_ssl_idintegerFilter the value of defaultSslId property (=) (wire: defaultSslId)
portstringFilter the value of port property (like)
x_pagination_modestringSent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode)
zonestringFilter the value of zone property (=)

SELECT examples​

Get an HTTP frontend

SELECT
default_farm_id,
default_ssl_id,
frontend_id,
vrack_network_id,
vrack_vrouter_id,
display_name,
allowed_source,
dedicated_ipfo,
denied_source,
disabled,
force_sni,
hsts,
http_header,
port,
redirect_location,
ssl,
zone
FROM ovh.ip_loadbalancing.http_frontends
WHERE frontend_id = '{{ frontend_id }}' -- required
AND service_name = '{{ service_name }}' -- required
;

INSERT examples​

Create an HTTP frontend

INSERT INTO ovh.ip_loadbalancing.http_frontends (
allowed_source,
dedicated_ipfo,
default_farm_id,
default_ssl_id,
denied_source,
disabled,
display_name,
force_sni,
hsts,
http_header,
port,
redirect_location,
ssl,
zone,
service_name
)
SELECT
'{{ allowed_source }}',
'{{ dedicated_ipfo }}',
{{ default_farm_id }},
{{ default_ssl_id }},
'{{ denied_source }}',
{{ disabled }},
'{{ display_name }}',
{{ force_sni }},
{{ hsts }},
'{{ http_header }}',
'{{ port }}' /* required */,
'{{ redirect_location }}',
{{ ssl }},
'{{ zone }}' /* required */,
'{{ service_name }}'
RETURNING
default_farm_id,
default_ssl_id,
frontend_id,
vrack_network_id,
vrack_vrouter_id,
display_name,
allowed_source,
dedicated_ipfo,
denied_source,
disabled,
force_sni,
hsts,
http_header,
port,
redirect_location,
ssl,
zone
;

UPDATE examples​

Update an HTTP frontend

UPDATE ovh.ip_loadbalancing.http_frontends
SET
allowed_source = '{{ allowed_source }}',
dedicated_ipfo = '{{ dedicated_ipfo }}',
default_farm_id = {{ default_farm_id }},
default_ssl_id = {{ default_ssl_id }},
denied_source = '{{ denied_source }}',
disabled = {{ disabled }},
display_name = '{{ display_name }}',
force_sni = {{ force_sni }},
hsts = {{ hsts }},
http_header = '{{ http_header }}',
port = '{{ port }}',
redirect_location = '{{ redirect_location }}',
ssl = {{ ssl }},
zone = '{{ zone }}'
WHERE
frontend_id = '{{ frontend_id }}' --required
AND service_name = '{{ service_name }}' --required;

DELETE examples​

Delete an HTTP frontend

DELETE FROM ovh.ip_loadbalancing.http_frontends
WHERE frontend_id = '{{ frontend_id }}' --required
AND service_name = '{{ service_name }}' --required
;