Event Grid ソースとしての Azure Storage Actions

この記事では、Azure Storage Actions イベントのプロパティとスキーマについて説明します。 イベント スキーマの概要については、「Azure Event Grid イベント スキーマ」を参照してください。 Azure Storage Actions の詳細については、「Azure Storage Actions とは」を参照してください。

重要

Azure Storage Actions は現在プレビュー段階であり、こちらのリージョンで使用できます。 ベータ版、プレビュー版、または一般提供としてまだリリースされていない Azure の機能に適用される法律条項については、「Microsoft Azure プレビューの追加使用条件」を参照してください。

使用可能なイベントの種類

Storage Actions イベント

以下のイベントは、ストレージ タスクがキューに登録されたとき、およびストレージ タスクの実行が完了したときにトリガーされます。

イベント名 説明
Microsoft.StorageActions.StorageTaskQueued ストレージ タスクの割り当て実行がキューに登録されるとトリガーされます。 このイベントにより、追跡の目的で、割り当て実行の状態 (割り当てがキューに登録されたときなど) と、対応する実行 ID が提供されます。
Microsoft.StorageActions.StorageTaskCompleted ストレージ タスクの割り当て実行が完了するとトリガーされます。 このイベントにより、割り当て実行の状態 (割り当てが完了したときなど)、割り当ての状態、割り当てに関連付けられているタスク、概要レポート ファイルへのリンクが提供されます。

イベントの例

Microsoft.StorageActions.StorageTaskQueued イベント

[{
  "source": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/BlobInventory/providers/Microsoft.StorageActions/storageAccounts/my-storage-account",
  "subject": "DataManagement/StorageTasks",
  "type": "Microsoft.StorageActions.StorageTaskQueued",
  "time": "2023-08-07T21:35:23Z",
  "id": "8eb4656c-5c4a-4541-91e0-685558acbb1d",
  "data": {
    "queuedDateTime":"2023-08-07T21:35:23Z",
    "taskExecutionId":"testdelete-2023-08-07T21:35:16.9494934Z_2023-08-07T21:35:17.5432186Z"
  },
  "specversion": "1.0"
}]

Microsoft.StorageActions.StorageTaskCompleted イベント

[{
  "source": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/BlobInventory/providers/Microsoft.StorageActions/storageAccounts/my-storage-account",
  "subject": "DataManagement/StorageTasks",
  "type": "Microsoft.StorageActions.StorageTaskCompleted",
  "time": "2023-08-07T21:35:34Z",
  "id": "dee33d3b-0b39-42f2-b2be-76f2fb94b852",
  "data": {
    "status":"Succeeded",
    "completedDateTime":"2023-08-07T21:35:34Z",
    "taskExecutionId":"testdelete-2023-08-07T21:35:16.9494934Z_2023-08-07T21:35:17.5432186Z",
    "taskName":"deleteallcentraleu",
    "summaryReportBlobUrl":"https://my-storage-account.blob.core.windows.net/result-container/deleteallcentraleu_testdelete_2023-08-07T21:35:23/SummaryReport.json"
  },
  "specversion": "1.0"
}]

イベントのプロパティ

イベントのトップレベルのデータを次に示します。

プロパティ タイプ 説明
source string イベント ソースの完全なリソース パス。 このフィールドは書き込み可能ではありません。 この値は Event Grid によって指定されます。
subject string 発行元が定義したイベントの対象のパス。
type string このイベント ソース用に登録されたイベントの種類のいずれか。
id string イベントの一意識別子。
data object ストレージ タスク イベント データ。
specversion string CloudEvents スキーマ仕様バージョン。

データ オブジェクトには、次のプロパティがあります。

プロパティ タイプ 説明
queuedDateTime string ストレージ タスク割り当てがキューに登録された時刻。
status string ストレージ タスク割り当ての完了状態 (Succeeded または Failed)
completedDateTime string ストレージ タスク割り当てが完了した時刻。
taskExecutionId string ストレージ タスク割り当てに関連付けられている一意の ID。
taskName string ストレージ タスク割り当てに関連付けられているストレージ タスク。
summaryReportBlobUrl string ストレージ タスク割り当ての概要レポート ファイルへのリンク。

次のステップ