List of usage examples for com.amazonaws.services.secretsmanager.model GetSecretValueRequest getSecretId
public String getSecretId()
Specifies the secret containing the version that you want to retrieve.
From source file:org.springframework.cloud.aws.secretsmanager.AwsSecretsManagerPropertySource.java
License:Apache License
private void readSecretValue(GetSecretValueRequest secretValueRequest) { try {//from w ww . j a va 2s.c om GetSecretValueResult secretValueResult = source.getSecretValue(secretValueRequest); Map<String, Object> secretMap = jsonMapper.readValue(secretValueResult.getSecretString(), new TypeReference<Map<String, Object>>() { }); for (Map.Entry<String, Object> secretEntry : secretMap.entrySet()) { properties.put(secretEntry.getKey(), secretEntry.getValue()); } } catch (ResourceNotFoundException e) { logger.debug("AWS secret not found from " + secretValueRequest.getSecretId()); } catch (IOException e) { throw new RuntimeException(e); } }