aws / aws-tools-for-powershell

The AWS Tools for PowerShell lets developers and administrators manage their AWS services from the PowerShell scripting environment.
Apache License 2.0
235 stars 78 forks source link

Get-HSM2ResourceTag MaxResults Error #124

Closed amarbut24 closed 4 years ago

amarbut24 commented 4 years ago

When running Get-HSM2ResourceTag I'm getting below error

System.InvalidOperationException: MaxResults for ListTags cannot currently support any value other than 50. Please set it to 50 if provided. ---> Amazon.CloudHSMV2.Model.CloudHsmInvalidRequestException: MaxResults for ListTags cannot currently support any value other than 50. Please set it to 50 if provided. ---> Amazon.Runtime.Internal.HttpErrorResponseException: The remote server returned an error: (400) Bad Request. ---> System.Net.WebException: The remote server returned an error: (400) Bad Request.

No matter how I run the command I get that error

Get-HSM2ResourceTag - ResourceID $ID Get-HSM2ResourceTag - ResourceID $ID -MaxResults 50 Get-HSM2ResourceTag - ResourceID $ID -MaxResults "50"

I've also tried giving -MaxResults various numbers to no avail

I am running module version = 4.0.2.0 PowerShell version = 5.1.14393.3471

I've ran the aws cloudhsmv2 list-tags command and am able to retrieve the tags

matteo-prosperi commented 4 years ago

Hello, Thanks for reporting this. I am able to reproduce the issue and I am working on a fix.

matteo-prosperi commented 4 years ago

Hello, thanks again for reporting the issue. It should be fixed in version 4.0.4.0.

amarbut24 commented 4 years ago

Awesome!! Thanks for your help on this one.