Attached Security Group / List Attached Security Groups
curl --request GET \ --url 'https://api.e2enetworks.com/myaccount/api/v1/security_group/{vm_id}/attach/?project_id=<PROJECT_ID>&apikey=<API_KEY>&location=<LOCATION>' \ --header 'Authorization: Bearer <API_TOKEN>'import requests
response = requests.get( "https://api.e2enetworks.com/myaccount/api/v1/security_group/{vm_id}/attach/", params={"project_id": "<PROJECT_ID>", "apikey": "<API_KEY>", "location": "<LOCATION>"}, headers={"Authorization": "Bearer <API_TOKEN>"},)print(response.json())const url = new URL("https://api.e2enetworks.com/myaccount/api/v1/security_group/{vm_id}/attach/");url.search = new URLSearchParams({ project_id: "<PROJECT_ID>", apikey: "<API_KEY>", location: "<LOCATION>" });
const response = await fetch(url, { method: "GET", headers: { "Authorization": "Bearer <API_TOKEN>" },});console.log(await response.json());curl --request GET \ --url 'https://api.e2enetworks.com/myaccount/api/v1/security_group/{vm_id}/attach/?project_id=<PROJECT_ID>&apikey=<API_KEY>&location=<LOCATION>' \ --header 'Authorization: Bearer <API_TOKEN>'import requests
response = requests.get( "https://api.e2enetworks.com/myaccount/api/v1/security_group/{vm_id}/attach/", params={"project_id": "<PROJECT_ID>", "apikey": "<API_KEY>", "location": "<LOCATION>"}, headers={"Authorization": "Bearer <API_TOKEN>"},)print(response.json())const url = new URL("https://api.e2enetworks.com/myaccount/api/v1/security_group/{vm_id}/attach/");url.search = new URLSearchParams({ project_id: "<PROJECT_ID>", apikey: "<API_KEY>", location: "<LOCATION>" });
const response = await fetch(url, { method: "GET", headers: { "Authorization": "Bearer <API_TOKEN>" },});console.log(await response.json());Lists the security groups currently attached to the load balancer’s underlying VM, with their inbound/outbound rules. The vm_id path parameter is the node_detail.vm_id of the load balancer.
Attached Security Group and List Attached Security Groups are the same request.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Path parameter vm_id.
Query Parameters
Section titled “Query Parameters”Identifier of the project to scope the request to. Required integer project ID.
Example
<PROJECT_ID>API key used for authentication
Example
<API_KEY>Location filter for the attached security group query
Example
<LOCATION>Responses
Section titled “Responses”Successful response
object
HTTP status code indicating the result of the request
object
Unique identifier of the attached security group
Name of the attached security group
Name of the attached security group
object
Unique identifier for the security group rule
Specifies the direction of the security group rule
Name of the network protocol for the rule
Port range for the rule, expressed as a single port or a start-end range
Network identifier for the rule, such as a CIDR block or “any”
Network CIDR block for the security group rule
Number of networks associated with the security group
Identifier of the VPC associated with the security group rule
Textual description of the security group rule.
Indicates whether the attached security group is the default one
Indicates whether the security group rule applies to all traffic
object
Status message indicating the result of attaching a security group
Example
{ "code": 200, "data": [ { "id": 12345, "name": "default_sg_delhi_35027", "description": "default security group delhi", "rules": [ { "id": 123456, "rule_type": "Inbound", "protocol_name": "All", "port_range": "", "network": "any", "network_cidr": "--", "network_size": 1, "description": "" } ], "is_default": true, "is_all_traffic_rule": false } ], "message": "Success"}