Search in sources :

Example 1 with DeleteAppResponse

use of software.amazon.awssdk.services.pinpoint.model.DeleteAppResponse in project aws-doc-sdk-examples by awsdocs.

the class DeleteApp method deletePinApp.

// snippet-start:[pinpoint.java2.deleteapp.main]
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);
    }
}
Also used : DeleteAppResponse(software.amazon.awssdk.services.pinpoint.model.DeleteAppResponse) DeleteAppRequest(software.amazon.awssdk.services.pinpoint.model.DeleteAppRequest) PinpointException(software.amazon.awssdk.services.pinpoint.model.PinpointException)

Aggregations

DeleteAppRequest (software.amazon.awssdk.services.pinpoint.model.DeleteAppRequest)1 DeleteAppResponse (software.amazon.awssdk.services.pinpoint.model.DeleteAppResponse)1 PinpointException (software.amazon.awssdk.services.pinpoint.model.PinpointException)1