az eventgrid event-subscription

Note

このコマンド グループには、Azure CLI と少なくとも 1 つの拡張機能の両方で定義されているコマンドがあります。 各拡張機能をインストールして、拡張機能を活用します。 拡張機能の詳細をご覧ください。

イベント サブスクリプションを管理します。

Event Grid トピック、doメイン、doメイン トピック、Azure サブスクリプション、リソース グループ、またはイベント通知をサポートするその他の Azure リソースのイベント サブスクリプションを管理します。

コマンド

名前 説明 Status
az eventgrid event-subscription create

新しいイベント サブスクリプションを作成します。

コア GA
az eventgrid event-subscription create (eventgrid 拡張機能)

新しいイベント サブスクリプションを作成します。

拡張子 プレビュー
az eventgrid event-subscription delete

イベント サブスクリプションを削除する。

コア GA
az eventgrid event-subscription delete (eventgrid 拡張機能)

イベント サブスクリプションを削除する。

拡張子 プレビュー
az eventgrid event-subscription list

イベント サブスクリプションを一覧表示します。

コア GA
az eventgrid event-subscription list (eventgrid 拡張機能)

イベント サブスクリプションを一覧表示します。

拡張子 プレビュー
az eventgrid event-subscription show

イベント サブスクリプションの詳細を取得します。

コア GA
az eventgrid event-subscription show (eventgrid 拡張機能)

イベント サブスクリプションの詳細を取得します。

拡張子 プレビュー
az eventgrid event-subscription update

イベント サブスクリプションを更新します。

コア GA
az eventgrid event-subscription update (eventgrid 拡張機能)

イベント サブスクリプションを更新します。

拡張子 プレビュー

az eventgrid event-subscription create

新しいイベント サブスクリプションを作成します。

az eventgrid event-subscription create --name
                                       [--aad-tenant-id]
                                       [--advanced-filter]
                                       [--azure-active-directory-application-id-or-uri]
                                       [--deadletter-endpoint]
                                       [--deadletter-identity {systemassigned}]
                                       [--deadletter-identity-endpoint]
                                       [--delivery-attribute-mapping]
                                       [--delivery-identity {systemassigned}]
                                       [--delivery-identity-endpoint]
                                       [--delivery-identity-endpoint-type {azurefunction, eventhub, hybridconnection, servicebusqueue, servicebustopic, storagequeue, webhook}]
                                       [--enable-advanced-filtering-on-arrays {false, true}]
                                       [--endpoint]
                                       [--endpoint-type]
                                       [--event-delivery-schema {cloudeventschemav1_0, custominputschema, eventgridschema}]
                                       [--event-ttl]
                                       [--expiration-date]
                                       [--included-event-types]
                                       [--labels]
                                       [--max-delivery-attempts]
                                       [--max-events-per-batch]
                                       [--preferred-batch-size-in-kilobytes]
                                       [--qttl]
                                       [--source-resource-id]
                                       [--subject-begins-with]
                                       [--subject-case-sensitive {false, true}]
                                       [--subject-ends-with]

既定のフィルターを使用して、Event Grid トピックの新しいイベント サブスクリプションを作成します。

az eventgrid event-subscription create --name es1 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/topics/topic1 \
    --endpoint https://contoso.azurewebsites.net/api/f1?code=code

既定のフィルターを使用して、Azure サブスクリプションの新しいイベント サブスクリプションを作成します。

az eventgrid event-subscription create --name es2 \
    --source-resource-id /subscriptions/{SubID} \
    --endpoint https://contoso.azurewebsites.net/api/f1?code=code

既定のフィルターを使用して、リソース グループの新しいイベント サブスクリプションを作成します。

az eventgrid event-subscription create --name es3 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG} \
    --endpoint https://contoso.azurewebsites.net/api/f1?code=code

既定のフィルターを使用して、ストレージ アカウントの新しいイベント サブスクリプションを作成します。

az eventgrid event-subscription create --name es3 \
    --source-resource-id "/subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.Storage/storageaccounts/s1"  \
    --endpoint https://contoso.azurewebsites.net/api/f1?code=code

高度なフィルターを使用して、ストレージ アカウントの新しいイベント サブスクリプションを作成します。

az eventgrid event-subscription create  --name es3 \
    --source-resource-id "/subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.Storage/storageaccounts/s1" \
    --endpoint https://contoso.azurewebsites.net/api/f1?code=code
    --advanced-filter data.blobType StringIn BlockBlob
    --advanced-filter data.url StringBeginsWith https://myaccount.blob.core.windows.net

サブジェクト プレフィックスを指定するフィルターを使用して、Azure サブスクリプションの新しいイベント サブスクリプションを作成します。

az eventgrid event-subscription create --name es4 \
    --source-resource-id /subscriptions/{SubID} \
    --endpoint https://contoso.azurewebsites.net/api/f1?code=code \
    --subject-begins-with mysubject_prefix

件名サフィックスを指定するフィルターを使用して、リソース グループの新しいイベント サブスクリプションを作成します。

az eventgrid event-subscription create --name es5 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG} \
    --endpoint https://contoso.azurewebsites.net/api/f1?code=code \
    --subject-ends-with mysubject_suffix

既定のフィルターと EventHub を宛先として使用して、Azure サブスクリプションの新しいイベント サブスクリプションを作成します。

az eventgrid event-subscription create --name es2 \
    --source-resource-id /subscriptions/{SubID} \
    --endpoint-type eventhub \
    --endpoint /subscriptions/{SubID}/resourceGroups/TestRG/providers/Microsoft.EventHub/namespaces/n1/eventhubs/EH1

既定のフィルターと Azure Storage キューを宛先として使用して、Azure サブスクリプションの新しいイベント サブスクリプションを作成します。

az eventgrid event-subscription create --name es2 \
    --source-resource-id /subscriptions/{SubID} \
    --endpoint-type storagequeue \
    --endpoint /subscriptions/{SubID}/resourceGroups/TestRG/providers/Microsoft.Storage/storageAccounts/sa1/queueservices/default/queues/q1

既定のフィルターと Azure ServiceBusQueue を宛先として使用して、Azure サブスクリプションの新しいイベント サブスクリプションを作成します。

az eventgrid event-subscription create --name es2 \
    --source-resource-id /subscriptions/{SubID} \
    --endpoint-type servicebusqueue \
    --endpoint /subscriptions/{SubID}/resourceGroups/TestRG/providers/Microsoft.ServiceBus/namespaces/ns1/queues/queue1

既定のフィルターと CloudEvent V 1.0 を配信スキーマとして使用して、Event Grid doメイン の新しいイベント サブスクリプションを作成します。

az eventgrid event-subscription create --name es2 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/domains/d1 \
    --endpoint https://contoso.azurewebsites.net/api/f1?code=code \
    --event-delivery-schema cloudeventschemav1_0

配信不能な宛先とカスタム再試行ポリシーが最大 10 回、イベント TTL が 2 時間 (どちらか早い方) で、ストレージ アカウントの新しいイベント サブスクリプションを作成します。

az eventgrid event-subscription create --name es2 \
    --source-resource-id "/subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.Storage/storageaccounts/s1" \
    --endpoint https://contoso.azurewebsites.net/api/f1?code=code \
    --deadletter-endpoint /subscriptions/{SubID}/resourceGroups/TestRG/providers/Microsoft.Storage/storageAccounts/s2/blobServices/default/containers/blobcontainer1 \
    --max-delivery-attempts 10 --event-ttl 120

doメイン トピックの新しいイベント サブスクリプションを作成します。

az eventgrid event-subscription create --name es2 \
    --source-resource-id "/subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/domains/domain1/topics/t1" \
    --endpoint https://contoso.azurewebsites.net/api/f1?code=code

有効期限が設定された新しいイベント サブスクリプション (ストレージ アカウント用) を作成します。

az eventgrid event-subscription create --name es2 \
    --source-resource-id "/subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.Storage/storageaccounts/sa1" \
    --endpoint https://contoso.azurewebsites.net/api/f1?code=code
    --expiration-date "2018-10-31"

Azure Active Directory 対応 Webhook を宛先として使用して、Event Grid トピックの新しいイベント サブスクリプションを作成します。

az eventgrid event-subscription create --name es1 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/topics/topic1 \
    --endpoint https://contoso.azurewebsites.net/api/f1?code=code
    --azure-active-directory-tenant-id azureactivedirectorytenantid
    --azure-active-directory-application-id-or-uri azureactivedirectoryapplicationidoruri

Azure 関数を宛先として使用して、Event Grid トピックの新しいイベント サブスクリプションを作成します。

az eventgrid event-subscription create --name es1 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/topics/topic1 \
    --endpoint /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.Web/sites/{functionappname}/functions/{functionname} --endpoint-type azurefunction

Eventhub と systemassigned MSI ID を宛先として使用し、配信不能と MSI ID を使用して、Event Grid トピックの新しいイベント サブスクリプションを作成する

az eventgrid event-subscription create --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/topics/topic1 \
    --delivery-identity-endpoint-type eventhub --delivery-identity systemassigned --delivery-identity-endpoint /subscriptions/{SubId2|}/resourceGroups/{RG2}/providers/Microsoft.eventhub/namespaces/{EventHubNamespace}/eventhubs/{EventhubName} \
    --deadletter-identity-endpoint /subscriptions/{SubID}/resourceGroups/TestRG/providers/Microsoft.Storage/storageAccounts/s2/blobServices/default/containers/blobcontainer1 --deadletter-identity systemassigned -n {EventSubscriptionName}

