private RemoveNotificationChannelResponse deleteResource()

in aws-devopsguru-notificationchannel/src/main/java/software/amazon/devopsguru/notificationchannel/DeleteHandler.java [60:83]


    private RemoveNotificationChannelResponse deleteResource(
            final RemoveNotificationChannelRequest deleteNotificationChannelRequest,
            final ProxyClient<DevOpsGuruClient> proxyClient,
            final ResourceModel model){
        RemoveNotificationChannelResponse awsResponse = null;

        try {
            awsResponse = proxyClient.injectCredentialsAndInvokeV2(deleteNotificationChannelRequest, proxyClient.client()::removeNotificationChannel);
            logger.log(String.format("DeleteNotificationChannel response: %s", awsResponse.toString()));
        } catch (final AccessDeniedException e) {
            throw new CfnAccessDeniedException(ResourceModel.TYPE_NAME, e);
        } catch (final InternalServerException e) {
            throw new CfnServiceInternalErrorException(ResourceModel.TYPE_NAME, e);
        } catch (final ResourceNotFoundException e) {
            throw new CfnNotFoundException(ResourceModel.TYPE_NAME, model.getId(), e);
        } catch (final ValidationException e) {
            throw new CfnInvalidRequestException(ResourceModel.TYPE_NAME, e);
        } catch (final ThrottlingException e) {
            throw new CfnThrottlingException(ResourceModel.TYPE_NAME, e);
        }

        logger.log(String.format("%s successfully deleted.", ResourceModel.TYPE_NAME));
        return awsResponse;
    }