Skip to content

Attach VPC

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

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