3

I am developing a blob triggered azure function. Following is the configuration of my "function.json" file:

{
  "disabled": false,
  "bindings": [
    {
      "name": "myBlob",
      "type": "blobTrigger",
      "direction": "in",
      "path": "input/{name}",
      "connection": "BlobConnectionString"
    }
  ]
}

My function is working fine. It is triggered for all files in "input" blob. Now I want to filter files by its naming pattern. For Example : I want to trigger my azure function for only those files which contains "~123~" in its name.

Is it possible to do with some change in "path" property of "function.json" file? If yes, then what should be the value of the "path" property? If not, please let me know if there is any other workaround possible.

Thanks,

1 Answer 1

5

input/{prefix}~123~{suffix} should work. In function method signature, instead of name, use prefix and suffix to get blob name if needed.

Sign up to request clarification or add additional context in comments.

3 Comments

@Yash Unfortunately not, one blob trigger allows monitoring only one container.
@Yash, you can use eventgrid to achieve trigger on multiple containers
@Yash No, but you can have multiple functions that all call a private method that does the real work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.