지원 종료 공지: 2026년 10월 30일에 AWS 는 Amazon Pinpoint에 대한 지원을 종료합니다. 2026년 10월 30일 이후에는 Amazon Pinpoint 콘솔 또는 Amazon Pinpoint 리소스(엔드포인트, 세그먼트, 캠페인, 여정 및 분석)에 더 이상 액세스할 수 없습니다. 자세한 내용은 Amazon Pinpoint 지원 종료를 참조하세요. 참고: SMS, 음성, 모바일 푸시, OTP 및 전화번호 검증과 관련된 APIs는이 변경의 영향을 받지 않으며 AWS 최종 사용자 메시징에서 지원됩니다.
기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.
Amazon Pinpoint를 사용하여 엔드포인트 ID 나열
엔드포인트를 업데이트하거나 삭제하려면 엔드포인트 ID가 필요합니다. 따라서 Amazon Pinpoint 프로젝트의 모든 엔드포인트에서 이러한 작업을 수행하려는 경우 첫 번째 단계는 해당 프로젝트에 속한 모든 엔드포인트 ID를 나열하는 것입니다. 그런 다음, 이러한 ID를 반복하여 예를 들면 글로벌로 속성을 추가하거나 프로젝트에 있는 모든 엔드포인트를 삭제할 수 있습니다.
다음 예제에서는를 사용하고 다음을 AWS SDK for Java 수행합니다.
-
Amazon Pinpoint에서 엔드포인트 내보내기의 예제 코드에서 예제
exportEndpointsToS3
메서드를 호출합니다. 이 메서드는 Amazon Pinpoint 프로젝트에서 엔드포인트 정의를 내보냅니다. 엔드포인트 정의는 gzip 파일로 Amazon S3 버킷에 추가됩니다. -
내보낸 gzip 파일을 다운로드합니다.
-
gzip 파일을 읽고 각 엔드포인트의 JSON 정의에서 엔드포인트 ID를 가져옵니다.
-
엔드포인트 ID를 콘솔로 인쇄합니다.
-
Amazon Pinpoint가 Amazon S3에 추가한 파일을 삭제하여 정리합니다.
import software.amazon.awssdk.regions.Region; import software.amazon.awssdk.services.pinpoint.PinpointClient; import software.amazon.awssdk.services.pinpoint.model.EndpointResponse; import software.amazon.awssdk.services.pinpoint.model.GetUserEndpointsRequest; import software.amazon.awssdk.services.pinpoint.model.GetUserEndpointsResponse; import software.amazon.awssdk.services.pinpoint.model.PinpointException; import java.util.List;
import software.amazon.awssdk.regions.Region; import software.amazon.awssdk.services.pinpoint.PinpointClient; import software.amazon.awssdk.services.pinpoint.model.EndpointResponse; import software.amazon.awssdk.services.pinpoint.model.GetUserEndpointsRequest; import software.amazon.awssdk.services.pinpoint.model.GetUserEndpointsResponse; import software.amazon.awssdk.services.pinpoint.model.PinpointException; import java.util.List; /** * Before running this Java V2 code example, set up your development * environment, including your credentials. * * For more information, see the following documentation topic: * * https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/get-started.html */ public class ListEndpointIds { public static void main(String[] args) { final String usage = """ Usage: <applicationId> <userId> Where: applicationId - The ID of the Amazon Pinpoint application that has the endpoint. userId - The user id applicable to the endpoints"""; if (args.length != 2) { System.out.println(usage); System.exit(1); } String applicationId = args[0]; String userId = args[1]; PinpointClient pinpoint = PinpointClient.builder() .region(Region.US_EAST_1) .build(); listAllEndpoints(pinpoint, applicationId, userId); pinpoint.close(); } public static void listAllEndpoints(PinpointClient pinpoint, String applicationId, String userId) { try { GetUserEndpointsRequest endpointsRequest = GetUserEndpointsRequest.builder() .userId(userId) .applicationId(applicationId) .build(); GetUserEndpointsResponse response = pinpoint.getUserEndpoints(endpointsRequest); List<EndpointResponse> endpoints = response.endpointsResponse().item(); // Display the results. for (EndpointResponse endpoint : endpoints) { System.out.println("The channel type is: " + endpoint.channelType()); System.out.println("The address is " + endpoint.address()); } } catch (PinpointException e) { System.err.println(e.awsErrorDetails().errorMessage()); System.exit(1); } } }
전체 SDK 예제를 보려면 GitHub