boto3
boto3 copied to clipboard
Problem with Cloudwatch.Metric.put_data resource documentation
Problem The Cloudwatch.Metric:put_data documentation specifies the following request syntax:
import boto3
cloudwatch = boto3.resource('cloudwatch')
metric = cloudwatch.Metric('namespace', 'name')
response = metric.put_data()
ie. no arguments/parameters for the put_data method.
Calling this function results in
botocore.errorfactory.InvalidParameterCombinationException: An error occurred (InvalidParameterCombination) when calling the PutMetricData operation: At least one of the parameters must be specified.
ie. some arguments/parameters are in fact required! Please consider updating the documentation. 😄
Hi @choffa, thanks for opening!
The arguments that are pulled in are defined here:
https://github.com/boto/boto3/blob/2b8d46f5686a30c36f1785c5306e2fb3d569dd8b/boto3/data/cloudwatch/2010-08-01/resources-1.json#L284-L301
I looked at other resources (like an S3 bucket, which has a put_object method) to see how their parameters are generated that are much more complete. We'll need to investigate further what's going on.
Greetings! It looks like this issue hasn’t been active in longer than one year. We encourage you to check if this is still an issue in the latest release. In the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or upvote with a reaction on the initial post to prevent automatic closure. If the issue is already closed, please feel free to open a new one.
This has not been fixed. This function should still take an argument similar to MetricDatum from CF docs
Linking related issue: https://github.com/aws/aws-sdk/issues/179
Actually this appears to be a duplicate of https://github.com/boto/boto3/issues/1396. I just noticed as that received a recent comment. The assignee of that issue has since left the team so I will unassign them begin further investigation. Thanks for your patience.