メッセージ ttl が 5 分の宛先としてストレージ キューを使用して、Event Grid トピックの新しいイベント サブスクリプションを作成する

az eventgrid event-subscription create -n es1 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/topics/topic1
    --endpoint-type storagequeue \
    --endpoint /subscriptions/{SubID}/resourceGroups/TestRG/providers/Microsoft.Storage/storageAccounts/sa1/queueservices/default/queues/q1 \
    --storage-queue-msg-ttl 300

Systemassigned MSI ID を宛先として StorageQueue を使用して Event Grid トピックの新しいイベント サブスクリプションを作成する

az eventgrid event-subscription create -n {EventSubscriptionName} --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/topics/topic1 \
    --delivery-identity-endpoint-type StorageQueue --delivery-identity systemassigned --delivery-identity-endpoint /subscriptions/{SubID}/resourceGroups/TestRG/providers/Microsoft.Storage/storageAccounts/sa1/queueservices/default/queues/q1 \
    --storage-queue-msg-ttl 300

配列で高度なフィルター処理が有効になっている Event Grid トピックの新しいイベント サブスクリプションを作成する

az eventgrid event-subscription create -n es1 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/topics/topic1
    --endpoint-type storagequeue \
    --endpoint /subscriptions/{SubID}/resourceGroups/TestRG/providers/Microsoft.Storage/storageAccounts/sa1/queueservices/default/queues/q1 \
    --enable-advanced-filtering-on-arrays true

必須のパラメーター

--name -n

イベント サブスクリプションの名前。

省略可能のパラメーター

--aad-tenant-id --azure-active-directory-tenant-id

配信要求にベアラー トークンとして含まれるアクセス トークンを取得する Azure Active Directory テナント ID。 宛先として Webhook にのみ適用されます。

--advanced-filter

高度なフィルターを使用すると、特定のイベント プロパティに基づいてイベントをフィルター処理できます。

使用法: --advanced-filter KEY[.INNERKEY] FILTEROPERATOR 値 [値 ...]StringIn: --advanced-filter データ。Color StringIn Blue Red Orange Yellow StringNotIn: --advanced-filter データ。Color StringNotIn Blue Red Orange Yellow StringContains: --advanced-filter subject StringContains Blue Red StringNotContains: --advanced-filter subject StringNotContains Blue Red StringBeginsWith: --advanced-filter subject StringBeginsWith Blue Red StringNotBeginsWith: --advanced-filter subject StringNotBeginsWith Blue Red StringEndsWith: --advanced-filter subject StringEndsWith img png jpg StringNotEndsWith: --advanced-filter subject StringNotEndsWith img png jpg NumberIn: --advanced-filterdata.property1 NumberIn 5 10 20 NumberInRange --advanced-filter data.property1 NumberInRange 5,10 20,30 40,50 NumberNotIn: --advanced-filter data.property2 NumberNotIn 100 200 300 NumberNotInRange: --advanced-filter data.property2 NumberNotNotInInInRange 100,110 200,210 300,310 NumberLessThan: --advanced-filter data.property3 NumberLessThan 100 NumberLessThanOrEquals: --advanced-filter data.property2 NumberLessThanOrEquals 100 NumberGreaterThan: --advanced-filter data.property3NumberGreaterThan 100 NumberGreaterThanOrEquals: --advanced-filter data.property2 NumberGreaterThanOrEquals 100 BoolEquals: --advanced-filter data.property3 BoolEquals true IsNullOrUndefined: --advanced-filter data.property3 IsNullOrUndefined IsNotNull: --advanced-filter data.property3 IsNotNull 複数の高度なフィルターは、複数の --advanced-filter 引数を使用して指定できます。

--azure-active-directory-application-id-or-uri

配信要求にベアラー トークンとして含まれるアクセス トークンを取得する Azure Active Directory アプリケーション ID または URI。 宛先として Webhook にのみ適用されます。

--deadletter-endpoint

EventGrid がこのイベント サブスクリプションの配信不能イベントを配信不能にする必要がある Azure Storage BLOB コンテナーの宛先の Azure リソース ID。

例: --deadletter-endpoint /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/sa1/blobServices/default/containers/containerName。

--deadletter-identity
プレビュー

配信不能なターゲット リソースの ID の種類。

承認された値: systemassigned
--deadletter-identity-endpoint

EventGrid がこのイベント サブスクリプションの配信不能イベントを配信不能にする必要がある ID を持つ Azure Storage BLOB コンテナーの宛先の Azure リソース ID。

--delivery-attribute-mapping

配信属性マッピングを追加して、イベントを配信するときに HTTP ヘッダー経由で追加情報を送信します。 この属性は、StorageQueue を除くすべての宛先の種類に対して有効です。 複数の引数を使用して、複数の属性を --delivery-attribute-mapping 指定できます。

使用法: --delivery-attribute-mapping attribute-name attribute-type attribute-value [attribute-is-secret] 静的属性マッピング: --delivery-attribute-mapping somename static somevalue static somevalue false Static Attribute Mapping: --delivery-attribute-mapping somename static somevalue true Dynamic Attribute Mapping: --delivery-attribute-mapping somename dynamic somevalue Static と Dynamic: --delivery-attribute-mapping somename dynamic somevalue --delivery-attribute-mapping somename2 static somevalue.

--delivery-identity
プレビュー

配信先リソースの ID の種類 (ストレージ キュー、eventhub など)。

承認された値: systemassigned
--delivery-identity-endpoint
プレビュー

EventGrid がこのイベント サブスクリプションに一致するイベントを配信する ID を持つエンドポイント。 webhook エンドポイントの種類の場合、これは対応する webhook URL である必要があります。 その他の種類のエンドポイントの場合、これはエンドポイントの Azure リソース識別子である必要があります。

--delivery-identity-endpoint-type
プレビュー

リソース ID を持つ宛先エンドポイントの種類。

承認された値: azurefunction, eventhub, hybridconnection, servicebusqueue, servicebustopic, storagequeue, webhook
--enable-advanced-filtering-on-arrays --enable-af-arr

特異な値を期待するのではなく、値の配列に対して高度なフィルターを評価できるようにします。

承認された値: false, true
--endpoint

EventGrid がこのイベント サブスクリプションに一致するイベントを配信するエンドポイント。 webhook エンドポイントの種類の場合、これは対応する webhook URL である必要があります。 その他の種類のエンドポイントの場合、これはエンドポイントの Azure リソース識別子である必要があります。 Event Grid コマンドを実行する前に、宛先エンドポイントが既に作成され、使用できる必要があります。

--endpoint-type

宛先エンドポイントの種類。

既定値: webhook
--event-delivery-schema

このイベント サブスクリプションに対してイベントを配信するスキーマ。 既定では、イベントは(対応するトピックの入力スキーマに基づいて) 発行されるのと同じスキーマで配信されます。

承認された値: cloudeventschemav1_0, custominputschema, eventgridschema
--event-ttl

イベントの有効期間 (分単位)。 1 ~ 1440 の数値を指定する必要があります。

既定値: 1440
--expiration-date

イベント サブスクリプションの有効期限が切れる日付または日時 (UTC、例: '2018-11-30T11:59:59+00:00' または '2018-11-30')。 既定では、イベント サブスクリプションの有効期限はありません。

--included-event-types

イベントの種類 (Microsoft.Storage.BlobCreated や Microsoft.Storage.BlobDeleted など) のスペース区切りのリスト。 すべての既定のイベントの種類をサブスクライブするには、この引数に値を指定しないでください。 イベント グリッド トピックの場合、イベントの種類は顧客定義です。 Azure イベント (ストレージ アカウント、IoT Hub など) の場合は、この CLI コマンド 'az eventgrid topic-type list-event-types' を使用して、イベントの種類に対してクエリを実行できます。

--labels

このイベント サブスクリプションに関連付けるラベルのスペース区切りの一覧。

--max-delivery-attempts

配信試行の最大数。 1 ~ 30 の数値を指定する必要があります。

既定値: 30
--max-events-per-batch

バッチ内のイベントの最大数。 1 から 5000 までの数値を指定する必要があります。

--preferred-batch-size-in-kilobytes

推奨されるバッチ サイズ (KB 単位)。 1 から 1024 までの数値を指定する必要があります。

--qttl --storage-queue-msg-ttl

ストレージ キュー メッセージの有効期間 (秒単位)。

--source-resource-id

イベント サブスクリプションを作成する必要がある Azure リソースの完全修飾識別子。

Usage: --source-resource-id Azure-Resource-ID For Azure subscription: --source-resource-id /subscriptions/{SubID} For resource group: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1 For EventGrid topic: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.EventGrid/topics/t1 ストレージ アカウントの場合: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.Storage/storageaccounts/sa1 For EventGrid doメイン: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.EventGrid/doメインs/d1 EventGrid doメイン トピック: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.EventGrid/doメインs/d1/topics/t1。

--subject-begins-with

プレフィックスに基づいてイベント サブスクリプションのイベントをフィルター処理する省略可能な文字列。 ワイルドカード文字はサポートされていません。

--subject-case-sensitive

件名フィールドを大文字と小文字を区別して比較するかどうかを指定します。 True の場合フラグが存在します。

承認された値: false, true
既定値: False
--subject-ends-with

サフィックスに基づいてイベント サブスクリプションのイベントをフィルター処理する省略可能な文字列。 ワイルドカード文字はサポートされていません。

グローバル パラメーター
--debug

すべてのデバッグ ログを表示するようにログの詳細レベルを上げます。

--help -h

このヘルプ メッセージを表示して終了します。

--only-show-errors

