次の方法で共有


Microsoft.EventGrid イベントサブスクリプション

Bicepリソースの定義

eventSubscriptions リソースの種類は、次をターゲットとする操作と共にデプロイできます。

  • Tenant - 参照 tenant deployment commandsManagement groups - management group deployment commandsSubscriptionを参照 - subscription deployment commandsResource groups - リソースを参照グループ展開コマンド

各 API バージョンで変更されたプロパティの一覧については、変更ログの参照してください。

リソースの形式

Microsoft.EventGrid/eventSubscriptionsリソースを作成するには、テンプレートに以下のBicepを追加してください。

resource symbolicname 'Microsoft.EventGrid/eventSubscriptions@2025-07-15-preview' = {
  scope: resourceSymbolicName or scope
  name: 'string'
  properties: {
    deadLetterDestination: {
      endpointType: 'string'
      // For remaining properties, see DeadLetterDestination objects
    }
    deadLetterWithResourceIdentity: {
      deadLetterDestination: {
        endpointType: 'string'
        // For remaining properties, see DeadLetterDestination objects
      }
      identity: {
        federatedIdentityCredentialInfo: {
          federatedClientId: 'string'
        }
        type: 'string'
        userAssignedIdentity: 'string'
      }
    }
    deliveryWithResourceIdentity: {
      destination: {
        endpointType: 'string'
        // For remaining properties, see EventSubscriptionDestination objects
      }
      identity: {
        federatedIdentityCredentialInfo: {
          federatedClientId: 'string'
        }
        type: 'string'
        userAssignedIdentity: 'string'
      }
    }
    destination: {
      endpointType: 'string'
      // For remaining properties, see EventSubscriptionDestination objects
    }
    eventDeliverySchema: 'string'
    expirationTimeUtc: 'string'
    filter: {
      advancedFilters: [
        {
          key: 'string'
          operatorType: 'string'
          // For remaining properties, see AdvancedFilter objects
        }
      ]
      enableAdvancedFilteringOnArrays: bool
      includedEventTypes: [
        'string'
      ]
      isSubjectCaseSensitive: bool
      subjectBeginsWith: 'string'
      subjectEndsWith: 'string'
    }
    labels: [
      'string'
    ]
    retryPolicy: {
      eventTimeToLiveInMinutes: int
      maxDeliveryAttempts: int
    }
  }
}

DeliveryAttributeMapping オブジェクト

プロパティを設定して、オブジェクトの型を指定します。

動的の場合は、以下を使用します。

{
  properties: {
    sourceField: 'string'
  }
  type: 'Dynamic'
}

静的の場合は、次を使用します。

{
  properties: {
    isSecret: bool
    value: 'string'
  }
  type: 'Static'
}

DeadLetterDestination オブジェクト

endpointType プロパティを設定して、オブジェクトの種類を指定します。

StorageBlobを する場合は、次を使用します。

{
  endpointType: 'StorageBlob'
  properties: {
    blobContainerName: 'string'
    resourceId: 'string'
  }
}

EventSubscriptionDestination オブジェクト

endpointType プロパティを設定して、オブジェクトの種類を指定します。

AzureFunction の場合は、次を使用します。

{
  endpointType: 'AzureFunction'
  properties: {
    deliveryAttributeMappings: [
      {
        name: 'string'
        type: 'string'
        // For remaining properties, see DeliveryAttributeMapping objects
      }
    ]
    maxEventsPerBatch: int
    preferredBatchSizeInKilobytes: int
    resourceId: 'string'
  }
}

EventHubの場合は、次を使用します。

{
  endpointType: 'EventHub'
  properties: {
    deliveryAttributeMappings: [
      {
        name: 'string'
        type: 'string'
        // For remaining properties, see DeliveryAttributeMapping objects
      }
    ]
    resourceId: 'string'
  }
}

HybridConnection の場合は、次を使用します。

{
  endpointType: 'HybridConnection'
  properties: {
    deliveryAttributeMappings: [
      {
        name: 'string'
        type: 'string'
        // For remaining properties, see DeliveryAttributeMapping objects
      }
    ]
    resourceId: 'string'
  }
}

MonitorAlert の場合は、次を使用します。

{
  endpointType: 'MonitorAlert'
  properties: {
    actionGroups: [
      'string'
    ]
    description: 'string'
    severity: 'string'
  }
}

NamespaceTopicには、以下を使用します。

{
  endpointType: 'NamespaceTopic'
  properties: {
    resourceId: 'string'
  }
}

PartnerDestination には、次を使用します。

{
  endpointType: 'PartnerDestination'
  properties: {
    resourceId: 'string'
  }
}

ServiceBusQueue の場合は、次を使用します。

{
  endpointType: 'ServiceBusQueue'
  properties: {
    deliveryAttributeMappings: [
      {
        name: 'string'
        type: 'string'
        // For remaining properties, see DeliveryAttributeMapping objects
      }
    ]
    resourceId: 'string'
  }
}

ServiceBusTopic の場合は、次を使用します。

{
  endpointType: 'ServiceBusTopic'
  properties: {
    deliveryAttributeMappings: [
      {
        name: 'string'
        type: 'string'
        // For remaining properties, see DeliveryAttributeMapping objects
      }
    ]
    resourceId: 'string'
  }
}

StorageQueue の場合は、次を使用します。

{
  endpointType: 'StorageQueue'
  properties: {
    queueMessageTimeToLiveInSeconds: int
    queueName: 'string'
    resourceId: 'string'
  }
}

WebHook の場合は、次を使用します。

{
  endpointType: 'WebHook'
  properties: {
    azureActiveDirectoryApplicationIdOrUri: 'string'
    azureActiveDirectoryTenantId: 'string'
    deliveryAttributeMappings: [
      {
        name: 'string'
        type: 'string'
        // For remaining properties, see DeliveryAttributeMapping objects
      }
    ]
    endpointUrl: 'string'
    maxEventsPerBatch: int
    minimumTlsVersionAllowed: 'string'
    preferredBatchSizeInKilobytes: int
  }
}

AdvancedFilter オブジェクト

operatorType プロパティを設定して、オブジェクトの種類を指定します。

BoolEquals の場合は、次の値を使用します。

{
  operatorType: 'BoolEquals'
  value: bool
}

IsNotNull の場合は、次を使用します。

{
  operatorType: 'IsNotNull'
}

IsNullOrUndefined の場合は、次のようにします。

{
  operatorType: 'IsNullOrUndefined'
}

NumberGreaterThan の場合は、次の値を使用します。

{
  operatorType: 'NumberGreaterThan'
  value: int
}

NumberGreaterThanOrEquals の場合は、次の値を使用します。

{
  operatorType: 'NumberGreaterThanOrEquals'
  value: int
}

NumberIn の場合は、次の値を使用します。

{
  operatorType: 'NumberIn'
  values: [
    int
  ]
}

NumberInRange の場合は、次を使用します。

{
  operatorType: 'NumberInRange'
  values: [
    [
      int
    ]
  ]
}

NumberLessThan の場合は、次の値を使用します。

{
  operatorType: 'NumberLessThan'
  value: int
}

NumberLessThanOrEquals の場合は、次の値を使用します。

{
  operatorType: 'NumberLessThanOrEquals'
  value: int
}

NumberNotIn の場合は、次の値を使用します。

{
  operatorType: 'NumberNotIn'
  values: [
    int
  ]
}

NumberNotInRange の場合は、次を使用します。

{
  operatorType: 'NumberNotInRange'
  values: [
    [
      int
    ]
  ]
}

StringBeginsWith の場合は、次の値を使用します。

{
  operatorType: 'StringBeginsWith'
  values: [
    'string'
  ]
}

StringContains の場合は、次を使用します。

{
  operatorType: 'StringContains'
  values: [
    'string'
  ]
}

StringEndsWith の場合は、次の値を使用します。

{
  operatorType: 'StringEndsWith'
  values: [
    'string'
  ]
}

StringIn の場合は、次の値を使用します。

{
  operatorType: 'StringIn'
  values: [
    'string'
  ]
}

StringNotBeginsWith の場合は、次を使用します。

{
  operatorType: 'StringNotBeginsWith'
  values: [
    'string'
  ]
}

StringNotContains の場合は、次のようにします。

{
  operatorType: 'StringNotContains'
  values: [
    'string'
  ]
}

StringNotEndsWith の場合は、次を使用します。

{
  operatorType: 'StringNotEndsWith'
  values: [
    'string'
  ]
}

StringNotIn の場合は、次の値を使用します。

{
  operatorType: 'StringNotIn'
  values: [
    'string'
  ]
}

プロパティ値

Microsoft.EventGrid/eventSubscriptions

Name Description Value
name リソース名 string (必須)
properties イベント サブスクリプションのプロパティ。 EventSubscriptionProperties
スコープ デプロイ スコープとは異なるスコープでリソースを作成するときに使用します。 このプロパティをリソースのシンボル名に設定し、extension resourceを適用します。

AdvancedFilter

Name Description Value
キー フィルター処理するイベントのフィールド/プロパティ。 文字列
operatorType BoolEqualsAdvancedFilter型 'BoolEquals' に設定します。 IsNotNullAdvancedFilter 型の 'IsNotNull' に設定します。 IsNullOrUndefinedAdvancedFilter 型の 'IsNullOrUndefined' に設定します。 NumberGreaterThanAdvancedFilter型の 'NumberGreaterThan' に設定します。 NumberGreaterThanOrEqualsAdvancedFilter'NumberGreaterThanOrEquals' に設定します。 NumberInAdvancedFilter'NumberIn' に設定します。 NumberInRangeAdvancedFilter 型の 'NumberInRange' に設定します。 NumberLessThanAdvancedFilter'NumberLessThan' に設定します。 NumberLessThanOrEqualsAdvancedFilter'NumberLessThanOrEquals' に設定します。 NumberNotInAdvancedFilter'NumberNotIn' に設定します。 NumberNotInRangeAdvancedFilter 型の 'NumberNotInRange' に設定します。 StringBeginsWithAdvancedFilterの型 'StringBeginsWith' に設定します。 StringContainsAdvancedFilter'StringContains' に設定します。 StringEndsWithAdvancedFilterの型 'StringEndsWith' に設定します。 StringInAdvancedFilter'StringIn' に設定します。 型 StringNotBeginsWithAdvancedFilter の 'StringNotBeginsWith' に設定します。 StringNotContainsAdvancedFilter 型の 'StringNotContains' に設定します。 StringNotEndsWithAdvancedFilter 型の 'StringNotEndsWith' に設定します。 StringNotInAdvancedFilter'StringNotIn' に設定します。 'BoolEquals'
'IsNotNull'
'IsNullOrUndefined'
'NumberGreaterThan'
'NumberGreaterThanOrEquals'
'NumberIn'
'NumberInRange'
'NumberLessThan'
'NumberLessThanOrEquals'
'NumberNotIn'
'NumberNotInRange'
'StringBeginsWith'
'StringContains'
'StringEndsWith'
'StringIn'
'StringNotBeginsWith'
'StringNotContains'
'StringNotEndsWith'
'StringNotIn' (必須)

AzureFunctionEventSubscriptionDestination

Name Description Value
endpointType イベント サブスクリプションの送信先のエンドポイントの種類。 'AzureFunction' (必須)
properties Azure Function Properties of the event subscription destination. AzureFunctionEventSubscriptionDestinationProperties

