* Add EG Blob Trigger templates for Node functions

* Remove non-4.x templates
This commit is contained in:
Daniel Castro 2024-04-30 16:11:06 -07:00 коммит произвёл GitHub
Родитель 3ab7c45f61
Коммит cd70878740
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
1 изменённых файлов: 48 добавлений и 0 удалений

Просмотреть файл

@ -1452,6 +1452,54 @@
"userPrompt": []
}
},
{
"id": "EventGridBlobTrigger-JavaScript-4.x",
"runtime": "2",
"files": {
"%functionName%.js": "const { app } = require('@azure/functions');\r\n\r\napp.storageBlob('%functionName%', {\r\n path: '%path%',\r\n source: 'EventGrid',\r\n connection: '%connection%',\r\n handler: (blob, context) => {\r\n context.log(`Storage blob (using Event Grid) function processed blob \"${context.triggerMetadata.name}\" with size ${blob.length} bytes`);\r\n }\r\n});\r\n"
},
"metadata": {
"defaultFunctionName": "eventGridBlobTrigger",
"description": "$BlobTrigger_description",
"name": "Azure Blob Storage Trigger (using Event Grid)",
"language": "JavaScript",
"triggerType": "blobTrigger",
"category": [
"$temp_category_core",
"$temp_category_dataProcessing"
],
"categoryStyle": "blob",
"enabledInTryMode": true,
"userPrompt": [
"connection",
"path"
]
}
},
{
"id": "EventGridBlobTrigger-TypeScript-4.x",
"runtime": "2",
"files": {
"%functionName%.ts": "import { app, InvocationContext } from \"@azure/functions\";\r\n\r\nexport async function %functionName%(blob: Buffer, context: InvocationContext): Promise<void> {\r\n context.log(`Storage blob function processed blob \"${context.triggerMetadata.name}\" with size ${blob.length} bytes`);\r\n}\r\n\r\napp.storageBlob('%functionName%', {\r\n path: '%path%',\r\n source: 'EventGrid',\r\n connection: '%connection%',\r\n handler: %functionName%\r\n});\r\n"
},
"metadata": {
"defaultFunctionName": "eventGridBlobTrigger",
"description": "$BlobTrigger_description",
"name": "Azure Blob Storage Trigger (using Event Grid)",
"language": "TypeScript",
"triggerType": "blobTrigger",
"category": [
"$temp_category_core",
"$temp_category_dataProcessing"
],
"categoryStyle": "blob",
"enabledInTryMode": true,
"userPrompt": [
"connection",
"path"
]
}
},
{
"id": "EventGridTrigger-CSharp",
"runtime": "2",