Skip to content

Attached Security Group / List Attached Security Groups

GET
/api/v1/security_group/{vm_id}/attach/
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>'

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.

vm_id
required
string

Path parameter vm_id.

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 for authentication

Example

<API_KEY>
location
required
string

Location filter for the attached security group query

Example

<LOCATION>

Successful response

Media typeapplication/json
object
code

HTTP status code indicating the result of the request

integer
data
Array<object>
object
id

Unique identifier of the attached security group

integer
name

Name of the attached security group

string
description

Name of the attached security group

string
rules
Array<object>
object
id

Unique identifier for the security group rule

integer
rule_type

Specifies the direction of the security group rule

string
protocol_name

Name of the network protocol for the rule

string
port_range

Port range for the rule, expressed as a single port or a start-end range

string
network

Network identifier for the rule, such as a CIDR block or “any”

string
network_cidr

Network CIDR block for the security group rule

string
network_size

Number of networks associated with the security group

integer
vpc_id

Identifier of the VPC associated with the security group rule

string
description

Textual description of the security group rule.

string
is_default

Indicates whether the attached security group is the default one

boolean
is_all_traffic_rule

Indicates whether the security group rule applies to all traffic

boolean
errors
object
message

Status message indicating the result of attaching a security group

string

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"
}