-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New APIG throttling policy resource supported #1296
New APIG throttling policy resource supported #1296
Conversation
Pending sdk supports throttling policy. |
return fmtp.Errorf("Error saving special user throttles to state: %s", err) | ||
} | ||
apps := make([]map[string]interface{}, len(specThrottles)) | ||
for i, throttle := range specThrottles { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is better to construct users
and apps
in one loop.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thx, that's easy to understand.
- support base type and share type - support four kinds of call limit - support special throttling policies management
- use more readable code - refactor the policies structure of attribute parameters
This parameter applies with each of the API call limits: `max_api_requests`, `max_app_requests`, `max_ip_requests` | ||
and `max_user_requests`. | ||
|
||
* `max_api_requests` - (Required, Int) Specifies the maximum number of times an API can be accessed within a specified |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please put max_api_requests
, max_app_requests
, max_ip_requests
and max_user_requests
together.
return nil | ||
} | ||
|
||
func resourceApigThrottlingPolicyV2Create(d *schema.ResourceData, meta interface{}) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add some blank lines to make it easier to read.
- adjust the locations of all api limit call in document - add some blank lines and annotations
What this PR does / why we need it:
The throttling policy controls the number of times APIs can be called by a user, an app, or an IP address during a specific period to protect backend services.
Which issue this PR fixes:
(optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged)reference: #1249
Special notes for your reviewer:
Release note:
PR Checklist
Acceptance Steps Performed