hetzner/primary_ip_actions

Procs

proc postPrimaryIpsIdActionsAssign(client: HetznerClient; id: int64;
                                   body: PostPrimaryIpsIdActionsAssignRequest): Future[
    PostPrimaryIpsIdActionsAssignResponse] {....stackTrace: false, raises: [
    Exception, ValueError, HttpRequestError, LibraryError, SslError, OSError,
    IOError, ProtocolError, KeyError, OpenParserJsonError, HetznerClientError],
    tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
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.

#### Call specific error codes

| 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
|
proc postPrimaryIpsIdActionsChangeDnsPtr(client: HetznerClient; id: int64;
    body: PostPrimaryIpsIdActionsChangeDnsPtrRequest): Future[
    PostPrimaryIpsIdActionsChangeDnsPtrResponse] {....stackTrace: false, raises: [
    Exception, ValueError, HttpRequestError, LibraryError, SslError, OSError,
    IOError, ProtocolError, KeyError, OpenParserJsonError, HetznerClientError],
    tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
Changes the hostname that will appear when getting the hostname belonging to this Primary IP.
proc postPrimaryIpsIdActionsChangeProtection(client: HetznerClient; id: int64;
    body: PostPrimaryIpsIdActionsChangeProtectionRequest): Future[
    PostPrimaryIpsIdActionsChangeProtectionResponse] {....stackTrace: false, raises: [
    Exception, ValueError, HttpRequestError, LibraryError, SslError, OSError,
    IOError, ProtocolError, KeyError, OpenParserJsonError, HetznerClientError],
    tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}

Changes the protection configuration of a Primary IP.

A Primary IP can only be delete protected if its auto_delete property is set to false.

proc postPrimaryIpsIdActionsUnassign(client: HetznerClient; id: int64): Future[
    PostPrimaryIpsIdActionsUnassignResponse] {....stackTrace: false, raises: [
    Exception, ValueError, HttpRequestError, LibraryError, SslError, OSError,
    IOError, ProtocolError, KeyError, OpenParserJsonError, HetznerClientError],
    tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
Unassigns a Primary IP from a Server.

The Server must be powered off (status `off`) in order for this operation to
succeed.

Note that only Servers that have at least one network interface (public or
private) attached can be powered on.

#### Call specific error codes

| Code                              | Description
|
|----------------------------------
|-------------------------------------------------------------- |
| `server_not_stopped`              | The server is running, but needs to be
powered off            |
| `server_is_load_balancer_target`  | The server ipv4 address is a loadbalancer
target              |