private ProgressEvent checkDeleteScheduledQueryStatus()

in aws-timestream-scheduledquery/src/main/java/software/amazon/timestream/scheduledquery/DeleteHandler.java [84:113]


    private ProgressEvent<ResourceModel, CallbackContext> checkDeleteScheduledQueryStatus(
            ResourceHandlerRequest<ResourceModel> request, CallbackContext callbackContext, ResourceModel model) {

        DescribeScheduledQueryRequest describeScheduledQueryRequest =
                new DescribeScheduledQueryRequest()
                        .withScheduledQueryArn(model.getArn());

        try {
            this.proxy.injectCredentialsAndInvoke(describeScheduledQueryRequest, timestreamClient::describeScheduledQuery);
        } catch (ResourceNotFoundException ex) {
            return ProgressEvent.<ResourceModel, CallbackContext>builder()
                    .status(OperationStatus.SUCCESS)
                    .build();
        } catch (ValidationException | InvalidEndpointException ex) {
            throw new CfnInvalidRequestException(request.toString(), ex);
        } catch (AccessDeniedException ex) {
            throw new CfnAccessDeniedException(DESCRIBE_SCHEDULED_QUERY, ex);
        } catch (ThrottlingException ex) {
            throw new CfnThrottlingException(DESCRIBE_SCHEDULED_QUERY, ex);
        } catch (InternalServerException ex) {
            throw new CfnInternalFailureException(ex);
        }

        return ProgressEvent.<ResourceModel, CallbackContext>builder()
                .callbackContext(callbackContext)
                .resourceModel(model)
                .status(OperationStatus.IN_PROGRESS)
                .callbackDelaySeconds(CALLBACK_DELAY_SECONDS)
                .build();
    }