-
Notifications
You must be signed in to change notification settings - Fork 11
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
Update CloudWatch client to send payload in POST body instead of URL #98
Update CloudWatch client to send payload in POST body instead of URL #98
Conversation
|
||
static let modelOverride = ModelOverride( | ||
fieldRawTypeOverride: ["Long": CommonConfiguration.intOverride], | ||
additionalErrors: ["ThrottlingException"]) |
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.
Does ThrottlingException the new exception after sending payload in POST body?
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.
No, throttling exception is always there, it's just not part of the model. Let me look it up.
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.
https://docs.aws.amazon.com/cloudwatch/latest/APIReference/CommonErrors.html
ThrottlingException
The request was denied due to request throttling.
HTTP Status Code: 400
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.
And it's not explicitly mentioned here: https://github.com/aws/aws-sdk-go/blob/main/models/apis/monitoring/2010-08-01/api-2.json
Hence, why we need to add this.
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.
I see. I'm wondering why it not in the model Before? Throttling happened many times in our service.
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's a miss for this client.
Issue #, if available:
URL encoded requests do not support as much as data as POST body. This will allow client to send up to 1MB of data to CloudWatch service.
Description of changes:
This update to the client changes where the payload is placed in the HTTP request. Currently it's in the URL. After this change it will be in POST body.
Testing:
Before (URL encoded):
After (POST body):
Verified that the metric appears using AWS console.
PR for the generated code: amzn/smoke-aws#146
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.