Updated on 2024-10-09 GMT+08:00

x-apigateway-ratelimits.policy

Meaning: Definition of a request throttling policy.

Scope of effect: x-apigateway-ratelimits

Example:

x-apigateway-ratelimits:
  customRatelimitName:
    api-limit: 200
    app-limit: 200
    user-limit: 200
    ip-limit: 200
    interval: 1
    unit: MINUTE
    shared: false
    special: 
      - type: USER
        limit: 100
        instance: xxxxxxx
Table 1 Parameter description

Parameter

Mandatory

Type

Description

api-limit

Yes

Number

Maximum number of times an API can be called.

user-limit

No

Number

Maximum number of times the API can be called by a user.

app-limit

No

Number

Maximum number of times the API can be called by an app.

ip-limit

No

Number

Maximum number of times the API can be called by an IP address.

interval

Yes

Number

Throttling period.

unit

Yes

String

Throttling unit, which can be SECOND, MINUTE, HOUR, or DAY.

shared

No

Boolean

Whether to share the throttling limits among APIs.

special

No

x-apigateway-ratelimits.policy.special

Array

Special request throttling policy.