action hetzner_post_load_balancers_id_actions_add_target { label: "Add Target" description: "Adds a target to a Load Balancer.\n\n#### Call specific error codes\n\n| Code | Description |\n|-----------------------------------------|-------------------------------------------------------------------------------------------------------|\n| `cloud_resource_ip_not_allowed` | The IP you are trying to add as a target belongs to a Hetzner Cloud resource |\n| `ip_not_owned` | The IP you are trying to add as a target is not owned by the Project owner |\n| `load_balancer_not_attached_to_network` | The Load Balancer is not attached to a network |\n| `robot_unavailable` | Robot was not available. The caller may retry the operation after a short delay. |\n| `server_not_attached_to_network` | The server you are trying to add as a target is not attached to the same network as the Load Balancer |\n| `target_already_defined` | The Load Balancer target you are trying to define is already defined |\n" provider: hetzner method: POST path: "/load_balancers/{id}/actions/add_target" encoding: json input: { type: "object" properties: { id: { type: "integer" } ip: { type: "object" description: "IP targets where the traffic should be routed through. It is only possible to use the (Public or vSwitch) IPs of Hetzner Online Root Servers belonging to the project owner. IPs belonging to other users are blocked. Additionally IPs belonging to services provided by Hetzner Cloud (Servers, Load Balancers, ...) are blocked as well." required: ["ip"] properties: { ip: { type: "string" description: "IP of a server that belongs to the same customer (public IPv4/IPv6) or private IP in a Subnetwork type vswitch." } } } label_selector: { type: "object" description: "Configuration for label selector targets, required if type is `label_selector`" required: ["selector"] properties: { selector: { type: "string" description: "Label selector" } } } server: { type: "object" description: "Configuration for type Server, required if type is `server`" required: ["id"] properties: { id: { type: "number" description: "ID of the Server" } } additionalProperties: false } type: { type: "string" description: "Type of the resource" enum: ["server", "label_selector", "ip"] } use_private_ip: { type: "boolean" description: "Use the private network IP instead of the public IP of the Server, requires the Server and Load Balancer to be in the same network. Default value is false." } } required: ["id", "type"] 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"] } } } } } }