如何基于Cognito的创建日期/更新日期获取用户列表 [英] how to get list of users based on created date/updated date from cognito
本文介绍了如何基于Cognito的创建日期/更新日期获取用户列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用sub和创建日期从cognito获取用户,能够使用sub获取用户,但不接受创建日期,因为这不是要传递给过滤器的属性,以下是相同的代码,我希望通过过滤器中创建的过滤器Filter =" created =" 2020-06-30""
I am trying to fetch users from cognito with sub and created date , able to fetch the user using sub but its not accepting for created date, as this is not attribute to pass for filter, below is the code for the same , i wan to pass created in filter Filter="created ="2020-06-30""
import boto3
client = boto3.client('cognito-idp',region_name='us-east-2',
aws_access_key_id='XXXXXX',
aws_secret_access_key='XXXXXXX',
)
response1 = client.list_users(UserPoolId='us-east-2_XXXXXX',AttributesToGet=
['birthdate','name','sub'], Filter="sub =\"XXXXX-dCCa-4121-94c9-XXXXXX\"")
print(response1)
错误: InvalidParameterException:调用ListUsers操作时发生错误(InvalidParameterException):无效的搜索属性:UserCreateDate
error: InvalidParameterException: An error occurred (InvalidParameterException) when calling the ListUsers operation: Invalid search attribute: UserCreateDate
推荐答案
查看全文