AzureFunctionEventSubscriptionDestinationProperties

Name Description Value
deliveryAttributeMappings 配信属性の詳細。 DeliveryAttributeMapping[]
maxEventsPerBatch バッチあたりのイベントの最大数。 int
preferredBatchSizeInKilobytes 推奨されるバッチ サイズ (KB 単位)。 int
resourceId イベントサブスクリプションのAzure関数宛先のエンドポイントを表すAzureリソースID。 文字列

BoolEqualsAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'BoolEquals' (必須)
value ブール値のフィルター値。 bool

DeadLetterDestination

Name Description Value
endpointType StorageBlobDeadLetterDestinationの種類 'StorageBlob' に設定します。 'StorageBlob' (必須)

DeadLetterWithResourceIdentity

Name Description Value
deadLetterDestination イベント サブスクリプションに対してイベントを配信する必要がある送信先に関する情報。
親リソース (トピックまたはドメイン) のマネージド ID セットアップを使用して、配信不能時に使用される認証トークンを取得します。
DeadLetterDestination
ID 配信不能イベントの場合に使用する ID。 EventSubscriptionIdentity

DeliveryAttributeMapping

Name Description Value
name 配信属性またはヘッダーの名前。 文字列
DynamicDeliveryAttributeMapping 型を 'Dynamic' に設定します。 タイプ StaticDeliveryAttributeMapping を 'Static' に設定します。 'Dynamic'
'Static' (必須)

DeliveryWithResourceIdentity

Name Description Value
コピー先 イベント サブスクリプションに対してイベントを配信する必要がある送信先に関する情報。
親リソース (トピックまたはドメイン) のマネージド ID セットアップを使用して、配信中に使用される認証トークンを取得します。
EventSubscriptionDestination
ID イベントを配信するときに使用する ID。 EventSubscriptionIdentity

DynamicDeliveryAttributeMapping

Name Description Value
properties 動的配信属性マッピングのプロパティ。 DynamicDeliveryAttributeMappingProperties
配信属性またはヘッダー名の種類。 '動的' (必須)

DynamicDeliveryAttributeMappingProperties

Name Description Value
sourceField 属性値を含むイベントの JSON パス。 文字列

EventHubEventSubscriptionDestination

Name Description Value
endpointType イベント サブスクリプションの送信先のエンドポイントの種類。 'EventHub' (必須)
properties イベント サブスクリプションの送信先の Event Hub プロパティ。 EventHubEventSubscriptionDestinationProperties

EventHubEventSubscriptionDestinationProperties

Name Description Value
deliveryAttributeMappings 配信属性の詳細。 DeliveryAttributeMapping[]
resourceId イベントサブスクリプションのイベントハブ宛先のエンドポイントを表すAzureリソースID。 文字列

EventSubscriptionDestination

Name Description Value
endpointType AzureFunctionEventSubscriptionDestination 型の 'AzureFunction' に設定します。 EventHubEventSubscriptionDestination型として 'EventHub' に設定します。 HybridConnectionEventSubscriptionDestinationの種類 'HybridConnection' に設定します。 タイプ MonitorAlertEventSubscriptionDestination を 'MonitorAlert' に設定します。 タイプ NamespaceTopicEventSubscriptionDestination を 'NamespaceTopic' に設定します。 PartnerEventSubscriptionDestination 型の 'PartnerDestination' に設定します。 ServiceBusQueueEventSubscriptionDestination 型の 'ServiceBusQueue' に設定します。 ServiceBusTopicEventSubscriptionDestination 型の 'ServiceBusTopic' に設定します。 StorageQueueEventSubscriptionDestination種類として 'StorageQueue' に設定します。 WebHookEventSubscriptionDestination型として 'WebHook' に設定します。 'AzureFunction'
'EventHub'
'HybridConnection'
'MonitorAlert'
'NamespaceTopic'
'PartnerDestination'
'ServiceBusQueue'
'ServiceBusTopic'
'StorageQueue'
'WebHook' (必須)

EventSubscriptionFilter

Name Description Value
advancedFilters イベント サブスクリプションのフィルター処理に使用される高度なフィルターの配列。 AdvancedFilter[]
enableAdvancedFilteringOnArrays 特異な値を期待するのではなく、値の配列に対して高度なフィルターを評価できるようにします。 bool
includedEventTypes イベント サブスクリプションの一部である必要がある適用可能なイベントの種類の一覧。 すべての既定のイベントの種類をサブスクライブする場合は、IncludedEventTypes を null に設定します。 string[]
isSubjectCaseSensitive フィルターの SubjectBeginsWith プロパティと SubjectEndsWith プロパティを指定します。
は、大文字と小文字を区別して比較する必要があります。
bool
subjectBeginsWith リソース パス プレフィックスに基づいてイベント サブスクリプションのイベントをフィルター処理する省略可能な文字列。
この形式はイベントのpublisherによって異なります。
このパスでは、ワイルドカード文字はサポートされていません。
文字列
subjectEndsWith リソース パス サフィックスに基づいてイベント サブスクリプションのイベントをフィルター処理する省略可能な文字列。
このパスでは、ワイルドカード文字はサポートされていません。
文字列

EventSubscriptionIdentity

Name Description Value
federatedIdentityCredentialInfo リソース配信で使用されるフェデレーション ID 資格情報 (FIC) の詳細。 FederatedIdentityCredentialInfo
使用されるマネージド ID の種類。 'SystemAssigned' または 'UserAssigned' のいずれかを指定できます。 'SystemAssigned'
'UserAssigned'
userAssignedIdentity リソースに関連付けられているユーザー ID。 文字列

EventSubscriptionProperties

Name Description Value
deadLetterDestination イベント サブスクリプションの配信不能の宛先。 配信不能の宛先に配信できないイベントは、配信不能の宛先に送信されます。
Azure Event GridのIDを使って、配信やデッドレター処理時に使われている認証トークンを取得します。
DeadLetterDestination
deadLetterWithResourceIdentity イベント サブスクリプションの配信不能の宛先。 配信不能の宛先に配信できないイベントは、配信不能の宛先に送信されます。
親リソース (トピックまたはドメイン) のマネージド ID セットアップを使用して、配信/配信不能時に使用される認証トークンを取得します。
DeadLetterWithResourceIdentity
deliveryWithResourceIdentity イベント サブスクリプションに対してイベントを配信する必要がある送信先に関する情報。
親リソース (トピックまたはドメイン) のマネージド ID セットアップを使用して、配信/配信不能時に使用される認証トークンを取得します。
DeliveryWithResourceIdentity
コピー先 イベント サブスクリプションに対してイベントを配信する必要がある送信先に関する情報。
Azure Event GridのIDを使って、配信やデッドレター処理時に使われている認証トークンを取得します。
EventSubscriptionDestination
eventDeliverySchema イベント サブスクリプションのイベント配信スキーマ。 'CloudEventSchemaV1_0'
'CustomInputSchema'
'EventGridSchema'
expirationTimeUtc イベント サブスクリプションの有効期限。 文字列
フィルタ イベント サブスクリプションのフィルターに関する情報。 EventSubscriptionFilter
labels ユーザー定義ラベルの一覧。 string[]
retryPolicy イベントの再試行ポリシー。 これを使用して、イベントの配信試行の最大数と有効期間を構成できます。 RetryPolicy

FederatedIdentityCredentialInfo

Name Description Value
federatedClientId 連邦アイデンティティ認証(FIC)が関連付けられるマルチテナントMicrosoft Entra IDアプリケーション。 string

Constraints:
最小長 = 36
最大長 = 36
パターン = ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$ (必須)

HybridConnectionEventSubscriptionDestination

Name Description Value
endpointType イベント サブスクリプションの送信先のエンドポイントの種類。 'HybridConnection' (必須)
properties イベント サブスクリプションの送信先のハイブリッド接続プロパティ。 HybridConnectionEventSubscriptionDestinationProperties

HybridConnectionEventSubscriptionDestinationProperties

Name Description Value
deliveryAttributeMappings 配信属性の詳細。 DeliveryAttributeMapping[]
resourceId イベントサブスクリプションの目的地であるハイブリッド接続のAzureリソースID。 文字列

IsNotNullAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'IsNotNull' (必須)

IsNullOrUndefinedAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'IsNullOrUndefined' (必須)

MonitorAlertEventSubscriptionDestination

Name Description Value
endpointType イベント サブスクリプションの送信先のエンドポイントの種類。 'MonitorAlert' (必須)
properties イベント サブスクリプションの送信先のアラート プロパティを監視します。 MonitorAlertEventSubscriptionDestinationProperties

MonitorAlertEventSubscriptionDestinationProperties

