Chuyển tới nội dung chính

Xem chi tiết security group

GET/v2.0/security-groups/{security_group_id}

Trả về một security group cùng toàn bộ rule của nó.

info

Request​

Tham số​

security_group_idstringbắt buộcpath

ID của security group.

verbosebooleanquery

Trả về thông tin chi tiết.

fieldsstringquery

Chỉ trả về các thuộc tính được liệt kê. Có thể lặp lại.

Request mẫu​

curl -ks -H 'Content-Type: application/json' -H 'X-Auth-Token: gAAAAA<...>' \
https://api.vietnix.cloud:9696/v2.0/security-groups/{security_group_id}

Response​

Response mẫu​

Response body
{
"security_group": {
"id": "e7489f02-f846-46f2-9edf-cc5a2640041a",
"name": "web-sg",
"description": "HTTP and HTTPS from anywhere",
"stateful": true,
"tenant_id": "f5d834d636c642c7bfe8af86139c6f26",
"project_id": "f5d834d636c642c7bfe8af86139c6f26",
"security_group_rules": [
{
"id": "5c9f3a21-7d4e-4b8f-a0c6-3e2d1b0a9f88",
"direction": "ingress",
"ethertype": "IPv4",
"protocol": "tcp",
"port_range_min": 443,
"port_range_max": 443,
"remote_ip_prefix": "0.0.0.0/0",
"remote_group_id": null,
"security_group_id": "e7489f02-f846-46f2-9edf-cc5a2640041a"
}
],
"tags": [],
"created_at": "2026-02-11T08:21:14Z",
"updated_at": "2026-02-11T08:25:03Z",
"revision_number": 2
}
}

Mã trạng thái​

Thành công​

MãMô tả
200 - OKRequest thành công.

Lỗi​

MãMô tả
401 - UnauthorizedCần xác thực trước khi gửi request.
403 - ForbiddenPolicy không cho phép user hiện tại thực hiện thao tác này.
404 - Not FoundSecurity group không tồn tại, hoặc không hiển thị với project của bạn.