tencent cloud

APIs

DescribeSecurityPolicies

Download
Focus Mode
Font Size
Last updated: 2026-09-28 14:17:29

1. API Description

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

Queries the custom security policy list, supports filtering by security policy ID, name, or tag, and supports paging query.

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: DescribeSecurityPolicies.
Version Yes String Common Params. The value used for this API: 2025-10-30.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
Filters.N No Array of Filter Filter condition list for filtering security policies that meet the specified conditions. Multiple filter conditions are in an "AND" relationship with each other.

Supported filter conditions:
- SecurityPolicyNames: Filter by security policy name. Fuzzy matching is supported.
- tag:tag-key: Filter by tag key-value pair. Replace tag-key with the actual tag key. For example, tag:env means filtering by the tag key env.

Description: Each filter condition supports a maximum of 10 values.
MaxResults No Integer Maximum number of results returned for a single request. For pagination queries, use together with NextToken.

Value range: from 1 to 100.

Default value: 20.
NextToken No String Token for the paging query start. Used to obtain the result data on the next page.

Instructions:
-No need to set this parameter for the initial query.
- If the last query returned NextToken, it means there is more data. Input this value to retrieve the next page.
-If the last query did not return NextToken or returned empty, it means the current page is the last page.
SecurityPolicyIds.N No Array of String Security policy ID list. The ID format is tls- followed by 8 alphanumeric characters.

3. Output Parameters

Parameter Name Type Description
NextToken String Token for the next query.

-If the return value is not empty, it means there is more data. You can use this value as the NextToken parameter in the next request to continue querying.
-If the return value is empty or this field is not returned, it means the current page is the last page.
SecurityPolicies Array of SecurityPolicyInfo Information list of security policies. Contains detailed configuration of each security policy, such as policy ID, name, TLS version, and encryption suite.
TotalCount Integer Total number of security policies that meet filtering criteria.

Description: This value indicates the total record count that meets the query condition, not the number of records returned this time. It can be used to calculate pagination information.
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 Query custom security policies

Input Example

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

{
    "MaxResults": 20,
    "SecurityPolicyIds": [
        "tls-t2ckydug"
    ]
}

Output Example

{
    "Response": {
        "NextToken": "",
        "SecurityPolicies": [
            {
                "SecurityPolicyId": "tls-t2ckydug",
                "SecurityPolicyName": "test-policy",
                "Status": "Active",
                "TLSVersions": [
                    "TLSv1.2",
                    "TLSv1.3"
                ],
                "Ciphers": [
                    "TLS_AES_128_GCM_SHA256"
                ],
                "CreateTime": "2025-01-01T08:30:00+08:00",
                "Tags": []
            }
        ],
        "TotalCount": 1,
        "RequestId": "3b848733-70e5-4558-ae39-4b9938eb7609"
    }
}

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
FailedOperation Operation failed.
InternalError Internal error.
InvalidFilter Invalid Filter
InvalidParameter Parameter error.
InvalidParameter.InvalidFieldValue Field value is incorrect.
InvalidParameterValue Parameter value error.
MissingParameter Parameters are missing.
OperationDenied Operation denied.
RegionError Region error
ResourceNotFound The resource does not exist.
UnauthorizedOperation Unauthorized operation.
UnknownParameter Unknown parameter error.
UnsupportedOperation The operation is not supported.

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback