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

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
EXPERTO
preguntada hace 6 meses21 visualizaciones
1 Respuesta
0

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

input.json

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

profile picture
EXPERTO
respondido hace 6 meses

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas