Assigns a Primary IP to a Server.
A Server can only have one Primary IP of type ipv4 and one of type ipv6 assigned. If you need more IPs use Floating IPs.
The Server must be powered off (status off) in order for this operation to succeed.
643 matches
100 actions
Hetzner Cloud
100 actions
Infrastructure/Hetzner Cloud
Assigns a Primary IP to a Server.
A Server can only have one Primary IP of type ipv4 and one of type ipv6 assigned. If you need more IPs use Floating IPs.
The Server must be powered off (status off) in order for this operation to succeed.
| Code | Description |
|---|---|
server_not_stopped | The server is running, but needs to be powered off |
primary_ip_already_assigned | Primary ip is already assigned to a different server |
server_has_ipv4 | The server already has an ipv4 address |
server_has_ipv6 | The server already has an ipv6 address |
{
"type": "object",
"properties": {
"assignee_id": {
"type": "integer",
"description": "ID of a resource of type `assignee_type`"
},
"assignee_type": {
"type": "string",
"description": "Type of resource assigning the Primary IP to",
"enum": [
"server"
]
},
"id": {
"type": "integer"
}
},
"required": [
"assignee_id",
"assignee_type",
"id"
],
"additionalProperties": false
}{
"type": "object",
"required": [
"action"
],
"properties": {
"action": {
"type": "object",
"required": [
"command",
"error",
"finished",
"id",
"progress",
"resources",
"started",
"status"
],
"properties": {
"command": {
"type": "string",
"description": "Command executed in the Action"
},
"error": {
"type": "object",
"description": "Error message for the Action if error occurred, otherwise null",
"required": [
"code",
"message"
],
"properties": {
"code": {
"type": "string",
"description": "Fixed machine readable code"
},
"message": {
"type": "string",
"description": "Humanized error message"
}
}
},
"finished": {
"type": "string",
"description": "Point in time when the Action was finished (in ISO-8601 format). Only set if the Action is finished otherwise null."
},
"id": {
"type": "integer",
"description": "ID of the Resource"
},
"progress": {
"type": "number",
"description": "Progress of Action in percent"
},
"resources": {
"type": "array",
"description": "Resources the Action relates to",
"items": {
"type": "object",
"required": [
"id",
"type"
],
"properties": {
"id": {
"type": "integer",
"description": "ID of the Resource"
},
"type": {
"type": "string",
"description": "Type of resource referenced"
}
}
}
},
"started": {
"type": "string",
"description": "Point in time when the Action was started (in ISO-8601 format)"
},
"status": {
"type": "string",
"description": "Status of the Action",
"enum": [
"success",
"running",
"error"
]
}
}
}
}
}