@@ -21,10 +21,6 @@ public async Task<string> GetParam(string name, bool withDecryption = true, Canc
2121 var prefix = $ "/elastic-docs-v3/{ appEnvironment . Current . ToStringFast ( true ) } /";
2222 var prefixedName = prefix + name . TrimStart ( '/' ) ;
2323 logger . LogInformation ( "Retrieving parameter '{Name}' from Lambda Extension (SSM Parameter Store)." , prefixedName ) ;
24- var requestUri =
25- $ "/systemsmanager/parameters/get?name={ Uri . EscapeDataString ( prefixedName ) } &withDecryption={ withDecryption . ToString ( ) . ToLowerInvariant ( ) } ";
26- var rawResponse = await _httpClient . GetStringAsync ( requestUri , ctx ) ;
27- logger . LogInformation ( "{RawResponse}" , rawResponse ) ;
2824 var response = await _httpClient . GetFromJsonAsync < ParameterResponse > ( $ "/systemsmanager/parameters/get?name={ Uri . EscapeDataString ( prefixedName ) } &withDecryption={ withDecryption . ToString ( ) . ToLowerInvariant ( ) } ", AwsJsonContext . Default . ParameterResponse , ctx ) ;
2925 return response ? . Parameter ? . Value ?? throw new InvalidOperationException ( $ "Parameter value for '{ name } ' is null.") ;
3026 }
@@ -53,6 +49,7 @@ internal sealed class ParameterResponse
5349
5450internal sealed class Parameter
5551{
52+ [ JsonPropertyName ( "ARN" ) ]
5653 public string ? Arn { get ; set ; }
5754 public string ? Name { get ; set ; }
5855 public string ? Type { get ; set ; }
@@ -66,5 +63,4 @@ internal sealed class Parameter
6663
6764
6865[ JsonSerializable ( typeof ( ParameterResponse ) ) ]
69- [ JsonSourceGenerationOptions ( PropertyNamingPolicy = JsonKnownNamingPolicy . CamelCase ) ]
7066internal sealed partial class AwsJsonContext : JsonSerializerContext ;
0 commit comments