Skip to content
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

Cloudwatch PutMetricData API wrongly states the format of Timestamp #4052

Open
nikith1997 opened this issue Mar 18, 2024 · 1 comment
Open
Assignees
Labels
bug This issue is a confirmed bug. cloudwatch documentation This is a problem with documentation. p3 This is a minor priority issue response-requested Waiting on additional information or feedback.

Comments

@nikith1997
Copy link

Describe the issue

As per the documentation:
Timestamp: The time the metric data was received, expressed as the number of milliseconds since Jan 1, 1970 00:00:00 UTC.
Error when supplying milliseconds:

Invalid type for parameter MetricData[3].Timestamp, value: 1710802853708, type: <class 'int'>, valid types: <class 'datetime.datetime'>, timestamp-string

Please fix the documentation.

Links

https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/cloudwatch/client/put_metric_data.html

@nikith1997 nikith1997 added documentation This is a problem with documentation. needs-triage This issue or PR still needs to be triaged. labels Mar 18, 2024
@RyanFitzSimmonsAK RyanFitzSimmonsAK self-assigned this May 3, 2024
@RyanFitzSimmonsAK RyanFitzSimmonsAK added bug This issue is a confirmed bug. cloudwatch p3 This is a minor priority issue investigating This issue is being investigated and/or work is in progress to resolve the issue. and removed needs-triage This issue or PR still needs to be triaged. labels May 3, 2024
@RyanFitzSimmonsAK
Copy link
Contributor

Hi @nikith1997, thanks for reaching out. Updating this documentation is a request we've had in the past (aws/aws-sdk#54), but it's a bit tricky because that docstring is shared across all SDKs. The operation isn't expecting an integer (Timestamp (datetime)), but is instead expecting you to use the datetime module in the case of Boto3. Other SDKs use different libraries to accomplish the same thing. Updating the docstring to reflect the specificities of one SDK would make the documentation confusing for the others. Do you have a suggestion on how the documentation could be improved with that in mind?

@RyanFitzSimmonsAK RyanFitzSimmonsAK added response-requested Waiting on additional information or feedback. and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. labels May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a confirmed bug. cloudwatch documentation This is a problem with documentation. p3 This is a minor priority issue response-requested Waiting on additional information or feedback.
Projects
None yet
Development

No branches or pull requests

2 participants