Primary IPs

Update a Primary IP

Update a Primary IP.

If another change is concurrently performed on this Primary IP, a error response with code conflict will be returned.

put/primary_ips/{id}

Request

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

Path parameters

idinteger required

ID of the Primary IP.

Example:42

ID of the Primary IP.

Request body

namestring

Name of the Resource. Must be unique per Project.

labelsobject

User-defined labels (key/value pairs) for the Resource.

Note that the set of Labels provided in the request will overwrite the existing one.

For more information, see "Labels".

auto_deleteboolean

Auto deletion state.

If enabled the Primary IP will be deleted once the assigned resource gets deleted.

Example request

{
  "name": "my-resource",
  "labels": {
    "environment": "prod",
    "example.com/my": "label",
    "just-a-key": ""
  },
  "auto_delete": true
}

Response

Request succeeded.

Example response

{
  "primary_ip": {
    "id": 42,
    "name": "my-resource",
    "labels": {
      "environment": "prod",
      "example.com/my": "label",
      "just-a-key": ""
    },
    "created": "2016-01-30T23:55:00Z",
    "location": {
      "id": 42,
      "name": "fsn1",
      "description": "Falkenstein DC Park 1",
      "country": "DE",
      "city": "Falkenstein",
      "latitude": 50.47612,
      "longitude": 12.370071,
      "network_zone": "eu-central"
    },
    "ip": "2001:db8::/64",
    "dns_ptr": [
      {
        "ip": "2001:db8::1",
        "dns_ptr": "server.example.com"
      }
    ],
    "type": "ipv6",
    "auto_delete": true,
    "assignee_type": "server",
    "assignee_id": 17
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.