in aws-ssm-parameter/src/main/java/com/amazonaws/ssm/parameter/DeleteHandler.java [40:59]
private DeleteParameterResponse deleteResource(final DeleteParameterRequest deleteParameterRequest,
final ProxyClient<SsmClient> proxyClient) {
try {
return proxyClient.injectCredentialsAndInvokeV2(deleteParameterRequest, proxyClient.client()::deleteParameter);
} catch (final ParameterNotFoundException exception) {
throw new CfnNotFoundException(ResourceModel.TYPE_NAME, deleteParameterRequest.name());
} 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);
}
}