POST
/api/v1/kubernetes/attach-security-group/{service_id}/
curl --request POST \ --url 'https://api.e2enetworks.com/myaccount/api/v1/kubernetes/attach-security-group/{service_id}/?project_id=<PROJECT_ID>&apikey=<API_KEY>&location=<LOCATION>' \ --header 'Authorization: Bearer <API_TOKEN>' \ --header 'Content-Type: application/json' \ --data '{ "security_group_ids": [ 12345 ]}'import requests
response = requests.post( "https://api.e2enetworks.com/myaccount/api/v1/kubernetes/attach-security-group/{service_id}/", params={"project_id": "<PROJECT_ID>", "apikey": "<API_KEY>", "location": "<LOCATION>"}, headers={"Authorization": "Bearer <API_TOKEN>"}, json={ "security_group_ids": [ 12345, ], },)print(response.json())const url = new URL("https://api.e2enetworks.com/myaccount/api/v1/kubernetes/attach-security-group/{service_id}/");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({ "security_group_ids": [ 12345 ] }),});console.log(await response.json());Attaches one or more security groups to the cluster’s nodes. Send security_group_ids - a non-empty list of security group IDs (from Available Security Groups). Use the cluster service_id.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”service_id
required
integer
The cluster service_id, as returned by List.
Example
12345Query 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 to authenticate the request.
Example
<API_KEY>location
required
string
Region of the cluster.
Example
<LOCATION>Request Body
Section titled “Request Body”Media typeapplication/json
Security groups to attach to the cluster.
object
security_group_ids
required
IDs of the security groups to attach (from Available Security Groups).
Array<integer>
Example
[ 12345]Example
{ "security_group_ids": [ 12345 ]}Responses
Section titled “Responses”Successful response
Media typeapplication/json
object
code
integer
data
object
errors
object
message
string
Example
{ "code": 200, "message": "Security Group Attached Successfully"}