如何更新身份存储中的用户?

0

【以下的问题经过翻译处理】 试图更新身份存储中用户的属性,但我无法确定属性路径和值应该是什么。例如,如果我想更新用户的昵称,我应该使用下面的JSON数组来做什么? AttributePath和AttributeValue的值应该填入什么?

我一直在遵循此文档(https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_UpdateUser.html),但没有成功。

{
   "IdentityStoreId": 123456,
   "Operations": [ 
      { 
         "AttributePath": "string",
         "AttributeValue": JSON value
      }
   ],
   "UserId": 987654321
}

profile picture
专家
已提问 5 个月前14 查看次数
1 回答
0

【以下的回答经过翻译处理】 UpdateUser不支持对复杂或列表属性进行嵌套/有针对性的替换。因此,在这种情况下,我们需要提供一个电子邮件列表。像这样:

input.json

{
    "IdentityStoreId": "d-1234567890",
    "UserId": "uid",
    "Operations": [
    {
        "AttributePath": "emails",
        "AttributeValue": [{
            "value": "testemail@gmail.com",
            "type": "work",
            "primary": true
        }]
    }
]
 }

profile picture
专家
已回答 5 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则