如何在AWS Cognito用户池中为特定用户编辑用户属性? [英] How to edit user attributes in AWS Cognito User Pool for specific user?
问题描述
我正在使用AWS Cognito用户池,并且已经创建了一些用户。现在,我想更改特定用户的某些属性,例如姓名,地址等。
I'm using AWS Cognito User Pool and have created some users. Now I would like to change some of the attributes for a specific user such as name, address, etc...
是否可以在AWS网站上执行此操作?如果是,怎么办?
Is it possible to do this on an AWS Website? If so, how?
推荐答案
控制台没有该功能,但是可以在AWS Command Line Interface中完成。 / p>
The console does not have that capability but it can be done in the AWS Command Line Interface.
aws cognito-idp admin-update-user-attributes \
--user-pool-id xxx \
--username yyy \
--user-attributes Name=xxx,Value=yyy Name=ttt,Value=sss ...
自定义属性使用以下语法:
Custom attributes use the following syntax:
--user-attributes Name="custom:attributeName",Value="value with space"
您需要设置通过以下命令使用cli首先(只有第一次)使用cli:
You need to set up your credentials with cli first (only the first time), via the command:
aws configure
,但是在那之后很简单。有关更多信息:
but after that it is straightforward. For more:
aws cognito-idp admin-update-user-attributes help
这篇关于如何在AWS Cognito用户池中为特定用户编辑用户属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!