DescribeAvailablePatches SSM api - incorrect type for the field epoch
Confirm by changing [ ] to [x] below to ensure that it's a bug:
- [x] I've gone though Developer Guide and API reference
- [x] I've checked AWS Forums and StackOverflow for answers
- [x] I've searched for previous similar issues and didn't find any solution
Describe the bug
error while getting available patches","error":"SerializationError: failed decoding JSON RPC response\n\tstatus code: 200, request id: 5ff26977-ddee-4ddf-82cf-c88291a6cac0\ncaused by: unsupported value: <nil> (*int64)
Version of AWS SDK for Go?
v1.36.15
Version of Go (go version)?
go version go1.16.4 linux/amd64
To Reproduce (observed behavior)
if err := DescribeAvailablePatchesPagesWithContext(ctx, &DescribeAvailablePatchesInput{
Filters: []*PatchOrchestratorFilter{
{
Key: aws.String("PRODUCT"),
Values: []*string{
aws.String("AmazonLinux2.0"),
},
},
},
MaxResults: aws.Int64(50),
}, func(result *DescribeAvailablePatchesOutput, lastPage bool) bool {
res = append(res, result.Patches...)
return !lastPage
}); err != nil {
return nil, err
}
Expected behavior
The method should be finished without error
Hi @svagner , Yea I am able ot reproduce this, thanks for bringing it up to us we'll review the PR.
I updated, and had to close the PR because the SDK cannot take this change directly since these model files are copied into the SDK automatically. The copy would overwrite this change. In addition, this change breaks the SDK's public released type. Changing it from a int to string.
We'll need to forward this issue to the API team, to correct their API's behavior. This most likely is an issue with the service sending the wrong type in this specific case.
V694669741
Unassigning.
Service team has auto closed this. This needs a re-triage. For whoever picks this up, if this cannot be reproduced with your SDK language, re-assign it to the Go SDK queue for follow up.
Thanks.
Cannot be reproduced with AWS SDK for .NET using the code below:
using Amazon.SimpleSystemsManagement;
using Amazon.SimpleSystemsManagement.Model;
var response = await (new AmazonSimpleSystemsManagementClient()).DescribeAvailablePatchesAsync(newDescribeAvailablePatchesRequest()
{
Filters = new List<PatchOrchestratorFilter>() {
new PatchOrchestratorFilter() { Key="PRODUCT", Values = new List<string>(){ "AmazonLinux2.0" } }
}
});
Console.WriteLine(response);
Transferring to AWS SDK for Go repo.
Hi there,
I'm Not sure why @ashishdhingra is able to reproduce this with .NET. I tested this with the Go SDK and can see that the response field Epoch is set to return a value a string instead of a number as described in the API model.
I have created an internal ticket with the SSM service team ( P137583768) and will update you when we hear back from them. Sorry for the delay.
Ran~
Hi,
The service had acknowledged this needs to get fixed. Since it is not actionable by the Go SDK team, Im going to go ahead and close this. Thanks, Ran~
This issue is now closed. Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one.