Add a Load Balancer Service
Body Required
-
Load Balancer Service name
Minimum length is
1
, maximum length is255
. -
description string
Load Balancer Service description
Maximum length is
255
. -
Instance Pool to forward network traffic to
Additional properties are allowed.
-
Network traffic protocol
Values are
tcp
orudp
. -
Load balancing strategy
Values are
round-robin
,maglev-hash
, orsource-hash
. -
Port exposed on the Load Balancer's public IP
Minimum value is
1
, maximum value is65535
. -
Port on which the network traffic will be forwarded to on the receiving instance
Minimum value is
1
, maximum value is65535
. -
Healthcheck configuration
Additional properties are allowed.
POST
/load-balancer/{id}/service
curl \
-X POST https://api-ch-gva-2.exoscale.com/v2/load-balancer/{id}/service \
-H "Content-Type: application/json" \
-d '{"name":"string","description":"string","instance-pool":{"anti-affinity-groups":[{"name":"string","description":"string"}],"description":"string","public-ip-assignment":"inet4","labels":{"additionalProperty1":"string","additionalProperty2":"string"},"security-groups":[{"name":"string","description":"string","external-sources":["string"],"rules":[{"description":"string","start-port":42,"protocol":"tcp","icmp":{"code":42,"type":42},"end-port":42,"security-group":{"name":"string","visibility":"private"},"network":"string","flow-direction":"ingress"}]}],"elastic-ips":[{"description":"string","healthcheck":{"strikes-ok":42,"tls-skip-verify":true,"tls-sni":"string","strikes-fail":42,"mode":"tcp","port":42,"uri":"string","interval":42,"timeout":42},"labels":{"additionalProperty1":"string","additionalProperty2":"string"}}],"name":"string","instance-type":{},"min-available":42,"private-networks":[{"description":"string","labels":{"additionalProperty1":"string","additionalProperty2":"string"},"name":"string","start-ip":"string","vni":42,"netmask":"string","options":{"routers":["string"],"dns-servers":["string"],"ntp-servers":["string"],"domain-search":["string"]},"end-ip":"string"}],"template":{"description":"string","ssh-key-enabled":true,"name":"string","default-user":"string","size":42,"password-enabled":true,"checksum":"string","boot-mode":"legacy","zones":["ch-dk-2"],"url":"string"},"size":42,"ssh-key":{"name":"string"},"instance-prefix":"string","user-data":"string","deploy-target":{"id":"string","name":"string","type":"edge","description":"string"},"ipv6-enabled":true,"disk-size":42,"ssh-keys":[{"name":"string"}]},"protocol":"tcp","strategy":"round-robin","port":42,"target-port":42,"healthcheck":{"mode":"tcp","interval":42,"uri":"string","port":42,"timeout":42,"retries":42,"tls-sni":"string"}}'
Request examples
{
"name": "string",
"description": "string",
"instance-pool": {
"anti-affinity-groups": [
{
"name": "string",
"description": "string"
}
],
"description": "string",
"public-ip-assignment": "inet4",
"labels": {
"additionalProperty1": "string",
"additionalProperty2": "string"
},
"security-groups": [
{
"name": "string",
"description": "string",
"external-sources": [
"string"
],
"rules": [
{
"description": "string",
"start-port": 42,
"protocol": "tcp",
"icmp": {
"code": 42,
"type": 42
},
"end-port": 42,
"security-group": {
"name": "string",
"visibility": "private"
},
"network": "string",
"flow-direction": "ingress"
}
]
}
],
"elastic-ips": [
{
"description": "string",
"healthcheck": {
"strikes-ok": 42,
"tls-skip-verify": true,
"tls-sni": "string",
"strikes-fail": 42,
"mode": "tcp",
"port": 42,
"uri": "string",
"interval": 42,
"timeout": 42
},
"labels": {
"additionalProperty1": "string",
"additionalProperty2": "string"
}
}
],
"name": "string",
"instance-type": {},
"min-available": 42,
"private-networks": [
{
"description": "string",
"labels": {
"additionalProperty1": "string",
"additionalProperty2": "string"
},
"name": "string",
"start-ip": "string",
"vni": 42,
"netmask": "string",
"options": {
"routers": [
"string"
],
"dns-servers": [
"string"
],
"ntp-servers": [
"string"
],
"domain-search": [
"string"
]
},
"end-ip": "string"
}
],
"template": {
"description": "string",
"ssh-key-enabled": true,
"name": "string",
"default-user": "string",
"size": 42,
"password-enabled": true,
"checksum": "string",
"boot-mode": "legacy",
"zones": [
"ch-dk-2"
],
"url": "string"
},
"size": 42,
"ssh-key": {
"name": "string"
},
"instance-prefix": "string",
"user-data": "string",
"deploy-target": {
"id": "string",
"name": "string",
"type": "edge",
"description": "string"
},
"ipv6-enabled": true,
"disk-size": 42,
"ssh-keys": [
{
"name": "string"
}
]
},
"protocol": "tcp",
"strategy": "round-robin",
"port": 42,
"target-port": 42,
"healthcheck": {
"mode": "tcp",
"interval": 42,
"uri": "string",
"port": 42,
"timeout": 42,
"retries": 42,
"tls-sni": "string"
}
}
Response examples (200)
{
"id": "string",
"reason": "incorrect",
"reference": {
"id": "string",
"link": "string",
"command": "string"
},
"message": "string",
"state": "failure"
}