@@ -42,8 +42,8 @@ public void UpdateRedirects(string kvsName, IReadOnlyDictionary<string, string>
42
42
ConsoleApp . Log ( "Describing KeyValueStore" ) ;
43
43
try
44
44
{
45
- var json = Capture ( "aws" , "cloudfront" , "describe-key-value-store" , "--name" , kvsName , "|" , "jq" , "-c" ) ;
46
- var describeResponse = JsonSerializer . Deserialize < DescribeKeyValueStoreResponse > ( json , AwsCloudFrontKeyValueStoreJsonContext . Default . DescribeKeyValueStoreResponse ) ;
45
+ var json = CaptureMultiple ( "aws" , "cloudfront" , "describe-key-value-store" , "--name" , kvsName ) ;
46
+ var describeResponse = JsonSerializer . Deserialize < DescribeKeyValueStoreResponse > ( string . Concat ( json ) , AwsCloudFrontKeyValueStoreJsonContext . Default . DescribeKeyValueStoreResponse ) ;
47
47
if ( describeResponse ? . ETag is not null && describeResponse . KeyValueStore is { ARN . Length : > 0 } )
48
48
return ( describeResponse . KeyValueStore . ARN , describeResponse . ETag ) ;
49
49
@@ -67,8 +67,8 @@ private HashSet<string> ListAllKeys(string kvsArn)
67
67
{
68
68
do
69
69
{
70
- var json = Capture ( "aws" , [ .. baseArgs , .. nextToken is not null ? ( string [ ] ) [ "--starting-token" , nextToken ] : [ ] , "|" , "jq" , "-c" ] ) ;
71
- var response = JsonSerializer . Deserialize < ListKeysResponse > ( json , AwsCloudFrontKeyValueStoreJsonContext . Default . ListKeysResponse ) ;
70
+ var json = CaptureMultiple ( "aws" , [ .. baseArgs , .. nextToken is not null ? ( string [ ] ) [ "--starting-token" , nextToken ] : [ ] ] ) ;
71
+ var response = JsonSerializer . Deserialize < ListKeysResponse > ( string . Concat ( json ) , AwsCloudFrontKeyValueStoreJsonContext . Default . ListKeysResponse ) ;
72
72
73
73
if ( response ? . Items != null )
74
74
{
@@ -108,9 +108,9 @@ private string ProcessBatchUpdates(
108
108
AwsCloudFrontKeyValueStoreJsonContext . Default . ListDeleteKeyRequestListItem ) ,
109
109
_ => string . Empty
110
110
} ;
111
- var responseJson = Capture ( false , 1 , "aws" , "cloudfront-keyvaluestore" , "update-keys" , "--kvs-arn" , kvsArn , "--if-match" , eTag ,
112
- $ "--{ operation . ToString ( ) . ToLowerInvariant ( ) } ", "--payload" , payload , "|" , "jq" , "-c" ) ;
113
- var updateResponse = JsonSerializer . Deserialize < UpdateKeysResponse > ( responseJson , AwsCloudFrontKeyValueStoreJsonContext . Default . UpdateKeysResponse ) ;
111
+ var responseJson = CaptureMultiple ( false , 1 , "aws" , "cloudfront-keyvaluestore" , "update-keys" , "--kvs-arn" , kvsArn , "--if-match" , eTag ,
112
+ $ "--{ operation . ToString ( ) . ToLowerInvariant ( ) } ", "--payload" , payload ) ;
113
+ var updateResponse = JsonSerializer . Deserialize < UpdateKeysResponse > ( string . Concat ( responseJson ) , AwsCloudFrontKeyValueStoreJsonContext . Default . UpdateKeysResponse ) ;
114
114
115
115
if ( string . IsNullOrEmpty ( updateResponse ? . ETag ) )
116
116
throw new Exception ( "Failed to get new ETag after update operation." ) ;
0 commit comments