curl --location --request PUT 'https://api.hetzner.cloud/v1/primary_ips/' \
--header 'Content-Type: application/json' \
--data-raw '{
"auto_delete": true,
"labels": {
"labelkey": "value"
},
"name": "my-ip"
}'
{
"primary_ip": {
"assignee_id": 17,
"assignee_type": "server",
"auto_delete": true,
"blocked": false,
"created": "2016-01-30T23:55:00.000Z",
"datacenter": {
"description": "Falkenstein DC Park 8",
"id": 42,
"location": {
"city": "Falkenstein",
"country": "DE",
"description": "Falkenstein DC Park 1",
"id": 1,
"latitude": 50.47612,
"longitude": 12.370071,
"name": "fsn1",
"network_zone": "eu-central"
},
"name": "fsn1-dc8",
"server_types": {
"available": [
1,
2,
3
],
"available_for_migration": [
1,
2,
3
],
"supported": [
1,
2,
3
]
}
},
"dns_ptr": [
{
"dns_ptr": "server.example.com",
"ip": "131.232.99.1"
}
],
"id": 42,
"ip": "131.232.99.1",
"labels": {
"property1": "string",
"property2": "string"
},
"name": "my-resource",
"protection": {
"delete": false
},
"type": "ipv4"
}
}