aws / aws-sdk

Landing page for the AWS SDKs on GitHub
https://aws.amazon.com/tools/
Other
68 stars 12 forks source link

Add `--filters` for iam list-roles #636

Closed LozanoMatheus closed 8 months ago

LozanoMatheus commented 8 months ago

Describe the feature

Currently, the iam list-roles doesn't have the option --filters, only the query.

Use Case

This would be quite handy when using the AWS CLI for scripting. For example, if I want to get certain roles:

aws iam list-roles --query "Roles[*].RoleName" --filters "Name=role-name,Values=*my-role*"

## or using the tagging

aws iam list-roles --query "Roles[*].RoleName" --filters "Name=tag:Name,Values=*my-role*"

Proposed Solution

No response

Other Information

Similar to ec2 describe-instances

Acknowledgements

CLI version used

aws-cli/2.13.28 Python/3.11.6 Darwin/22.6.0 exe/x86_64 prompt/off

Environment details (OS name and version, etc.)

macOS Ventura 13.6

RyanFitzSimmonsAK commented 8 months ago

Hi @LozanoMatheus, thanks for reaching out. I've reached out to the IAM team about considering this request. As this is a service team feature request, I'm going to move this issue to our cross-SDK repository (https://github.com/aws/aws-sdk/) for tracking. Please refer to that issue for any updates. Thanks!

Ticket # for internal use : P104646561

michaelajr commented 8 months ago

This is definitely needed. Especially to list all roles based on a tag.

RyanFitzSimmonsAK commented 8 months ago

The IAM team replied to me with the following information.

Obviously you are aware of the CLI's client-side filtering capabilities as well.

I'm going to close this issue for now, but I'll reopen it if anything changes regarding this.

github-actions[bot] commented 8 months ago

This issue is now closed.

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.

wmgroot commented 1 month ago

Why is this closed when the issue persists and the ask is reasonable?