Console API
  1. Security group
Console API
  • User
    • User Info
      GET
  • Tenant / Regions
    • Get Regions & Tenant info
      GET
    • Get Tenant Info
      GET
  • VPC
    • Get VPC List
      GET
    • Rename VPC
      PUT
  • Images
    • Get images
      GET
  • Flavors
    • Get flavors
      GET
  • Storage Policy
    • List
      GET
  • Instances
    • List
      GET
    • Detail
      GET
    • Security Group
      GET
    • Create instance
      POST
    • Power off
      POST
    • Reboot
      POST
    • Power on
      POST
    • Terminate
      POST
    • Resize
      POST
    • Lock Termination
      POST
    • Rename
      POST
    • Manage tag
      POST
  • Subnet
    • List
    • Create
    • Rename
    • Delete
    • Manage tags
  • Security group
    • Security Group List
      GET
    • Security Group Detail
      GET
    • Rule Types
      GET
    • Create Security Group
      POST
    • Create Rule
      POST
    • Apply to private ip
      POST
    • Delete Rule
      POST
    • Delete security group
      DELETE
    • Manage tag
      POST
  • Floating IP
    • List
    • Allocate
    • Connect to instance
    • Disconnect
    • Release
    • Manage tag
  • Activity Logs
    • List
  • Tags
    • Lists
  • Iam
    • Add user to user group
    • Get all user groups
    • Create user group
    • Update user group
    • Get roles
    • Get user vpcs
  • Billing
    • Bill
      • Get bills by date
      • Get Bills by paging
      • Bill Info
      • Bill service types
  • Project
    • Get projects
  • S3
    • Get bucket policy
    • List buckets
    • Get s3 service enabled
  1. Security group

Create Security Group

Developing
POST
/api/v1/vmware/vpc/{vpc_id}/security-groups

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Path Params
vpc_id
string 
required
Header Params
OrgId
string 
required
Example:
ed2dab76-61a9-4352-a7d6-64fe716f6795
Body Params application/json
name
string 
required
network
string 
required
field id - API Subnet (List)
ip_address
array[string]
required
rules
string 
required
json encode
schema
destinationPorts: int (port) (ex: 80, 90, 92)
protocol: null
sources: array of string (ex: ["10.10.10.10"])
action: str (ALLOW | DENY)
direction: str (ingress: inbound | egress: outbound)
port: field id from API Rule Types
description: str
tag_ids
array[string]
required
Example
{
    "name": "security-group-5662",
    "network": "f09f9d6d-399e-42cc-bcfc-ec8e3e3fffad",
    "ip_address": [
        "10.0.1.232"
    ],
    "rules": "[{\"destinationPorts\":\"80\",\"protocol\":null,\"description\":\"description\",\"port\":\"ed55f780-6e33-4bb0-b04d-3010cab5afe4\",\"sources\":[\"10.10.10.10\"],\"action\":\"ALLOW\",\"direction\":\"ingress\"}]",
    "tag_ids": [
        "bea8782e-de99-46ac-b3c1-70dd8408728f"
    ]
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/api/v1/vmware/vpc//security-groups' \
--header 'OrgId: ed2dab76-61a9-4352-a7d6-64fe716f6795' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "security-group-5662",
    "network": "f09f9d6d-399e-42cc-bcfc-ec8e3e3fffad",
    "ip_address": [
        "10.0.1.232"
    ],
    "rules": "[{\"destinationPorts\":\"80\",\"protocol\":null,\"description\":\"description\",\"port\":\"ed55f780-6e33-4bb0-b04d-3010cab5afe4\",\"sources\":[\"10.10.10.10\"],\"action\":\"ALLOW\",\"direction\":\"ingress\"}]",
    "tag_ids": [
        "bea8782e-de99-46ac-b3c1-70dd8408728f"
    ]
}'

Responses

🟢200Success
application/json
Body
object {0}
Example
{}
Modified at 2024-05-24 07:10:00
Previous
Rule Types
Next
Create Rule
Built with