Querying the Details of a Security Group¶
Function¶
After a security group is created, you can call this API to query all information about the security group, including the name, ID, and description.
URI¶
GET /v3/{project_id}/vpc/security-groups/{security_group_id}
Parameter | Mandatory | Type | Description |
---|---|---|---|
project_id | Yes | String |
|
security_group_id | Yes | String |
|
Request Parameters¶
None
Response Parameters¶
Status code: 200
Parameter | Type | Description |
---|---|---|
request_id | String |
|
security_group | SecurityGroupInfo object |
|
Parameter | Type | Description |
---|---|---|
id | String |
|
name | String |
|
description | String |
|
project_id | String |
|
created_at | String |
|
updated_at | String |
|
enterprise_project_id | String |
|
tags | Array of ResponseTag objects |
|
security_group_rules | Array of SecurityGroupRule objects |
|
Parameter | Type | Description |
---|---|---|
key | String |
|
value | String |
|
Parameter | Type | Description |
---|---|---|
id | String |
|
description | String |
|
security_group_id | String |
|
direction | String |
|
protocol | String |
|
ethertype | String |
|
multiport | String |
|
action | String |
|
priority | Integer |
|
remote_group_id | String |
|
remote_ip_prefix | String |
|
remote_address_group_id | String |
|
created_at | String |
|
updated_at | String |
|
project_id | String |
|
Example Requests¶
Querying the details of a security group
GET https://{Endpoint}/v3/{project_id}/vpc/security-groups/69c999ad-d9ef-4d79-94fd-35e6ceb75325
Example Responses¶
Status code: 200
Normal response to the GET operation. For more status codes, see Status Codes.
{
"security_group" : {
"id" : "69c999ad-d9ef-4d79-94fd-35e6ceb75325",
"name" : "security_group_1",
"project_id" : "060576782980d5762f9ec014dd2f1148",
"description" : "security group description",
"enterprise_project_id" : 0,
"tags" : [ {
"key" : "a",
"value" : "b"
} ],
"security_group_rules" : [ {
"id" : "f11a3824-ac19-4fad-b4f1-c5f4a6dd0a80",
"project_id" : "060576782980d5762f9ec014dd2f1148",
"security_group_id" : "69c999ad-d9ef-4d79-94fd-35e6ceb75325",
"remote_group_id" : "69c999ad-d9ef-4d79-94fd-35e6ceb75325",
"direction" : "ingress",
"description" : "",
"created_at" : "2020-07-09T05:56:27.000+00:00",
"updated_at" : "2020-07-09T05:56:27.000+00:00",
"ethertype" : "IPv6",
"action" : "allow",
"priority" : 100,
"protocol" : null,
"multiport" : null,
"remote_ip_prefix" : null,
"remote_address_group_id" : null
}, {
"id" : "3d6480e8-9ea4-46dc-bb1b-8db190cd5677",
"project_id" : "060576782980d5762f9ec014dd2f1148",
"security_group_id" : "69c999ad-d9ef-4d79-94fd-35e6ceb75325",
"direction" : "egress",
"description" : "",
"created_at" : "2020-07-09T05:56:27.000+00:00",
"updated_at" : "2020-07-09T05:56:27.000+00:00",
"ethertype" : "IPv6",
"action" : "allow",
"priority" : 100,
"protocol" : null,
"multiport" : null,
"remote_ip_prefix" : null,
"remote_group_id" : null,
"remote_address_group_id" : null
}, {
"id" : "9581f18c-1fdd-43da-ace9-7758a56ef28a",
"project_id" : "060576782980d5762f9ec014dd2f1148",
"security_group_id" : "69c999ad-d9ef-4d79-94fd-35e6ceb75325",
"direction" : "egress",
"description" : "",
"created_at" : "2020-07-09T05:56:27.000+00:00",
"updated_at" : "2020-07-09T05:56:27.000+00:00",
"ethertype" : "IPv4",
"action" : "allow",
"priority" : 100,
"protocol" : null,
"multiport" : null,
"remote_ip_prefix" : null,
"remote_group_id" : null,
"remote_address_group_id" : null
}, {
"id" : "a3ba270e-e58b-432d-a912-aeb7eace9fb8",
"project_id" : "060576782980d5762f9ec014dd2f1148",
"security_group_id" : "69c999ad-d9ef-4d79-94fd-35e6ceb75325",
"remote_group_id" : "69c999ad-d9ef-4d79-94fd-35e6ceb75325",
"direction" : "ingress",
"description" : "",
"created_at" : "2020-07-09T05:56:27.000+00:00",
"updated_at" : "2020-07-09T05:56:27.000+00:00",
"ethertype" : "IPv4",
"action" : "allow",
"priority" : 100,
"protocol" : null,
"multiport" : null,
"remote_ip_prefix" : null,
"remote_address_group_id" : null
} ],
"created_at" : "2020-07-09T05:56:27.000+00:00",
"updated_at" : "2020-07-09T05:56:27.000+00:00"
},
"request_id" : "a8cf4f79ca3c22ca685e7e8872e8c20b"
}
Status Codes¶
Status Code | Description |
---|---|
200 | Normal response to the GET operation. For more status codes, see Status Codes. |
Error Codes¶
See Error Codes.