Skip to content

Attach Security Group

POST
/api/v1/security_group/{vm_id}/attach/
curl --request POST \
--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>' \
--header 'Content-Type: application/json' \
--data '"{\n \"security_group_ids\": [\n {{security_group_id}}\n ]\n}"'

Attaches one or more security groups to the load balancer’s underlying VM. The vm_id path parameter is the load balancer’s node_detail.vm_id.

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

Specifies the target location for attaching the security group.

Example

<LOCATION>
Media typeapplication/json
One of:

JSON string specifying security group IDs to attach

string

Example

{
"security_group_ids": [
{{security_group_id}}
]
}

Successful response

Media typeapplication/json
object
code

HTTP status code indicating the result of the attach operation

integer
data
object
errors
object
message

Human-readable status message indicating the result of the attach operation

string

Example

{
"code": 200,
"message": "Security Group Attached Successfully"
}