in aws-ssm-parameter/src/main/java/com/amazonaws/ssm/parameter/CreateHandler.java [74:93]
private PutParameterResponse createResource(final PutParameterRequest putParameterRequest,
final ProxyClient<SsmClient> proxyClient) {
try {
return proxyClient.injectCredentialsAndInvokeV2(putParameterRequest, proxyClient.client()::putParameter);
} catch (final ParameterAlreadyExistsException exception) {
throw new CfnAlreadyExistsException(ResourceModel.TYPE_NAME, putParameterRequest.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);
}
}