in src/main/java/com/aliyuncs/kms/secretsmanager/client/SecretCacheClient.java [190:218]
private SecretInfo getSecretValue(final String secretName) throws CacheSecretException {
GetSecretValueRequest request = new GetSecretValueRequest();
request.setSecretName(secretName);
request.setVersionStage(stage);
request.setFetchExtendedConfig(true);
request.setAcceptFormat(FormatType.XML);
GetSecretValueResponse resp;
try {
resp = secretClient.getSecretValue(request);
} catch (ClientException e) {
CommonLogger.getCommonLogger(CacheClientConstant.MODE_NAME).errorf("action:getSecretValue", e);
if (!BackoffUtils.judgeNeedRecoveryException(e)) {
throw new CacheSecretException(e);
}
try {
SecretInfo secretInfo = cacheHook.recoveryGetSecret(secretName);
if (secretInfo != null) {
return secretInfo;
} else {
throw e;
}
} catch (ClientException ce) {
CommonLogger.getCommonLogger(CacheClientConstant.MODE_NAME).errorf("action:getSecretValue", e);
throw new CacheSecretException(e);
}
}
return new SecretInfo(resp.getSecretName(), resp.getVersionId(), resp.getSecretData(), resp.getSecretDataType(), resp.getCreateTime(), resp.getSecretType(), resp.getAutomaticRotation(), resp.getExtendedConfig(), resp.getRotationInterval(), resp.getNextRotationDate());
}