server
in the same network_zone
.alias_ips
attribute you can also define one or more additional IPs to the Servers. Please note that you will have to configure these IPs by hand on your Server since only the primary IP will be given out by DHCP.Code | Description |
---|---|
server_already_attached | The server is already attached to the network |
ip_not_available | The provided Network IP is not available |
no_subnet_available | No Subnet or IP is available for the Server within the network |
networks_overlap | The network IP range overlaps with one of the server networks |
curl --location --request POST 'https://api.hetzner.cloud/v1/servers//actions/attach_to_network' \
--header 'Content-Type: application/json' \
--data-raw '{
"alias_ips": [
"10.0.1.2"
],
"ip": "10.0.1.1",
"network": 4711
}'
{
"action": {
"command": "attach_to_network",
"error": {
"code": "action_failed",
"message": "Action failed"
},
"finished": null,
"id": 13,
"progress": 0,
"resources": [
{
"id": 42,
"type": "server"
},
{
"id": 4711,
"type": "network"
}
],
"started": "2016-01-30T23:50:00.000Z",
"status": "running"
}
}