エラーのみを表示し、警告は抑制します。

--output -o

出力形式。

承認された値: json, jsonc, none, table, tsv, yaml, yamlc
既定値: json
--query

JMESPath クエリ文字列。 詳細と例については、http://jmespath.org/ をご覧ください。

--subscription

サブスクリプションの名前または ID。 az account set -s NAME_OR_ID を使用して、既定のサブスクリプションを構成できます。

--verbose

ログの詳細レベルを上げます。 詳細なデバッグ ログを表示するには --debug を使います。

az eventgrid event-subscription create (eventgrid 拡張機能)

プレビュー

コマンド グループ 'az eventgrid' はプレビュー段階であり、開発中です。 参照レベルとサポート レベル: https://aka.ms/CLI_refstatus

新しいイベント サブスクリプションを作成します。

az eventgrid event-subscription create --name
                                       [--advanced-filter]
                                       [--azure-active-directory-application-id-or-uri]
                                       [--azure-active-directory-tenant-id]
                                       [--deadletter-endpoint]
                                       [--deadletter-identity {systemassigned}]
                                       [--deadletter-identity-endpoint]
                                       [--delivery-identity {systemassigned}]
                                       [--delivery-identity-endpoint]
                                       [--delivery-identity-endpoint-type {azurefunction, eventhub, hybridconnection, servicebusqueue, servicebustopic, storagequeue, webhook}]
                                       [--endpoint]
                                       [--endpoint-type {azurefunction, eventhub, hybridconnection, servicebusqueue, servicebustopic, storagequeue, webhook}]
                                       [--event-delivery-schema {cloudeventschemav1_0, custominputschema, eventgridschema}]
                                       [--event-ttl]
                                       [--expiration-date]
                                       [--included-event-types]
                                       [--labels]
                                       [--max-delivery-attempts]
                                       [--max-events-per-batch]
                                       [--preferred-batch-size-in-kilobytes]
                                       [--source-resource-id]
                                       [--subject-begins-with]
                                       [--subject-case-sensitive {false, true}]
                                       [--subject-ends-with]

既定のフィルターを使用して、Event Grid トピックの新しいイベント サブスクリプションを作成します。

az eventgrid event-subscription create --name es1 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/topics/topic1 \
    --endpoint https://contoso.azurewebsites.net/api/f1?code=code

既定のフィルターを使用して、Azure サブスクリプション サブスクリプションの新しいイベント サブスクリプションを作成します。

az eventgrid event-subscription create --name es2 \
    --source-resource-id /subscriptions/{SubID} \
    --endpoint https://contoso.azurewebsites.net/api/f1?code=code

既定のフィルターを使用して、リソース グループの新しいイベント サブスクリプションを作成します。

az eventgrid event-subscription create --name es3 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG} \
    --endpoint https://contoso.azurewebsites.net/api/f1?code=code

既定のフィルターを使用して、ストレージ アカウントの新しいイベント サブスクリプションを作成します。

az eventgrid event-subscription create --name es3 \
    --source-resource-id "/subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.Storage/storageaccounts/s1"  \
    --endpoint https://contoso.azurewebsites.net/api/f1?code=code

高度なフィルターを使用して、ストレージ アカウントの新しいイベント サブスクリプションを作成します。

az eventgrid event-subscription create  --name es3 \
    --source-resource-id "/subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.Storage/storageaccounts/s1" \
    --endpoint https://contoso.azurewebsites.net/api/f1?code=code
    --advanced-filter data.blobType StringIn BlockBlob
    --advanced-filter data.url StringBeginsWith https://myaccount.blob.core.windows.net

サブジェクト プレフィックスを指定するフィルターを使用して、Azure サブスクリプションの新しいイベント サブスクリプションを作成します。

az eventgrid event-subscription create --name es4 \
    --source-resource-id /subscriptions/{SubID} \
    --endpoint https://contoso.azurewebsites.net/api/f1?code=code \
    --subject-begins-with mysubject_prefix

件名サフィックスを指定するフィルターを使用して、リソース グループの新しいイベント サブスクリプションを作成します。

az eventgrid event-subscription create --name es5 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG} \
    --endpoint https://contoso.azurewebsites.net/api/f1?code=code \
    --subject-ends-with mysubject_suffix

既定のフィルターと EventHub を宛先として使用して、Azure サブスクリプションの新しいイベント サブスクリプションを作成します。

az eventgrid event-subscription create --name es2 \
    --source-resource-id /subscriptions/{SubID} \
    --endpoint-type eventhub \
    --endpoint /subscriptions/{SubID}/resourceGroups/TestRG/providers/Microsoft.EventHub/namespaces/n1/eventhubs/EH1

既定のフィルターと Azure Storage キューを宛先として使用して、Azure サブスクリプションの新しいイベント サブスクリプションを作成します。

az eventgrid event-subscription create --name es2 \
    --source-resource-id /subscriptions/{SubID} \
    --endpoint-type storagequeue \
    --endpoint /subscriptions/{SubID}/resourceGroups/TestRG/providers/Microsoft.Storage/storageAccounts/sa1/queueservices/default/queues/q1

既定のフィルターと Azure ServiceBusQueue を宛先として使用して、Azure サブスクリプションの新しいイベント サブスクリプションを作成します。

az eventgrid event-subscription create --name es2 \
    --source-resource-id /subscriptions/{SubID} \
    --endpoint-type servicebusqueue \
    --endpoint /subscriptions/{SubID}/resourceGroups/TestRG/providers/Microsoft.ServiceBus/namespaces/ns1/queues/queue1

既定のフィルターと CloudEvent V 1.0 を配信スキーマとして使用して、Event Grid doメイン の新しいイベント サブスクリプションを作成します。

az eventgrid event-subscription create --name es2 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/domains/d1 \
    --endpoint https://contoso.azurewebsites.net/api/f1?code=code \
    --event-delivery-schema cloudeventschemav1_0

配信不能な宛先とカスタム再試行ポリシーが最大 10 回、イベント TTL が 2 時間 (どちらか早い方) で、ストレージ アカウントの新しいイベント サブスクリプションを作成します。

az eventgrid event-subscription create --name es2 \
    --source-resource-id "/subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.Storage/storageaccounts/s1" \
    --endpoint https://contoso.azurewebsites.net/api/f1?code=code \
    --deadletter-endpoint /subscriptions/{SubID}/resourceGroups/TestRG/providers/Microsoft.Storage/storageAccounts/s2/blobServices/default/containers/blobcontainer1 \
    --max-delivery-attempts 10 --event-ttl 120

doメイン トピックの新しいイベント サブスクリプションを作成します。

az eventgrid event-subscription create --name es2 \
    --source-resource-id "/subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/domains/domain1/topics/t1" \
    --endpoint https://contoso.azurewebsites.net/api/f1?code=code

有効期限が設定された新しいイベント サブスクリプション (ストレージ アカウント用) を作成します。

az eventgrid event-subscription create --name es2 \
    --source-resource-id "/subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.Storage/storageaccounts/sa1" \
    --endpoint https://contoso.azurewebsites.net/api/f1?code=code
    --expiration-date "2018-10-31"

Azure Active Directory 対応 Webhook を宛先として使用して、Event Grid トピックの新しいイベント サブスクリプションを作成します。

az eventgrid event-subscription create --name es1 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/topics/topic1 \
    --endpoint https://contoso.azurewebsites.net/api/f1?code=code
    --azure-active-directory-tenant-id azureactivedirectorytenantid
    --azure-active-directory-application-id-or-uri azureactivedirectoryapplicationidoruri

Azure 関数を宛先として使用して、Event Grid トピックの新しいイベント サブスクリプションを作成します。

az eventgrid event-subscription create --name es1 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/topics/topic1 \
    --endpoint /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.Web/sites/{functionappname}/functions/{functionname} --endpoint-type azurefunction

Eventhub と systemassigned MSI ID を宛先として使用し、配信不能と MSI ID を使用して、Event Grid トピックの新しいイベント サブスクリプションを作成する

az eventgrid event-subscription create --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/topics/topic1 \
    --delivery-identity-endpoint-type eventhub --delivery-identity systemassigned --delivery-identity-endpoint /subscriptions/{SubId2|}/resourceGroups/{RG2}/providers/Microsoft.eventhub/namespaces/{EventHubNamespace}/eventhubs/{EventhubName} \
    --deadletter-identity-endpoint /subscriptions/{SubID}/resourceGroups/TestRG/providers/Microsoft.Storage/storageAccounts/s2/blobServices/default/containers/blobcontainer1 --deadletter-identity systemassigned -n {EventSubscriptionName}

必須のパラメーター

--name -n

イベント サブスクリプションの名前。

省略可能のパラメーター

--advanced-filter

高度なフィルターを使用すると、特定のイベント プロパティに基づいてイベントをフィルター処理できます。

使用法: --advanced-filter KEY[.INNERKEY] FILTEROPERATOR 値 [値 ...]StringIn: --advanced-filter データ。Color StringIn Blue Red Orange Yellow StringNotIn: --advanced-filter データ。Color StringNotIn Blue Red Orange Yellow StringContains: --advanced-filter subject StringContains Blue Red StringBeginsWith: --advanced-filter subject StringBeginsWith Blue Red StringEndsWith: --advanced-filter subject StringEndsWith img png jpg NumberIn: --advanced-filter data.property 1 NumberIn 5 10 20 NumberNotIn: --advanced-filter data.property2 NumberNotIn 100 200 300 NumberLessThan: --advanced-filter data.property3 NumberLessThan 100 NumberLessThanOrEquals: --advanced-filterdata.property2 NumberLessThanOrEquals 100 NumberGreaterThan: --advanced-filter data.property3 NumberGreaterThan 100 NumberGreaterThanOrEquals: --advanced-filter data.property2 NumberGreaterThanOrEquals 100 BoolEquals: --advanced-filter data.property3 BoolEquals true Multiple advanced filters は、複数の --advanced-filter 引数を使用して指定できます。

