APIG.Throttle
Element Description
The request throttling function allows you to limit the number of API calls within a specified period to protect backend services. After APIs go online, the system provides an access control policy for each API by default. API providers can change the access control policy based on the service capabilities and load conditions of their APIs.
Element Properties
|
Property |
Required |
Descripiton |
|---|---|---|
|
timeInterval |
Yes |
Duration unit of request throttling Type: integer Value Description: Indicates the duration unit of request throttling. This parameter works with the API request throttling limit, which indicates the maximum number of API requests in a specified period. This value must be a positive integer and cannot exceed 2147483647. Value Constraint: This value must be a positive integer and cannot exceed 2147483647 |
|
remark |
No |
Description of the request throttling policy Type: string Value Description: Supports a maximum of 255 characters. Value Constraint: Supports a maximum of 255 characters. Suggestion: None |
|
name |
Yes |
Request throttling policy name Type: string Value Description: Supports customization. Value Constraint: Supports a string of 3-64 characters. This string consists of Chinese characters, letters, digits, and underscores (_), and starts with a letter. Suggestion: None |
|
apiCallLimits |
Yes |
API request throttling limit Type: integer Value Description: API request throttling limits the maximum number of access requests that can be sent to an API within a specified time period. Value Constraint: This value must be a positive integer and cannot exceed 2147483647 Suggestion: None |
|
userCallLimits |
No |
User request throttling limit Type: integer Value Description: User request throttling limits the maximum number of access requests that each user can send to an API within a specified time period. This value cannot be greater than the value of apiCallLimits. Value Constraint: This value must be a positive integer and cannot exceed 2147483647 Suggestion: None |
|
appCallLimits |
No |
APP request throttling limit Type: integer Value Description: Indicates the maximum number of times that an API can be accessed by an APP in a specified period. This value cannot exceed the user request throttling limit. This value must be a positive integer and cannot exceed 2147483647. Value Constraint: This value must be a positive integer and cannot exceed 2147483647 Suggestion: None |
|
timeUnit |
Yes |
Time unit of request throttling Type: string Value Description: Supports the following units: second, minute, hour, or day. Default: SECOND Value Constraint: Supports "SECOND", "MINUTE", "HOUR", "DAY" Suggestion: None |
Relationships Between Elements
None.
Return Value
|
Property |
Type |
Description |
|---|---|---|
|
refName |
string |
Throtte name |
|
refID |
string |
Throttle ID |
Blueprint Example
inputs:
apiName:
default: api321b
apigroupName:
default: test_group321b
throttleName:
default: throttle321
node_templates:
throttle1:
type: HuaweiCloud.APIG.Throttle
properties:
name:
get_input: throttleName
remark: test throttle of aos plugin
apiCallLimits: 10
appCallLimits: 7
userCallLimits: 9
timeInterval: 100
timeUnit: MINUTE
api-group1:
properties:
name:
get_input: apigroupName
remark: test group of aos plugin
type: HuaweiCloud.APIG.ApiGroup
api1:
properties:
authType: NONE
backendApi:
remark: test backend
reqMethod: GET
reqProtocol: HTTP
reqUri: '/test/{aaa}'
timeout: 10000
urlDomain: 192.145.47.226:12346
backendType: HTTP
cors: false
groupId:
get_attribute:
- api-group1
- refID
matchMode: NORMAL
name:
get_input: apiName
remark: test api of aos plugin
reqMethod: GET
reqProtocol: HTTP
reqUri: '/test/{aaa}'
strategyId:
get_attribute:
- throttle1
- refID
requirements:
- groupId:
node: api-group1
- strategyId:
node: throttle1
type: HuaweiCloud.APIG.API
tosca_definitions_version: huaweicloud_tosca_version_1_0
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.