private DeleteOpsMetadataResponse deleteResource()

in aws-ssm-opsmetadata/src/main/java/com/amazonaws/ssm/opsmetadata/DeleteHandler.java [53:72]


    private DeleteOpsMetadataResponse deleteResource(final DeleteOpsMetadataRequest deleteOpsMetadataRequest,
                                                     final ProxyClient<SsmClient> proxyClient) {
        try {
            return proxyClient.injectCredentialsAndInvokeV2(deleteOpsMetadataRequest, proxyClient.client()::deleteOpsMetadata);
        } catch (final OpsMetadataNotFoundException exception) {
            throw new CfnNotFoundException(ResourceModel.TYPE_NAME, deleteOpsMetadataRequest.opsMetadataArn());
        } catch (final InternalServerErrorException exception) {
            throw new CfnServiceInternalErrorException(OPERATION, exception);
        } catch (final AmazonServiceException exception) {
            final Integer errorStatus = exception.getStatusCode();
            final String errorCode = exception.getErrorCode();
            if (errorStatus >= Constants.ERROR_STATUS_CODE_400 && errorStatus < Constants.ERROR_STATUS_CODE_500) {
                if (THROTTLING_ERROR_CODES.contains(errorCode)) {
                    logger.log(String.format(RETRY_MESSAGE, exception.getMessage()));
                    throw new CfnThrottlingException(OPERATION, exception);
                }
            }
            throw new CfnGeneralServiceException(OPERATION, exception);
        }
    }