azure-docs icon indicating copy to clipboard operation
azure-docs copied to clipboard

Wildcard character in prefixMatch

Open AjayBathini-MSFT opened this issue 1 year ago • 2 comments

The document only mentions that the '*' and '?' characters do not function as wildcard characters, but it does not indicate if any other characters can be used as wildcards. It would be helpful to have clarification on whether any characters can be used as wildcards, such as the '%' character. Providing this information would be more useful than simply listing which characters are not wildcards.

Since it is only possible to enter up to 10 filters per rule, not being able to use wildcard characters would necessitate creating multiple rules, each with 10 filters.

As a provider of SQL management services for hundreds of customers, we often encounter situations where a single customer may have over 200 containers, each comprising of the server name with various suffixes corresponding to lifecycle rules. To manage these containers, we use Azure PowerShell cmdlets like Add-AzStorageAccountManagementPolicyAction, New-AzStorageAccountManagementPolicyFilter, New-AzStorageAccountManagementPolicyRule, and Set-AzStorageAccountManagementPolicy.

While this solution is elegant, it can be difficult to manage because it requires constructing the complete policy when using Set-AzStorageAccountManagementPolicy, and it's not possible to append to existing filters in place. Additionally, the limit of 10 filters per container can be restrictive, and we hoped to bypass this limitation by setting filters via PowerShell.

The lack of support for wildcards in the Lifecycle rules poses a significant challenge for customers trying to manage storage accounts with a large number of containers. If wildcards were supported, it would greatly simplify the management process and alleviate a major pain point for our customers. We hope that Microsoft will consider adding support for wildcards in the future.


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

AjayBathini-MSFT avatar Mar 07 '23 07:03 AjayBathini-MSFT

@normesta Can you please check and add your comments on this doc update request as applicable.

AjayBathini-MSFT avatar Mar 07 '23 07:03 AjayBathini-MSFT

I need this feature too, pls. :)

alejandropiuryp avatar Jun 01 '23 14:06 alejandropiuryp

Hi @AjayBathini-MSFT - wildcards are not supported in prefix matches. I've updated the doc accordingly. Thanks!

#please-close

normesta avatar Sep 01 '23 13:09 normesta