サポート終了通知: 2026 年 10 月 30 日に、 AWS は Amazon Pinpoint のサポートを終了します。2026 年 10 月 30 日を過ぎると、Amazon Pinpoint コンソールまたは Amazon Pinpoint のリソース (エンドポイント、セグメント、キャンペーン、ジャーニー、分析) にアクセスできなくなります。詳細については、「Amazon Pinpoint のサポート終了」を参照してください。注: SMS、音声、モバイルプッシュ、OTP、電話番号の検証に関連する APIs は、この変更の影響を受けず、 AWS エンドユーザーメッセージングでサポートされています。
翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。
AWS SDK または CLI DeleteAppで を使用する
次のサンプルコードは、DeleteApp を使用する方法を説明しています。
アクション例は、より大きなプログラムからのコードの抜粋であり、コンテキスト内で実行する必要があります。次のコード例で、このアクションのコンテキストを確認できます。
- CLI
-
- AWS CLI
-
アプリケーションを削除するには
次の delete-app の例は、アプリケーション (プロジェクト) を削除します。
aws pinpoint delete-app \
--application-id 810c7aab86d42fb2b56c8c966example
出力:
{
"ApplicationResponse": {
"Arn": "arn:aws:mobiletargeting:us-west-2:AIDACKCEVSQ6C2EXAMPLE:apps/810c7aab86d42fb2b56c8c966example",
"Id": "810c7aab86d42fb2b56c8c966example",
"Name": "ExampleCorp",
"tags": {}
}
}
- Java
-
- SDK for Java 2.x
-
GitHub には、その他のリソースもあります。用例一覧を検索し、AWS コード例リポジトリでの設定と実行の方法を確認してください。
アプリケーションを削除します。
import software.amazon.awssdk.regions.Region;
import software.amazon.awssdk.services.pinpoint.PinpointClient;
import software.amazon.awssdk.services.pinpoint.model.DeleteAppRequest;
import software.amazon.awssdk.services.pinpoint.model.DeleteAppResponse;
import software.amazon.awssdk.services.pinpoint.model.PinpointException;
/**
* 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 DeleteApp {
public static void main(String[] args) {
final String usage = """
Usage: <appId>
Where:
appId - The ID of the application to delete.
""";
if (args.length != 1) {
System.out.println(usage);
System.exit(1);
}
String appId = args[0];
System.out.println("Deleting an application with ID: " + appId);
PinpointClient pinpoint = PinpointClient.builder()
.region(Region.US_EAST_1)
.build();
deletePinApp(pinpoint, appId);
System.out.println("Done");
pinpoint.close();
}
public static void deletePinApp(PinpointClient pinpoint, String appId) {
try {
DeleteAppRequest appRequest = DeleteAppRequest.builder()
.applicationId(appId)
.build();
DeleteAppResponse result = pinpoint.deleteApp(appRequest);
String appName = result.applicationResponse().name();
System.out.println("Application " + appName + " has been deleted.");
} catch (PinpointException e) {
System.err.println(e.awsErrorDetails().errorMessage());
System.exit(1);
}
}
}
- Kotlin
-
- SDK for Kotlin
-
GitHub には、その他のリソースもあります。用例一覧を検索し、AWS コード例リポジトリでの設定と実行の方法を確認してください。
suspend fun deletePinApp(appId: String?) {
PinpointClient.fromEnvironment { region = "us-west-2" }.use { pinpoint ->
val result =
pinpoint.deleteApp(
DeleteAppRequest {
applicationId = appId
},
)
val appName = result.applicationResponse?.name
println("Application $appName has been deleted.")
}
}
AWS SDK 開発者ガイドとコード例の完全なリストについては、「」を参照してくださいAWS SDK での Amazon Pinpoint の使用。このトピックには、使用開始方法に関する情報と、以前の SDK バージョンの詳細も含まれています。