Load Balancer Actions
Add Service
Adds a service to a Load Balancer.
Operation specific errors
| Status | Code | Description |
|---|---|---|
| 412 | source_port_already_used | The source port you are trying to add is already in use |
post/load_balancers/{id}/actions/add_service
Request
- Base URL: https://api.hetzner.cloud/v1
- URL: https://api.hetzner.cloud/v1/load_balancers/{id}/actions/add_service
- Auth: HTTP bearer
Path parameters
idinteger required
ID of the Load Balancer.
Example:42
ID of the Load Balancer.
Request body
Example request
{
"protocol": "https",
"listen_port": 443,
"destination_port": 80,
"health_check": {
"protocol": "http",
"port": 4711,
"interval": 15,
"timeout": 10,
"retries": 3,
"http": {
"domain": "example.com",
"path": "/",
"response": "{\"status\": \"ok\"}",
"status_codes": [
"2??",
"3??"
]
}
},
"http": {
"cookie_name": "HCLBSTICKY",
"cookie_lifetime": 300,
"timeout_idle": 50,
"certificates": [
897
],
"redirect_http": true,
"sticky_sessions": true
}
}Response
Request succeeded.
Example response
{
"action": {
"id": 42,
"command": "start_resource",
"started": "2016-01-30T23:55:00Z",
"finished": "2016-01-30T23:55:00Z",
"progress": 100,
"resources": [
{
"id": 42,
"type": "server"
}
],
"error": {
"code": "action_failed",
"message": "Action failed"
}
}
}Changes
No recorded changes to this operation across all 1 revision of this API.