Security groups
Create security group
Create a new security group.
x-api-key<token>
In: header
Query Parameters
regionstring
Region code where the resource exists (e.g., eu2).
Security group to be created.
namestring
Length
1 <= length <= 255description?string
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://cloud.huddleapis.com/api/v1/security-groups?region=eu2" \ -H "Content-Type: application/json" \ -d '{ "name": "allow-rtmp", "description": "Allow RTMP ingress from CDN nodes" }'{
"id": "sg-9f3c7c2",
"name": "allow-rtmp",
"description": "Allow RTMP ingress from CDN nodes",
"created_at": "2024-03-18T10:20:00Z",
"region": {
"name": "eu2"
}
}{
"message": "Bad request",
"error": {
"code": "BAD_REQUEST",
"message": "Invalid request body",
"type": "client"
},
"timestamp": "2024-03-18T10:22:00Z"
}{
"message": "Unauthorized",
"error": {
"code": "UNAUTHORIZED",
"message": "x-api-key header missing",
"type": "auth"
},
"timestamp": "2024-03-18T10:22:00Z"
}{
"message": "Internal server error",
"error": {
"code": "INTERNAL_ERROR",
"message": "Failed to create instance",
"type": "server"
},
"timestamp": "2024-03-18T10:22:00Z"
}