Skip to content

Attach Auto Scaling Group Security Groups

POST
/notebooks/autoscale-groups/{group_id}/security-groups/
curl --request POST \
--url 'https://api.e2enetworks.com/myaccount/api/v1/gpu/notebooks/autoscale-groups/{group_id}/security-groups/?project_id=<PROJECT_ID>&location=<LOCATION>&apikey=<API_KEY>' \
--header 'Authorization: Bearer <API_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"security_groups_ids": [
45,
46
]
}'

Attaches up to five Security Groups to an Auto Scaling Group, which applies them to every VM in it, including VMs added later. The Security Groups must be in the same project and region as the group. A group that is already attached is skipped. If one cannot be attached, the call fails with “Security group addition failed”. Groups that attached successfully stay attached. Needs the permission to update.

group_id
required
integer

Auto Scaling Group ID

project_id
required
integer

Project ID

active_iam
integer

Active IAM ID (To access contact person account) Find your Active IAM ID here

location
required
string
Allowed values: Delhi Chennai

Location

Media typeapplication/json
object
security_groups_ids
required

IDs of the Security Groups to attach. At least one, at most 5, no repeats.

Array<integer>

Example

[
45,
46
]

Security Groups attached

Media typeapplication/json
object
code
integer
message
string
data
string
errors
object

Example

{
"code": 200,
"message": "Success",
"data": "Security group addition successful",
"errors": {}
}

The list is missing, not a list, empty, has a repeat or is too long; or a Security Group could not be attached. errors is “Project ID is missing or invalid” when project_id is missing or not a number.

Media typeapplication/json
object
code
integer
message
string
data
object
errors

One of: “security_groups_ids must be a list.”, “No security group provided in the request.”, “Duplicate security groups found in the request.”, “Security group addition failed”, or a refusal when the request holds more than five groups.

string

Example

{
"code": 400,
"message": "Bad Request",
"data": {},
"errors": "Duplicate security groups found in the request."
}

No Auto Scaling Group with that ID in the project and region.

Media typeapplication/json
object
code
integer
message
string
data
object
errors
string

Example

{
"code": 404,
"message": "Bad Request",
"data": {},
"errors": "Autoscale Group not found"
}