curl --request POST \ --url 'https://api.e2enetworks.com/myaccount/api/v1/gpu/gateway/{gateway_id}/security-groups/{security_groups_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/gateway/{gateway_id}/security-groups/{security_groups_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/gateway/{gateway_id}/security-groups/{security_groups_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 the Load Balancer, so its rules start to apply to the Load Balancer’s traffic. Needs the Update permission for Load Balancers.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Load Balancer 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”The security group or groups were attached
object
object
Example
{ "code": 200, "message": "Success", "data": "Security group addition successful", "errors": {}}The Load Balancer cannot take security groups (“Security groups can only be attached to load balancers.”), the group is already attached (“Security group already exists”), is not an active security group of this project and region (“Security Group not found”), or could not be attached (“Security group addition failed”). The same 400 is returned, with the project’s own text, when project_id is missing or not a number.
object
object
Example
{ "code": 400, "message": "Bad Request", "data": {}, "errors": "Security group already exists"}No Load Balancer with that ID in the project and region.
object
object
Example
{ "code": 404, "message": "Bad Request", "data": {}, "errors": "Gateway not found"}