--azure-active-directory-application-id-or-uri

配信要求にベアラー トークンとして含まれるアクセス トークンを取得する Azure Active Directory アプリケーション ID または URI。 宛先として Webhook にのみ適用されます。

--azure-active-directory-tenant-id

配信要求にベアラー トークンとして含まれるアクセス トークンを取得する Azure Active Directory テナント ID。 宛先として Webhook にのみ適用されます。

--deadletter-endpoint

EventGrid がこのイベント サブスクリプションの配信不能イベントを配信不能にする必要がある Azure Storage BLOB コンテナーの宛先の Azure リソース ID。

例: --deadletter-endpoint /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/sa1/blobServices/default/containers/containerName。

--deadletter-identity

配信不能なターゲット リソースの ID の種類。

承認された値: systemassigned
--deadletter-identity-endpoint

EventGrid がこのイベント サブスクリプションの配信不能イベントを配信不能にする必要がある ID を持つ Azure Storage BLOB コンテナーの宛先の Azure リソース ID。

--delivery-identity

配信先リソースの ID の種類 (ストレージ キュー、eventhub など)。

承認された値: systemassigned
--delivery-identity-endpoint

EventGrid がこのイベント サブスクリプションに一致するイベントを配信する ID を持つエンドポイント。 webhook エンドポイントの種類の場合、これは対応する webhook URL である必要があります。 その他の種類のエンドポイントの場合、これはエンドポイントの Azure リソース識別子である必要があります。

--delivery-identity-endpoint-type

リソース ID を持つ宛先エンドポイントの種類。

承認された値: azurefunction, eventhub, hybridconnection, servicebusqueue, servicebustopic, storagequeue, webhook
--endpoint

EventGrid がこのイベント サブスクリプションに一致するイベントを配信するエンドポイント。 webhook エンドポイントの種類の場合、これは対応する webhook URL である必要があります。 その他の種類のエンドポイントの場合、これはエンドポイントの Azure リソース識別子である必要があります。

--endpoint-type

宛先エンドポイントの種類。

承認された値: azurefunction, eventhub, hybridconnection, servicebusqueue, servicebustopic, storagequeue, webhook
既定値: webhook
--event-delivery-schema

このイベント サブスクリプションに対してイベントを配信するスキーマ。 既定では、イベントは(対応するトピックの入力スキーマに基づいて) 発行されるのと同じスキーマで配信されます。

承認された値: cloudeventschemav1_0, custominputschema, eventgridschema
--event-ttl

イベントの有効期間 (分単位)。 1 ~ 1440 の数値を指定する必要があります。

既定値: 1440
--expiration-date

イベント サブスクリプションの有効期限が切れる日付または日時 (UTC、例: '2018-11-30T11:59:59+00:00' または '2018-11-30')。 既定では、イベント サブスクリプションの有効期限はありません。

--included-event-types

イベントの種類のスペース区切りのリスト。 例: Microsoft.Storage.BlobCreated Microsoft.Storage.BlobDeleted。 すべての既定のイベントの種類をサブスクライブするには、この引数に値を指定しないでください。

--labels

このイベント サブスクリプションに関連付けるラベルのスペース区切りの一覧。

--max-delivery-attempts

配信試行の最大数。 1 ~ 30 の数値を指定する必要があります。

既定値: 30
--max-events-per-batch

バッチ内のイベントの最大数。 1 から 5000 までの数値を指定する必要があります。

--preferred-batch-size-in-kilobytes

推奨されるバッチ サイズ (KB 単位)。 1 から 1024 までの数値を指定する必要があります。

--source-resource-id

イベント サブスクリプションを作成する必要がある Azure リソースの完全修飾識別子。

Usage: --source-resource-id Azure-Resource-ID For Azure subscription: --source-resource-id /subscriptions/{SubID} For resource group: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1 For EventGrid topic: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.EventGrid/topics/t1 ストレージ アカウントの場合: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.Storage/storageaccounts/sa1 For EventGrid doメイン: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.EventGrid/doメインs/d1 EventGrid doメイン トピック: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.EventGrid/doメインs/d1/topics/t1。

--subject-begins-with

プレフィックスに基づいてイベント サブスクリプションのイベントをフィルター処理する省略可能な文字列。 ワイルドカード文字はサポートされていません。

--subject-case-sensitive

件名フィールドを大文字と小文字を区別して比較するかどうかを指定します。 True の場合フラグが存在します。

承認された値: false, true
既定値: False
--subject-ends-with

サフィックスに基づいてイベント サブスクリプションのイベントをフィルター処理する省略可能な文字列。 ワイルドカード文字はサポートされていません。

グローバル パラメーター
--debug

すべてのデバッグ ログを表示するようにログの詳細レベルを上げます。

--help -h

このヘルプ メッセージを表示して終了します。

--only-show-errors

エラーのみを表示し、警告は抑制します。

--output -o

出力形式。

承認された値: json, jsonc, none, table, tsv, yaml, yamlc
既定値: json
--query

JMESPath クエリ文字列。 詳細と例については、http://jmespath.org/ をご覧ください。

--subscription

サブスクリプションの名前または ID。 az account set -s NAME_OR_ID を使用して、既定のサブスクリプションを構成できます。

--verbose

ログの詳細レベルを上げます。 詳細なデバッグ ログを表示するには --debug を使います。

az eventgrid event-subscription delete

イベント サブスクリプションを削除する。

az eventgrid event-subscription delete --name
                                       [--source-resource-id]

Event Grid トピックのイベント サブスクリプションを削除します。

az eventgrid event-subscription delete --name es1 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/topics/topic1

Event Grid doメイン トピックのイベント サブスクリプションを削除します。

az eventgrid event-subscription delete --name es1 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/domains/domain1/topics/topic1

Event Grid doメイン のイベント サブスクリプションを削除します。

az eventgrid event-subscription delete --name es1 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/domains/domain1

Azure サブスクリプションのイベント サブスクリプションを削除します。

az eventgrid event-subscription delete --name es2 \
    --source-resource-id /subscriptions/{SubID}

リソース グループのイベント サブスクリプションを削除します。

az eventgrid event-subscription delete --name es3 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}

ストレージ アカウントのイベント サブスクリプションを削除します。

az eventgrid event-subscription delete --name es3 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/microsoft.storage/storageaccounts/kalsegblob

必須のパラメーター

--name -n

イベント サブスクリプションの名前。

省略可能のパラメーター

--source-resource-id

イベント サブスクリプションを削除する必要がある Azure リソースの完全修飾識別子。

Usage: --source-resource-id Azure-Resource-ID For Azure subscription: --source-resource-id /subscriptions/{SubID} For resource group: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1 For EventGrid topic: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.EventGrid/topics/t1 ストレージ アカウントの場合: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.Storage/storageaccounts/sa1 For EventGrid doメイン: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.EventGrid/doメインs/d1 EventGrid doメイン トピック: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.EventGrid/doメインs/d1/topics/t1。

グローバル パラメーター
--debug

すべてのデバッグ ログを表示するようにログの詳細レベルを上げます。

--help -h

このヘルプ メッセージを表示して終了します。

--only-show-errors

エラーのみを表示し、警告は抑制します。

--output -o

出力形式。

承認された値: json, jsonc, none, table, tsv, yaml, yamlc
既定値: json
--query

JMESPath クエリ文字列。 詳細と例については、http://jmespath.org/ をご覧ください。

--subscription

サブスクリプションの名前または ID。 az account set -s NAME_OR_ID を使用して、既定のサブスクリプションを構成できます。

--verbose

ログの詳細レベルを上げます。 詳細なデバッグ ログを表示するには --debug を使います。

az eventgrid event-subscription delete (eventgrid 拡張機能)

プレビュー

コマンド グループ 'az eventgrid' はプレビュー段階であり、開発中です。 参照レベルとサポート レベル: https://aka.ms/CLI_refstatus

イベント サブスクリプションを削除する。

az eventgrid event-subscription delete --name
                                       [--source-resource-id]

Event Grid トピックのイベント サブスクリプションを削除します。

az eventgrid event-subscription delete --name es1 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/topics/topic1

Event Grid doメイン トピックのイベント サブスクリプションを削除します。

az eventgrid event-subscription delete --name es1 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/domains/domain1/topics/topic1

Event Grid doメイン のイベント サブスクリプションを削除します。

az eventgrid event-subscription delete --name es1 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/domains/domain1

Azure サブスクリプションのイベント サブスクリプションを削除します。

az eventgrid event-subscription delete --name es2 \
    --source-resource-id /subscriptions/{SubID}

リソース グループのイベント サブスクリプションを削除します。

az eventgrid event-subscription delete --name es3 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}

ストレージ アカウントのイベント サブスクリプションを削除します。

az eventgrid event-subscription delete --name es3 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/microsoft.storage/storageaccounts/kalsegblob

必須のパラメーター

--name -n

イベント サブスクリプションの名前。

省略可能のパラメーター

--source-resource-id

イベント サブスクリプションを削除する必要がある Azure リソースの完全修飾識別子。

