2
2
title : Azure Blob Storage as Event Grid source
3
3
description : Describes the properties that are provided for blob storage events with Azure Event Grid
4
4
ms.topic : conceptual
5
- ms.date : 05/26 /2022
5
+ ms.date : 09/22 /2022
6
6
---
7
7
8
8
# Azure Blob Storage as an Event Grid source
@@ -15,7 +15,7 @@ This article provides the properties and schema for blob storage events. For an
15
15
16
16
## Available event types
17
17
18
- ### List of events for Blob REST APIs
18
+ ## Blob Storage events
19
19
20
20
These events are triggered when a client creates, replaces, or deletes a blob by calling Blob REST APIs.
21
21
@@ -29,7 +29,174 @@ These events are triggered when a client creates, replaces, or deletes a blob by
29
29
| ** Microsoft.Storage.BlobTierChanged** | Triggered when the blob access tier is changed. Specifically, when clients call the ` Set Blob Tier ` operation that is available in the Blob REST API, this event is triggered after the tier change completes. |
30
30
| ** Microsoft.Storage.AsyncOperationInitiated** | Triggered when an operation involving moving or copying of data from the archive to hot or cool tiers is initiated. Specifically, this event is triggered either when clients call the ` Set Blob Tier ` API to move a blob from archive tier to hot or cool tier, or when clients call the ` Copy Blob ` API to copy data from a blob in the archive tier to a blob in the hot or cool tier.|
31
31
32
- ### List of the events for Azure Data Lake Storage Gen 2 REST APIs
32
+ ### Example events
33
+
34
+ # [ Event Grid event schema] ( #tab/event-grid-event-schema )
35
+
36
+ ### Microsoft.Storage.BlobCreated event
37
+
38
+ ``` json
39
+ [{
40
+ "topic" : " /subscriptions/{subscription-id}/resourceGroups/Storage/providers/Microsoft.Storage/storageAccounts/my-storage-account" ,
41
+ "subject" : " /blobServices/default/containers/test-container/blobs/new-file.txt" ,
42
+ "eventType" : " Microsoft.Storage.BlobCreated" ,
43
+ "eventTime" : " 2017-06-26T18:41:00.9584103Z" ,
44
+ "id" : " 831e1650-001e-001b-66ab-eeb76e069631" ,
45
+ "data" : {
46
+ "api" : " PutBlockList" ,
47
+ "clientRequestId" : " 6d79dbfb-0e37-4fc4-981f-442c9ca65760" ,
48
+ "requestId" : " 831e1650-001e-001b-66ab-eeb76e000000" ,
49
+ "eTag" : " \" 0x8D4BCC2E4835CD0\" " ,
50
+ "contentType" : " text/plain" ,
51
+ "contentLength" : 524288 ,
52
+ "blobType" : " BlockBlob" ,
53
+ "url" : " https://my-storage-account.blob.core.windows.net/testcontainer/new-file.txt" ,
54
+ "sequencer" : " 00000000000004420000000000028963" ,
55
+ "storageDiagnostics" : {
56
+ "batchId" : " b68529f3-68cd-4744-baa4-3c0498ec19f0"
57
+ }
58
+ },
59
+ "dataVersion" : " " ,
60
+ "metadataVersion" : " 1"
61
+ }]
62
+ ```
63
+
64
+ ### Microsoft.Storage.BlobDeleted event
65
+
66
+ ``` json
67
+ [{
68
+ "topic" : " /subscriptions/{subscription-id}/resourceGroups/Storage/providers/Microsoft.Storage/storageAccounts/my-storage-account" ,
69
+ "subject" : " /blobServices/default/containers/testcontainer/blobs/file-to-delete.txt" ,
70
+ "eventType" : " Microsoft.Storage.BlobDeleted" ,
71
+ "eventTime" : " 2017-11-07T20:09:22.5674003Z" ,
72
+ "id" : " 4c2359fe-001e-00ba-0e04-58586806d298" ,
73
+ "data" : {
74
+ "api" : " DeleteBlob" ,
75
+ "requestId" : " 4c2359fe-001e-00ba-0e04-585868000000" ,
76
+ "contentType" : " text/plain" ,
77
+ "blobType" : " BlockBlob" ,
78
+ "url" : " https://my-storage-account.blob.core.windows.net/testcontainer/file-to-delete.txt" ,
79
+ "sequencer" : " 0000000000000281000000000002F5CA" ,
80
+ "storageDiagnostics" : {
81
+ "batchId" : " b68529f3-68cd-4744-baa4-3c0498ec19f0"
82
+ }
83
+ },
84
+ "dataVersion" : " " ,
85
+ "metadataVersion" : " 1"
86
+ }]
87
+ ```
88
+
89
+ ### Microsoft.Storage.BlobTierChanged event
90
+
91
+ ``` json
92
+ {
93
+ "topic" : " /subscriptions/{subscription-id}/resourceGroups/Storage/providers/Microsoft.Storage/storageAccounts/my-storage-account" ,
94
+ "subject" : " /blobServices/default/containers/testcontainer/blobs/Auto.jpg" ,
95
+ "eventType" : " Microsoft.Storage.BlobTierChanged" ,
96
+ "id" : " 0fdefc06-b01e-0034-39f6-4016610696f6" ,
97
+ "data" : {
98
+ "api" : " SetBlobTier" ,
99
+ "clientRequestId" : " 68be434c-1a0d-432f-9cd7-1db90bff83d7" ,
100
+ "requestId" : " 0fdefc06-b01e-0034-39f6-401661000000" ,
101
+ "contentType" : " image/jpeg" ,
102
+ "contentLength" : 105891 ,
103
+ "blobType" : " BlockBlob" ,
104
+ "url" : " https://my-storage-account.blob.core.windows.net/testcontainer/Auto.jpg" ,
105
+ "sequencer" : " 000000000000000000000000000089A4000000000018d6ea" ,
106
+ "storageDiagnostics" : {
107
+ "batchId" : " 3418f7a9-7006-0014-00f6-406dc6000000"
108
+ }
109
+ },
110
+ "dataVersion" : " " ,
111
+ "metadataVersion" : " 1" ,
112
+ "eventTime" : " 2021-05-04T15:00:00.8350154Z"
113
+ }
114
+ ```
115
+
116
+ ### Microsoft.Storage.AsyncOperationInitiated event
117
+
118
+ ``` json
119
+ {
120
+ "topic" : " /subscriptions/{subscription-id}/resourceGroups/Storage/providers/Microsoft.Storage/storageAccounts/my-storage-account" ,
121
+ "subject" : " /blobServices/default/containers/testcontainer/blobs/00000.avro" ,
122
+ "eventType" : " Microsoft.Storage.AsyncOperationInitiated" ,
123
+ "id" : " 8ea4e3f2-101e-003d-5ff4-4053b2061016" ,
124
+ "data" : {
125
+ "api" : " SetBlobTier" ,
126
+ "clientRequestId" : " 777fb4cd-f890-4c5b-b024-fb47300bae62" ,
127
+ "requestId" : " 8ea4e3f2-101e-003d-5ff4-4053b2000000" ,
128
+ "contentType" : " application/octet-stream" ,
129
+ "contentLength" : 3660 ,
130
+ "blobType" : " BlockBlob" ,
131
+ "url" : " https://my-storage-account.blob.core.windows.net/testcontainer/00000.avro" ,
132
+ "sequencer" : " 000000000000000000000000000089A4000000000018c6d7" ,
133
+ "storageDiagnostics" : {
134
+ "batchId" : " 34128c8a-7006-0014-00f4-406dc6000000"
135
+ }
136
+ },
137
+ "dataVersion" : " " ,
138
+ "metadataVersion" : " 1" ,
139
+ "eventTime" : " 2021-05-04T14:44:59.3204652Z"
140
+ }
141
+ ```
142
+
143
+
144
+ # [ Cloud event schema] ( #tab/cloud-event-schema )
145
+
146
+ ### Microsoft.Storage.BlobCreated event
147
+
148
+ ``` json
149
+ [{
150
+ "source" : " /subscriptions/{subscription-id}/resourceGroups/Storage/providers/Microsoft.Storage/storageAccounts/my-storage-account" ,
151
+ "subject" : " /blobServices/default/containers/test-container/blobs/new-file.txt" ,
152
+ "type" : " Microsoft.Storage.BlobCreated" ,
153
+ "time" : " 2017-06-26T18:41:00.9584103Z" ,
154
+ "id" : " 831e1650-001e-001b-66ab-eeb76e069631" ,
155
+ "data" : {
156
+ "api" : " PutBlockList" ,
157
+ "clientRequestId" : " 6d79dbfb-0e37-4fc4-981f-442c9ca65760" ,
158
+ "requestId" : " 831e1650-001e-001b-66ab-eeb76e000000" ,
159
+ "eTag" : " \" 0x8D4BCC2E4835CD0\" " ,
160
+ "contentType" : " text/plain" ,
161
+ "contentLength" : 524288 ,
162
+ "blobType" : " BlockBlob" ,
163
+ "url" : " https://my-storage-account.blob.core.windows.net/testcontainer/new-file.txt" ,
164
+ "sequencer" : " 00000000000004420000000000028963" ,
165
+ "storageDiagnostics" : {
166
+ "batchId" : " b68529f3-68cd-4744-baa4-3c0498ec19f0"
167
+ }
168
+ },
169
+ "specversion" : " 1.0"
170
+ }]
171
+ ```
172
+
173
+ ### Microsoft.Storage.BlobDeleted event
174
+
175
+ ``` json
176
+ [{
177
+ "source" : " /subscriptions/{subscription-id}/resourceGroups/Storage/providers/Microsoft.Storage/storageAccounts/my-storage-account" ,
178
+ "subject" : " /blobServices/default/containers/testcontainer/blobs/file-to-delete.txt" ,
179
+ "type" : " Microsoft.Storage.BlobDeleted" ,
180
+ "time" : " 2017-11-07T20:09:22.5674003Z" ,
181
+ "id" : " 4c2359fe-001e-00ba-0e04-58586806d298" ,
182
+ "data" : {
183
+ "api" : " DeleteBlob" ,
184
+ "requestId" : " 4c2359fe-001e-00ba-0e04-585868000000" ,
185
+ "contentType" : " text/plain" ,
186
+ "blobType" : " BlockBlob" ,
187
+ "url" : " https://my-storage-account.blob.core.windows.net/testcontainer/file-to-delete.txt" ,
188
+ "sequencer" : " 0000000000000281000000000002F5CA" ,
189
+ "storageDiagnostics" : {
190
+ "batchId" : " b68529f3-68cd-4744-baa4-3c0498ec19f0"
191
+ }
192
+ },
193
+ "specversion" : " 1.0"
194
+ }]
195
+ ```
196
+
197
+ ---
198
+
199
+ ## Azure Data Lake Storage Gen 2 events
33
200
34
201
These events are triggered if you enable a hierarchical namespace on the storage account, and clients use Azure Data Lake Storage Gen2 REST APIs. For more information bout Azure Data Lake Storage Gen2, see [ Introduction to Azure Data Lake Storage Gen2] ( ../storage/blobs/data-lake-storage-introduction.md ) .
35
202
@@ -72,34 +239,6 @@ When an event is triggered, the Event Grid service sends data about that event t
72
239
73
240
# [ Event Grid event schema] ( #tab/event-grid-event-schema )
74
241
75
- ### Microsoft.Storage.BlobCreated event
76
-
77
- ``` json
78
- [{
79
- "topic" : " /subscriptions/{subscription-id}/resourceGroups/Storage/providers/Microsoft.Storage/storageAccounts/my-storage-account" ,
80
- "subject" : " /blobServices/default/containers/test-container/blobs/new-file.txt" ,
81
- "eventType" : " Microsoft.Storage.BlobCreated" ,
82
- "eventTime" : " 2017-06-26T18:41:00.9584103Z" ,
83
- "id" : " 831e1650-001e-001b-66ab-eeb76e069631" ,
84
- "data" : {
85
- "api" : " PutBlockList" ,
86
- "clientRequestId" : " 6d79dbfb-0e37-4fc4-981f-442c9ca65760" ,
87
- "requestId" : " 831e1650-001e-001b-66ab-eeb76e000000" ,
88
- "eTag" : " \" 0x8D4BCC2E4835CD0\" " ,
89
- "contentType" : " text/plain" ,
90
- "contentLength" : 524288 ,
91
- "blobType" : " BlockBlob" ,
92
- "url" : " https://my-storage-account.blob.core.windows.net/testcontainer/new-file.txt" ,
93
- "sequencer" : " 00000000000004420000000000028963" ,
94
- "storageDiagnostics" : {
95
- "batchId" : " b68529f3-68cd-4744-baa4-3c0498ec19f0"
96
- }
97
- },
98
- "dataVersion" : " " ,
99
- "metadataVersion" : " 1"
100
- }]
101
- ```
102
-
103
242
### Microsoft.Storage.BlobCreated event (Data Lake Storage Gen2)
104
243
105
244
If the blob storage account has a hierarchical namespace, the data looks similar to the previous example with an exception of these changes:
@@ -186,30 +325,6 @@ If the blob storage account uses SFTP to create or overwrite a blob, then the da
186
325
}]
187
326
```
188
327
189
- ### Microsoft.Storage.BlobDeleted event
190
-
191
- ``` json
192
- [{
193
- "topic" : " /subscriptions/{subscription-id}/resourceGroups/Storage/providers/Microsoft.Storage/storageAccounts/my-storage-account" ,
194
- "subject" : " /blobServices/default/containers/testcontainer/blobs/file-to-delete.txt" ,
195
- "eventType" : " Microsoft.Storage.BlobDeleted" ,
196
- "eventTime" : " 2017-11-07T20:09:22.5674003Z" ,
197
- "id" : " 4c2359fe-001e-00ba-0e04-58586806d298" ,
198
- "data" : {
199
- "api" : " DeleteBlob" ,
200
- "requestId" : " 4c2359fe-001e-00ba-0e04-585868000000" ,
201
- "contentType" : " text/plain" ,
202
- "blobType" : " BlockBlob" ,
203
- "url" : " https://my-storage-account.blob.core.windows.net/testcontainer/file-to-delete.txt" ,
204
- "sequencer" : " 0000000000000281000000000002F5CA" ,
205
- "storageDiagnostics" : {
206
- "batchId" : " b68529f3-68cd-4744-baa4-3c0498ec19f0"
207
- }
208
- },
209
- "dataVersion" : " " ,
210
- "metadataVersion" : " 1"
211
- }]
212
- ```
213
328
214
329
### Microsoft.Storage.BlobDeleted event (Data Lake Storage Gen2)
215
330
@@ -286,61 +401,6 @@ If the blob storage account uses SFTP to delete a blob, then the data looks simi
286
401
}]
287
402
```
288
403
289
- ### Microsoft.Storage.BlobTierChanged event
290
-
291
- ``` json
292
- {
293
- "topic" : " /subscriptions/{subscription-id}/resourceGroups/Storage/providers/Microsoft.Storage/storageAccounts/my-storage-account" ,
294
- "subject" : " /blobServices/default/containers/testcontainer/blobs/Auto.jpg" ,
295
- "eventType" : " Microsoft.Storage.BlobTierChanged" ,
296
- "id" : " 0fdefc06-b01e-0034-39f6-4016610696f6" ,
297
- "data" : {
298
- "api" : " SetBlobTier" ,
299
- "clientRequestId" : " 68be434c-1a0d-432f-9cd7-1db90bff83d7" ,
300
- "requestId" : " 0fdefc06-b01e-0034-39f6-401661000000" ,
301
- "contentType" : " image/jpeg" ,
302
- "contentLength" : 105891 ,
303
- "blobType" : " BlockBlob" ,
304
- "url" : " https://my-storage-account.blob.core.windows.net/testcontainer/Auto.jpg" ,
305
- "sequencer" : " 000000000000000000000000000089A4000000000018d6ea" ,
306
- "storageDiagnostics" : {
307
- "batchId" : " 3418f7a9-7006-0014-00f6-406dc6000000"
308
- }
309
- },
310
- "dataVersion" : " " ,
311
- "metadataVersion" : " 1" ,
312
- "eventTime" : " 2021-05-04T15:00:00.8350154Z"
313
- }
314
- ```
315
-
316
- ### Microsoft.Storage.AsyncOperationInitiated event
317
-
318
- ``` json
319
- {
320
- "topic" : " /subscriptions/{subscription-id}/resourceGroups/Storage/providers/Microsoft.Storage/storageAccounts/my-storage-account" ,
321
- "subject" : " /blobServices/default/containers/testcontainer/blobs/00000.avro" ,
322
- "eventType" : " Microsoft.Storage.AsyncOperationInitiated" ,
323
- "id" : " 8ea4e3f2-101e-003d-5ff4-4053b2061016" ,
324
- "data" : {
325
- "api" : " SetBlobTier" ,
326
- "clientRequestId" : " 777fb4cd-f890-4c5b-b024-fb47300bae62" ,
327
- "requestId" : " 8ea4e3f2-101e-003d-5ff4-4053b2000000" ,
328
- "contentType" : " application/octet-stream" ,
329
- "contentLength" : 3660 ,
330
- "blobType" : " BlockBlob" ,
331
- "url" : " https://my-storage-account.blob.core.windows.net/testcontainer/00000.avro" ,
332
- "sequencer" : " 000000000000000000000000000089A4000000000018c6d7" ,
333
- "storageDiagnostics" : {
334
- "batchId" : " 34128c8a-7006-0014-00f4-406dc6000000"
335
- }
336
- },
337
- "dataVersion" : " " ,
338
- "metadataVersion" : " 1" ,
339
- "eventTime" : " 2021-05-04T14:44:59.3204652Z"
340
- }
341
- ```
342
-
343
-
344
404
### Microsoft.Storage.BlobRenamed event
345
405
346
406
``` json
@@ -630,33 +690,6 @@ If the blob storage account uses SFTP to delete a directory, then the data looks
630
690
631
691
# [ Cloud event schema] ( #tab/cloud-event-schema )
632
692
633
- ### Microsoft.Storage.BlobCreated event
634
-
635
- ``` json
636
- [{
637
- "source" : " /subscriptions/{subscription-id}/resourceGroups/Storage/providers/Microsoft.Storage/storageAccounts/my-storage-account" ,
638
- "subject" : " /blobServices/default/containers/test-container/blobs/new-file.txt" ,
639
- "type" : " Microsoft.Storage.BlobCreated" ,
640
- "time" : " 2017-06-26T18:41:00.9584103Z" ,
641
- "id" : " 831e1650-001e-001b-66ab-eeb76e069631" ,
642
- "data" : {
643
- "api" : " PutBlockList" ,
644
- "clientRequestId" : " 6d79dbfb-0e37-4fc4-981f-442c9ca65760" ,
645
- "requestId" : " 831e1650-001e-001b-66ab-eeb76e000000" ,
646
- "eTag" : " \" 0x8D4BCC2E4835CD0\" " ,
647
- "contentType" : " text/plain" ,
648
- "contentLength" : 524288 ,
649
- "blobType" : " BlockBlob" ,
650
- "url" : " https://my-storage-account.blob.core.windows.net/testcontainer/new-file.txt" ,
651
- "sequencer" : " 00000000000004420000000000028963" ,
652
- "storageDiagnostics" : {
653
- "batchId" : " b68529f3-68cd-4744-baa4-3c0498ec19f0"
654
- }
655
- },
656
- "specversion" : " 1.0"
657
- }]
658
- ```
659
-
660
693
### Microsoft.Storage.BlobCreated event (Data Lake Storage Gen2)
661
694
662
695
If the blob storage account has a hierarchical namespace, the data looks similar to the previous example with an exception of these changes:
@@ -693,29 +726,6 @@ If the blob storage account has a hierarchical namespace, the data looks similar
693
726
}]
694
727
```
695
728
696
- ### Microsoft.Storage.BlobDeleted event
697
-
698
- ``` json
699
- [{
700
- "source" : " /subscriptions/{subscription-id}/resourceGroups/Storage/providers/Microsoft.Storage/storageAccounts/my-storage-account" ,
701
- "subject" : " /blobServices/default/containers/testcontainer/blobs/file-to-delete.txt" ,
702
- "type" : " Microsoft.Storage.BlobDeleted" ,
703
- "time" : " 2017-11-07T20:09:22.5674003Z" ,
704
- "id" : " 4c2359fe-001e-00ba-0e04-58586806d298" ,
705
- "data" : {
706
- "api" : " DeleteBlob" ,
707
- "requestId" : " 4c2359fe-001e-00ba-0e04-585868000000" ,
708
- "contentType" : " text/plain" ,
709
- "blobType" : " BlockBlob" ,
710
- "url" : " https://my-storage-account.blob.core.windows.net/testcontainer/file-to-delete.txt" ,
711
- "sequencer" : " 0000000000000281000000000002F5CA" ,
712
- "storageDiagnostics" : {
713
- "batchId" : " b68529f3-68cd-4744-baa4-3c0498ec19f0"
714
- }
715
- },
716
- "specversion" : " 1.0"
717
- }]
718
- ```
719
729
720
730
### Microsoft.Storage.BlobDeleted event (Data Lake Storage Gen2)
721
731
0 commit comments