1

Is it possible to store data types in the Azure app configuration? Or is it left to the program calling the app configuration to declare the data type?

joshduffney
  • 389
  • 1
  • 4
  • 16

2 Answers2

2

Absolutely. Each key-value in App Configuration has a content-type field. While you can put anything in it as long as your application understands it, we do recommend using MIME types, which is also what the out-of-box data types App Configuration uses.

More discussion can be found at https://github.com/Azure/AppConfiguration/issues/116#issuecomment-559628997

Zhenlan Wang
  • 1,213
  • 8
  • 10
  • Correct, but it is not enforced. Since you could use something else and not required. I would say this is optional metadata. The content-type field is intended to be used to indicate the type of the value of a key-value. The field is for customer use. When this information is available, an application can behave differently, for example, use different parsers when value content is bool vs. integer. While you can use any formatting to indicate content-type, we recommend using MIME types - this is how we use content type to indicate feature flags or Key Vault references. – Ron Jul 16 '20 at 04:24
1

Because it's designed to be a centralized location to store the data as key value. It works similarly to a web.config or configuration settings in App Service. So it really is designed to just be strings. If you are wanting a specific data type, it would be up to the dev to ensure it to convert it to the corresponding data type.

https://learn.microsoft.com/en-us/azure/azure-app-configuration/overview Azure App Configuration provides a service to centrally manage application settings and feature flags. Modern programs, especially programs running in a cloud, generally have many components that are distributed in nature. Spreading configuration settings across these components can lead to hard-to-troubleshoot errors during an application deployment. Use App Configuration to store all the settings for your application and secure their accesses in one place.

Ron
  • 421
  • 3
  • 9