Updated on 2025-08-15 GMT+08:00

RateLimitContent

Table 1 RateLimitContent

Parameter

Mandatory

Type

Description

scope

No

String

Type of the request throttling policy.

  • basic: Limit the maximum number of times a single API bound with the policy can be called within the specified period.
  • share: Limit the maximum number of times all APIs bound with the policy can be called within the specified period.

default_time_unit

No

String

Time unit for limiting the number of API calls. Default unit: second.

  • second
  • minute
  • hour
  • day

default_interval

No

Integer

Period of time for limiting the number of API calls. This parameter applies with each of the preceding three API call limits. This value must be a positive integer and cannot exceed 2,147,483,647.

api_limit

Yes

Integer

Maximum number of times an API can be accessed within a specified period. The value cannot exceed the default quota limit. This value must be a positive integer and cannot exceed 2,147,483,647 or –1.

–1 indicates that no request throttling is applied.

app_limit

No

Integer

Maximum number of times the API can be accessed by an app within the same period. The value of this parameter must be less than or equal to that of user_call_limits. This value must be a positive integer and cannot exceed 2,147,483,647.

user_limit

No

Integer

Maximum number of times the API can be accessed by a user within the same period. The value of this parameter must be less than or equal to that of api_call_limits. This value must be a positive integer and cannot exceed 2,147,483,647.

ip_limit

No

Integer

Maximum number of times the API can be accessed by an IP address within the same period. The value of this parameter must be less than or equal to that of api_call_limits. This value must be a positive integer and cannot exceed 2,147,483,647.

algorithm

No

String

Throttling type. Options:

  • counter: High-precision throttling.
  • haht: High-performance throttling.
  • local: Single-node throttling.

specials

No

Array of RateLimitSpecial objects

Excluded configurations for basic throttling.

parameters

No

Array of PluginCommonParameter objects

Parameters for parameter-based throttling.

rules

No

Array of RateLimitRule objects

Rules for parameter-based throttling.

Table 2 RateLimitSpecial

Parameter

Mandatory

Type

Description

type

Yes

String

Type of the request throttling policy. Options:

  • app: application
  • user: IAM tenant

policies

Yes

Array of RateLimitSpecialPolicy objects

Excluded request throttling policies.

Table 3 RateLimitSpecialPolicy

Parameter

Mandatory

Type

Description

key

Yes

String

Object of excluded request throttling.

limit

Yes

Integer

Maximum number of times an excluded object can access an API within the throttling period. The value cannot exceed api_limit.

Table 4 PluginCommonParameter

Parameter

Mandatory

Type

Description

type

Yes

String

Parameter type. Options:

  • header: the value of the first HTTP header with the parameter name you set.
  • query: the value of the first query string with the parameter name you set.
  • path: complete HTTP request path.
  • method: HTTP request method.
  • system: system parameter.

name

Yes

String

Parameter name for "parameters" of "rules".

value

Yes

String

Parameter source value.

Table 5 RateLimitRule

Parameter

Mandatory

Type

Description

rule_name

Yes

String

Request throttling policy rule name.

match_regex

Yes

String

Rule expression. For details, see the rule expression description.

time_unit

No

String

Time unit for limiting the number of API calls. Default unit: value of default_time_unit. Options:

  • second
  • minute
  • hour
  • day

interval

No

Integer

Interval for limiting the number of API calls. Default unit: value of default_interval.

limit

Yes

Integer

Throttling limit, which is a positive integer. -1 indicates that request throttling is not required when this limited is reached.