tencent cloud

Application Load Balancer

DescribeRules

Download
Focus Mode
Font Size
Last updated: 2026-09-28 14:18:13

1. API Description

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

This API is used to query forwarding rules.

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: DescribeRules.
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.
ListenerId Yes String Listener ID, in the format of lst- followed by 8 alphanumeric characters.
LoadBalancerId Yes String CLB instance ID. The format is alb- followed by 8 alphanumeric characters.
Filters.N No Array of Filter Supported filter conditions are as follows:
MaxResults No Integer Number of lists returned. Default value: 20. Maximum value: 100.
NextToken No String Token for the next query. Not required for the first query or when there is no next query. If there is a next query, the value is the NextToken returned from the last API call.
RuleIds.N No Array of String List of forwarding rule IDs. Each ID is in the format of rule- followed by 8 alphanumeric characters.

3. Output Parameters

Parameter Name Type Description
NextToken String Token for the next query. If the current page is the last page, this field returns empty.
Rules Array of RuleOutput Forwarding rule list.
TotalCount Integer Total count of forwarding rules (after filtering by conditions such as listener ID and rule ID).
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 This example shows you how to query the rule list.

Input Example

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

{
    "LoadBalancerId": "alb-f8q2xk9m",
    "ListenerId": "lst-d9p3k7wa",
    "MaxResults": 100
}

Output Example

{
    "Response": {
        "TotalCount": 1,
        "NextToken": "",
        "Rules": [
            {
                "RuleId": "rule-h8cy5gwl",
                "Priority": 1,
                "RuleName": "rule1",
                "Direction": "Request",
                "Conditions": [
                    {
                        "Type": "Host",
                        "HostConfig": [
                            "test.com"
                        ]
                    }
                ],
                "Actions": [
                    {
                        "Type": "TargetGroup",
                        "Order": 1,
                        "TargetGroupConfig": {
                            "TargetGroups": [
                                {
                                    "TargetGroupId": "lbtg-0zrnc9qa",
                                    "Weight": 10
                                }
                            ]
                        }
                    }
                ],
                "Status": "Active",
                "Tags": []
            }
        ],
        "RequestId": "ed300290-70cc-41f6-af02-50e151f91f90"
    }
}

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 Operation failed.
InternalError Internal error.
InvalidFilter Invalid Filter
InvalidParameter Parameter error.
InvalidParameter.InvalidFieldType Field type error.
InvalidParameter.InvalidFieldValue Field value is incorrect.
InvalidParameter.MissingAction Action parameter is missing.
InvalidParameter.MissingField Please enter the required parameter.
InvalidParameterValue Parameter value error.
MissingParameter Parameters are missing.
OperationDenied Operation denied.
RegionError Region error
RequestLimitExceeded Number of requests exceeds the frequency limit.
ResourceNotFound The resource does not exist.
ResourceNotFound.Listener Listener not found.
ResourceNotFound.LoadBalancer The CLB resource does not exist.
ResourceNotFound.Rule Forwarding rule not found
UnauthorizedOperation Unauthorized operation.
UnauthorizedOperation.ServiceRoleUnauthorized Service role not authorized.
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