-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup_webhooks2.bat
51 lines (42 loc) · 1.92 KB
/
setup_webhooks2.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
SETLOCAL ENABLEEXTENSIONS
SET storageid=/subscriptions/7e695216-b24c-4241-a46e-d8571e7d2cb2/resourceGroups/tr-dev/providers/Microsoft.Storage/storageAccounts/trdevmedia
SET endpoint=https://8ac14ea3.ngrok.io/image_worker/runtime/webhooks/EventGrid?functionName=GenerateThumbnail
REM ################################################ Product Thumbnails
SET subscription_name=GenerateProductThumbnails
SET container_name=business-product-media
call az eventgrid event-subscription delete ^
--source-resource-id %storageid% ^
--name %subscription_name%
call az eventgrid event-subscription create ^
--source-resource-id %storageid% ^
--name %subscription_name% ^
--endpoint %endpoint% ^
--endpoint-type webhook ^
--included-event-types Microsoft.Storage.BlobCreated ^
--subject-begins-with /blobServices/default/containers/%container_name%/
REM ################################################ Business Thumbnails
SET subscription_name=GenerateBusinessThumbnails
SET container_name=business-media
call az eventgrid event-subscription delete ^
--source-resource-id %storageid% ^
--name %subscription_name%
call az eventgrid event-subscription create ^
--source-resource-id %storageid% ^
--name %subscription_name% ^
--endpoint %endpoint% ^
--endpoint-type webhook ^
--included-event-types Microsoft.Storage.BlobCreated ^
--subject-begins-with /blobServices/default/containers/%container_name%/
REM ################################################ Review Thumbnails
SET subscription_name=GenerateReviewThumbnails
SET container_name=review-media
call az eventgrid event-subscription delete ^
--source-resource-id %storageid% ^
--name %subscription_name%
call az eventgrid event-subscription create ^
--source-resource-id %storageid% ^
--name %subscription_name% ^
--endpoint %endpoint% ^
--endpoint-type webhook ^
--included-event-types Microsoft.Storage.BlobCreated ^
--subject-begins-with /blobServices/default/containers/%container_name%/