none
I want to use Regular expression on Azure Blob Lifecycle RRS feed

  • Question

  • Hi
    I want to use Regular expression on Azure Blob Lifecycle.
    but I could not find in the document.
    Can not use it?
    https://docs.microsoft.com/en-us/azure/storage/blobs/storage-lifecycle-management-concepts?tabs=azure-portal#examples

    or...
    I want to set the setting in more detail
    Forexample (prefixMatch)

    ======================================
    {
      "rules": [
        {
          "name": "agingRule_access",
          "enabled": true,
          "type": "Lifecycle",
          "definition": {
            "filters": {
              "blobTypes": [ "blockBlob" ],
              "prefixMatch": [ "container_name/foo/access_log-" ]
            },
            "actions": {
              "baseBlob": {
                "tierToCool": { "daysAfterModificationGreaterThan": 8 }
              }
            }
          }
        }
      ]
    }
    ======================================
    ======================================
    {
      "rules": [
        {
          "name": "agingRule_error",
          "enabled": true,
          "type": "Lifecycle",
          "definition": {
            "filters": {
              "blobTypes": [ "blockBlob" ],
              "prefixMatch": [ "container_name/foo/error_log-" ]
            },
            "actions": {
              "baseBlob": {
                "tierToCool": { "daysAfterModificationGreaterThan": 30 }
              }
            }
          }
        }
      ]
    }
    ======================================


    I tried to run with this setting but it did not secceed.
    Is this possible?


    Thanks a lot.
    Sunday, November 10, 2019 4:56 PM

All replies

  • Hi,

    Are you wanting this to affect wildcards then?  So anything starting with  container_name/foo/error_log- rather than it being a complete string?

    Thanks,

    Matt

    Sunday, November 10, 2019 8:24 PM
  •  Just checking in to see if the above answer helped. If this answers your query, do click “Mark as Answer” and Up-Vote for the same, which might be beneficial to other community members reading this thread. And, if you have any further query do let us know.
    Thursday, November 14, 2019 4:04 AM
    Moderator
  • @iganari Following up to see if the above suggestion was helpful. And, if you have any further query do let us know.

    If the suggested answer helped for your issue, do click on "Mark as Answer" and Up-Vote” on the post that helps you, this can be beneficial to other community members.


    Tuesday, November 19, 2019 3:33 AM
    Moderator
  •  @iganari Just checking in to see if the above answer helped. If this answers your query, do click “Mark as Answer” and Up-Vote for the same, which might be beneficial to other community members reading this thread. And, if you have any further query do let us know.
    Friday, November 22, 2019 2:16 PM
    Moderator