Обновление User.UserAttributes на AWS Pinpoint - PullRequest
0 голосов
/ 01 апреля 2019

Я не могу обновить уже существующие UserAttributes для пользователя "73".Я не уверен, стоит ли ожидать такого поведения.

Map<String, List<String>> userAttributes = new HashMap<>();
userAttributes.put("Inference", Arrays.asList("NEGATIVE"));
userAttributes.put("Gender", Arrays.asList("M"));
userAttributes.put("ChannelPreference", Arrays.asList("EMAIL"));
userAttributes.put("TwitterHandle", Arrays.asList("Nutter"));
userAttributes.put("Age", Arrays.asList("435"));

EndpointUser endpointUser = new EndpointUser().withUserId("73");
endpointUser.setUserAttributes(userAttributes);

EndpointRequest endpointRequest = new EndpointRequest().withUser(endpointUser);

UpdateEndpointResult updateEndpointResult = pinpoint.updateEndpoint(new UpdateEndpointRequest()
    .withEndpointRequest(endpointRequest).withApplicationId("380c3902d4ds47bfb6f9c6749c6dc8bf").withEndpointId("a1fiy2gy+eghmsadj1vqew6+aa"));

System.out.println(updateEndpointResult.getMessageBody());
...