Usage: --source-resource-id Azure-Resource-ID For Azure subscription: --source-resource-id /subscriptions/{SubID} For resource group: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1 For EventGrid topic: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.EventGrid/topics/t1 ストレージ アカウントの場合: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.Storage/storageaccounts/sa1 For EventGrid doメイン: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.EventGrid/doメインs/d1 EventGrid doメイン トピック: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.EventGrid/doメインs/d1/topics/t1。

グローバル パラメーター
--debug

すべてのデバッグ ログを表示するようにログの詳細レベルを上げます。

--help -h

このヘルプ メッセージを表示して終了します。

--only-show-errors

エラーのみを表示し、警告は抑制します。

--output -o

出力形式。

承認された値: json, jsonc, none, table, tsv, yaml, yamlc
既定値: json
--query

JMESPath クエリ文字列。 詳細と例については、http://jmespath.org/ をご覧ください。

--subscription

サブスクリプションの名前または ID。 az account set -s NAME_OR_ID を使用して、既定のサブスクリプションを構成できます。

--verbose

ログの詳細レベルを上げます。 詳細なデバッグ ログを表示するには --debug を使います。

az eventgrid event-subscription list

イベント サブスクリプションを一覧表示します。

Event Grid では、リージョンとグローバルの両方のイベント サブスクリプションがサポートされています。リージョン リソース (ストレージ アカウントや Event Grid トピックなど) のイベント サブスクリプションはリージョンであり、グローバル リソース (Azure サブスクリプションやリソース グループなど) のイベント サブスクリプションはグローバルです。 そのため、いくつかの異なる方法でイベント サブスクリプションを一覧表示できます。

  1. イベント サブスクリプションを一覧表示するリソースのリソース ID で一覧表示するには、--source-resource-id パラメーターを指定します。 他のパラメーターを指定する必要はありません。
  2. トピックの種類 (ストレージ アカウントなど) で一覧表示するには、--topic-type パラメーターと --location (例: "westus2") パラメーターを指定します。 グローバル トピックの種類 ("Microsoft.Resources.Subscriptions" など) の場合は、場所の値を "global" として指定します。
  3. リージョン内のすべてのイベント サブスクリプション (すべてのトピックの種類) を一覧表示するには、--location パラメーターのみを指定します。
  4. 上記の #2 と #3 の両方で、リソース グループでのみフィルター処理するには、--resource-group パラメーターを追加で指定できます。
az eventgrid event-subscription list [--location]
                                     [--odata-query]
                                     [--resource-group]
                                     [--source-resource-id]
                                     [--topic-type-name]

Event Grid トピック用に作成されたすべてのイベント サブスクリプションを一覧表示します。

az eventgrid event-subscription list --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/topics/topic1

ストレージ アカウント用に作成されたすべてのイベント サブスクリプションを一覧表示します。

az eventgrid event-subscription list --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.Storage/storageaccounts/kalsegblob

Azure サブスクリプション用に作成されたすべてのイベント サブスクリプションを一覧表示します。

az eventgrid event-subscription list --source-resource-id /subscriptions/{SubID}

リソース グループに対して作成されたすべてのイベント サブスクリプションを一覧表示します。

az eventgrid event-subscription list --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}

Event Grid doメイン のすべてのイベント サブスクリプションを一覧表示します。

az eventgrid event-subscription list --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/domains/d1

Event Grid doメイン トピックのすべてのイベント サブスクリプションを一覧表示します。

az eventgrid event-subscription list --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/domains/d1/topics/topic1

westus2 のすべての Storage イベント サブスクリプション (現在選択されている Azure サブスクリプションの下) を一覧表示します。

az eventgrid event-subscription list --topic-type Microsoft.Storage.StorageAccounts --location westus2

westus2 のすべての Storage イベント サブスクリプション (特定のリソース グループの下) を一覧表示します。

az eventgrid event-subscription list --topic-type Microsoft.Storage.StorageAccounts --location westus2 --resource-group {RG}

すべてのリージョンまたはグローバル イベント サブスクリプションを一覧表示します (現在選択されている Azure サブスクリプションの下)。

az eventgrid event-subscription list --location westus2
az eventgrid event-subscription list --location global

指定したリソース グループのすべてのリージョンまたはグローバル イベント サブスクリプションを一覧表示します。

az eventgrid event-subscription list --location westus2 --resource-group {RG}
az eventgrid event-subscription list --location global --resource-group {RG}

パターン "XYZ" を含む Event Grid doメイン のすべてのイベント サブスクリプションを一覧表示する

az eventgrid event-subscription list --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/domains/d1 --odata-query "Contains(name, 'XYZ')"

"name1" という名前のイベント サブスクリプションを除きメイン Event Grid do のすべてのイベント サブスクリプションを一覧表示します

az eventgrid event-subscription list --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/domains/d1 --odata-query "NOT (name eq 'name1')"

省略可能のパラメーター

--location -l

Location。 値のソース: az account list-locations az configure --defaults location=<location> を使用して、既定の場所を構成できます。

--odata-query

リストの結果をフィルター処理するために使用される OData クエリ。 現在、フィルター処理は Name プロパティでのみ許可されています。 サポートされる操作には、CONTAINS、eq (等しい)、ne (等しくない場合)、AND、OR、NOT が含まれます。

--resource-group -g

リソース グループの名前。 az configure --defaults group=<name> を使用して、既定のグループを構成できます。

--source-resource-id

イベント サブスクリプションを一覧表示する必要がある Azure リソースの完全修飾識別子。

Usage: --source-resource-id Azure-Resource-ID For Azure subscription: --source-resource-id /subscriptions/{SubID} For resource group: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1 For EventGrid topic: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.EventGrid/topics/t1 ストレージ アカウントの場合: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.Storage/storageaccounts/sa1 For EventGrid doメイン: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.EventGrid/doメインs/d1 EventGrid doメイン トピック: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.EventGrid/doメインs/d1/topics/t1。

--topic-type-name

イベント サブスクリプションを一覧表示する必要があるトピックの種類の名前。 これを指定する場合は、--location も指定する必要があります。

例 1: WestUS2 --resource-group TestRG --topic-type-name Microsoft.Storage.StorageAccounts --location westus2 Example 2: Azure サブスクリプションのすべてのイベント サブスクリプションを一覧表示する --topic-type-name Microsoft.Resources.Subscriptions --location global。

グローバル パラメーター
--debug

すべてのデバッグ ログを表示するようにログの詳細レベルを上げます。

--help -h

このヘルプ メッセージを表示して終了します。

--only-show-errors

エラーのみを表示し、警告は抑制します。

--output -o

出力形式。

承認された値: json, jsonc, none, table, tsv, yaml, yamlc
既定値: json
--query

JMESPath クエリ文字列。 詳細と例については、http://jmespath.org/ をご覧ください。

--subscription

サブスクリプションの名前または ID。 az account set -s NAME_OR_ID を使用して、既定のサブスクリプションを構成できます。

--verbose

ログの詳細レベルを上げます。 詳細なデバッグ ログを表示するには --debug を使います。

az eventgrid event-subscription list (eventgrid 拡張機能)

プレビュー

コマンド グループ 'az eventgrid' はプレビュー段階であり、開発中です。 参照レベルとサポート レベル: https://aka.ms/CLI_refstatus

イベント サブスクリプションを一覧表示します。

Event Grid では、リージョンとグローバルの両方のイベント サブスクリプションがサポートされています。リージョン リソース (ストレージ アカウントや Event Grid トピックなど) のイベント サブスクリプションはリージョンであり、グローバル リソース (Azure サブスクリプションやリソース グループなど) のイベント サブスクリプションはグローバルです。 そのため、いくつかの異なる方法でイベント サブスクリプションを一覧表示できます。

  1. イベント サブスクリプションを一覧表示するリソースのリソース ID で一覧表示するには、--source-resource-id パラメーターを指定します。 他のパラメーターを指定する必要はありません。
  2. トピックの種類 (ストレージ アカウントなど) で一覧表示するには、--topic-type パラメーターと --location (例: "westus2") パラメーターを指定します。 グローバル トピックの種類 ("Microsoft.Resources.Subscriptions" など) の場合は、場所の値を "global" として指定します。
  3. リージョン内のすべてのイベント サブスクリプション (すべてのトピックの種類) を一覧表示するには、--location パラメーターのみを指定します。
  4. 上記の #2 と #3 の両方で、リソース グループでのみフィルター処理するには、--resource-group パラメーターを追加で指定できます。
az eventgrid event-subscription list [--location]
                                     [--odata-query]
                                     [--resource-group]
                                     [--source-resource-id]
                                     [--topic-type-name]

Event Grid トピック用に作成されたすべてのイベント サブスクリプションを一覧表示します。

az eventgrid event-subscription list --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/topics/topic1

ストレージ アカウント用に作成されたすべてのイベント サブスクリプションを一覧表示します。

az eventgrid event-subscription list --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.Storage/storageaccounts/kalsegblob

Azure サブスクリプション用に作成されたすべてのイベント サブスクリプションを一覧表示します。

az eventgrid event-subscription list --source-resource-id /subscriptions/{SubID}

リソース グループに対して作成されたすべてのイベント サブスクリプションを一覧表示します。

az eventgrid event-subscription list --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}

Event Grid doメイン のすべてのイベント サブスクリプションを一覧表示します。

az eventgrid event-subscription list --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/domains/d1

Event Grid doメイン トピックのすべてのイベント サブスクリプションを一覧表示します。

az eventgrid event-subscription list --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/domains/d1/topics/topic1

westus2 のすべての Storage イベント サブスクリプション (現在選択されている Azure サブスクリプションの下) を一覧表示します。

