-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Unmarshalling error when calling the pricing GetProducts API #1636
Labels
bug
This issue is a bug.
service-api
This issue is due to a problem in a service API, not the SDK implementation.
Comments
jasdel
added
the
service-api
This issue is due to a problem in a service API, not the SDK implementation.
label
Nov 8, 2017
Thanks for reaching out to us @justone We're taking a look at this, and will update once we reproduce the issue. |
Was able to reproduce this easily. Thanks for the sample. Response body from service. {
"FormatVersion": "aws_v1",
"NextToken": "nwgM6jfEMURvqUBTOCtXvw==:0x2+NWRDC5l8tzDFYdtRI7sv1ua8wr8gulXULluS8OBMjd2UvaVhWVCIOyIhZnLtefLKeduMMIcajIpmk+niXFXR0k+iKhmtLRtW528QNyUR1FrLzrbP8Zru8tJaXMvB/JJe1I3Qoc+aMeGtF0LjXNJuLFqtu6wFohQvX9RyQTGL/gQHabQbYcKmTiOGhAkh",
"PriceList": [
"{\"product\":{\"productFamily\":\"Storage\",\"attributes\":{\"storageMedia\":\"SSD-backed\",\"maxThroughputvolume\":\"320 MB/sec\",\"volumeType\":\"Provisioned IOPS\",\"maxIopsvolume\":\"20000\",\"servicecode\":\"AmazonEC2\",\"usagetype\":\"APS1-EBS:VolumeUsage.piops\",\"locationType\":\"AWS Region\",\"location\":\"Asia Pacific (Singapore)\",\"servicename\":\"Amazon Elastic Compute Cloud\",\"maxVolumeSize\":\"16 TiB\",\"operation\":\"\"},\"sku\":\"3MKHN58N7RDDVGKJ\"},\"serviceCode\":\"AmazonEC2\",\"terms\":{\"OnDemand\":{\"3MKHN58N7RDDVGKJ.JRTCKXETXF\":{\"priceDimensions\":{\"3MKHN58N7RDDVGKJ.JRTCKXETXF.6YS6EN2CT7\":{\"unit\":\"GB-Mo\",\"endRange\":\"Inf\",\"description\":\"$0.138 per GB-month of Provisioned IOPS SSD (io1) provisioned storage - Asia Pacific (Singapore)\",\"appliesTo\":[],\"rateCode\":\"3MKHN58N7RDDVGKJ.JRTCKXETXF.6YS6EN2CT7\",\"beginRange\":\"0\",\"pricePerUnit\":{\"USD\":\"0.1380000000\"}}},\"sku\":\"3MKHN58N7RDDVGKJ\",\"effectiveDate\":\"2017-10-01T00:00:00Z\",\"offerTermCode\":\"JRTCKXETXF\",\"termAttributes\":{}}}},\"version\":\"20171026015458\",\"publicationDate\":\"2017-10-26T01:54:58Z\"}"
]
} |
jasdel
added a commit
to jasdel/aws-sdk-go
that referenced
this issue
Nov 9, 2017
jasdel
added a commit
to jasdel/aws-sdk-go
that referenced
this issue
Nov 14, 2017
jasdel
added a commit
to jasdel/aws-sdk-go
that referenced
this issue
Nov 15, 2017
Thanks for reporting this issue @justone I've merged in a fix that will correct the SDK's behavior. This will be included in the next release. |
Awesome, @jasdel, thanks for fixing it up! |
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
This issue is a bug.
service-api
This issue is due to a problem in a service API, not the SDK implementation.
Version of AWS SDK for Go?
I'm using the latest master version of the SDK.
Version of Go (
go version
)?The environment is inside a Docker container, accessed via SSH.
OS is Ubuntu 16.04:
What issue did you see?
When I call the pricing GetProducts method, I get a serialization error.
Steps to reproduce
Using this code (almost verbatim from the example, except I had to move ServiceCode from a filter to a top level key):
I tried to dig into the unmarshalling code, and it looks like the data passed to the
unmarshalMap
function is actually a string and not a map and that causes the failure.I don't know enough to tell if this is an error in the unmarshalling code or in the API's response.
Please let me know if I can provide any other information.
Thank you.
The text was updated successfully, but these errors were encountered: