Is it possible to change the default event that is fired on blobcreated
?
Storage accounts have the ability to fire events when blobs are deleted/created:
If you add a new event subscription, you can choose between these three:
I'd like to be able to use the Custom Input Schema. However, there's no documentation on how to use it.
How do we customize the custom input schema?
The default schema looks something like this:
{
"topic": "/subscriptions/xxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.Storage/storageAccounts/mystoraccount",
"subject": "/blobServices/default/containers/xmlinput/blobs/myj.json",
"eventType": "Microsoft.Storage.BlobCreated",
"eventTime": "2019-05-20T18:58:28.7390111Z",
"id": "xxxxxxxxxxxxxxxx",
"data": {
"api": "PutBlockList",
"clientRequestId": "xxxxxxxxxxxxxxxx",
"requestId": "xxxxxxxxxxxxxxxx",
"eTag": "0x8D6DD55254EBE75",
"contentType": "application/json",
"contentLength": 874636,
"blobType": "BlockBlob",
"url": "https://mystoraccount.blob.core.windows.net/xmlinput/myj.json",
"sequencer": "00000000000000000000000000005FAC0000000000614963",
"storageDiagnostics": {
"batchId": "xxxxxxxxxxxxxxxx"
}
},
"dataVersion": "",
"metadataVersion": "1"
}
I'd like to ONLY return the file name, in this case it is a substring of the subject
, myj.json.
How do we customize the event that's being fired?
Desired result:
{
"filename": "myj.json"
}