쿠키 기본 설정 선택

당사는 사이트와 서비스를 제공하는 데 필요한 필수 쿠키 및 유사한 도구를 사용합니다. 고객이 사이트를 어떻게 사용하는지 파악하고 개선할 수 있도록 성능 쿠키를 사용해 익명의 통계를 수집합니다. 필수 쿠키는 비활성화할 수 없지만 '사용자 지정' 또는 ‘거부’를 클릭하여 성능 쿠키를 거부할 수 있습니다.

사용자가 동의하는 경우 AWS와 승인된 제3자도 쿠키를 사용하여 유용한 사이트 기능을 제공하고, 사용자의 기본 설정을 기억하고, 관련 광고를 비롯한 관련 콘텐츠를 표시합니다. 필수가 아닌 모든 쿠키를 수락하거나 거부하려면 ‘수락’ 또는 ‘거부’를 클릭하세요. 더 자세한 내용을 선택하려면 ‘사용자 정의’를 클릭하세요.

Amazon Pinpoint에 엔드포인트 생성 - AWS SDK for Java 1.x

The AWS SDK for Java 1.x는 2024년 7월 31일부터 유지 관리 모드로 전환되었으며 2025년 12월 31일에 end-of-support. 새로운 기능, 가용성 개선 및 보안 업데이트를 AWS SDK for Java 2.x 계속 받으려면 로 마이그레이션하는 것이 좋습니다.

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

The AWS SDK for Java 1.x는 2024년 7월 31일부터 유지 관리 모드로 전환되었으며 2025년 12월 31일에 end-of-support. 새로운 기능, 가용성 개선 및 보안 업데이트를 AWS SDK for Java 2.x 계속 받으려면 로 마이그레이션하는 것이 좋습니다.

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

Amazon Pinpoint에 엔드포인트 생성

엔드포인트는 Amazon Pinpoint를 사용하여 푸시 알림이 전송될 수 있는 사용자 디바이스를 고유하게 식별합니다. Amazon Pinpoint를 지원하는 앱이라면 새 사용자가 앱을 열 때 자동으로 Amazon Pinpoint에 엔드포인트를 등록합니다. 다음 예제는 새 엔드포인트를 프로그래밍 방식으로 추가하는 방법을 보여 줍니다.

엔드포인트 생성

EndpointRequest 객체에 엔드포인트 데이터를 제공하여 Amazon Pinpoint에서 새 엔드포인트를 생성합니다.

가져오기

import com.amazonaws.services.pinpoint.AmazonPinpoint; import com.amazonaws.services.pinpoint.AmazonPinpointClientBuilder; import com.amazonaws.services.pinpoint.model.UpdateEndpointRequest; import com.amazonaws.services.pinpoint.model.UpdateEndpointResult; import com.amazonaws.services.pinpoint.model.EndpointDemographic; import com.amazonaws.services.pinpoint.model.EndpointLocation; import com.amazonaws.services.pinpoint.model.EndpointRequest; import com.amazonaws.services.pinpoint.model.EndpointResponse; import com.amazonaws.services.pinpoint.model.EndpointUser; import com.amazonaws.services.pinpoint.model.GetEndpointRequest; import com.amazonaws.services.pinpoint.model.GetEndpointResult;

코드

HashMap<String, List<String>> customAttributes = new HashMap<>(); List<String> favoriteTeams = new ArrayList<>(); favoriteTeams.add("Lakers"); favoriteTeams.add("Warriors"); customAttributes.put("team", favoriteTeams); EndpointDemographic demographic = new EndpointDemographic() .withAppVersion("1.0") .withMake("apple") .withModel("iPhone") .withModelVersion("7") .withPlatform("ios") .withPlatformVersion("10.1.1") .withTimezone("America/Los_Angeles"); EndpointLocation location = new EndpointLocation() .withCity("Los Angeles") .withCountry("US") .withLatitude(34.0) .withLongitude(-118.2) .withPostalCode("90068") .withRegion("CA"); Map<String,Double> metrics = new HashMap<>(); metrics.put("health", 100.00); metrics.put("luck", 75.00); EndpointUser user = new EndpointUser() .withUserId(UUID.randomUUID().toString()); DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm'Z'"); // Quoted "Z" to indicate UTC, no timezone offset String nowAsISO = df.format(new Date()); EndpointRequest endpointRequest = new EndpointRequest() .withAddress(UUID.randomUUID().toString()) .withAttributes(customAttributes) .withChannelType("APNS") .withDemographic(demographic) .withEffectiveDate(nowAsISO) .withLocation(location) .withMetrics(metrics) .withOptOut("NONE") .withRequestId(UUID.randomUUID().toString()) .withUser(user);

그런 다음 그 EndpointRequest 객체로 UpdateEndpointRequest 객체를 생성합니다. 마지막으로 AmazonPinpointClient의 updateEndpoint 메서드에 UpdateEndpointRequest 객체를 전달합니다.

코드

UpdateEndpointRequest updateEndpointRequest = new UpdateEndpointRequest() .withApplicationId(appId) .withEndpointId(endpointId) .withEndpointRequest(endpointRequest); UpdateEndpointResult updateEndpointResponse = client.updateEndpoint(updateEndpointRequest); System.out.println("Update Endpoint Response: " + updateEndpointResponse.getMessageBody());

GitHub의 전체 예제를 참조하십시오.

추가 정보

프라이버시사이트 이용 약관쿠키 기본 설정
© 2025, Amazon Web Services, Inc. 또는 계열사. All rights reserved.