Name Description Value
actionGroups このイベント サブスクリプションを通じて発生したすべてのアラートでトリガーされるアクション グループの ARM ID の一覧。
各リソース ARM ID は、/subscriptions/{AzureSubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Insights/actionGroups/{ActionGroupName} というパターンに従う必要があります。
string[]
description このイベント サブスクリプションを通じて発生したすべてのアラートにアタッチされる説明。 文字列
severity このイベント サブスクリプションを通じて発生したすべてのアラートにアタッチされる重大度。
このフィールドは指定する必要があります。
'Sev0'
'Sev1'
'Sev2'
'Sev3'
'Sev4'

NamespaceTopicEventSubscriptionDestination

Name Description Value
endpointType イベント サブスクリプションの送信先のエンドポイントの種類。 'NamespaceTopic' (必須)
properties イベント サブスクリプションの送信先の名前空間トピックのプロパティ。 NamespaceTopicEventSubscriptionDestinationProperties

NamespaceTopicEventSubscriptionDestinationProperties

Name Description Value
resourceId イベントサブスクリプションのイベントグリッド名前空間トピック宛先のエンドポイントを表すAzureリソースID。
このフィールドは必須であり、一覧表示されている名前空間トピック リソースが既に存在している必要があります。
リソース ARM ID は、/subscriptions/{AzureSubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.EventGrid/namespaces/{NamespaceName}/topics/{TopicName} というパターンに従う必要があります。
文字列

NumberGreaterThanAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'NumberGreaterThan' (必須)
value フィルター値。 int

NumberGreaterThanOrEqualsAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'NumberGreaterThanOrEquals' (必須)
value フィルター値。 int

NumberInAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'NumberIn' (必須)
values フィルター値のセット。 int[]

NumberInRangeAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'NumberInRange' (必須)
values フィルター値のセット。 int[][]

NumberLessThanAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'NumberLessThan' (必須)
value フィルター値。 int

NumberLessThanOrEqualsAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'NumberLessThanOrEquals' (必須)
value フィルター値。 int

NumberNotInAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'NumberNotIn' (必須)
values フィルター値のセット。 int[]

NumberNotInRangeAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'NumberNotInRange' (必須)
values フィルター値のセット。 int[][]

PartnerEventSubscriptionDestination

Name Description Value
endpointType イベント サブスクリプションの送信先のエンドポイントの種類。 'PartnerDestination' (必須)
properties イベント サブスクリプションの送信先のパートナー変換先のプロパティ。 PartnerEventSubscriptionDestinationProperties

PartnerEventSubscriptionDestinationProperties

Name Description Value
resourceId イベントサブスクリプションのパートナーデスティネーションのエンドポイントを表すAzureリソースID。 文字列

RetryPolicy

Name Description Value
eventTimeToLiveInMinutes イベントの Time To Live (分単位)。 int
maxDeliveryAttempts イベントの配信再試行の最大数。 int

ServiceBusQueueEventSubscriptionDestination

Name Description Value
endpointType イベント サブスクリプションの送信先のエンドポイントの種類。 'ServiceBusQueue' (必須)
properties イベントのService Busプロパティ サブスクリプション先。 ServiceBusQueueEventSubscriptionDestinationProperties

ServiceBusQueueEventSubscriptionDestinationProperties

Name Description Value
deliveryAttributeMappings 配信属性の詳細。 DeliveryAttributeMapping[]
resourceId イベントサブスクリプションのService Bus宛先のエンドポイントを表すAzureリソースID。 文字列

ServiceBusTopicEventSubscriptionDestination

Name Description Value
endpointType イベント サブスクリプションの送信先のエンドポイントの種類。 'ServiceBusTopic' (必須)
properties Service Bus トピック イベントのサブスクリプション先のプロパティ。 ServiceBusTopicEventSubscriptionDestinationProperties

ServiceBusTopicEventSubscriptionDestinationProperties

Name Description Value
deliveryAttributeMappings 配信属性の詳細。 DeliveryAttributeMapping[]
resourceId イベントサブスクリプションのService Busトピック宛先のエンドポイントを表すAzureリソースID。 文字列

StaticDeliveryAttributeMapping

Name Description Value
properties 静的配信属性マッピングのプロパティ。 StaticDeliveryAttributeMappingProperties
配信属性またはヘッダー名の種類。 'Static' (必須)

StaticDeliveryAttributeMappingProperties

Name Description Value
isSecret 属性に機密情報が含まれているかどうかを示すブール型フラグ。 bool
value 配信属性の値。 文字列

StorageBlobDeadLetterDestination

Name Description Value
endpointType 配信不能宛先のエンドポイントの種類 'StorageBlob' (必須)
properties Storage Blobベースのデッドレター宛先のプロパティ StorageBlobDeadLetterDestinationProperties

StorageBlobDeadLetterDestinationProperties

Name Description Value
blobContainerName デッドレターイベントの宛先となるStorageブロブコンテナの名前 文字列
resourceId デッドレターイベントの目的地となるストレージアカウントのAzureリソースID 文字列

StorageQueueEventSubscriptionDestination

Name Description Value
endpointType イベント サブスクリプションの送信先のエンドポイントの種類。 'StorageQueue' (必須)
properties Storage Queue イベントサブスクリプション宛先のプロパティ。 StorageQueueEventSubscriptionDestinationProperties

StorageQueueEventSubscriptionDestinationProperties

Name Description Value
queueMessageTimeToLiveInSeconds Storage queueのメッセージの生存時間は秒単位です。 メッセージの Time To Live が Infinite であることを示すために -1 を使用する場合を除き、この値を 0 または負にすることはできません。 int
queueName イベントサブスクリプションの宛先であるstorageアカウントの下にあるStorageキューの名前。 文字列
resourceId イベントサブスクリプションの宛先となるキューを含むストレージアカウントのAzureリソースID。 文字列

StringBeginsWithAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'StringBeginsWith' (必須)
values フィルター値のセット。 string[]

StringContainsAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'StringContains' (必須)
values フィルター値のセット。 string[]

StringEndsWithAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'StringEndsWith' (必須)
values フィルター値のセット。 string[]

StringInAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'StringIn' (必須)
values フィルター値のセット。 string[]

StringNotBeginsWithAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'StringNotBeginsWith' (必須)
values フィルター値のセット。 string[]

StringNotContainsAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'StringNotContains' (必須)
values フィルター値のセット。 string[]

StringNotEndsWithAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'StringNotEndsWith' (必須)
values フィルター値のセット。 string[]

StringNotInAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'StringNotIn' (必須)
values フィルター値のセット。 string[]

WebHookEventSubscriptionDestination

Name Description Value
endpointType イベント サブスクリプションの送信先のエンドポイントの種類。 'WebHook' (必須)
properties イベント サブスクリプションの送信先の WebHook プロパティ。 WebHookEventSubscriptionDestinationProperties

WebHookEventSubscriptionDestinationProperties

Name Description Value
azureActiveDirectoryApplicationIdOrUri Microsoft Entra ID Application IDまたはURIを使って、デリバリーリクエストに含まれるベアラートークンとしてアクセストークンを取得します。 文字列
azureActiveDirectoryTenantId Microsoft Entra ID Tenant IDを使って、デリバリーリクエストのベアラートークンとしてアクセストークンを取得します。 文字列
deliveryAttributeMappings 配信属性の詳細。 DeliveryAttributeMapping[]
endpointUrl イベント サブスクリプションの送信先のエンドポイントを表す URL。 string

Constraints:
機密性の高い値。 セキュリティで保護されたパラメーターとして渡します。
maxEventsPerBatch バッチあたりのイベントの最大数。 int
minimumTlsVersionAllowed Webhook エンドポイントでサポートされる必要がある最小 TLS バージョン '1.0'
'1.1'
'1.2'
preferredBatchSizeInKilobytes 推奨されるバッチ サイズ (KB 単位)。 int

使用例

Bicep サンプル

EventGrid イベント サブスクリプションのデプロイの基本的な例。

param resourceName string = 'acctest0001'
param location string = 'westeurope'

resource eventSubscription 'Microsoft.EventGrid/eventSubscriptions@2021-12-01' = {
  scope: storageAccount
  name: resourceName
  properties: {
    deadLetterDestination: null
    destination: {
      endpointType: 'EventHub'
      properties: {
        deliveryAttributeMappings: null
        resourceId: eventhub.id
      }
    }
    eventDeliverySchema: 'EventGridSchema'
    filter: {
      includedEventTypes: [
        'Microsoft.Storage.BlobCreated'
        'Microsoft.Storage.BlobRenamed'
      ]
    }
    labels: []
    retryPolicy: {
      eventTimeToLiveInMinutes: 144
      maxDeliveryAttempts: 10
    }
  }
}

resource namespace 'Microsoft.EventHub/namespaces@2022-01-01-preview' = {
  name: resourceName
  location: location
  properties: {
    disableLocalAuth: false
    isAutoInflateEnabled: false
    publicNetworkAccess: 'Enabled'
    zoneRedundant: false
  }
  sku: {
    capacity: 1
    name: 'Standard'
    tier: 'Standard'
  }
}

resource storageAccount 'Microsoft.Storage/storageAccounts@2021-09-01' = {
  name: resourceName
  location: location
  kind: 'StorageV2'
  properties: {
    accessTier: 'Hot'
    allowBlobPublicAccess: true
    allowCrossTenantReplication: true
    allowSharedKeyAccess: true
    defaultToOAuthAuthentication: false
    encryption: {
      keySource: 'Microsoft.Storage'
      services: {
        queue: {
          keyType: 'Service'
        }
        table: {
          keyType: 'Service'
        }
      }
    }
    isHnsEnabled: false
    isNfsV3Enabled: false
    isSftpEnabled: false
    minimumTlsVersion: 'TLS1_2'
    networkAcls: {
      defaultAction: 'Allow'
    }
    publicNetworkAccess: 'Enabled'
    supportsHttpsTrafficOnly: true
  }
  sku: {
    name: 'Standard_LRS'
  }
}

resource eventhub 'Microsoft.EventHub/namespaces/eventhubs@2021-11-01' = {
  parent: namespace
  name: resourceName
  properties: {
    messageRetentionInDays: 1
    partitionCount: 1
    status: 'Active'
  }
}

Azure Quickstart Samples

以下の Azure クイックスタートテンプレートには、このリソースタイプのデプロイのためのBicepサンプルが含まれています。

Bicepファイル Description
Create Azure Event Grid Custom Topic and Queue Subscription Azure Event Gridのカスタムトピックとサービスバスキューサブスクリプションを作成します。 テンプレートはもともと Markus Meyer によって作成されました。
Create Azure Event Grid カスタムトピックとサブスクリプション Azure Event Gridのカスタムトピックとwebhookサブスクリプションを作成します。 元は John Downs によって作成されたテンプレートです。

ARM テンプレート リソース定義

eventSubscriptions リソースの種類は、次をターゲットとする操作と共にデプロイできます。

  • Tenant - 参照 tenant deployment commandsManagement groups - management group deployment commandsSubscriptionを参照 - subscription deployment commandsResource groups - リソースを参照グループ展開コマンド

各 API バージョンで変更されたプロパティの一覧については、変更ログの参照してください。

リソースの形式

Microsoft.EventGrid/eventSubscriptions リソースを作成するには、次の JSON をテンプレートに追加します。

{
  "type": "Microsoft.EventGrid/eventSubscriptions",
  "apiVersion": "2025-07-15-preview",
  "name": "string",
  "properties": {
    "deadLetterDestination": {
      "endpointType": "string"
      // For remaining properties, see DeadLetterDestination objects
    },
    "deadLetterWithResourceIdentity": {
      "deadLetterDestination": {
        "endpointType": "string"
        // For remaining properties, see DeadLetterDestination objects
      },
      "identity": {
        "federatedIdentityCredentialInfo": {
          "federatedClientId": "string"
        },
        "type": "string",
        "userAssignedIdentity": "string"
      }
    },
    "deliveryWithResourceIdentity": {
      "destination": {
        "endpointType": "string"
        // For remaining properties, see EventSubscriptionDestination objects
      },
      "identity": {
        "federatedIdentityCredentialInfo": {
          "federatedClientId": "string"
        },
        "type": "string",
        "userAssignedIdentity": "string"
      }
    },
    "destination": {
      "endpointType": "string"
      // For remaining properties, see EventSubscriptionDestination objects
    },
    "eventDeliverySchema": "string",
    "expirationTimeUtc": "string",
    "filter": {
      "advancedFilters": [ {
        "key": "string",
        "operatorType": "string"
        // For remaining properties, see AdvancedFilter objects
      } ],
      "enableAdvancedFilteringOnArrays": "bool",
      "includedEventTypes": [ "string" ],
      "isSubjectCaseSensitive": "bool",
      "subjectBeginsWith": "string",
      "subjectEndsWith": "string"
    },
    "labels": [ "string" ],
    "retryPolicy": {
      "eventTimeToLiveInMinutes": "int",
      "maxDeliveryAttempts": "int"
    }
  }
}

DeliveryAttributeMapping オブジェクト

プロパティを設定して、オブジェクトの型を指定します。

動的の場合は、以下を使用します。

{
  "properties": {
    "sourceField": "string"
  },
  "type": "Dynamic"
}

静的の場合は、次を使用します。

{
  "properties": {
    "isSecret": "bool",
    "value": "string"
  },
  "type": "Static"
}

DeadLetterDestination オブジェクト

endpointType プロパティを設定して、オブジェクトの種類を指定します。

StorageBlobを する場合は、次を使用します。

{
  "endpointType": "StorageBlob",
  "properties": {
    "blobContainerName": "string",
    "resourceId": "string"
  }
}

EventSubscriptionDestination オブジェクト

endpointType プロパティを設定して、オブジェクトの種類を指定します。

AzureFunction の場合は、次を使用します。

{
  "endpointType": "AzureFunction",
  "properties": {
    "deliveryAttributeMappings": [ {
      "name": "string",
      "type": "string"
      // For remaining properties, see DeliveryAttributeMapping objects
    } ],
    "maxEventsPerBatch": "int",
    "preferredBatchSizeInKilobytes": "int",
    "resourceId": "string"
  }
}

EventHubの場合は、次を使用します。

{
  "endpointType": "EventHub",
  "properties": {
    "deliveryAttributeMappings": [ {
      "name": "string",
      "type": "string"
      // For remaining properties, see DeliveryAttributeMapping objects
    } ],
    "resourceId": "string"
  }
}

HybridConnection の場合は、次を使用します。

{
  "endpointType": "HybridConnection",
  "properties": {
    "deliveryAttributeMappings": [ {
      "name": "string",
      "type": "string"
      // For remaining properties, see DeliveryAttributeMapping objects
    } ],
    "resourceId": "string"
  }
}

MonitorAlert の場合は、次を使用します。

{
  "endpointType": "MonitorAlert",
  "properties": {
    "actionGroups": [ "string" ],
    "description": "string",
    "severity": "string"
  }
}

NamespaceTopicには、以下を使用します。

{
  "endpointType": "NamespaceTopic",
  "properties": {
    "resourceId": "string"
  }
}

PartnerDestination には、次を使用します。

{
  "endpointType": "PartnerDestination",
  "properties": {
    "resourceId": "string"
  }
}

ServiceBusQueue の場合は、次を使用します。

{
  "endpointType": "ServiceBusQueue",
  "properties": {
    "deliveryAttributeMappings": [ {
      "name": "string",
      "type": "string"
      // For remaining properties, see DeliveryAttributeMapping objects
    } ],
    "resourceId": "string"
  }
}

ServiceBusTopic の場合は、次を使用します。

{
  "endpointType": "ServiceBusTopic",
  "properties": {
    "deliveryAttributeMappings": [ {
      "name": "string",
      "type": "string"
      // For remaining properties, see DeliveryAttributeMapping objects
    } ],
    "resourceId": "string"
  }
}

StorageQueue の場合は、次を使用します。

{
  "endpointType": "StorageQueue",
  "properties": {
    "queueMessageTimeToLiveInSeconds": "int",
    "queueName": "string",
    "resourceId": "string"
  }
}

WebHook の場合は、次を使用します。

{
  "endpointType": "WebHook",
  "properties": {
    "azureActiveDirectoryApplicationIdOrUri": "string",
    "azureActiveDirectoryTenantId": "string",
    "deliveryAttributeMappings": [ {
      "name": "string",
      "type": "string"
      // For remaining properties, see DeliveryAttributeMapping objects
    } ],
    "endpointUrl": "string",
    "maxEventsPerBatch": "int",
    "minimumTlsVersionAllowed": "string",
    "preferredBatchSizeInKilobytes": "int"
  }
}

AdvancedFilter オブジェクト

operatorType プロパティを設定して、オブジェクトの種類を指定します。

BoolEquals の場合は、次の値を使用します。

{
  "operatorType": "BoolEquals",
  "value": "bool"
}

IsNotNull の場合は、次を使用します。

{
  "operatorType": "IsNotNull"
}

IsNullOrUndefined の場合は、次のようにします。

{
  "operatorType": "IsNullOrUndefined"
}

NumberGreaterThan の場合は、次の値を使用します。

{
  "operatorType": "NumberGreaterThan",
  "value": "int"
}

NumberGreaterThanOrEquals の場合は、次の値を使用します。

{
  "operatorType": "NumberGreaterThanOrEquals",
  "value": "int"
}

NumberIn の場合は、次の値を使用します。

{
  "operatorType": "NumberIn",
  "values": [ "int" ]
}

NumberInRange の場合は、次を使用します。

{
  "operatorType": "NumberInRange",
  "values": [
    [ "int" ]
  ]
}

NumberLessThan の場合は、次の値を使用します。

{
  "operatorType": "NumberLessThan",
  "value": "int"
}

NumberLessThanOrEquals の場合は、次の値を使用します。

{
  "operatorType": "NumberLessThanOrEquals",
  "value": "int"
}

NumberNotIn の場合は、次の値を使用します。

{
  "operatorType": "NumberNotIn",
  "values": [ "int" ]
}

NumberNotInRange の場合は、次を使用します。

{
  "operatorType": "NumberNotInRange",
  "values": [
    [ "int" ]
  ]
}

StringBeginsWith の場合は、次の値を使用します。

{
  "operatorType": "StringBeginsWith",
  "values": [ "string" ]
}

StringContains の場合は、次を使用します。

{
  "operatorType": "StringContains",
  "values": [ "string" ]
}

StringEndsWith の場合は、次の値を使用します。

{
  "operatorType": "StringEndsWith",
  "values": [ "string" ]
}

StringIn の場合は、次の値を使用します。

{
  "operatorType": "StringIn",
  "values": [ "string" ]
}

StringNotBeginsWith の場合は、次を使用します。

{
  "operatorType": "StringNotBeginsWith",
  "values": [ "string" ]
}

StringNotContains の場合は、次のようにします。

{
  "operatorType": "StringNotContains",
  "values": [ "string" ]
}

StringNotEndsWith の場合は、次を使用します。

{
  "operatorType": "StringNotEndsWith",
  "values": [ "string" ]
}

StringNotIn の場合は、次の値を使用します。

{
  "operatorType": "StringNotIn",
  "values": [ "string" ]
}

プロパティ値

Microsoft.EventGrid/eventSubscriptions

Name Description Value
apiVersion API のバージョン 『2025-07-15-プレビュー』
name リソース名 string (必須)
properties イベント サブスクリプションのプロパティ。 EventSubscriptionProperties
リソースの種類 'Microsoft.EventGrid/eventSubscriptions'

AdvancedFilter

Name Description Value
キー フィルター処理するイベントのフィールド/プロパティ。 文字列
operatorType BoolEqualsAdvancedFilter型 'BoolEquals' に設定します。 IsNotNullAdvancedFilter 型の 'IsNotNull' に設定します。 IsNullOrUndefinedAdvancedFilter 型の 'IsNullOrUndefined' に設定します。 NumberGreaterThanAdvancedFilter型の 'NumberGreaterThan' に設定します。 NumberGreaterThanOrEqualsAdvancedFilter'NumberGreaterThanOrEquals' に設定します。 NumberInAdvancedFilter'NumberIn' に設定します。 NumberInRangeAdvancedFilter 型の 'NumberInRange' に設定します。 NumberLessThanAdvancedFilter'NumberLessThan' に設定します。 NumberLessThanOrEqualsAdvancedFilter'NumberLessThanOrEquals' に設定します。 NumberNotInAdvancedFilter'NumberNotIn' に設定します。 NumberNotInRangeAdvancedFilter 型の 'NumberNotInRange' に設定します。 StringBeginsWithAdvancedFilterの型 'StringBeginsWith' に設定します。 StringContainsAdvancedFilter'StringContains' に設定します。 StringEndsWithAdvancedFilterの型 'StringEndsWith' に設定します。 StringInAdvancedFilter'StringIn' に設定します。 型 StringNotBeginsWithAdvancedFilter の 'StringNotBeginsWith' に設定します。 StringNotContainsAdvancedFilter 型の 'StringNotContains' に設定します。 StringNotEndsWithAdvancedFilter 型の 'StringNotEndsWith' に設定します。 StringNotInAdvancedFilter'StringNotIn' に設定します。 'BoolEquals'
'IsNotNull'
'IsNullOrUndefined'
'NumberGreaterThan'
'NumberGreaterThanOrEquals'
'NumberIn'
'NumberInRange'
'NumberLessThan'
'NumberLessThanOrEquals'
'NumberNotIn'
'NumberNotInRange'
'StringBeginsWith'
'StringContains'
'StringEndsWith'
'StringIn'
'StringNotBeginsWith'
'StringNotContains'
'StringNotEndsWith'
'StringNotIn' (必須)

AzureFunctionEventSubscriptionDestination

Name Description Value
endpointType イベント サブスクリプションの送信先のエンドポイントの種類。 'AzureFunction' (必須)
properties Azure Function Properties of the event subscription destination. AzureFunctionEventSubscriptionDestinationProperties

AzureFunctionEventSubscriptionDestinationProperties

Name Description Value
deliveryAttributeMappings 配信属性の詳細。 DeliveryAttributeMapping[]
maxEventsPerBatch バッチあたりのイベントの最大数。 int
preferredBatchSizeInKilobytes 推奨されるバッチ サイズ (KB 単位)。 int
resourceId イベントサブスクリプションのAzure関数宛先のエンドポイントを表すAzureリソースID。 文字列

BoolEqualsAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'BoolEquals' (必須)
value ブール値のフィルター値。 bool

DeadLetterDestination

Name Description Value
endpointType StorageBlobDeadLetterDestinationの種類 'StorageBlob' に設定します。 'StorageBlob' (必須)

DeadLetterWithResourceIdentity

Name Description Value
deadLetterDestination イベント サブスクリプションに対してイベントを配信する必要がある送信先に関する情報。
親リソース (トピックまたはドメイン) のマネージド ID セットアップを使用して、配信不能時に使用される認証トークンを取得します。
DeadLetterDestination
ID 配信不能イベントの場合に使用する ID。 EventSubscriptionIdentity

DeliveryAttributeMapping

Name Description Value
name 配信属性またはヘッダーの名前。 文字列
DynamicDeliveryAttributeMapping 型を 'Dynamic' に設定します。 タイプ StaticDeliveryAttributeMapping を 'Static' に設定します。 'Dynamic'
'Static' (必須)

DeliveryWithResourceIdentity

Name Description Value
コピー先 イベント サブスクリプションに対してイベントを配信する必要がある送信先に関する情報。
親リソース (トピックまたはドメイン) のマネージド ID セットアップを使用して、配信中に使用される認証トークンを取得します。
EventSubscriptionDestination
ID イベントを配信するときに使用する ID。 EventSubscriptionIdentity

DynamicDeliveryAttributeMapping

Name Description Value
properties 動的配信属性マッピングのプロパティ。 DynamicDeliveryAttributeMappingProperties
配信属性またはヘッダー名の種類。 '動的' (必須)

DynamicDeliveryAttributeMappingProperties

Name Description Value
sourceField 属性値を含むイベントの JSON パス。 文字列

EventHubEventSubscriptionDestination

Name Description Value
endpointType イベント サブスクリプションの送信先のエンドポイントの種類。 'EventHub' (必須)
properties イベント サブスクリプションの送信先の Event Hub プロパティ。 EventHubEventSubscriptionDestinationProperties

EventHubEventSubscriptionDestinationProperties

Name Description Value
deliveryAttributeMappings 配信属性の詳細。 DeliveryAttributeMapping[]
resourceId イベントサブスクリプションのイベントハブ宛先のエンドポイントを表すAzureリソースID。 文字列

EventSubscriptionDestination

Name Description Value
endpointType AzureFunctionEventSubscriptionDestination 型の 'AzureFunction' に設定します。 EventHubEventSubscriptionDestination型として 'EventHub' に設定します。 HybridConnectionEventSubscriptionDestinationの種類 'HybridConnection' に設定します。 タイプ MonitorAlertEventSubscriptionDestination を 'MonitorAlert' に設定します。 タイプ NamespaceTopicEventSubscriptionDestination を 'NamespaceTopic' に設定します。 PartnerEventSubscriptionDestination 型の 'PartnerDestination' に設定します。 ServiceBusQueueEventSubscriptionDestination 型の 'ServiceBusQueue' に設定します。 ServiceBusTopicEventSubscriptionDestination 型の 'ServiceBusTopic' に設定します。 StorageQueueEventSubscriptionDestination種類として 'StorageQueue' に設定します。 WebHookEventSubscriptionDestination型として 'WebHook' に設定します。 'AzureFunction'
'EventHub'
'HybridConnection'
'MonitorAlert'
'NamespaceTopic'
'PartnerDestination'
'ServiceBusQueue'
'ServiceBusTopic'
'StorageQueue'
'WebHook' (必須)

EventSubscriptionFilter

Name Description Value
advancedFilters イベント サブスクリプションのフィルター処理に使用される高度なフィルターの配列。 AdvancedFilter[]
enableAdvancedFilteringOnArrays 特異な値を期待するのではなく、値の配列に対して高度なフィルターを評価できるようにします。 bool
includedEventTypes イベント サブスクリプションの一部である必要がある適用可能なイベントの種類の一覧。 すべての既定のイベントの種類をサブスクライブする場合は、IncludedEventTypes を null に設定します。 string[]
isSubjectCaseSensitive フィルターの SubjectBeginsWith プロパティと SubjectEndsWith プロパティを指定します。
は、大文字と小文字を区別して比較する必要があります。
bool
subjectBeginsWith リソース パス プレフィックスに基づいてイベント サブスクリプションのイベントをフィルター処理する省略可能な文字列。
この形式はイベントのpublisherによって異なります。
このパスでは、ワイルドカード文字はサポートされていません。
文字列
subjectEndsWith リソース パス サフィックスに基づいてイベント サブスクリプションのイベントをフィルター処理する省略可能な文字列。
このパスでは、ワイルドカード文字はサポートされていません。
文字列

EventSubscriptionIdentity

Name Description Value
federatedIdentityCredentialInfo リソース配信で使用されるフェデレーション ID 資格情報 (FIC) の詳細。 FederatedIdentityCredentialInfo
使用されるマネージド ID の種類。 'SystemAssigned' または 'UserAssigned' のいずれかを指定できます。 'SystemAssigned'
'UserAssigned'
userAssignedIdentity リソースに関連付けられているユーザー ID。 文字列

EventSubscriptionProperties

Name Description Value
deadLetterDestination イベント サブスクリプションの配信不能の宛先。 配信不能の宛先に配信できないイベントは、配信不能の宛先に送信されます。
Azure Event GridのIDを使って、配信やデッドレター処理時に使われている認証トークンを取得します。
DeadLetterDestination
deadLetterWithResourceIdentity イベント サブスクリプションの配信不能の宛先。 配信不能の宛先に配信できないイベントは、配信不能の宛先に送信されます。
親リソース (トピックまたはドメイン) のマネージド ID セットアップを使用して、配信/配信不能時に使用される認証トークンを取得します。
DeadLetterWithResourceIdentity
deliveryWithResourceIdentity イベント サブスクリプションに対してイベントを配信する必要がある送信先に関する情報。
親リソース (トピックまたはドメイン) のマネージド ID セットアップを使用して、配信/配信不能時に使用される認証トークンを取得します。
DeliveryWithResourceIdentity
コピー先 イベント サブスクリプションに対してイベントを配信する必要がある送信先に関する情報。
Azure Event GridのIDを使って、配信やデッドレター処理時に使われている認証トークンを取得します。
EventSubscriptionDestination
eventDeliverySchema イベント サブスクリプションのイベント配信スキーマ。 'CloudEventSchemaV1_0'
'CustomInputSchema'
'EventGridSchema'
expirationTimeUtc イベント サブスクリプションの有効期限。 文字列
フィルタ イベント サブスクリプションのフィルターに関する情報。 EventSubscriptionFilter
labels ユーザー定義ラベルの一覧。 string[]
retryPolicy イベントの再試行ポリシー。 これを使用して、イベントの配信試行の最大数と有効期間を構成できます。 RetryPolicy

FederatedIdentityCredentialInfo

Name Description Value
federatedClientId 連邦アイデンティティ認証(FIC)が関連付けられるマルチテナントMicrosoft Entra IDアプリケーション。 string

Constraints:
最小長 = 36
最大長 = 36
パターン = ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$ (必須)

HybridConnectionEventSubscriptionDestination

Name Description Value
endpointType イベント サブスクリプションの送信先のエンドポイントの種類。 'HybridConnection' (必須)
properties イベント サブスクリプションの送信先のハイブリッド接続プロパティ。 HybridConnectionEventSubscriptionDestinationProperties

HybridConnectionEventSubscriptionDestinationProperties

Name Description Value
deliveryAttributeMappings 配信属性の詳細。 DeliveryAttributeMapping[]
resourceId イベントサブスクリプションの目的地であるハイブリッド接続のAzureリソースID。 文字列

IsNotNullAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'IsNotNull' (必須)

IsNullOrUndefinedAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'IsNullOrUndefined' (必須)

MonitorAlertEventSubscriptionDestination

Name Description Value
endpointType イベント サブスクリプションの送信先のエンドポイントの種類。 'MonitorAlert' (必須)
properties イベント サブスクリプションの送信先のアラート プロパティを監視します。 MonitorAlertEventSubscriptionDestinationProperties

MonitorAlertEventSubscriptionDestinationProperties

Name Description Value
actionGroups このイベント サブスクリプションを通じて発生したすべてのアラートでトリガーされるアクション グループの ARM ID の一覧。
各リソース ARM ID は、/subscriptions/{AzureSubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Insights/actionGroups/{ActionGroupName} というパターンに従う必要があります。
string[]
description このイベント サブスクリプションを通じて発生したすべてのアラートにアタッチされる説明。 文字列
severity このイベント サブスクリプションを通じて発生したすべてのアラートにアタッチされる重大度。
このフィールドは指定する必要があります。
'Sev0'
'Sev1'
'Sev2'
'Sev3'
'Sev4'

NamespaceTopicEventSubscriptionDestination

Name Description Value
endpointType イベント サブスクリプションの送信先のエンドポイントの種類。 'NamespaceTopic' (必須)
properties イベント サブスクリプションの送信先の名前空間トピックのプロパティ。 NamespaceTopicEventSubscriptionDestinationProperties

NamespaceTopicEventSubscriptionDestinationProperties

Name Description Value
resourceId イベントサブスクリプションのイベントグリッド名前空間トピック宛先のエンドポイントを表すAzureリソースID。
このフィールドは必須であり、一覧表示されている名前空間トピック リソースが既に存在している必要があります。
リソース ARM ID は、/subscriptions/{AzureSubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.EventGrid/namespaces/{NamespaceName}/topics/{TopicName} というパターンに従う必要があります。
文字列

NumberGreaterThanAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'NumberGreaterThan' (必須)
value フィルター値。 int

NumberGreaterThanOrEqualsAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'NumberGreaterThanOrEquals' (必須)
value フィルター値。 int

NumberInAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'NumberIn' (必須)
values フィルター値のセット。 int[]

NumberInRangeAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'NumberInRange' (必須)
values フィルター値のセット。 int[][]

NumberLessThanAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'NumberLessThan' (必須)
value フィルター値。 int

NumberLessThanOrEqualsAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'NumberLessThanOrEquals' (必須)
value フィルター値。 int

NumberNotInAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'NumberNotIn' (必須)
values フィルター値のセット。 int[]

NumberNotInRangeAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'NumberNotInRange' (必須)
values フィルター値のセット。 int[][]

PartnerEventSubscriptionDestination

Name Description Value
endpointType イベント サブスクリプションの送信先のエンドポイントの種類。 'PartnerDestination' (必須)
properties イベント サブスクリプションの送信先のパートナー変換先のプロパティ。 PartnerEventSubscriptionDestinationProperties

PartnerEventSubscriptionDestinationProperties

Name Description Value
resourceId イベントサブスクリプションのパートナーデスティネーションのエンドポイントを表すAzureリソースID。 文字列

RetryPolicy

Name Description Value
eventTimeToLiveInMinutes イベントの Time To Live (分単位)。 int
maxDeliveryAttempts イベントの配信再試行の最大数。 int

ServiceBusQueueEventSubscriptionDestination

Name Description Value
endpointType イベント サブスクリプションの送信先のエンドポイントの種類。 'ServiceBusQueue' (必須)
properties イベントのService Busプロパティ サブスクリプション先。 ServiceBusQueueEventSubscriptionDestinationProperties

ServiceBusQueueEventSubscriptionDestinationProperties

Name Description Value
deliveryAttributeMappings 配信属性の詳細。 DeliveryAttributeMapping[]
resourceId イベントサブスクリプションのService Bus宛先のエンドポイントを表すAzureリソースID。 文字列

ServiceBusTopicEventSubscriptionDestination

Name Description Value
endpointType イベント サブスクリプションの送信先のエンドポイントの種類。 'ServiceBusTopic' (必須)
properties Service Bus トピック イベントのサブスクリプション先のプロパティ。 ServiceBusTopicEventSubscriptionDestinationProperties

ServiceBusTopicEventSubscriptionDestinationProperties

Name Description Value
deliveryAttributeMappings 配信属性の詳細。 DeliveryAttributeMapping[]
resourceId イベントサブスクリプションのService Busトピック宛先のエンドポイントを表すAzureリソースID。 文字列

StaticDeliveryAttributeMapping

Name Description Value
properties 静的配信属性マッピングのプロパティ。 StaticDeliveryAttributeMappingProperties
配信属性またはヘッダー名の種類。 'Static' (必須)

StaticDeliveryAttributeMappingProperties

Name Description Value
isSecret 属性に機密情報が含まれているかどうかを示すブール型フラグ。 bool
value 配信属性の値。 文字列

StorageBlobDeadLetterDestination

Name Description Value
endpointType 配信不能宛先のエンドポイントの種類 'StorageBlob' (必須)
properties Storage Blobベースのデッドレター宛先のプロパティ StorageBlobDeadLetterDestinationProperties

StorageBlobDeadLetterDestinationProperties

Name Description Value
blobContainerName デッドレターイベントの宛先となるStorageブロブコンテナの名前 文字列
resourceId デッドレターイベントの目的地となるストレージアカウントのAzureリソースID 文字列

StorageQueueEventSubscriptionDestination

Name Description Value
endpointType イベント サブスクリプションの送信先のエンドポイントの種類。 'StorageQueue' (必須)
properties Storage Queue イベントサブスクリプション宛先のプロパティ。 StorageQueueEventSubscriptionDestinationProperties

StorageQueueEventSubscriptionDestinationProperties

Name Description Value
queueMessageTimeToLiveInSeconds Storage queueのメッセージの生存時間は秒単位です。 メッセージの Time To Live が Infinite であることを示すために -1 を使用する場合を除き、この値を 0 または負にすることはできません。 int
queueName イベントサブスクリプションの宛先であるstorageアカウントの下にあるStorageキューの名前。 文字列
resourceId イベントサブスクリプションの宛先となるキューを含むストレージアカウントのAzureリソースID。 文字列

StringBeginsWithAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'StringBeginsWith' (必須)
values フィルター値のセット。 string[]

StringContainsAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'StringContains' (必須)
values フィルター値のセット。 string[]

StringEndsWithAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'StringEndsWith' (必須)
values フィルター値のセット。 string[]

StringInAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'StringIn' (必須)
values フィルター値のセット。 string[]

StringNotBeginsWithAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'StringNotBeginsWith' (必須)
values フィルター値のセット。 string[]

StringNotContainsAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'StringNotContains' (必須)
values フィルター値のセット。 string[]

StringNotEndsWithAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'StringNotEndsWith' (必須)
values フィルター値のセット。 string[]

StringNotInAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'StringNotIn' (必須)
values フィルター値のセット。 string[]

WebHookEventSubscriptionDestination

Name Description Value
endpointType イベント サブスクリプションの送信先のエンドポイントの種類。 'WebHook' (必須)
properties イベント サブスクリプションの送信先の WebHook プロパティ。 WebHookEventSubscriptionDestinationProperties

WebHookEventSubscriptionDestinationProperties

Name Description Value
azureActiveDirectoryApplicationIdOrUri Microsoft Entra ID Application IDまたはURIを使って、デリバリーリクエストに含まれるベアラートークンとしてアクセストークンを取得します。 文字列
azureActiveDirectoryTenantId Microsoft Entra ID Tenant IDを使って、デリバリーリクエストのベアラートークンとしてアクセストークンを取得します。 文字列
deliveryAttributeMappings 配信属性の詳細。 DeliveryAttributeMapping[]
endpointUrl イベント サブスクリプションの送信先のエンドポイントを表す URL。 string

Constraints:
機密性の高い値。 セキュリティで保護されたパラメーターとして渡します。
maxEventsPerBatch バッチあたりのイベントの最大数。 int
minimumTlsVersionAllowed Webhook エンドポイントでサポートされる必要がある最小 TLS バージョン '1.0'
'1.1'
'1.2'
preferredBatchSizeInKilobytes 推奨されるバッチ サイズ (KB 単位)。 int

使用例

Azure Quickstart Templates

以下のAzureクイックスタートテンプレートはこのリソースタイプを展開します。

Template Description
Create Azure Event Grid Custom Topic and Queue Subscription

展開Azure
Azure Event Gridのカスタムトピックとサービスバスキューサブスクリプションを作成します。 テンプレートはもともと Markus Meyer によって作成されました。
Create Azure Event Grid カスタムトピックとサブスクリプション

展開Azure
Azure Event Gridのカスタムトピックとwebhookサブスクリプションを作成します。 元は John Downs によって作成されたテンプレートです。
Create Azure Event Grid Custom Topic Subscription

展開Azure
Azure Event Gridのカスタムトピックとサービスバストピックのサブスクリプションを作成します。 テンプレートはもともと Markus Meyer によって作成されました。
Create Event Grid custom topic and event hub handler

展開Azure
Azure Event Gridのカスタムトピックとイベントハブを作成してイベントを処理します。
Create Event Grid for Resource events

展開Azure
リソースグループまたはAzureサブスクリプションのいずれかにイベントグリッドのサブスクリプションを作成できます。
Custom Azure Event Grid トピック/サブスクリプション with CloudEvents

展開Azure
カスタムのAzure Event Gridトピック、CloudEventsスキーマを持つWebhookサブスクリプション、イベントハンドラとしてのLogic Appを作成します。 元はジャスティン・ユーによって作成されたテンプレート。

Terraform (AzAPI プロバイダー) リソース定義

eventSubscriptions リソースの種類は、次をターゲットとする操作と共にデプロイできます。

  • * * *

各 API バージョンで変更されたプロパティの一覧については、変更ログの参照してください。

リソースの形式

Microsoft.EventGrid/eventSubscriptions リソースを作成するには、次の Terraform をテンプレートに追加します。

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.EventGrid/eventSubscriptions@2025-07-15-preview"
  name = "string"
  parent_id = "string"
  body = {
    properties = {
      deadLetterDestination = {
        endpointType = "string"
        // For remaining properties, see DeadLetterDestination objects
      }
      deadLetterWithResourceIdentity = {
        deadLetterDestination = {
          endpointType = "string"
          // For remaining properties, see DeadLetterDestination objects
        }
        identity = {
          federatedIdentityCredentialInfo = {
            federatedClientId = "string"
          }
          type = "string"
          userAssignedIdentity = "string"
        }
      }
      deliveryWithResourceIdentity = {
        destination = {
          endpointType = "string"
          // For remaining properties, see EventSubscriptionDestination objects
        }
        identity = {
          federatedIdentityCredentialInfo = {
            federatedClientId = "string"
          }
          type = "string"
          userAssignedIdentity = "string"
        }
      }
      destination = {
        endpointType = "string"
        // For remaining properties, see EventSubscriptionDestination objects
      }
      eventDeliverySchema = "string"
      expirationTimeUtc = "string"
      filter = {
        advancedFilters = [
          {
            key = "string"
            operatorType = "string"
            // For remaining properties, see AdvancedFilter objects
          }
        ]
        enableAdvancedFilteringOnArrays = bool
        includedEventTypes = [
          "string"
        ]
        isSubjectCaseSensitive = bool
        subjectBeginsWith = "string"
        subjectEndsWith = "string"
      }
      labels = [
        "string"
      ]
      retryPolicy = {
        eventTimeToLiveInMinutes = int
        maxDeliveryAttempts = int
      }
    }
  }
}

DeliveryAttributeMapping オブジェクト

プロパティを設定して、オブジェクトの型を指定します。

動的の場合は、以下を使用します。

{
  properties = {
    sourceField = "string"
  }
  type = "Dynamic"
}

静的の場合は、次を使用します。

{
  properties = {
    isSecret = bool
    value = "string"
  }
  type = "Static"
}

DeadLetterDestination オブジェクト

endpointType プロパティを設定して、オブジェクトの種類を指定します。

StorageBlobを する場合は、次を使用します。

{
  endpointType = "StorageBlob"
  properties = {
    blobContainerName = "string"
    resourceId = "string"
  }
}

EventSubscriptionDestination オブジェクト

endpointType プロパティを設定して、オブジェクトの種類を指定します。

AzureFunction の場合は、次を使用します。

{
  endpointType = "AzureFunction"
  properties = {
    deliveryAttributeMappings = [
      {
        name = "string"
        type = "string"
        // For remaining properties, see DeliveryAttributeMapping objects
      }
    ]
    maxEventsPerBatch = int
    preferredBatchSizeInKilobytes = int
    resourceId = "string"
  }
}

EventHubの場合は、次を使用します。

{
  endpointType = "EventHub"
  properties = {
    deliveryAttributeMappings = [
      {
        name = "string"
        type = "string"
        // For remaining properties, see DeliveryAttributeMapping objects
      }
    ]
    resourceId = "string"
  }
}

HybridConnection の場合は、次を使用します。

{
  endpointType = "HybridConnection"
  properties = {
    deliveryAttributeMappings = [
      {
        name = "string"
        type = "string"
        // For remaining properties, see DeliveryAttributeMapping objects
      }
    ]
    resourceId = "string"
  }
}

MonitorAlert の場合は、次を使用します。

{
  endpointType = "MonitorAlert"
  properties = {
    actionGroups = [
      "string"
    ]
    description = "string"
    severity = "string"
  }
}

NamespaceTopicには、以下を使用します。

{
  endpointType = "NamespaceTopic"
  properties = {
    resourceId = "string"
  }
}

PartnerDestination には、次を使用します。

{
  endpointType = "PartnerDestination"
  properties = {
    resourceId = "string"
  }
}

ServiceBusQueue の場合は、次を使用します。

{
  endpointType = "ServiceBusQueue"
  properties = {
    deliveryAttributeMappings = [
      {
        name = "string"
        type = "string"
        // For remaining properties, see DeliveryAttributeMapping objects
      }
    ]
    resourceId = "string"
  }
}

ServiceBusTopic の場合は、次を使用します。

{
  endpointType = "ServiceBusTopic"
  properties = {
    deliveryAttributeMappings = [
      {
        name = "string"
        type = "string"
        // For remaining properties, see DeliveryAttributeMapping objects
      }
    ]
    resourceId = "string"
  }
}

StorageQueue の場合は、次を使用します。

{
  endpointType = "StorageQueue"
  properties = {
    queueMessageTimeToLiveInSeconds = int
    queueName = "string"
    resourceId = "string"
  }
}

WebHook の場合は、次を使用します。

{
  endpointType = "WebHook"
  properties = {
    azureActiveDirectoryApplicationIdOrUri = "string"
    azureActiveDirectoryTenantId = "string"
    deliveryAttributeMappings = [
      {
        name = "string"
        type = "string"
        // For remaining properties, see DeliveryAttributeMapping objects
      }
    ]
    endpointUrl = "string"
    maxEventsPerBatch = int
    minimumTlsVersionAllowed = "string"
    preferredBatchSizeInKilobytes = int
  }
}

AdvancedFilter オブジェクト

operatorType プロパティを設定して、オブジェクトの種類を指定します。

BoolEquals の場合は、次の値を使用します。

{
  operatorType = "BoolEquals"
  value = bool
}

IsNotNull の場合は、次を使用します。

{
  operatorType = "IsNotNull"
}

IsNullOrUndefined の場合は、次のようにします。

{
  operatorType = "IsNullOrUndefined"
}

NumberGreaterThan の場合は、次の値を使用します。

{
  operatorType = "NumberGreaterThan"
  value = int
}

NumberGreaterThanOrEquals の場合は、次の値を使用します。

{
  operatorType = "NumberGreaterThanOrEquals"
  value = int
}

NumberIn の場合は、次の値を使用します。

{
  operatorType = "NumberIn"
  values = [
    int
  ]
}

NumberInRange の場合は、次を使用します。

{
  operatorType = "NumberInRange"
  values = [
    [
      int
    ]
  ]
}

NumberLessThan の場合は、次の値を使用します。

{
  operatorType = "NumberLessThan"
  value = int
}

NumberLessThanOrEquals の場合は、次の値を使用します。

{
  operatorType = "NumberLessThanOrEquals"
  value = int
}

NumberNotIn の場合は、次の値を使用します。

{
  operatorType = "NumberNotIn"
  values = [
    int
  ]
}

NumberNotInRange の場合は、次を使用します。

{
  operatorType = "NumberNotInRange"
  values = [
    [
      int
    ]
  ]
}

StringBeginsWith の場合は、次の値を使用します。

{
  operatorType = "StringBeginsWith"
  values = [
    "string"
  ]
}

StringContains の場合は、次を使用します。

{
  operatorType = "StringContains"
  values = [
    "string"
  ]
}

StringEndsWith の場合は、次の値を使用します。

{
  operatorType = "StringEndsWith"
  values = [
    "string"
  ]
}

StringIn の場合は、次の値を使用します。

{
  operatorType = "StringIn"
  values = [
    "string"
  ]
}

StringNotBeginsWith の場合は、次を使用します。

{
  operatorType = "StringNotBeginsWith"
  values = [
    "string"
  ]
}

StringNotContains の場合は、次のようにします。

{
  operatorType = "StringNotContains"
  values = [
    "string"
  ]
}

StringNotEndsWith の場合は、次を使用します。

{
  operatorType = "StringNotEndsWith"
  values = [
    "string"
  ]
}

StringNotIn の場合は、次の値を使用します。

{
  operatorType = "StringNotIn"
  values = [
    "string"
  ]
}

プロパティ値

Microsoft.EventGrid/eventSubscriptions

Name Description Value
name リソース名 string (必須)
parent_id この拡張リソースを適用するリソースの ID。 string (必須)
properties イベント サブスクリプションのプロパティ。 EventSubscriptionProperties
リソースの種類 "Microsoft.EventGrid/eventSubscriptions@2025-07-15-preview"

AdvancedFilter

Name Description Value
キー フィルター処理するイベントのフィールド/プロパティ。 文字列
operatorType BoolEqualsAdvancedFilter型 'BoolEquals' に設定します。 IsNotNullAdvancedFilter 型の 'IsNotNull' に設定します。 IsNullOrUndefinedAdvancedFilter 型の 'IsNullOrUndefined' に設定します。 NumberGreaterThanAdvancedFilter型の 'NumberGreaterThan' に設定します。 NumberGreaterThanOrEqualsAdvancedFilter'NumberGreaterThanOrEquals' に設定します。 NumberInAdvancedFilter'NumberIn' に設定します。 NumberInRangeAdvancedFilter 型の 'NumberInRange' に設定します。 NumberLessThanAdvancedFilter'NumberLessThan' に設定します。 NumberLessThanOrEqualsAdvancedFilter'NumberLessThanOrEquals' に設定します。 NumberNotInAdvancedFilter'NumberNotIn' に設定します。 NumberNotInRangeAdvancedFilter 型の 'NumberNotInRange' に設定します。 StringBeginsWithAdvancedFilterの型 'StringBeginsWith' に設定します。 StringContainsAdvancedFilter'StringContains' に設定します。 StringEndsWithAdvancedFilterの型 'StringEndsWith' に設定します。 StringInAdvancedFilter'StringIn' に設定します。 型 StringNotBeginsWithAdvancedFilter の 'StringNotBeginsWith' に設定します。 StringNotContainsAdvancedFilter 型の 'StringNotContains' に設定します。 StringNotEndsWithAdvancedFilter 型の 'StringNotEndsWith' に設定します。 StringNotInAdvancedFilter'StringNotIn' に設定します。 'BoolEquals'
'IsNotNull'
'IsNullOrUndefined'
'NumberGreaterThan'
'NumberGreaterThanOrEquals'
'NumberIn'
'NumberInRange'
'NumberLessThan'
'NumberLessThanOrEquals'
'NumberNotIn'
'NumberNotInRange'
'StringBeginsWith'
'StringContains'
'StringEndsWith'
'StringIn'
'StringNotBeginsWith'
'StringNotContains'
'StringNotEndsWith'
'StringNotIn' (必須)

AzureFunctionEventSubscriptionDestination

Name Description Value
endpointType イベント サブスクリプションの送信先のエンドポイントの種類。 'AzureFunction' (必須)
properties Azure Function Properties of the event subscription destination. AzureFunctionEventSubscriptionDestinationProperties

AzureFunctionEventSubscriptionDestinationProperties

Name Description Value
deliveryAttributeMappings 配信属性の詳細。 DeliveryAttributeMapping[]
maxEventsPerBatch バッチあたりのイベントの最大数。 int
preferredBatchSizeInKilobytes 推奨されるバッチ サイズ (KB 単位)。 int
resourceId イベントサブスクリプションのAzure関数宛先のエンドポイントを表すAzureリソースID。 文字列

BoolEqualsAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'BoolEquals' (必須)
value ブール値のフィルター値。 bool

DeadLetterDestination

Name Description Value
endpointType StorageBlobDeadLetterDestinationの種類 'StorageBlob' に設定します。 'StorageBlob' (必須)

DeadLetterWithResourceIdentity

Name Description Value
deadLetterDestination イベント サブスクリプションに対してイベントを配信する必要がある送信先に関する情報。
親リソース (トピックまたはドメイン) のマネージド ID セットアップを使用して、配信不能時に使用される認証トークンを取得します。
DeadLetterDestination
ID 配信不能イベントの場合に使用する ID。 EventSubscriptionIdentity

DeliveryAttributeMapping

Name Description Value
name 配信属性またはヘッダーの名前。 文字列
DynamicDeliveryAttributeMapping 型を 'Dynamic' に設定します。 タイプ StaticDeliveryAttributeMapping を 'Static' に設定します。 'Dynamic'
'Static' (必須)

DeliveryWithResourceIdentity

Name Description Value
コピー先 イベント サブスクリプションに対してイベントを配信する必要がある送信先に関する情報。
親リソース (トピックまたはドメイン) のマネージド ID セットアップを使用して、配信中に使用される認証トークンを取得します。
EventSubscriptionDestination
ID イベントを配信するときに使用する ID。 EventSubscriptionIdentity

DynamicDeliveryAttributeMapping

Name Description Value
properties 動的配信属性マッピングのプロパティ。 DynamicDeliveryAttributeMappingProperties
配信属性またはヘッダー名の種類。 '動的' (必須)

DynamicDeliveryAttributeMappingProperties

Name Description Value
sourceField 属性値を含むイベントの JSON パス。 文字列

EventHubEventSubscriptionDestination

Name Description Value
endpointType イベント サブスクリプションの送信先のエンドポイントの種類。 'EventHub' (必須)
properties イベント サブスクリプションの送信先の Event Hub プロパティ。 EventHubEventSubscriptionDestinationProperties

EventHubEventSubscriptionDestinationProperties

Name Description Value
deliveryAttributeMappings 配信属性の詳細。 DeliveryAttributeMapping[]
resourceId イベントサブスクリプションのイベントハブ宛先のエンドポイントを表すAzureリソースID。 文字列

EventSubscriptionDestination

Name Description Value
endpointType AzureFunctionEventSubscriptionDestination 型の 'AzureFunction' に設定します。 EventHubEventSubscriptionDestination型として 'EventHub' に設定します。 HybridConnectionEventSubscriptionDestinationの種類 'HybridConnection' に設定します。 タイプ MonitorAlertEventSubscriptionDestination を 'MonitorAlert' に設定します。 タイプ NamespaceTopicEventSubscriptionDestination を 'NamespaceTopic' に設定します。 PartnerEventSubscriptionDestination 型の 'PartnerDestination' に設定します。 ServiceBusQueueEventSubscriptionDestination 型の 'ServiceBusQueue' に設定します。 ServiceBusTopicEventSubscriptionDestination 型の 'ServiceBusTopic' に設定します。 StorageQueueEventSubscriptionDestination種類として 'StorageQueue' に設定します。 WebHookEventSubscriptionDestination型として 'WebHook' に設定します。 'AzureFunction'
'EventHub'
'HybridConnection'
'MonitorAlert'
'NamespaceTopic'
'PartnerDestination'
'ServiceBusQueue'
'ServiceBusTopic'
'StorageQueue'
'WebHook' (必須)

EventSubscriptionFilter

Name Description Value
advancedFilters イベント サブスクリプションのフィルター処理に使用される高度なフィルターの配列。 AdvancedFilter[]
enableAdvancedFilteringOnArrays 特異な値を期待するのではなく、値の配列に対して高度なフィルターを評価できるようにします。 bool
includedEventTypes イベント サブスクリプションの一部である必要がある適用可能なイベントの種類の一覧。 すべての既定のイベントの種類をサブスクライブする場合は、IncludedEventTypes を null に設定します。 string[]
isSubjectCaseSensitive フィルターの SubjectBeginsWith プロパティと SubjectEndsWith プロパティを指定します。
は、大文字と小文字を区別して比較する必要があります。
bool
subjectBeginsWith リソース パス プレフィックスに基づいてイベント サブスクリプションのイベントをフィルター処理する省略可能な文字列。
この形式はイベントのpublisherによって異なります。
このパスでは、ワイルドカード文字はサポートされていません。
文字列
subjectEndsWith リソース パス サフィックスに基づいてイベント サブスクリプションのイベントをフィルター処理する省略可能な文字列。
このパスでは、ワイルドカード文字はサポートされていません。
文字列

EventSubscriptionIdentity

Name Description Value
federatedIdentityCredentialInfo リソース配信で使用されるフェデレーション ID 資格情報 (FIC) の詳細。 FederatedIdentityCredentialInfo
使用されるマネージド ID の種類。 'SystemAssigned' または 'UserAssigned' のいずれかを指定できます。 'SystemAssigned'
'UserAssigned'
userAssignedIdentity リソースに関連付けられているユーザー ID。 文字列

EventSubscriptionProperties

Name Description Value
deadLetterDestination イベント サブスクリプションの配信不能の宛先。 配信不能の宛先に配信できないイベントは、配信不能の宛先に送信されます。
Azure Event GridのIDを使って、配信やデッドレター処理時に使われている認証トークンを取得します。
DeadLetterDestination
deadLetterWithResourceIdentity イベント サブスクリプションの配信不能の宛先。 配信不能の宛先に配信できないイベントは、配信不能の宛先に送信されます。
親リソース (トピックまたはドメイン) のマネージド ID セットアップを使用して、配信/配信不能時に使用される認証トークンを取得します。
DeadLetterWithResourceIdentity
deliveryWithResourceIdentity イベント サブスクリプションに対してイベントを配信する必要がある送信先に関する情報。
親リソース (トピックまたはドメイン) のマネージド ID セットアップを使用して、配信/配信不能時に使用される認証トークンを取得します。
DeliveryWithResourceIdentity
コピー先 イベント サブスクリプションに対してイベントを配信する必要がある送信先に関する情報。
Azure Event GridのIDを使って、配信やデッドレター処理時に使われている認証トークンを取得します。
EventSubscriptionDestination
eventDeliverySchema イベント サブスクリプションのイベント配信スキーマ。 'CloudEventSchemaV1_0'
'CustomInputSchema'
'EventGridSchema'
expirationTimeUtc イベント サブスクリプションの有効期限。 文字列
フィルタ イベント サブスクリプションのフィルターに関する情報。 EventSubscriptionFilter
labels ユーザー定義ラベルの一覧。 string[]
retryPolicy イベントの再試行ポリシー。 これを使用して、イベントの配信試行の最大数と有効期間を構成できます。 RetryPolicy

FederatedIdentityCredentialInfo

Name Description Value
federatedClientId 連邦アイデンティティ認証(FIC)が関連付けられるマルチテナントMicrosoft Entra IDアプリケーション。 string

Constraints:
最小長 = 36
最大長 = 36
パターン = ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$ (必須)

HybridConnectionEventSubscriptionDestination

Name Description Value
endpointType イベント サブスクリプションの送信先のエンドポイントの種類。 'HybridConnection' (必須)
properties イベント サブスクリプションの送信先のハイブリッド接続プロパティ。 HybridConnectionEventSubscriptionDestinationProperties

HybridConnectionEventSubscriptionDestinationProperties

Name Description Value
deliveryAttributeMappings 配信属性の詳細。 DeliveryAttributeMapping[]
resourceId イベントサブスクリプションの目的地であるハイブリッド接続のAzureリソースID。 文字列

IsNotNullAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'IsNotNull' (必須)

IsNullOrUndefinedAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'IsNullOrUndefined' (必須)

MonitorAlertEventSubscriptionDestination

Name Description Value
endpointType イベント サブスクリプションの送信先のエンドポイントの種類。 'MonitorAlert' (必須)
properties イベント サブスクリプションの送信先のアラート プロパティを監視します。 MonitorAlertEventSubscriptionDestinationProperties

MonitorAlertEventSubscriptionDestinationProperties

Name Description Value
actionGroups このイベント サブスクリプションを通じて発生したすべてのアラートでトリガーされるアクション グループの ARM ID の一覧。
各リソース ARM ID は、/subscriptions/{AzureSubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Insights/actionGroups/{ActionGroupName} というパターンに従う必要があります。
string[]
description このイベント サブスクリプションを通じて発生したすべてのアラートにアタッチされる説明。 文字列
severity このイベント サブスクリプションを通じて発生したすべてのアラートにアタッチされる重大度。
このフィールドは指定する必要があります。
'Sev0'
'Sev1'
'Sev2'
'Sev3'
'Sev4'

NamespaceTopicEventSubscriptionDestination

Name Description Value
endpointType イベント サブスクリプションの送信先のエンドポイントの種類。 'NamespaceTopic' (必須)
properties イベント サブスクリプションの送信先の名前空間トピックのプロパティ。 NamespaceTopicEventSubscriptionDestinationProperties

NamespaceTopicEventSubscriptionDestinationProperties

Name Description Value
resourceId イベントサブスクリプションのイベントグリッド名前空間トピック宛先のエンドポイントを表すAzureリソースID。
このフィールドは必須であり、一覧表示されている名前空間トピック リソースが既に存在している必要があります。
リソース ARM ID は、/subscriptions/{AzureSubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.EventGrid/namespaces/{NamespaceName}/topics/{TopicName} というパターンに従う必要があります。
文字列

NumberGreaterThanAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'NumberGreaterThan' (必須)
value フィルター値。 int

NumberGreaterThanOrEqualsAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'NumberGreaterThanOrEquals' (必須)
value フィルター値。 int

NumberInAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'NumberIn' (必須)
values フィルター値のセット。 int[]

NumberInRangeAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'NumberInRange' (必須)
values フィルター値のセット。 int[][]

NumberLessThanAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'NumberLessThan' (必須)
value フィルター値。 int

NumberLessThanOrEqualsAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'NumberLessThanOrEquals' (必須)
value フィルター値。 int

NumberNotInAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'NumberNotIn' (必須)
values フィルター値のセット。 int[]

NumberNotInRangeAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'NumberNotInRange' (必須)
values フィルター値のセット。 int[][]

PartnerEventSubscriptionDestination

Name Description Value
endpointType イベント サブスクリプションの送信先のエンドポイントの種類。 'PartnerDestination' (必須)
properties イベント サブスクリプションの送信先のパートナー変換先のプロパティ。 PartnerEventSubscriptionDestinationProperties

PartnerEventSubscriptionDestinationProperties

Name Description Value
resourceId イベントサブスクリプションのパートナーデスティネーションのエンドポイントを表すAzureリソースID。 文字列

RetryPolicy

Name Description Value
eventTimeToLiveInMinutes イベントの Time To Live (分単位)。 int
maxDeliveryAttempts イベントの配信再試行の最大数。 int

ServiceBusQueueEventSubscriptionDestination

Name Description Value
endpointType イベント サブスクリプションの送信先のエンドポイントの種類。 'ServiceBusQueue' (必須)
properties イベントのService Busプロパティ サブスクリプション先。 ServiceBusQueueEventSubscriptionDestinationProperties

ServiceBusQueueEventSubscriptionDestinationProperties

Name Description Value
deliveryAttributeMappings 配信属性の詳細。 DeliveryAttributeMapping[]
resourceId イベントサブスクリプションのService Bus宛先のエンドポイントを表すAzureリソースID。 文字列

ServiceBusTopicEventSubscriptionDestination

Name Description Value
endpointType イベント サブスクリプションの送信先のエンドポイントの種類。 'ServiceBusTopic' (必須)
properties Service Bus トピック イベントのサブスクリプション先のプロパティ。 ServiceBusTopicEventSubscriptionDestinationProperties

ServiceBusTopicEventSubscriptionDestinationProperties

Name Description Value
deliveryAttributeMappings 配信属性の詳細。 DeliveryAttributeMapping[]
resourceId イベントサブスクリプションのService Busトピック宛先のエンドポイントを表すAzureリソースID。 文字列

StaticDeliveryAttributeMapping

Name Description Value
properties 静的配信属性マッピングのプロパティ。 StaticDeliveryAttributeMappingProperties
配信属性またはヘッダー名の種類。 'Static' (必須)

StaticDeliveryAttributeMappingProperties

Name Description Value
isSecret 属性に機密情報が含まれているかどうかを示すブール型フラグ。 bool
value 配信属性の値。 文字列

StorageBlobDeadLetterDestination

Name Description Value
endpointType 配信不能宛先のエンドポイントの種類 'StorageBlob' (必須)
properties Storage Blobベースのデッドレター宛先のプロパティ StorageBlobDeadLetterDestinationProperties

StorageBlobDeadLetterDestinationProperties

Name Description Value
blobContainerName デッドレターイベントの宛先となるStorageブロブコンテナの名前 文字列
resourceId デッドレターイベントの目的地となるストレージアカウントのAzureリソースID 文字列

StorageQueueEventSubscriptionDestination

Name Description Value
endpointType イベント サブスクリプションの送信先のエンドポイントの種類。 'StorageQueue' (必須)
properties Storage Queue イベントサブスクリプション宛先のプロパティ。 StorageQueueEventSubscriptionDestinationProperties

StorageQueueEventSubscriptionDestinationProperties

Name Description Value
queueMessageTimeToLiveInSeconds Storage queueのメッセージの生存時間は秒単位です。 メッセージの Time To Live が Infinite であることを示すために -1 を使用する場合を除き、この値を 0 または負にすることはできません。 int
queueName イベントサブスクリプションの宛先であるstorageアカウントの下にあるStorageキューの名前。 文字列
resourceId イベントサブスクリプションの宛先となるキューを含むストレージアカウントのAzureリソースID。 文字列

StringBeginsWithAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'StringBeginsWith' (必須)
values フィルター値のセット。 string[]

StringContainsAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'StringContains' (必須)
values フィルター値のセット。 string[]

StringEndsWithAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'StringEndsWith' (必須)
values フィルター値のセット。 string[]

StringInAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'StringIn' (必須)
values フィルター値のセット。 string[]

StringNotBeginsWithAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'StringNotBeginsWith' (必須)
values フィルター値のセット。 string[]

StringNotContainsAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'StringNotContains' (必須)
values フィルター値のセット。 string[]

StringNotEndsWithAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'StringNotEndsWith' (必須)
values フィルター値のセット。 string[]

StringNotInAdvancedFilter

Name Description Value
operatorType フィルター処理に使用される演算子の種類 (NumberIn、StringContains、BoolEquals など)。 'StringNotIn' (必須)
values フィルター値のセット。 string[]

WebHookEventSubscriptionDestination

Name Description Value
endpointType イベント サブスクリプションの送信先のエンドポイントの種類。 'WebHook' (必須)
properties イベント サブスクリプションの送信先の WebHook プロパティ。 WebHookEventSubscriptionDestinationProperties

WebHookEventSubscriptionDestinationProperties

Name Description Value
azureActiveDirectoryApplicationIdOrUri Microsoft Entra ID Application IDまたはURIを使って、デリバリーリクエストに含まれるベアラートークンとしてアクセストークンを取得します。 文字列
azureActiveDirectoryTenantId Microsoft Entra ID Tenant IDを使って、デリバリーリクエストのベアラートークンとしてアクセストークンを取得します。 文字列
deliveryAttributeMappings 配信属性の詳細。 DeliveryAttributeMapping[]
endpointUrl イベント サブスクリプションの送信先のエンドポイントを表す URL。 string

Constraints:
機密性の高い値。 セキュリティで保護されたパラメーターとして渡します。
maxEventsPerBatch バッチあたりのイベントの最大数。 int
minimumTlsVersionAllowed Webhook エンドポイントでサポートされる必要がある最小 TLS バージョン '1.0'
'1.1'
'1.2'
preferredBatchSizeInKilobytes 推奨されるバッチ サイズ (KB 単位)。 int

使用例

Terraformサンプル

EventGrid イベント サブスクリプションのデプロイの基本的な例。

terraform {
  required_providers {
    azapi = {
      source = "Azure/azapi"
    }
  }
}

provider "azapi" {
  skip_provider_registration = false
}

variable "resource_name" {
  type    = string
  default = "acctest0001"
}

variable "location" {
  type    = string
  default = "westeurope"
}

resource "azapi_resource" "resourceGroup" {
  type     = "Microsoft.Resources/resourceGroups@2020-06-01"
  name     = var.resource_name
  location = var.location
}

resource "azapi_resource" "namespace" {
  type      = "Microsoft.EventHub/namespaces@2022-01-01-preview"
  parent_id = azapi_resource.resourceGroup.id
  name      = var.resource_name
  location  = var.location
  body = {
    properties = {
      disableLocalAuth     = false
      isAutoInflateEnabled = false
      publicNetworkAccess  = "Enabled"
      zoneRedundant        = false
    }
    sku = {
      capacity = 1
      name     = "Standard"
      tier     = "Standard"
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

resource "azapi_resource" "storageAccount" {
  type      = "Microsoft.Storage/storageAccounts@2021-09-01"
  parent_id = azapi_resource.resourceGroup.id
  name      = var.resource_name
  location  = var.location
  body = {
    kind = "StorageV2"
    properties = {
      accessTier                   = "Hot"
      allowBlobPublicAccess        = true
      allowCrossTenantReplication  = true
      allowSharedKeyAccess         = true
      defaultToOAuthAuthentication = false
      encryption = {
        keySource = "Microsoft.Storage"
        services = {
          queue = {
            keyType = "Service"
          }
          table = {
            keyType = "Service"
          }
        }
      }
      isHnsEnabled      = false
      isNfsV3Enabled    = false
      isSftpEnabled     = false
      minimumTlsVersion = "TLS1_2"
      networkAcls = {
        defaultAction = "Allow"
      }
      publicNetworkAccess      = "Enabled"
      supportsHttpsTrafficOnly = true
    }
    sku = {
      name = "Standard_LRS"
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

resource "azapi_resource" "eventhub" {
  type      = "Microsoft.EventHub/namespaces/eventhubs@2021-11-01"
  parent_id = azapi_resource.namespace.id
  name      = var.resource_name
  body = {
    properties = {
      messageRetentionInDays = 1
      partitionCount         = 1
      status                 = "Active"
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

resource "azapi_resource" "eventSubscription" {
  type      = "Microsoft.EventGrid/eventSubscriptions@2021-12-01"
  parent_id = azapi_resource.storageAccount.id
  name      = var.resource_name
  body = {
    properties = {
      deadLetterDestination = null
      destination = {
        endpointType = "EventHub"
        properties = {
          deliveryAttributeMappings = null
          resourceId                = azapi_resource.eventhub.id
        }
      }
      eventDeliverySchema = "EventGridSchema"
      filter = {
        includedEventTypes = [
          "Microsoft.Storage.BlobCreated",
          "Microsoft.Storage.BlobRenamed",
        ]
      }
      labels = [
      ]
      retryPolicy = {
        eventTimeToLiveInMinutes = 144
        maxDeliveryAttempts      = 10
      }
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}