Hi @Pratim Das, Partha C,
Thank you for reaching out Microsoft Q&A Forum.
Azure Storage Lifecycle Management only applies policies to blobs that match a specific prefix, and does not support wildcard paths such as mycontainer/. If you want to delete all blobs in a container, you'll need to specify a prefix, like mycontainer/a.
Lifecycle management policies generally take up to 24 hours to apply after they're created or updated. This delay occurs because the policy runs on a scheduled basis, and it doesn’t take immediate effect. If you've just applied the policy, waiting a bit for it to run could resolve the issue.
The prefix filter in the lifecycle policy should match the beginning of the blob names. If your filter is set to something like "abcd/", the policy will apply only to blobs whose names start with this prefix (e.g., abcd/xyz).
Please check the below code:
{
"rules": [
{
"enabled": true,
"name": "delete 1 day old",
"type": "Lifecycle",
"definition": {
"actions": {
"baseBlob": {
"delete": {
"daysAfterModificationGreaterThan": 1
}
}
},
"filters": {
"blobTypes": [
"blockBlob"
],
"prefixMatch": [
"abcd"
]
}
}
}
]
}
For additional information please refer this link:
Azure Blob Storage frequently asked questions
Please let us know if you have any further queries. I’m happy to assist you further.
Please consider to “up-vote” wherever the information provided helps you, this can be beneficial to other community members.