az eventgrid event-subscription list --topic-type Microsoft.Storage.StorageAccounts --location westus2

westus2 のすべての Storage イベント サブスクリプション (特定のリソース グループの下) を一覧表示します。

az eventgrid event-subscription list --topic-type Microsoft.Storage.StorageAccounts --location westus2 --resource-group {RG}

すべてのリージョンまたはグローバル イベント サブスクリプションを一覧表示します (現在選択されている Azure サブスクリプションの下)。

az eventgrid event-subscription list --location westus2
az eventgrid event-subscription list --location global

指定したリソース グループのすべてのリージョンまたはグローバル イベント サブスクリプションを一覧表示します。

az eventgrid event-subscription list --location westus2 --resource-group {RG}
az eventgrid event-subscription list --location global --resource-group {RG}

パターン "XYZ" を含む Event Grid doメイン のすべてのイベント サブスクリプションを一覧表示する

az eventgrid event-subscription list --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/domains/d1 --odata-query "Contains(name, 'XYZ')"

"name1" という名前のイベント サブスクリプションを除きメイン Event Grid do のすべてのイベント サブスクリプションを一覧表示します

az eventgrid event-subscription list --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/domains/d1 --odata-query "NOT (name eq 'name1')"

省略可能のパラメーター

--location -l

Location。 値のソース: az account list-locations az configure --defaults location=<location> を使用して、既定の場所を構成できます。

--odata-query

OData 構文を使用して結果をフィルター処理するために使用されるクエリ。

--resource-group -g

リソース グループの名前。 az configure --defaults group=<name> を使用して、既定のグループを構成できます。

--source-resource-id

イベント サブスクリプションを一覧表示する必要がある Azure リソースの完全修飾識別子。

Usage: --source-resource-id Azure-Resource-ID For Azure subscription: --source-resource-id /subscriptions/{SubID} For resource group: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1 For EventGrid topic: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.EventGrid/topics/t1 ストレージ アカウントの場合: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.Storage/storageaccounts/sa1 For EventGrid doメイン: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.EventGrid/doメインs/d1 EventGrid doメイン トピック: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.EventGrid/doメインs/d1/topics/t1。

--topic-type-name

イベント サブスクリプションを一覧表示する必要があるトピックの種類の名前。 これを指定する場合は、--location も指定する必要があります。

例 1: WestUS2 --resource-group TestRG --topic-type-name Microsoft.Storage.StorageAccounts --location westus2 Example 2: Azure サブスクリプションのすべてのイベント サブスクリプションを一覧表示する --topic-type-name Microsoft.Resources.Subscriptions --location global。

グローバル パラメーター
--debug

すべてのデバッグ ログを表示するようにログの詳細レベルを上げます。

--help -h

このヘルプ メッセージを表示して終了します。

--only-show-errors

エラーのみを表示し、警告は抑制します。

--output -o

出力形式。

承認された値: json, jsonc, none, table, tsv, yaml, yamlc
既定値: json
--query

JMESPath クエリ文字列。 詳細と例については、http://jmespath.org/ をご覧ください。

--subscription

サブスクリプションの名前または ID。 az account set -s NAME_OR_ID を使用して、既定のサブスクリプションを構成できます。

--verbose

ログの詳細レベルを上げます。 詳細なデバッグ ログを表示するには --debug を使います。

az eventgrid event-subscription show

イベント サブスクリプションの詳細を取得します。

az eventgrid event-subscription show --name
                                     [--include-attrib-secret {false, true}]
                                     [--include-full-endpoint-url {false, true}]
                                     [--source-resource-id]

Event Grid トピックのイベント サブスクリプションの詳細を表示します。

az eventgrid event-subscription show --name es1 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.EventGrid/topics/topic1

Azure サブスクリプションのイベント サブスクリプションの詳細を表示します。

az eventgrid event-subscription show --name es2 \
    --source-resource-id /subscriptions/{SubID}

リソース グループのイベント サブスクリプションの詳細を表示します。

az eventgrid event-subscription show --name es3 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1

ストレージ アカウントのイベント サブスクリプションの詳細を表示します。

az eventgrid event-subscription show --name es3 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/microsoft.storage/storageaccounts/kalsegblob

静的配信属性シークレットを含む、リソース グループのイベント サブスクリプションの詳細を表示します。

az eventgrid event-subscription show --name es3 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1 \
    --include-static-delivery-attribute-secret

必須のパラメーター

--name -n

イベント サブスクリプションの名前。

省略可能のパラメーター

--include-attrib-secret --include-static-delivery-attribute-secret

静的配信属性シークレットを返す必要があるかどうかを示します。 True の場合フラグが存在します。

承認された値: false, true
既定値: False
--include-full-endpoint-url

完全なエンドポイント URL を返す必要があるかどうかを指定します。 True の場合フラグが存在します。

承認された値: false, true
既定値: False
--source-resource-id

イベント サブスクリプションを表示する必要がある Azure リソースの完全修飾識別子。

Usage: --source-resource-id Azure-Resource-ID For Azure subscription: --source-resource-id /subscriptions/{SubID} For resource group: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1 For EventGrid topic: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.EventGrid/topics/t1 ストレージ アカウントの場合: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.Storage/storageaccounts/sa1 For EventGrid doメイン: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.EventGrid/doメインs/d1 EventGrid doメイン トピック: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.EventGrid/doメインs/d1/topics/t1。

グローバル パラメーター
--debug

すべてのデバッグ ログを表示するようにログの詳細レベルを上げます。

--help -h

このヘルプ メッセージを表示して終了します。

--only-show-errors

エラーのみを表示し、警告は抑制します。

--output -o

出力形式。

承認された値: json, jsonc, none, table, tsv, yaml, yamlc
既定値: json
--query

JMESPath クエリ文字列。 詳細と例については、http://jmespath.org/ をご覧ください。

--subscription

サブスクリプションの名前または ID。 az account set -s NAME_OR_ID を使用して、既定のサブスクリプションを構成できます。

--verbose

ログの詳細レベルを上げます。 詳細なデバッグ ログを表示するには --debug を使います。

az eventgrid event-subscription show (eventgrid 拡張機能)

プレビュー

コマンド グループ 'az eventgrid' はプレビュー段階であり、開発中です。 参照レベルとサポート レベル: https://aka.ms/CLI_refstatus

イベント サブスクリプションの詳細を取得します。

az eventgrid event-subscription show --name
                                     [--include-full-endpoint-url {false, true}]
                                     [--source-resource-id]

Event Grid トピックのイベント サブスクリプションの詳細を表示します。

az eventgrid event-subscription show --name es1 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.EventGrid/topics/topic1

Azure サブスクリプションのイベント サブスクリプションの詳細を表示します。

az eventgrid event-subscription show --name es2 \
    --source-resource-id /subscriptions/{SubID}

リソース グループのイベント サブスクリプションの詳細を表示します。

az eventgrid event-subscription show --name es3 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1

ストレージ アカウントのイベント サブスクリプションの詳細を表示します。

az eventgrid event-subscription show --name es3 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/microsoft.storage/storageaccounts/kalsegblob

必須のパラメーター

--name -n

イベント サブスクリプションの名前。

省略可能のパラメーター

--include-full-endpoint-url

完全なエンドポイント URL を返す必要があるかどうかを指定します。 True の場合フラグが存在します。

承認された値: false, true
既定値: False
--source-resource-id

イベント サブスクリプションを表示する必要がある Azure リソースの完全修飾識別子。

Usage: --source-resource-id Azure-Resource-ID For Azure subscription: --source-resource-id /subscriptions/{SubID} For resource group: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1 For EventGrid topic: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.EventGrid/topics/t1 ストレージ アカウントの場合: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.Storage/storageaccounts/sa1 For EventGrid doメイン: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.EventGrid/doメインs/d1 EventGrid doメイン トピック: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.EventGrid/doメインs/d1/topics/t1。

グローバル パラメーター
--debug

すべてのデバッグ ログを表示するようにログの詳細レベルを上げます。

--help -h

このヘルプ メッセージを表示して終了します。

--only-show-errors

エラーのみを表示し、警告は抑制します。

--output -o

出力形式。

承認された値: json, jsonc, none, table, tsv, yaml, yamlc
既定値: json
--query

JMESPath クエリ文字列。 詳細と例については、http://jmespath.org/ をご覧ください。

--subscription

サブスクリプションの名前または ID。 az account set -s NAME_OR_ID を使用して、既定のサブスクリプションを構成できます。

--verbose

ログの詳細レベルを上げます。 詳細なデバッグ ログを表示するには --debug を使います。

az eventgrid event-subscription update

イベント サブスクリプションを更新します。

az eventgrid event-subscription update --name
                                       [--add]
                                       [--advanced-filter]
                                       [--deadletter-endpoint]
                                       [--deadletter-identity {systemassigned}]
                                       [--deadletter-identity-endpoint]
                                       [--delivery-attribute-mapping]
                                       [--delivery-identity {systemassigned}]
                                       [--delivery-identity-endpoint]
                                       [--delivery-identity-endpoint-type {azurefunction, eventhub, hybridconnection, servicebusqueue, servicebustopic, storagequeue, webhook}]
                                       [--enable-advanced-filtering-on-arrays {false, true}]
                                       [--endpoint]
                                       [--endpoint-type]
                                       [--force-string]
                                       [--included-event-types]
                                       [--labels]
                                       [--qttl]
                                       [--remove]
                                       [--set]
                                       [--source-resource-id]
                                       [--subject-begins-with]
                                       [--subject-ends-with]

