POST
/api/v1/vpc/node/attach/
curl --request POST \ --url 'https://api.e2enetworks.com/myaccount/api/v1/vpc/node/attach/?project_id=<PROJECT_ID>&apikey=<API_KEY>&location=<LOCATION>' \ --header 'Authorization: Bearer <API_TOKEN>' \ --header 'Content-Type: application/json' \ --data '"{\n \"network_id\": \"{{network_id}}\",\n \"vpc_name\": \"VPC-493\",\n \"current_private_ip\": {{private_ip}},\n \"node_id\": {{node_id}},\n \"subnet_id\": \"{{subnet_id}}\",\n \"input_ip\": {{preffered_ip}},\n \"action\": \"attach\"\n}"'import requests
response = requests.post( "https://api.e2enetworks.com/myaccount/api/v1/vpc/node/attach/", params={"project_id": "<PROJECT_ID>", "apikey": "<API_KEY>", "location": "<LOCATION>"}, headers={"Authorization": "Bearer <API_TOKEN>"}, json="{\n \"network_id\": \"{{network_id}}\",\n \"vpc_name\": \"VPC-493\",\n \"current_private_ip\": {{private_ip}},\n \"node_id\": {{node_id}},\n \"subnet_id\": \"{{subnet_id}}\",\n \"input_ip\": {{preffered_ip}},\n \"action\": \"attach\"\n}",)print(response.json())const url = new URL("https://api.e2enetworks.com/myaccount/api/v1/vpc/node/attach/");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("{\n \"network_id\": \"{{network_id}}\",\n \"vpc_name\": \"VPC-493\",\n \"current_private_ip\": {{private_ip}},\n \"node_id\": {{node_id}},\n \"subnet_id\": \"{{subnet_id}}\",\n \"input_ip\": {{preffered_ip}},\n \"action\": \"attach\"\n}"),});console.log(await response.json());Parameters
Section titled “Parameters”Query 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
The target location or region for the VPC attachment.
Example
<LOCATION>Request Body
Section titled “Request Body”Media typeapplication/json
JSON string containing parameters to attach a VPC
string
Example
{ "network_id": "{{network_id}}", "vpc_name": "VPC-493", "current_private_ip": {{private_ip}}, "node_id": {{node_id}}, "subnet_id": "{{subnet_id}}", "input_ip": {{preffered_ip}}, "action": "attach"}Responses
Section titled “Responses”Successful response
Media typeapplication/json
object
code
HTTP status code indicating the result of the attach VPC operation
integer
data
object
vpc_id
Identifier of the VPC to which the resource is attached
integer
vpc_name
Identifier of the attached VPC
string
project_id
Unique identifier of the project
string
errors
object
message
Human-readable status message for the Attach VPC operation
string
Example
{ "code": 200, "data": { "vpc_id": 1234, "vpc_name": "VPC-493", "project_id": "12345" }, "message": "VPC Attach operation successfully done"}