curl --request POST \ --url 'https://api.e2enetworks.com/myaccount/api/v1/gpu/notebooks/autoscale-groups/{group_id}/security-groups/{security_group_id}/?project_id=<PROJECT_ID>&location=<LOCATION>&apikey=<API_KEY>' \ --header 'Authorization: Bearer <API_TOKEN>'import requests
response = requests.post( "https://api.e2enetworks.com/myaccount/api/v1/gpu/notebooks/autoscale-groups/{group_id}/security-groups/{security_group_id}/", params={"project_id": "<PROJECT_ID>", "location": "<LOCATION>", "apikey": "<API_KEY>"}, headers={"Authorization": "Bearer <API_TOKEN>"},)print(response.json())const url = new URL("https://api.e2enetworks.com/myaccount/api/v1/gpu/notebooks/autoscale-groups/{group_id}/security-groups/{security_group_id}/");url.search = new URLSearchParams({ project_id: "<PROJECT_ID>", location: "<LOCATION>", apikey: "<API_KEY>" });
const response = await fetch(url, { method: "POST", headers: { "Authorization": "Bearer <API_TOKEN>" },});console.log(await response.json());Attaches one Security Group to an Auto Scaling Group; its rules then apply to the VMs. To attach several at once, use Attach Auto Scaling Group Security Groups. Needs the permission to update.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Auto Scaling Group ID
Security Group ID
Query Parameters
Section titled “Query Parameters”Project ID
Active IAM ID (To access contact person account) Find your Active IAM ID here
Location
Responses
Section titled “Responses”Security Group attached
object
object
Example
{ "code": 200, "message": "Success", "data": "Security group addition successful", "errors": {}}The Security Group is already attached, does not exist in the project and region, or the attach failed. errors is “Project ID is missing or invalid” when project_id is missing or not a number.
object
object
One of: “Security group already exists”, “Security Group not found”, “Security group addition failed”.
Example
{ "code": 400, "message": "Bad Request", "data": {}, "errors": "Security group already exists"}No Auto Scaling Group with that ID in the project and region.
object
object
Example
{ "code": 404, "message": "Bad Request", "data": {}, "errors": "Autoscale Group not found"}