開始使用免費開始

設定 Event Grid 回應 Blob 建立事件

Cipher Coffee 想在 Blob Storage 新增檔案時,自動執行後續動作。你將設定 Azure Event Grid,於每次建立 Blob 時發出通知,並將通知路由到 Storage Queue 進行處理。 你會建立目的地佇列、將 Storage 帳戶訂閱「Blob Created」事件、上傳測試 Blob,並驗證佇列中是否出現事件訊息。

本練習屬於課程

開發 Azure Storage

檢視課程

練習說明

在你的「Storage account」中,前往「Data storage」,選取「Queues」,並建立名為「blob-events」的佇列。,前往「Events」,建立新的「Event Subscription」,名稱設為「blob-created-to-queue」,「System Topic Name」設為「storage-events-topic」,將「Blob Created」事件以「Storage Queues」做為端點類型路由至「blob-events」佇列。,在「Containers」中建立「images」容器,並上傳任一測試檔案以觸發事件。,回到「blob-events」佇列,使用「Peek messages」確認事件通知已送達。 Screenshot showing Event Grid subscription on a Storage account with Blob Created selected and endpoint set to a Storage Queue named blob-events, plus a queued event message.

動手互動練習

將理論付諸實踐,立即體驗我們的互動練習

開始練習