Azure / AppConfiguration

Questions, feedback and samples for Azure App Configuration service
MIT License
241 stars 73 forks source link

How to run a show command with a wildcard for label? #905

Closed cveld closed 7 months ago

cveld commented 7 months ago

I am looking for a way to run az appconfig kv show to query for a key or key wildcard expression to get results irrespective from the label value.

I tried: az appconfig kv show --key $SettingKey --name $appconfig --label * but it does not yield any result.

The rest api on the other hand works flawlessly: $result = Invoke-AzCli rest --uri "https://$($appconfig).azconfig.io/kv?key=$settingKey&label=*&api-version=2023-10-01" --resource https://$appconfig.azconfig.io

albertofori commented 7 months ago

Hello @cveld, the cli has a az appconfig kv list command that can be used to list key-values using wildcard expressions for the key and label.

To list key-value with a given key irrespective of the label, omit the label argument. az appconfig kv list --key $SettingKey --name $appconfig

Kindly let me know if this works for your use case.

Thanks!