tencent cloud

DescribeDBSecurityGroups
Last updated:2026-03-13 18:56:39
DescribeDBSecurityGroups
Last updated: 2026-03-13 18:56:39

1. API Description

Domain name for API request: tdmysql.intl.tencentcloudapi.com.

This API is used to query instance security group information.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: DescribeDBSecurityGroups.
Version Yes String Common Params. The value used for this API: 2021-11-22.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
InstanceId Yes String Instance ID.

3. Output Parameters

Parameter Name Type Description
Groups Array of SecurityGroup Security group description.
VIP String Instance VIP.
Note: This field may return null, indicating that no valid values can be obtained.
VPort String Instance port.
Note: This field may return null, indicating that no valid values can be obtained.
RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

4. Example

Example1 Querying an Instance Security Group

Querying an Instance Security Group

Input Example

POST / HTTP/1.1
Host: tdmysql.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeDBSecurityGroups
<Common request parameters>

{
    "InstanceId": "tdsql3-be88fd7f"
}

Output Example

{
    "Response": {
        "Groups": [
            {
                "CreateTime": "2024-06-14 17:54:00",
                "Inbound": [
                    {
                        "Action": "ACCEPT",
                        "CidrIp": "0.0.0.0/0",
                        "IpProtocol": "ALL",
                        "PortRange": "ALL"
                    },
                    {
                        "Action": "DROP",
                        "CidrIp": "::/0",
                        "IpProtocol": "ALL",
                        "PortRange": "ALL"
                    }
                ],
                "Outbound": [
                    {
                        "Action": "ACCEPT",
                        "CidrIp": "0.0.0.0/0",
                        "IpProtocol": "ALL",
                        "PortRange": "ALL"
                    },
                    {
                        "Action": "ACCEPT",
                        "CidrIp": "",
                        "IpProtocol": "ALL",
                        "PortRange": "ALL"
                    }
                ],
                "ProjectId": 0,
                "SecurityGroupId": "sg-bbu5xxm3",
                "SecurityGroupName": "default",
                "SecurityGroupRemark": "System created security group"
            }
        ],
        "RequestId": "9690ec5d-4969-4bd9-ab0a-221437f617f5",
        "VIP": "10.0.0.25",
        "VPort": "3306"
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
AuthFailure CAM signature/authentication error.
FailedOperation.AuthNoStrategy FailedOperation.AuthNoStrategy
FailedOperation.GetSecurityGroupDetailFailed FailedOperation.GetSecurityGroupDetailFailed
InternalError.GetSecurityGroupDetailFailed InternalError.GetSecurityGroupDetailFailed
InternalError.InstanceOperatePermissionError InternalError.InstanceOperatePermissionError
InternalError.ListInstanceRespResourceCountNotMatchError InternalError.ListInstanceRespResourceCountNotMatchError
InternalError.ListInstancesError InternalError.ListInstancesError
InternalError.QueryDatabaseFailed InternalError.QueryDatabaseFailed
InternalError.ReadDatabaseFailed InternalError.ReadDatabaseFailed
InternalError.RouteNotFound InternalError.RouteNotFound
InvalidParameter Parameter error.
InvalidParameter.IllegalParameterError InvalidParameter.IllegalParameterError
InvalidParameter.InstanceNotFound InvalidParameter.InstanceNotFound
InvalidParameter.PermissionDenied InvalidParameter.PermissionDenied
InvalidParameterValue.InvalidParameterValueError Parameter error
ResourceNotFound.InstanceNotFound ResourceNotFound.InstanceNotFound
ResourceNotFound.ProductConfigNotExistedError ResourceNotFound.ProductConfigNotExistedError
ResourceUnavailable.InstanceStatusAbnormal ResourceUnavailable.InstanceStatusAbnormal
UnauthorizedOperation.PermissionDenied UnauthorizedOperation.PermissionDenied
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback