Load Balancer Actions

Attach a Load Balancer to a Network

Attach a Load Balancer to a Network.

Operation specific errors

StatusCodeDescription
422load_balancer_already_attachedThe Load Balancer is already attached to a network
422ip_not_availableThe provided Network IP is not available
422no_subnet_availableNo Subnet or IP is available for the Load Balancer within the network
post/load_balancers/{id}/actions/attach_to_network

Request

  • Base URL: https://api.hetzner.cloud/v1
  • URL: https://api.hetzner.cloud/v1/load_balancers/{id}/actions/attach_to_network
  • Auth: HTTP bearer

Path parameters

idinteger required

ID of the Load Balancer.

Example:42

ID of the Load Balancer.

Request body

networkinteger required

ID of an existing network to attach the Load Balancer to.

ipstring

IP to request to be assigned to this Load Balancer; if you do not provide this then you will be auto assigned an IP address.

ip_rangestring

IP range in CIDR block notation of the subnet to attach to.

This allows for auto assigning an IP address for a specific subnet. Providing ip that is not part of ip_range will result in an error.

Example request

{
  "network": 123,
  "ip": "10.0.1.1",
  "ip_range": "10.0.1.0/24"
}

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.