private String forceResolve ( String key ) { GetParametersRequest request ; if ( key . startsWith ( "aws." ) ) { log . warn ( "Will not try to resolve unprefixed key (" + key + ") - AWS does not allow this" ) ; if ( org . apache . commons . lang3 . StringUtils . isNotEmpty ( parameterPrefix ) ) { request = new GetParametersRequest ( ) . withNames ( parameterPrefix + key ) . withWithDecryption ( true ) ; } else { return null ; } } else { request = new GetParametersRequest ( ) . withNames ( parameterPrefix + key , key ) . withWithDecryption ( true ) ; } GetParametersResult result = ssmClient . getParameters ( request ) ; for ( Parameter parameter : result . getParameters ( ) ) { return parameter . getValue ( ) ; } return null ; }
todo - ensure prefixe parameter takes precedence