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

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
전문가
질문됨 6달 전20회 조회
1개 답변
0

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

input.json

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

profile picture
전문가
답변함 6달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