Skip to content

Attach or Detach a LoadBalancer IP

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"
}'

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).

ip_address
required
string

The reserved IP address to act on (from List LB IPs).

Example

203.0.113.20
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>
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

323906
type
required

The action to perform.

string

Example

attach

Example

{
"vm_id": 323906,
"type": "attach"
}

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."
}