DescribeRules

Last updated: 2019-11-25 22:42:43

1. API Description

Domain name for API request: gaap.tencentcloudapi.com.

This API (DescribeRules) is used to query all rule information of a listener, including the domain names, paths, and list of bound origin servers. For version 3.0 connections, this API returns the advanced authentication configuration information of the domain name.

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

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 parameter. The value used for this API: DescribeRules
Version Yes String Common parameter. The value used for this API: 2018-05-29
Region No String Common parameter. This parameter is not required for this API.
ListenerId Yes String Layer-7 listener ID.

3. Output Parameters

Parameter Name Type Description
DomainRuleSet Array of DomainRuleSet Rule information list classified by domain name type
TotalCount Integer Total quantity of domain names under this listener
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 Querying the Forwarding Rule Information

Input Example

https://gaap.tencentcloudapi.com/?Action=DescribeRules
&ListenerId=listener-9jt0rtv9
&<Common request parameters>

Output Example

{
  "Response": {
    "TotalCount": 1,
    "DomainRuleSet": [
      {
        "GaapCertificateAlias": "gaap-casfdgs",
        "Domain": "www.bbb.com",
        "CertificateId": "cert-mqkdxhcl",
        "RealServerCertificateId": "cert-76es2p6n",
        "CertificateAlias": "test1",
        "BasicAuth": 1,
        "GaapCertificateId": "cert-47teq6gt",
        "RealServerAuth": 1,
        "BasicAuthConfAlias": "basicAuth",
        "BasicAuthConfId": "cert-cqwokbyp",
        "ClientCertificateId": "cert-5n7ifekx",
        "RuleSet": [
          {
            "BindStatus": 1,
            "Domain": "www.bbb.com",
            "RealServerType": "IP",
            "RuleId": "rule-hh5xg2yd",
            "HealthCheck": 0,
            "ListenerId": "listener-9jt0rtv9",
            "CheckParams": {
              "Domain": "www.bbb.com",
              "ConnectTimeout": 2,
              "Path": "/",
              "Method": "HEAD",
              "DelayLoop": 30,
              "StatusCode": [
                100,
                200,
                300,
                400,
                500
              ]
            },
            "Scheduler": "rr",
            "Path": "/",
            "RuleStatus": 0,
            "RealServerSet": [
              {
                "RealServerStatus": 0,
                "RealServerPort": 234,
                "RealServerId": "rs-04v3s12c",
                "DownIPList": [],
                "RealServerWeight": 1,
                "RealServerIP": "4.4.4.4"
              },
              {
                "RealServerStatus": 0,
                "RealServerPort": 424,
                "RealServerId": "rs-10vtt5en",
                "DownIPList": [],
                "RealServerWeight": 1,
                "RealServerIP": "5.5.5.6"
              }
            ]
          }
        ],
        "GaapAuth": 1,
        "ClientCertificateAlias": "clientCA",
        "RealServerCertificateAlias": "rsca",
        "RealServerCertificateDomain": "www.bbb.com"
      }
    ],
    "RequestId": "6aecde5a-fd9a-4380-8fe9-1e9e4a98b7b5"
  }
}

5. Developer Resources

API Explorer

This tool allows online call, signature authentication, SDK code generation and quick search of APIs to greatly improve the efficiency of using TencentCloud APIs.

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
InvalidParameter Parameter error
InvalidParameterValue Parameter value error
MissingParameter Parameter missing
ResourceNotFound Resource does not exist
UnauthorizedOperation Unauthorized operation