All Products
Search
Document Center

Anti-DDoS:DescribeWebCCRulesV2

Last Updated:Oct 23, 2024

Queries the custom frequency control rules that are created for a website.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
yundun-ddoscoo:DescribeWebCCRulesV2list
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DomainstringNo

The domain name of the website that you want to add to the Anti-DDoS Proxy instance for protection.

example.com
PageSizestringNo

The number of entries per page. Maximum value: 20. Default value: 20.

20
OffsetstringNo

The number of entries that you want the system to skip before the system returns entries. Default value: 0.

0
OwnerstringNo

The method used to create the rule. Valid values:

  • manual (default): manually created.
  • clover: automatically created.
manual

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

CF33B4C3-196E-4015-AADD-5CAD00057B80
TotalCountstring

The total number of returned custom frequency control rules.

12
Domainstring

The domain name of the website.

www.aliyun.com
WebCCRulesarray<object>

The custom frequency control rules.

WebCCRuleobject

The custom frequency control rule.

Ownerstring

The method used to create the rule. Valid values:

  • manual (default): manually created.
  • clover: automatically created.
manual
Expireslong

The validity period of the rule. Unit: seconds. If the Action parameter is set to block, the system blocks the requests that match the rule within the validity period of the rule. The value 0 indicates that the rule is permanently valid.

0
Namestring

The name of the rule.

wq
RuleDetailobject

The details of the rule.

Modestring

The parameter is deprecated.

Countinteger

The parameter is deprecated.

Namestring

The name of the rule.

ccauto14
Actionstring

The action triggered if the rule is matched. Valid values:

  • accept: The requests that match the rule are allowed.
  • block: The requests that match the rule are blocked.
  • challenge: Completely Automated Public Turing test to tell Computers and Humans Apart (CAPTCHA) verification for the requests that match the rule is implemented.
  • watch: The requests that match the rule are recorded in logs and allowed.
block
Intervalinteger

The parameter is deprecated.

60
Ttlinteger

The parameter is deprecated.

300
Uristring

The parameter is deprecated.

/p3shijihao
RateLimitobject

The frequency statistics.

SubKeystring

The name of the field. This parameter is required only when the Target parameter is set to header.

action
Intervalinteger

The statistical period. Unit: seconds.

60
Thresholdinteger

The trigger threshold.

20
Ttlinteger

The blocking duration. Unit: seconds.

15
Targetstring

The statistical method. Valid values:

  • ip
  • header
ip
Conditionarray<object>

The match conditions.

condobject

The match condition.

MatchMethodstring

The match method.

belong
Fieldstring

The match field.

ip
HeaderNamestring

The custom HTTP request header.

Note This parameter takes effect only when Field is set to header.
null
Contentstring

The match content.

192.0.XX.XX
ContentListstring

The match content when the match method is Equals to One of Multiple Values.

["2","3","ad"]
Statisticsobject

The statistics after deduplication. By default, the system collects statistics before deduplication.

Modestring

Indicates whether the system collects statistics after deduplication. Valid values:

  • count: The system collects statistics before deduplication.
  • distinct: The system collects statistics after deduplication.
count
Fieldstring

The statistical method. Valid values:

  • ip
  • header
  • uri
uri
HeaderNamestring

The name of the header. This parameter is required only when the Field parameter is set to header.

hello
StatusCodeobject

The status codes.

Enabledboolean

Indicates whether the status code is enabled. Valid values:

  • true
  • false
true
Codeinteger

The status code. Valid values: 100 to 599.

  • 200: The request was successful.
  • Other codes: The request failed.
200
UseRatioboolean

Indicates whether to use a ratio.

  • true
  • false
true
CountThresholdinteger

If a ratio is not used, the handling action is triggered only when the number of requests of the corresponding status code reaches the value of CountThreshold. Valid values: 2 to 50000.

10
RatioThresholdinteger

If a ratio is used, the handling action is triggered only when the number of requests of the corresponding status code reaches the value of RatioThreshold. Valid values: 1 to 100.

10

Examples

Sample success responses

JSONformat

{
  "RequestId": "CF33B4C3-196E-4015-AADD-5CAD00057B80",
  "TotalCount": "12",
  "Domain": "www.aliyun.com",
  "WebCCRules": [
    {
      "Owner": "manual",
      "Expires": 0,
      "Name": "wq",
      "RuleDetail": {
        "Mode": "",
        "Count": 0,
        "Name": "ccauto14",
        "Action": "block",
        "Interval": 60,
        "Ttl": 300,
        "Uri": "/p3shijihao",
        "RateLimit": {
          "SubKey": "action",
          "Interval": 60,
          "Threshold": 20,
          "Ttl": 15,
          "Target": "ip"
        },
        "Condition": [
          {
            "MatchMethod": "belong",
            "Field": "ip",
            "HeaderName": "null",
            "Content": "192.0.XX.XX",
            "ContentList": "[\"2\",\"3\",\"ad\"]"
          }
        ],
        "Statistics": {
          "Mode": "count",
          "Field": "uri",
          "HeaderName": "hello"
        },
        "StatusCode": {
          "Enabled": true,
          "Code": 200,
          "UseRatio": true,
          "CountThreshold": 10,
          "RatioThreshold": 10
        }
      }
    }
  ]
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-07-30The response structure of the API has changedView Change Details