AWSDocAWS SDKGitHub サンプルリポジトリには、さらに多くの SDK サンプルがあります
翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。
特定のユーザー ID に関連付けられている Amazon Pinpoint エンドポイントを一覧表示します。
次のコード例は、エンドポイントを一覧表示する方法を示しています。
- Java
-
- SDK for Java 2.x
-
注記
他にもありますGitHub。用例一覧を検索し、AWS コード例リポジトリ
での設定と実行の方法を確認してください。 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); } }
-
API の詳細については、AWS SDK for Java 2.xAPI GetUserEndpointsリファレンスのを参照してください。
-
セグメントのインポート
セグメントを一覧表示する