PUT
/api/v1/security_group/{security_grp_id}/
curl --request PUT \ --url 'https://api.e2enetworks.com/myaccount/api/v1/security_group/{security_grp_id}/?project_id=<PROJECT_ID>&location=<LOCATION>&apikey=<API_KEY>' \ --header 'Authorization: Bearer <API_TOKEN>' \ --header 'Content-Type: application/json' \ --data '{ "name": "testing", "description": "", "rules": [ { "id": 351529, "rule_type": "Outbound", "protocol_name": "All", "port_range": "All", "network": "any", "network_cidr": "--", "network_size": 1, "vpc_id": null } ]}'import requests
response = requests.put( "https://api.e2enetworks.com/myaccount/api/v1/security_group/{security_grp_id}/", params={"project_id": "<PROJECT_ID>", "location": "<LOCATION>", "apikey": "<API_KEY>"}, headers={"Authorization": "Bearer <API_TOKEN>"}, json={ "name": "testing", "description": "", "rules": [ { "id": 351529, "rule_type": "Outbound", "protocol_name": "All", "port_range": "All", "network": "any", "network_cidr": "--", "network_size": 1, "vpc_id": None, }, ], },)print(response.json())const url = new URL("https://api.e2enetworks.com/myaccount/api/v1/security_group/{security_grp_id}/");url.search = new URLSearchParams({ project_id: "<PROJECT_ID>", location: "<LOCATION>", apikey: "<API_KEY>" });
const response = await fetch(url, { method: "PUT", headers: { "Authorization": "Bearer <API_TOKEN>", "Content-Type": "application/json" }, body: JSON.stringify({ "name": "testing", "description": "", "rules": [ { "id": 351529, "rule_type": "Outbound", "protocol_name": "All", "port_range": "All", "network": "any", "network_cidr": "--", "network_size": 1, "vpc_id": null } ] }),});console.log(await response.json());Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”security_grp_id
required
string
Security Grp Id
Query Parameters
Section titled “Query Parameters”project_id
required
integer
Project ID Find your project id here
location
required
string
Deployment region for the resource. Accepted values: Delhi, Chennai.
Mumbai region has been discontinued. Delhi and Chennai are the only supported regions.
Request Body
Section titled “Request Body”Media typeapplication/json
object
name
string
Example
testingdescription
string
Example
rules
Array<object>
object
id
integer
Example
351529rule_type
string
Example
Outboundprotocol_name
string
Example
Allport_range
string
Example
Allnetwork
string
Example
anynetwork_cidr
string
Example
--network_size
integer
Example
1vpc_id
string
Example
nullResponses
Section titled “Responses”Successful response indicating the security group was updated
Media typeapplication/json
object
code
integer
data
string
errors
object
message
string
Example
{ "code": 200, "data": "", "errors": {}, "message": "Security Group updated successfully."}