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}"'import requests
response = requests.post( "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>"}, json="{\n \"security_group_ids\": [\n {{security_group_id}}\n ]\n}",)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: "POST", headers: { "Authorization": "Bearer <API_TOKEN>", "Content-Type": "application/json" }, body: JSON.stringify("{\n \"security_group_ids\": [\n {{security_group_id}}\n ]\n}"),});console.log(await response.json());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.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”vm_id
required
string
Path parameter vm_id.
Query Parameters
Section titled “Query Parameters”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>Request Body
Section titled “Request Body”Responses
Section titled “Responses”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"}