Skip to content

Commit 597ea4f

Browse files
Merge pull request #292783 from dapdetay/dapdetay-blob-inventory-update-event-subsscription
Update Subscribe-to-blob-inventory-policy-completed-event-in-blob-inventory-how-to.md
2 parents 4769f05 + ca219b0 commit 597ea4f

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

articles/storage/blobs/blob-inventory-how-to.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,46 @@ While you can disable individual reports, you can also prevent blob inventory fr
206206
207207
Clearing the **Enable blob inventory** checkbox suspends all blob inventory runs. You can select this checkbox later if you want to resume inventory runs.
208208

209+
## Subscribe to blob inventory policy completed event
210+
211+
You can suscribe to blob inventory completed event to receive information on the outcome of your inventory runs. This event gets triggered when the inventory run completes for a rule that is defined an inventory policy. This event also occurs if the inventory run fails with a user error before it starts to run. For example, an invalid policy, or an error that occurs when a destination container isn't present will trigger the event.
212+
213+
1. Sign in to the [Azure portal](https://portal.azure.com/).
214+
215+
2. Locate your storage account and display the account overview.
216+
217+
3. In the left menu, select **Events**.
218+
219+
4. Select **+ Event Subscription**.
220+
221+
The **Create Event Subscription** page appears.
222+
223+
5. In the **Create Event Subscription** page, name your event subscription and use default schema, Event Grid Schema.
224+
225+
6. Under **EVENT TYPES**, choose Blob Inventory Completed.
226+
227+
7. Under **ENDPOINT DETAILS**, choose Storage Queue as the Endpoint Type and select **Configure an endpoint**.
228+
229+
8. In the **Queues** page, choose the subscription, the storage account and create a new queue. Name your queue then click **Create**.
230+
231+
9. Optionally, select the **Filters** tab if you want to filter the subject of the event or its attributes.
232+
233+
10. Optionally, select the **Additional Features** tab if you want to enable dead-lettering, retry policies and set event subscription expiration time.
234+
235+
11. Optionally, select **Delivery Properties** tab to set the storage queue message time to live.
236+
237+
12. Select **Create**
238+
239+
**To view the delivered queue messages**
240+
241+
1. Locate your storage account and display the account overview.
242+
243+
2. Under **Data Storage**, select **Queues** and open the newly create queue used to configure the endpoint to access the messages.
244+
245+
3. Select the message for the desired inventory run time to access the message properties the review the message body for the event status.
246+
247+
For more methods on how to subscribe to blob storage events, see [Azure Blob Storage as Event Grid source - Azure Event Grid | Microsoft Learn](../../event-grid/event-schema-blob-storage.md)
248+
209249
## Optionally enable access time tracking
210250

211251
You can choose to enable blob access time tracking. When access time tracking is enabled, inventory reports will include the **LastAccessTime** field based on the time that the blob was last accessed with a read or write operation. To minimize the effect on read access latency, only the first read of the last 24 hours updates the last access time. Subsequent reads in the same 24-hour period don't update the last access time. If a blob is modified between reads, the last access time is the more recent of the two values.

0 commit comments

Comments
 (0)