POST
/api/v1/reserve_ips/k8s_public_ip/{ip_address}/actions/
curl --request POST \ --url 'https://api.e2enetworks.com/myaccount/api/v1/reserve_ips/k8s_public_ip/{ip_address}/actions/?project_id=<PROJECT_ID>&apikey=<API_KEY>&location=<LOCATION>' \ --header 'Authorization: Bearer <API_TOKEN>' \ --header 'Content-Type: application/json' \ --data '{ "vm_id": 323906, "type": "attach"}'import requests
response = requests.post( "https://api.e2enetworks.com/myaccount/api/v1/reserve_ips/k8s_public_ip/{ip_address}/actions/", params={"project_id": "<PROJECT_ID>", "apikey": "<API_KEY>", "location": "<LOCATION>"}, headers={"Authorization": "Bearer <API_TOKEN>"}, json={ "vm_id": 323906, "type": "attach", },)print(response.json())const url = new URL("https://api.e2enetworks.com/myaccount/api/v1/reserve_ips/k8s_public_ip/{ip_address}/actions/");url.search = new URLSearchParams({ project_id: "<PROJECT_ID>", apikey: "<API_KEY>", location: "<LOCATION>" });
const response = await fetch(url, { method: "POST", headers: { "Authorization": "Bearer <API_TOKEN>", "Content-Type": "application/json" }, body: JSON.stringify({ "vm_id": 323906, "type": "attach" }),});console.log(await response.json());Attaches a reserved LoadBalancer IP to a cluster node, or detaches it. Send vm_id (the target node’s VM ID) and type - attach or detach. The path takes the reserved ip_address (from List LB IPs).
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”ip_address
required
string
The reserved IP address to act on (from List LB IPs).
Example
203.0.113.20Query Parameters
Section titled “Query Parameters”project_id
required
integer
Identifier of the project to scope the request to. Required integer project ID.
Example
<PROJECT_ID>apikey
required
string
API key used to authenticate the request.
Example
<API_KEY>location
required
string
Region of the cluster.
Example
<LOCATION>Request Body
Section titled “Request Body”Media typeapplication/json
Attach or detach a reserved IP to/from a cluster node.
object
vm_id
required
VM ID of the target cluster node.
integer
Example
323906type
required
The action to perform.
string
Example
attachExample
{ "vm_id": 323906, "type": "attach"}Responses
Section titled “Responses”Successful response
Media typeapplication/json
object
code
integer
data
object
IP
string
status
string
vm_name
string
vm_id
integer
errors
object
message
string
Example
{ "code": 200, "data": { "IP": "203.0.113.20", "status": "Attached", "vm_name": "my-k8s-cluster", "vm_id": 323906 }, "message": "IP assigned Successfully."}