AWS Pinpoint custom attribute - the value of 'true'”改写为“AWS Pinpoint自定义属性 - 值为'true'”,可通过以下代码实现:
Map customAttributes = new HashMap<>();
customAttributes.put("myCustomAttribute", true);
Map endpointAttributes = new HashMap<>();
endpointAttributes.put("Attributes", customAttributes);
UpdateEndpointRequest request = new UpdateEndpointRequest()
.withApplicationId("YOUR_APP_ID")
.withEndpointId("YOUR_ENDPOINT_ID")
.withEndpointRequest(endpointAttributes);
UpdateEndpointResult result = PinpointClientBuilder.standard()
.withRegion(Regions.US_EAST_1)
.build()
.updateEndpoint(request);