0

I've created an Azure App Config and am calling the following to add a key / value pair through an Azure Cloud Shell:

az appconfig kv set -n $appConfigName --content-type application/json --key "tenantXYZ:1" --value {\"FilterConfig\":{\"ClientId\":\"GHRYWQAXCFGH\",\"Url\":\"http://localhost:9091\"}}

but i get the following error

parse error

what's the correct syntax for adding a JSON object called FilterConfig with ClientId and Url properties ? I'm able to add this type ok via the Portal but need to be able to do it on the command line also.

4

1 回答 1

0

@auburg, you should put the whole value in quotes

az appconfig kv set -n $appConfigName --content-type application/json --key "tenantXYZ:1" --value "{\"FilterConfig\":{\"ClientId\":\"GHRYWQAXCFGH\",\"Url\":\"http://localhost:9091\"}}"
于 2021-08-02T21:30:41.850 回答