action hetzner_post_servers_id_actions_attach_to_network { label: "Attach a Server to a Network" description: "Attaches a Server to a network. This will complement the fixed public Server interface by adding an additional ethernet interface to the Server which is connected to the specified network.\n\nThe Server will get an IP auto assigned from a subnet of type `server` in the same `network_zone`.\n\nUsing the `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.\n\n**Call specific error codes**\n\n| Code | Description |\n|----------------------------------|-----------------------------------------------------------------------|\n| `server_already_attached` | The server is already attached to the network |\n| `ip_not_available` | The provided Network IP is not available |\n| `no_subnet_available` | No Subnet or IP is available for the Server within the network |\n| `networks_overlap` | The network IP range overlaps with one of the server networks |\n" provider: hetzner method: POST path: "/servers/{id}/actions/attach_to_network" encoding: json input: { type: "object" properties: { alias_ips: { type: "array" description: "Additional IPs to be assigned to this Server" items: { type: "string" } } id: { type: "integer" } ip: { type: "string" description: "IP to request to be assigned to this Server; if you do not provide this then you will be auto assigned an IP address" } network: { type: "integer" description: "ID of an existing network to attach the Server to" } } required: ["id", "network"] additionalProperties: false } output: { 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"] } } } } } }