Skip to content

Attach a VPC to a Group

PUT
/api/v1/scaler/scalegroups/{scaler_id}/vpc/action/
curl --request PUT \
--url 'https://api.e2enetworks.com/myaccount/api/v1/scaler/scalegroups/{scaler_id}/vpc/action/?project_id=<PROJECT_ID>&apikey=<API_KEY>&location=<LOCATION>' \
--header 'Authorization: Bearer <API_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"vpc": [
{
"name": "VPC-Example",
"network_id": 12345,
"ipv4_cidr": "10.8.46.0/23",
"state": "",
"subnets": [],
"is_e2e_vpc": true
}
]
}'

Attaches one or more VPC networks to the group. New nodes launched after the change join the attached VPC(s). VPC operations are only allowed while the group is stopped - use Stop / Start first.

scaler_id
required
integer

The id of the auto scaling group, as returned by List.

Example

12345
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 group.

Example

<LOCATION>
Media typeapplication/json

VPC networks to attach to the group.

object
vpc
required

List of VPC networks to attach.

Array<object>
object
name

VPC name.

string

Example

VPC-Example
network_id

VPC network ID.

integer

Example

12345
ipv4_cidr

IPv4 CIDR block of the VPC.

string

Example

10.8.46.0/23
state

VPC state.

string

Example

subnets

Subnets within the VPC.

Array
is_e2e_vpc

Whether this is an E2E-managed VPC.

boolean

Example

true

Example

{
"vpc": [
{
"name": "VPC-Example",
"network_id": 12345,
"ipv4_cidr": "10.8.46.0/23",
"state": "",
"subnets": [],
"is_e2e_vpc": true
}
]
}

Successful response

Media typeapplication/json

VPC attach confirmation.

object
code
integer
data
string
errors
object
message
string

Example

{
"code": 200,
"data": "vpc has been attached successfully",
"message": "Success"
}