Querying Security Group Details¶
Function¶
This API is used to query details about a security group.
URI¶
GET /v1/{project_id}/security-groups/{security_group_id}
Table 1 describes the parameters.
Parameter | Mandatory | Description |
---|---|---|
project_id | Yes | Specifies the project ID. |
security_group_id | Yes | Specifies the security group ID, which uniquely identifies the security group. |
Request Parameters¶
None
Example Request¶
GET https://{Endpoint}/v1/{project_id}/security-groups/16b6e77a-08fa-42c7-aa8b-106c048884e6
Response Parameters¶
Parameter | Type | Description |
---|---|---|
security_group | security_group object | Specifies the security group object. |
Parameter | Type | Description |
---|---|---|
name | String | Specifies the security group name. |
description | String | Provides supplementary information about the security group. |
id | String | Specifies the security group ID, which uniquely identifies the security group. |
vpc_id | String | Specifies the resource ID of the VPC to which the security group belongs. Note Currently, this parameter is not recommended because it is only used as a prompt and does not restrict that the security group must be associated with the VPC. |
security_group_rules | Array of security_group_rule objects | Specifies the default security group rules, which ensure that resources in the security group can communicate with one another. |
enterprise_project_id | String |
Note This parameter is unsupported. Do not use it. |
Parameter | Type | Description |
---|---|---|
id | String | Specifies the security group rule ID, which uniquely identifies the security group rule. |
description | String |
|
security_group_id | String | Specifies the security group rule ID, which uniquely identifies the security group rule. |
direction | String |
|
ethertype | String |
|
protocol | String |
|
port_range_min | Integer |
|
port_range_max | Integer |
|
remote_ip_prefix | String |
|
remote_group_id | String |
|
remote_address_group_id | String |
|
tenant_id | String |
|
Example Response¶
{
"security_group": {
"id": "16b6e77a-08fa-42c7-aa8b-106c048884e6",
"name": "qq",
"description": "qq",
"vpc_id": "3ec3b33f-ac1c-4630-ad1c-7dba1ed79d85",
"enterprise_project_id": "0aad99bc-f5f6-4f78-8404-c598d76b0ed2",
"security_group_rules": [
{
"id": "f11a3824-ac19-4fad-b4f1-c5f4a6dd0a80",
"tenant_id": "060576782980d5762f9ec014dd2f1148",
"security_group_id": "69c999ad-d9ef-4d79-94fd-35e6ceb75325",
"remote_group_id": "69c999ad-d9ef-4d79-94fd-35e6ceb75325",
"direction": "ingress",
"protocol": null,
"description": "",
"ethertype": "IPv6",
"remote_ip_prefix": null,
"remote_address_group_id": null,
"port_range_max": null,
"port_range_min": null
},
{
"id": "3d6480e8-9ea4-46dc-bb1b-8db190cd5677",
"tenant_id": "060576782980d5762f9ec014dd2f1148",
"security_group_id": "69c999ad-d9ef-4d79-94fd-35e6ceb75325",
"remote_group_id": null,
"direction": "egress",
"protocol": null,
"description": "",
"ethertype": "IPv6",
"remote_ip_prefix": null,
"remote_address_group_id": null,
"port_range_max": null,
"port_range_min": null
},
{
"id": "9581f18c-1fdd-43da-ace9-7758a56ef28a",
"tenant_id": "060576782980d5762f9ec014dd2f1148",
"security_group_id": "69c999ad-d9ef-4d79-94fd-35e6ceb75325",
"remote_group_id": null,
"direction": "egress",
"protocol": null,
"description": "",
"ethertype": "IPv4",
"remote_ip_prefix": null,
"remote_address_group_id": null,
"port_range_max": null,
"port_range_min": null
},
{
"id": "a3ba270e-e58b-432d-a912-aeb7eace9fb8",
"tenant_id": "060576782980d5762f9ec014dd2f1148",
"security_group_id": "69c999ad-d9ef-4d79-94fd-35e6ceb75325",
"remote_group_id": "69c999ad-d9ef-4d79-94fd-35e6ceb75325",
"direction": "ingress",
"protocol": null,
"description": "",
"ethertype": "IPv4",
"remote_ip_prefix": null,
"remote_address_group_id": null,
"port_range_max": null,
"port_range_min": null
}
]
}
}
Status Code¶
See Status Codes.
Error Code¶
See Error Codes.