Closed techthoughts2 closed 4 years ago
@techthoughts2 Does the Service
parameter meet your needs?
Get-AWSCmdletName -Service SQS | Select-Object -First 5
CmdletName ServiceOperation ServiceName ModuleName
---------- ---------------- ----------- ----------
Add-SQSPermission AddPermission Amazon Simple Queue Service (SQS) AWS.Tools.SQS
Add-SQSResourceTag TagQueue Amazon Simple Queue Service (SQS) AWS.Tools.SQS
Clear-SQSQueue PurgeQueue Amazon Simple Queue Service (SQS) AWS.Tools.SQS
Edit-SQSMessageVisibility ChangeMessageVisibility Amazon Simple Queue Service (SQS) AWS.Tools.SQS
Edit-SQSMessageVisibilityBatch ChangeMessageVisibilityBatch Amazon Simple Queue Service (SQS) AWS.Tools.SQS
Get-AWSCmdletName -Service S3 | Select-Object -First 5
CmdletName ServiceOperation ServiceName ModuleName
---------- ---------------- ----------- ----------
Add-S3PublicAccessBlock PutPublicAccessBlock Amazon Simple Storage Service (S3) AWS.Tools.S3
Copy-S3Object CopyObject Amazon Simple Storage Service (S3) AWS.Tools.S3
Get-S3ACL GetACL Amazon Simple Storage Service (S3) AWS.Tools.S3
Get-S3Bucket ListBuckets Amazon Simple Storage Service (S3) AWS.Tools.S3
Get-S3BucketAccelerateConfiguration GetBucketAccelerateConfiguration Amazon Simple Storage Service (S3) AWS.Tools.S3
Hello, thanks for opening this issue.
I support @austoonz answer and would suggest to use Get-AWSCmdletName -Service SQS
instead.
Get-AWSCmdletName -CmdletName "*s3*"
from your example, returns something but, as you can see, it doesn't show S3 cmdlets. I think the reason is that -CmdletName
is expected to be a regular expression but *S3*
is not a valid regular expression and the .NET regex implementation behaves in an unexpected way.
Alternatively, the following work: Get-AWSCmdletName -CmdletName "S3" -MatchWithRegex
or Get-AWSCmdletName -CmdletName ".*S3.*"
Thanks for the suggestions. This is good to close out based on the suggestions.
The Get-AWSCmdletName with the CmdletName parameter sometimes works when wildcards are specified, but sometimes it does not.
Expected Behavior
Returns list of all AWS cmdlets with SQS in the cmdlet name
Current Behavior
Works for things like S3:
Does not work for SQS:
Possible Solution
There are several ways this could be solved but adjusting the behavior of this seems like a good start:
https://github.com/aws/aws-tools-for-powershell/blob/7d148285dbd8e0e465f4b5ceccc4053b82b763e2/modules/AWSPowerShell/Common/DiscoveryCmdlets.cs#L313
If the MatchWithRegex can't be adjusted a -like parameter could be added to provide that experience.
Steps to Reproduce (for bugs)
Run the following command:
Context
When trying to get a list of available cmdlets for a given technology (SQS) I will often wild-card search the technology name. Than I can select the correct cmdlet.
The current behavior enables this sometimes, but other times it does not work. This affects my ability to quickly identify the correct cmdlets I need.
Your Environment
AWS.Tools