Search code examples
azure-app-configuration

Selecting both labeled and not labeled values from Azure App Configuration


In my Azure App Configuration I have 2 keys, one of them has label.

Alpha:A = '1' [no-label]
Alpha:B = '2' [no-label]
Alpha:B = '3' ['Api' label]

I would like to select all Alpha keys but if they have label, load 'Api'. Currently I do this: First select all then select 'Api' label to overwrite the previous ones.

.Select("Alpha:*",LabelFilter.Null)
.Select("Alpha:*","Api")

Is there any better solution?


Solution

  • that is the solution provided in the Azure App Configuration documentation best practices section: https://learn.microsoft.com/en-us/azure/azure-app-configuration/howto-best-practices#key-value-compositions