Event Grid トピックのイベント サブスクリプションを更新して、新しいエンドポイントを指定します。

az eventgrid event-subscription update --name es1 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/topics/topic1 \
    --endpoint https://contoso.azurewebsites.net/api/f1?code=code

Azure サブスクリプションのイベント サブスクリプションを更新して、新しい subject-ends-with フィルターを指定します。

az eventgrid event-subscription update --name es2 \
    --source-resource-id /subscriptions/{SubID} \
    --subject-ends-with .jpg

リソース グループのイベント サブスクリプションを更新して、新しいエンドポイントと新しい subject-ends-with フィルターを指定します。

az eventgrid event-subscription update --name es3 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG} \
    --subject-ends-with .png \
    --endpoint https://contoso.azurewebsites.net/api/f1?code=code

ストレージ アカウントのイベント サブスクリプションを更新して、含まれるイベントの種類の新しい一覧を指定します。

az eventgrid event-subscription update --name es3 \
    --source-resource-id "/subscriptions/{SubID}/resourceGroups/{RG}/providers/microsoft.storage/storageaccounts/kalsegblob" \
    --included-event-types Microsoft.Storage.BlobCreated Microsoft.Storage.BlobDeleted

配信不能な宛先を含むように、ストレージ アカウントのイベント サブスクリプションを更新します。

az eventgrid event-subscription update --name es2 \
    --source-resource-id "/subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.Storage/storageaccounts/kalsegblob" \
    --deadletter-endpoint /subscriptions/{SubID}/resourceGroups/TestRG/providers/Microsoft.Storage/storageAccounts/sa1/blobServices/default/containers/blobcontainer1

高度なフィルターを使用して、ストレージ アカウントのイベント サブスクリプションを更新します。

az eventgrid event-subscription update --name es3 \
    --source-resource-id "/subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.Storage/storageaccounts/s1" \
    --endpoint https://contoso.azurewebsites.net/api/f1?code=code
    --advanced-filter data.blobType StringIn BlockBlob
    --advanced-filter data.url StringBeginsWith https://myaccount.blob.core.windows.net

ストレージ アカウントのイベント サブスクリプションを更新して、メッセージ ttl を 5 分に設定します。

az eventgrid event-subscription update --name es2 \
    --source-resource-id "/subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.Storage/storageaccounts/kalsegblob" \
    --storage-queue-msg-ttl 300

配列で高度なフィルター処理を有効にしてイベント サブスクリプションを更新する

az eventgrid event-subscription update --name es2 \
    --source-resource-id "/subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.Storage/storageaccounts/kalsegblob" \
    --enable-advanced-filtering-on-arrays true

必須のパラメーター

--name -n

イベント サブスクリプションの名前。

省略可能のパラメーター

--add

パスとキー値のペアを指定して、オブジェクトの一覧にオブジェクトを追加します。 例: --add property.listProperty <key=value, string or JSON string>

既定値: []
--advanced-filter

高度なフィルターを使用すると、特定のイベント プロパティに基づいてイベントをフィルター処理できます。

使用法: --advanced-filter KEY[.INNERKEY] FILTEROPERATOR 値 [値 ...]StringIn: --advanced-filter データ。Color StringIn Blue Red Orange Yellow StringNotIn: --advanced-filter データ。Color StringNotIn Blue Red Orange Yellow StringContains: --advanced-filter subject StringContains Blue Red StringNotContains: --advanced-filter subject StringNotContains Blue Red StringBeginsWith: --advanced-filter subject StringBeginsWith Blue Red StringNotBeginsWith: --advanced-filter subject StringNotBeginsWith Blue Red StringEndsWith: --advanced-filter subject StringEndsWith img png jpg StringNotEndsWith: --advanced-filter subject StringNotEndsWith img png jpg NumberIn: --advanced-filterdata.property1 NumberIn 5 10 20 NumberInRange --advanced-filter data.property1 NumberInRange 5,10 20,30 40,50 NumberNotIn: --advanced-filter data.property2 NumberNotIn 100 200 300 NumberNotInRange: --advanced-filter data.property2 NumberNotNotInInInRange 100,110 200,210 300,310 NumberLessThan: --advanced-filter data.property3 NumberLessThan 100 NumberLessThanOrEquals: --advanced-filter data.property2 NumberLessThanOrEquals 100 NumberGreaterThan: --advanced-filter data.property3NumberGreaterThan 100 NumberGreaterThanOrEquals: --advanced-filter data.property2 NumberGreaterThanOrEquals 100 BoolEquals: --advanced-filter data.property3 BoolEquals true IsNullOrUndefined: --advanced-filter data.property3 IsNullOrUndefined IsNotNull: --advanced-filter data.property3 IsNotNull 複数の高度なフィルターは、複数の --advanced-filter 引数を使用して指定できます。

--deadletter-endpoint

EventGrid がこのイベント サブスクリプションの配信不能イベントを配信不能にする必要がある Azure Storage BLOB コンテナーの宛先の Azure リソース ID。

--deadletter-identity
プレビュー

配信不能なターゲット リソースの ID の種類。

承認された値: systemassigned
--deadletter-identity-endpoint

EventGrid がこのイベント サブスクリプションの配信不能イベントを配信不能にする必要がある ID を持つ Azure Storage BLOB コンテナーの宛先の Azure リソース ID。

--delivery-attribute-mapping

配信属性マッピングを追加して、イベントを配信するときに HTTP ヘッダー経由で追加情報を送信します。 この属性は、StorageQueue を除くすべての宛先の種類に対して有効です。 複数の引数を使用して、複数の属性を --delivery-attribute-mapping 指定できます。

使用法: --delivery-attribute-mapping attribute-name attribute-type attribute-value [attribute-is-secret] 静的属性マッピング: --delivery-attribute-mapping somename static somevalue static somevalue false Static Attribute Mapping: --delivery-attribute-mapping somename static somevalue true Dynamic Attribute Mapping: --delivery-attribute-mapping somename dynamic somevalue Static と Dynamic: --delivery-attribute-mapping somename dynamic somevalue --delivery-attribute-mapping somename2 static somevalue.

--delivery-identity
プレビュー

配信先リソースの ID の種類 (ストレージ キュー、eventhub など)。

承認された値: systemassigned
--delivery-identity-endpoint
プレビュー

EventGrid がこのイベント サブスクリプションに一致するイベントを配信する ID を持つエンドポイント。 webhook エンドポイントの種類の場合、これは対応する webhook URL である必要があります。 その他の種類のエンドポイントの場合、これはエンドポイントの Azure リソース識別子である必要があります。

--delivery-identity-endpoint-type
プレビュー

リソース ID を持つ宛先エンドポイントの種類。

承認された値: azurefunction, eventhub, hybridconnection, servicebusqueue, servicebustopic, storagequeue, webhook
--enable-advanced-filtering-on-arrays --enable-af-arr

特異な値を期待するのではなく、値の配列に対して高度なフィルターを評価できるようにします。

承認された値: false, true
--endpoint

EventGrid がこのイベント サブスクリプションに一致するイベントを配信するエンドポイント。 webhook エンドポイントの種類の場合、これは対応する webhook URL である必要があります。 その他の種類のエンドポイントの場合、これはエンドポイントの Azure リソース識別子である必要があります。 Event Grid コマンドを実行する前に、宛先エンドポイントが既に作成され、使用できる必要があります。

--endpoint-type

宛先エンドポイントの種類。

既定値: webhook
--force-string

'set' または 'add' を使用する場合は、JSON に変換するのではなく、文字列リテラルを保持します。

既定値: False
--included-event-types

イベントの種類 (Microsoft.Storage.BlobCreated や Microsoft.Storage.BlobDeleted など) のスペース区切りのリスト。 すべての既定のイベントの種類をサブスクライブするには、この引数に値を指定しないでください。 イベント グリッド トピックの場合、イベントの種類は顧客定義です。 Azure イベント (ストレージ アカウント、IoT Hub など) の場合は、この CLI コマンド 'az eventgrid topic-type list-event-types' を使用して、イベントの種類に対してクエリを実行できます。

--labels

このイベント サブスクリプションに関連付けるラベルのスペース区切りの一覧。

--qttl --storage-queue-msg-ttl

ストレージ キュー メッセージの有効期間 (秒単位)。

--remove

リストからプロパティまたは要素を削除します。 例: --remove property.list <indexToRemove> OR --remove propertyToRemove.

既定値: []
--set

設定するプロパティ パスと値を指定して、オブジェクトを更新します。 例: --set property1.property2=<value>

既定値: []
--source-resource-id

イベント サブスクリプションを更新する必要がある Azure リソースの完全修飾識別子。

Usage: --source-resource-id Azure-Resource-ID For Azure subscription: --source-resource-id /subscriptions/{SubID} For resource group: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1 For EventGrid topic: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.EventGrid/topics/t1 ストレージ アカウントの場合: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.Storage/storageaccounts/sa1 For EventGrid doメイン: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.EventGrid/doメインs/d1 EventGrid doメイン トピック: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.EventGrid/doメインs/d1/topics/t1。

--subject-begins-with

プレフィックスに基づいてイベント サブスクリプションのイベントをフィルター処理する省略可能な文字列。 ワイルドカード文字はサポートされていません。

--subject-ends-with

サフィックスに基づいてイベント サブスクリプションのイベントをフィルター処理する省略可能な文字列。 ワイルドカード文字はサポートされていません。

グローバル パラメーター
--debug

すべてのデバッグ ログを表示するようにログの詳細レベルを上げます。

--help -h

