简体   繁体   中英

aws cognito-idp list-users : filter by email domain?

I can filter on addresses that start with "john@"

aws cognito-idp list-users --user-pool-id my-pool --filter "email ^= \"john@\"" --limit 20

Is it possible to filter on ends with "@gmail.com"?

Not at the moment. You can follow this issue to see if in the future they add this feature: https://github.com/aws/aws-sdk-js/issues/3136

Yes it is possible.

If you use the --query instead of --filter you can query on anything in the resulting response by using JMESPath .

So to filter out @gmail.com you can do:

aws cognito-idp list-users --user-pool-id my-pool --query 'Users[?Attributes[?Name==`email` && contains(Value, `gmail.com`)]]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM