AppConfiguration
AppConfiguration copied to clipboard
adding or deleting a specific user or group in Azure app configuration feature filter CLI
i created a filter by following command in azure app configuration
az appconfig feature filter add -n azureDBconfig --feature check --filter-name Microsoft.Targeting --filter-parameters Audience={\"DefaultRolloutPercentage\":0,\"Users\":[\"[email protected]\",\"[email protected]\"]}
{
"id": "check",
"description": "",
"enabled": true,
"conditions": {
"client_filters": [
{
"name": "Microsoft.Targeting",
"parameters": {
"Audience": {
"DefaultRolloutPercentage": 0,
"Users": [
"[email protected]",
"[email protected]"
]
}
}
}
]
}
}
now i want to add [email protected] and delete [email protected] from the user list without affecting any other attribute of the feature
az appconfig feature filter add -n azureDBconfig --feature check --filter-name Microsoft.Targeting --filter-parameters Audience={\"DefaultRolloutPercentage\":0,\"Users\":[\"[email protected]\",\"[email protected]\"]}
But when i am trying to do the same the new list is getting appended below the previous list rather than updating .
{
"id": "check",
"description": "",
"enabled": true,
"conditions": {
"client_filters": [
{
"name": "Microsoft.Targeting",
"parameters": {
"Audience": {
"DefaultRolloutPercentage": 0,
"Users": [
"[email protected]",
"[email protected]"
]
}
}
},
{
"name": "Microsoft.Targeting",
"parameters": {
"Audience": {
"DefaultRolloutPercentage": 0,
"Users": [
"[email protected]",
"[email protected]"
]
}
}
}
]
}
}
i want the end result like
{
"id": "check",
"description": "",
"enabled": true,
"conditions": {
"client_filters": [
{
"name": "Microsoft.Targeting",
"parameters": {
"Audience": {
"DefaultRolloutPercentage": 0,
"Users": [
"[email protected]",
"[email protected]"
]
}
}
}
]
}
}
Hi @Bhanu88, thanks for the feedback! We will add this capability in Azure CLI and keep you posted. In the meantime, you can achieve this in 2 steps:
- Delete the existing filter named "Microsoft.Targeting":
-
az appconfig feature filter delete -n <storeName> --feature <featureName> --filter-name Microsoft.Targeting
- Add a new filter called "Microsoft.Targeting" with the updated filter params:
-
az appconfig feature filter add -n azureDBconfig --feature check --filter-name Microsoft.Targeting --filter-parameters Audience={\"DefaultRolloutPercentage\":0,\"Users\":[\"[email protected]\",\"[email protected]\"]}
@avanigupta thanks for the workaround i will wait for the enhancement
@Bhanu88 The feature filter update functionality is available in preview now with azure-cli version 2.41.0. I hope this works for your use case. Any feedback you may have on this is welcome.
Thanks for the update and I will check and update here
its working as expected