このヘルプ メッセージを表示して終了します。

--only-show-errors

エラーのみを表示し、警告は抑制します。

--output -o

出力形式。

承認された値: json, jsonc, none, table, tsv, yaml, yamlc
既定値: json
--query

JMESPath クエリ文字列。 詳細と例については、http://jmespath.org/ をご覧ください。

--subscription

サブスクリプションの名前または ID。 az account set -s NAME_OR_ID を使用して、既定のサブスクリプションを構成できます。

--verbose

ログの詳細レベルを上げます。 詳細なデバッグ ログを表示するには --debug を使います。

az eventgrid event-subscription update (eventgrid 拡張機能)

プレビュー

コマンド グループ 'az eventgrid' はプレビュー段階であり、開発中です。 参照レベルとサポート レベル: https://aka.ms/CLI_refstatus

イベント サブスクリプションを更新します。

az eventgrid event-subscription update --name
                                       [--add]
                                       [--advanced-filter]
                                       [--deadletter-endpoint]
                                       [--deadletter-identity {systemassigned}]
                                       [--deadletter-identity-endpoint]
                                       [--delivery-identity {systemassigned}]
                                       [--delivery-identity-endpoint]
                                       [--delivery-identity-endpoint-type {azurefunction, eventhub, hybridconnection, servicebusqueue, servicebustopic, storagequeue, webhook}]
                                       [--endpoint]
                                       [--endpoint-type {azurefunction, eventhub, hybridconnection, servicebusqueue, servicebustopic, storagequeue, webhook}]
                                       [--force-string]
                                       [--included-event-types]
                                       [--labels]
                                       [--remove]
                                       [--set]
                                       [--source-resource-id]
                                       [--subject-begins-with]
                                       [--subject-ends-with]

Event Grid トピックのイベント サブスクリプションを更新して、新しいエンドポイントを指定します。

az eventgrid event-subscription update --name es1 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.EventGrid/topics/topic1 \
    --endpoint https://contoso.azurewebsites.net/api/f1?code=code

Azure サブスクリプションのイベント サブスクリプションを更新して、新しい subject-ends-with フィルターを指定します。

az eventgrid event-subscription update --name es2 \
    --source-resource-id /subscriptions/{SubID} \
    --subject-ends-with .jpg

リソース グループのイベント サブスクリプションを更新して、新しいエンドポイントと新しい subject-ends-with フィルターを指定します。

az eventgrid event-subscription update --name es3 \
    --source-resource-id /subscriptions/{SubID}/resourceGroups/{RG} \
    --subject-ends-with .png \
    --endpoint https://contoso.azurewebsites.net/api/f1?code=code

ストレージ アカウントのイベント サブスクリプションを更新して、含まれるイベントの種類の新しい一覧を指定します。

az eventgrid event-subscription update --name es3 \
    --source-resource-id "/subscriptions/{SubID}/resourceGroups/{RG}/providers/microsoft.storage/storageaccounts/kalsegblob" \
    --included-event-types Microsoft.Storage.BlobCreated Microsoft.Storage.BlobDeleted

配信不能な宛先を含むように、ストレージ アカウントのイベント サブスクリプションを更新します。

az eventgrid event-subscription update --name es2 \
    --source-resource-id "/subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.Storage/storageaccounts/kalsegblob" \
    --deadletter-endpoint /subscriptions/{SubID}/resourceGroups/TestRG/providers/Microsoft.Storage/storageAccounts/sa1/blobServices/default/containers/blobcontainer1

高度なフィルターを使用して、ストレージ アカウントのイベント サブスクリプションを更新します。

az eventgrid event-subscription update --name es3 \
    --source-resource-id "/subscriptions/{SubID}/resourceGroups/{RG}/providers/Microsoft.Storage/storageaccounts/s1" \
    --endpoint https://contoso.azurewebsites.net/api/f1?code=code
    --advanced-filter data.blobType StringIn BlockBlob
    --advanced-filter data.url StringBeginsWith https://myaccount.blob.core.windows.net

必須のパラメーター

--name -n

イベント サブスクリプションの名前。

省略可能のパラメーター

--add

パスとキー値のペアを指定して、オブジェクトの一覧にオブジェクトを追加します。 例: --add property.listProperty <key=value, string or JSON string>

既定値: []
--advanced-filter

高度なフィルターを使用すると、特定のイベント プロパティに基づいてイベントをフィルター処理できます。

使用法: --advanced-filter KEY[.INNERKEY] FILTEROPERATOR 値 [値 ...]StringIn: --advanced-filter データ。Color StringIn Blue Red Orange Yellow StringNotIn: --advanced-filter データ。Color StringNotIn Blue Red Orange Yellow StringContains: --advanced-filter subject StringContains Blue Red StringBeginsWith: --advanced-filter subject StringBeginsWith Blue Red StringEndsWith: --advanced-filter subject StringEndsWith img png jpg NumberIn: --advanced-filter data.property 1 NumberIn 5 10 20 NumberNotIn: --advanced-filter data.property2 NumberNotIn 100 200 300 NumberLessThan: --advanced-filter data.property3 NumberLessThan 100 NumberLessThanOrEquals: --advanced-filterdata.property2 NumberLessThanOrEquals 100 NumberGreaterThan: --advanced-filter data.property3 NumberGreaterThan 100 NumberGreaterThanOrEquals: --advanced-filter data.property2 NumberGreaterThanOrEquals 100 BoolEquals: --advanced-filter data.property3 BoolEquals true Multiple advanced filters は、複数の --advanced-filter 引数を使用して指定できます。

--deadletter-endpoint

EventGrid がこのイベント サブスクリプションの配信不能イベントを配信不能にする必要がある Azure Storage BLOB コンテナーの宛先の Azure リソース ID。

--deadletter-identity

配信不能なターゲット リソースの ID の種類。

承認された値: systemassigned
--deadletter-identity-endpoint

EventGrid がこのイベント サブスクリプションの配信不能イベントを配信不能にする必要がある ID を持つ Azure Storage BLOB コンテナーの宛先の Azure リソース ID。

--delivery-identity

配信先リソースの ID の種類 (ストレージ キュー、eventhub など)。

承認された値: systemassigned
--delivery-identity-endpoint

EventGrid がこのイベント サブスクリプションに一致するイベントを配信する ID を持つエンドポイント。 webhook エンドポイントの種類の場合、これは対応する webhook URL である必要があります。 その他の種類のエンドポイントの場合、これはエンドポイントの Azure リソース識別子である必要があります。

--delivery-identity-endpoint-type

リソース ID を持つ宛先エンドポイントの種類。

承認された値: azurefunction, eventhub, hybridconnection, servicebusqueue, servicebustopic, storagequeue, webhook
--endpoint

EventGrid がこのイベント サブスクリプションに一致するイベントを配信するエンドポイント。 webhook エンドポイントの種類の場合、これは対応する webhook URL である必要があります。 その他の種類のエンドポイントの場合、これはエンドポイントの Azure リソース識別子である必要があります。

--endpoint-type

宛先エンドポイントの種類。

承認された値: azurefunction, eventhub, hybridconnection, servicebusqueue, servicebustopic, storagequeue, webhook
既定値: webhook
--force-string

'set' または 'add' を使用する場合は、JSON に変換するのではなく、文字列リテラルを保持します。

既定値: False
--included-event-types

イベントの種類のスペース区切りのリスト。 例: Microsoft.Storage.BlobCreated Microsoft.Storage.BlobDeleted。 すべての既定のイベントの種類をサブスクライブするには、この引数に値を指定しないでください。

--labels

このイベント サブスクリプションに関連付けるラベルのスペース区切りの一覧。

--remove

リストからプロパティまたは要素を削除します。 例: --remove property.list <indexToRemove> OR --remove propertyToRemove.

既定値: []
--set

設定するプロパティ パスと値を指定して、オブジェクトを更新します。 例: --set property1.property2=<value>

既定値: []
--source-resource-id

イベント サブスクリプションを更新する必要がある Azure リソースの完全修飾識別子。

Usage: --source-resource-id Azure-Resource-ID For Azure subscription: --source-resource-id /subscriptions/{SubID} For resource group: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1 For EventGrid topic: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.EventGrid/topics/t1 ストレージ アカウントの場合: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.Storage/storageaccounts/sa1 For EventGrid doメイン: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.EventGrid/doメインs/d1 EventGrid doメイン トピック: --source-resource-id /subscriptions/{SubID}/resourceGroups/rg1/providers/Microsoft.EventGrid/doメインs/d1/topics/t1。

--subject-begins-with

プレフィックスに基づいてイベント サブスクリプションのイベントをフィルター処理する省略可能な文字列。 ワイルドカード文字はサポートされていません。

--subject-ends-with

サフィックスに基づいてイベント サブスクリプションのイベントをフィルター処理する省略可能な文字列。 ワイルドカード文字はサポートされていません。

グローバル パラメーター
--debug

すべてのデバッグ ログを表示するようにログの詳細レベルを上げます。

--help -h

このヘルプ メッセージを表示して終了します。

--only-show-errors

エラーのみを表示し、警告は抑制します。

--output -o

出力形式。

承認された値: json, jsonc, none, table, tsv, yaml, yamlc
既定値: json
--query

JMESPath クエリ文字列。 詳細と例については、http://jmespath.org/ をご覧ください。

--subscription

サブスクリプションの名前または ID。 az account set -s NAME_OR_ID を使用して、既定のサブスクリプションを構成できます。

--verbose

ログの詳細レベルを上げます。 詳細なデバッグ ログを表示するには --debug を使います。