How do I use the body of my queue message to bind to my input blob?
The value I would need to capture would be myj.json
.
I've got a queue triggered function:
[FunctionName ("OnSaveXmlBytesBlobTriggered")]
public static void Run (
[QueueTrigger ("xmlinputqueue", Connection = "mystorconn")] JObject myQueueItem,
[Blob ("xmlinput/{jsonFileName}", FileAccess.Read, Connection = "mystorconn")] Stream blobInput,
ILogger log) {
log.LogInformation ($"C# Queue trigger function processed: {myQueueItem.subject}");
}
Here's a sample of the myQueueItem
:
{
"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"
}
How do a string inside of the queue payload body, in order to bind to my input blob?