Skip to content

Create New Security Group

POST
/api/v1/security_group/
curl --request POST \
--url 'https://api.e2enetworks.com/myaccount/api/v1/security_group/?project_id=<PROJECT_ID>&location=<LOCATION>&apikey=<API_KEY>' \
--header 'Authorization: Bearer <API_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"name": "security_group_rule",
"description": "",
"rules": [
{
"network": "any",
"rule_type": "Inbound",
"protocol_name": "Custom_TCP",
"port_range": "21,22",
"network_cidr": "--",
"network_size": 1,
"vpc_id": null
}
],
"default": false
}'
project_id
required
integer
location
required
string
Allowed values: Delhi Chennai

Deployment region for the resource. Accepted values: Delhi, Chennai.

Mumbai region has been discontinued. Delhi and Chennai are the only supported regions.

Media typeapplication/json
object
name
string

Example

security_group_rule
description
string

Example

rules
Array<object>
object
network
string

Example

any
rule_type
string
Allowed values: Inbound Outbound

Example

Inbound
protocol_name
string

Example

Custom_TCP
port_range
string

Example

21,22
network_cidr
string

Example

--
network_size
integer

Example

1
vpc_id
integer
nullable

Example

null
default
boolean

Example

false

Successful response when a security group is created.

Media typeapplication/json
object
code
integer
data
object
resource_type
string
nullable
label_id
string
nullable
errors
object
message
string

Example

{
"code": 200,
"data": {
"resource_type": null,
"label_id": null
},
"errors": {},
"message": "Security Group created successfully."
}