共用方式為


Microsoft.EventGrid 主題 2019-02-01-preview

Bicep 資源定義

主題資源類型可以使用目標作業進行部署:

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。

資源格式

若要建立 Microsoft.EventGrid/topics 資源,請將下列 Bicep 新增至您的範本。

resource symbolicname 'Microsoft.EventGrid/topics@2019-02-01-preview' = {
  name: 'string'
  location: 'string'
  tags: {
    tagName1: 'tagValue1'
    tagName2: 'tagValue2'
  }
  properties: {
    inputSchema: 'string'
    inputSchemaMapping: {
      inputSchemaMappingType: 'string'
      // For remaining properties, see InputSchemaMapping objects
    }
  }
}

InputSchemaMapping 物件

設定 inputSchemaMappingType 屬性以指定物件的類型。

針對 Json,請使用:

  inputSchemaMappingType: 'Json'
  properties: {
    dataVersion: {
      defaultValue: 'string'
      sourceField: 'string'
    }
    eventTime: {
      sourceField: 'string'
    }
    eventType: {
      defaultValue: 'string'
      sourceField: 'string'
    }
    id: {
      sourceField: 'string'
    }
    subject: {
      defaultValue: 'string'
      sourceField: 'string'
    }
    topic: {
      sourceField: 'string'
    }
  }

屬性值

topics

名稱 描述
NAME 資源名稱 需要字串 ()

字元限制:3-50

合法字元:
英數字元和連字號。
location 資源的位置 需要字串 ()
tags 資源的標記 標記名稱和值的字典。 請參閱 範本中的標籤
properties 主題的屬性 TopicProperties

TopicProperties

名稱 描述
inputSchema 這會決定事件方格應該預期發行至主題之傳入事件的格式。 'CloudEventV01Schema'
'CustomEventSchema'
'EventGridSchema'
inputSchemaMapping 這可讓您使用自定義事件架構進行發佈。 您可以指定 InputSchemaMapping,將來源架構的各種屬性對應至 EventGridEvent 架構的各種必要屬性。 InputSchemaMapping

InputSchemaMapping

名稱 描述
inputSchemaMappingType 設定物件類型 需要 Json ()

JsonInputSchemaMapping

名稱 描述
inputSchemaMappingType 自定義對應的類型 'Json' (必要)
properties 輸入架構對應的 JSON 屬性 JsonInputSchemaMappingProperties

JsonInputSchemaMappingProperties

名稱 描述
dataVersion Event Grid 事件之 DataVersion 屬性的對應資訊。 JsonFieldWithDefault
eventTime Event Grid 事件之 EventTime 屬性的對應資訊。 JsonField
eventType Event Grid 事件之 EventType 屬性的對應資訊。 JsonFieldWithDefault
id Event Grid 事件之 Id 屬性的對應資訊。 JsonField
主旨 Event Grid 事件之 Subject 屬性的對應資訊。 JsonFieldWithDefault
主題 Event Grid 事件之 Topic 屬性的對應資訊。 JsonField

JsonFieldWithDefault

名稱 描述
defaultValue 未提供 SourceField 時要用於對應的預設值,或者如果已發布 JSON 事件承載中沒有具有指定名稱的屬性,則為 。 字串
sourceField 輸入事件架構中要作為對應來源的功能變數名稱。 字串

JsonField

名稱 描述
sourceField 輸入事件架構中要作為對應來源的功能變數名稱。 字串

快速入門範本

下列快速入門範本會部署此資源類型。

範本 描述
建立 Azure 事件方格 自定義主題和訂用帳戶

部署至 Azure
建立 Azure 事件方格 自定義主題和 Webhook 訂用帳戶。 最初由John Downs撰寫的範本。
使用 CloudEvents 自定義 Azure 事件方格 主題/訂用帳戶

部署至 Azure
建立自定義 Azure 事件方格 主題、具有 CloudEvents 架構的 Webhook 訂用帳戶,以及邏輯應用程式作為事件處理程式。 最初由 Justin Yoo 撰寫的範本。
建立事件方格自定義主題和事件中樞處理程式

部署至 Azure
建立 Azure 事件方格 自定義主題和事件中樞來處理事件。
建立 Azure 事件方格 自定義主題和佇列訂用帳戶

部署至 Azure
建立 Azure 事件方格 自定義主題和服務總線佇列訂用帳戶。 最初由 Markus Meyer 撰寫的範本。
建立 Azure 事件方格 自定義主題訂用帳戶

部署至 Azure
建立 Azure 事件方格 自定義主題和服務總線主題訂用帳戶。 最初由 Markus Meyer 撰寫的範本。

ARM 範本資源定義

主題資源類型可以使用目標作業進行部署:

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。

資源格式

若要建立 Microsoft.EventGrid/topics 資源,請將下列 JSON 新增至您的範本。

{
  "type": "Microsoft.EventGrid/topics",
  "apiVersion": "2019-02-01-preview",
  "name": "string",
  "location": "string",
  "tags": {
    "tagName1": "tagValue1",
    "tagName2": "tagValue2"
  },
  "properties": {
    "inputSchema": "string",
    "inputSchemaMapping": {
      "inputSchemaMappingType": "string"
      // For remaining properties, see InputSchemaMapping objects
    }
  }
}

InputSchemaMapping 物件

設定 inputSchemaMappingType 屬性以指定物件的類型。

針對 Json,請使用:

  "inputSchemaMappingType": "Json",
  "properties": {
    "dataVersion": {
      "defaultValue": "string",
      "sourceField": "string"
    },
    "eventTime": {
      "sourceField": "string"
    },
    "eventType": {
      "defaultValue": "string",
      "sourceField": "string"
    },
    "id": {
      "sourceField": "string"
    },
    "subject": {
      "defaultValue": "string",
      "sourceField": "string"
    },
    "topic": {
      "sourceField": "string"
    }
  }

屬性值

topics

名稱 描述
類型 資源類型 'Microsoft.EventGrid/topics'
apiVersion 資源 API 版本 '2019-02-01-preview'
NAME 資源名稱 需要字串 ()

字元限制:3-50

合法字元:
英數字元和連字號。
location 資源的位置 需要字串 ()
tags 資源的標記 標記名稱和值的字典。 請參閱 範本中的標籤
properties 主題的屬性 TopicProperties

TopicProperties

名稱 描述
inputSchema 這會決定事件方格應該預期發行至主題之傳入事件的格式。 'CloudEventV01Schema'
'CustomEventSchema'
'EventGridSchema'
inputSchemaMapping 這可讓您使用自定義事件架構進行發佈。 您可以指定 InputSchemaMapping,將來源架構的各種屬性對應至 EventGridEvent 架構的各種必要屬性。 InputSchemaMapping

InputSchemaMapping

名稱 描述
inputSchemaMappingType 設定物件類型 需要 json ()

JsonInputSchemaMapping

名稱 描述
inputSchemaMappingType 自定義對應的類型 需要 『Json』 ()
properties 輸入架構對應的 JSON 屬性 JsonInputSchemaMappingProperties

JsonInputSchemaMappingProperties

名稱 描述
dataVersion Event Grid 事件之 DataVersion 屬性的對應資訊。 JsonFieldWithDefault
eventTime Event Grid 事件之 EventTime 屬性的對應資訊。 JsonField
eventType Event Grid 事件之 EventType 屬性的對應資訊。 JsonFieldWithDefault
id Event Grid 事件之 Id 屬性的對應資訊。 JsonField
主旨 Event Grid 事件之 Subject 屬性的對應資訊。 JsonFieldWithDefault
主題 Event Grid 事件之 Topic 屬性的對應資訊。 JsonField

JsonFieldWithDefault

名稱 描述
defaultValue 未提供SourceField時要用於對應的預設值,或在已發佈的 JSON 事件承載中沒有具有指定名稱的屬性時使用。 字串
sourceField 輸入事件架構中要作為對應來源的功能變數名稱。 字串

JsonField

名稱 描述
sourceField 輸入事件架構中要作為對應來源的功能變數名稱。 字串

快速入門範本

下列快速入門範本會部署此資源類型。

範本 描述
建立自定義主題和訂用帳戶 Azure 事件方格

部署至 Azure
建立 Azure 事件方格 自定義主題和 Webhook 訂用帳戶。 最初由John Downs撰寫的範本。
使用 CloudEvents 的自訂 Azure 事件方格 主題/訂用帳戶

部署至 Azure
建立自定義 Azure 事件方格 主題、具有 CloudEvents 架構的 Webhook 訂用帳戶,以及邏輯應用程式作為事件處理程式。 最初由 Justin Yoo 撰寫的範本。
建立事件方格自定義主題和事件中樞處理程式

部署至 Azure
建立 Azure 事件方格 自定義主題和事件中樞來處理事件。
建立自定義主題和佇列訂用帳戶 Azure 事件方格

部署至 Azure
建立 Azure 事件方格 自定義主題和服務總線佇列訂用帳戶。 最初由 Markus Meyer 撰寫的範本。
建立自定義主題訂用帳戶 Azure 事件方格

部署至 Azure
建立 Azure 事件方格 自定義主題和服務總線主題訂用帳戶。 最初由 Markus Meyer 撰寫的範本。

Terraform (AzAPI 提供者) 資源定義

主題資源類型可以使用目標作業進行部署:

  • 資源群組

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄

資源格式

若要建立 Microsoft.EventGrid/topics 資源,請將下列 Terraform 新增至您的範本。

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.EventGrid/topics@2019-02-01-preview"
  name = "string"
  location = "string"
  parent_id = "string"
  tags = {
    tagName1 = "tagValue1"
    tagName2 = "tagValue2"
  }
  body = jsonencode({
    properties = {
      inputSchema = "string"
      inputSchemaMapping = {
        inputSchemaMappingType = "string"
        // For remaining properties, see InputSchemaMapping objects
      }
    }
  })
}

InputSchemaMapping 物件

設定 inputSchemaMappingType 屬性以指定物件的類型。

針對 Json,請使用:

  inputSchemaMappingType = "Json"
  properties = {
    dataVersion = {
      defaultValue = "string"
      sourceField = "string"
    }
    eventTime = {
      sourceField = "string"
    }
    eventType = {
      defaultValue = "string"
      sourceField = "string"
    }
    id = {
      sourceField = "string"
    }
    subject = {
      defaultValue = "string"
      sourceField = "string"
    }
    topic = {
      sourceField = "string"
    }
  }

屬性值

topics

名稱 描述
類型 資源類型 “Microsoft.EventGrid/topics@2019-02-01-preview”
NAME 資源名稱 字串 (必要)

字元限制:3-50

合法字元:
英數字元和連字號。
location 資源的位置 字串 (必要)
parent_id 若要部署至資源群組,請使用該資源群組的標識碼。 字串 (必要)
tags 資源的標記 標記名稱和值的字典。
properties 主題的屬性 TopicProperties

TopicProperties

名稱 描述
inputSchema 這會決定事件方格在發佈至主題的傳入事件時應該預期的格式。 “CloudEventV01Schema”
“CustomEventSchema”
“EventGridSchema”
inputSchemaMapping 這可讓您使用自定義事件架構進行發佈。 您可以指定 InputSchemaMapping,將來源架構的各種屬性對應至 EventGridEvent 架構的各種必要屬性。 InputSchemaMapping

InputSchemaMapping

名稱 描述
inputSchemaMappingType 設定物件類型 需要 json ()

JsonInputSchemaMapping

名稱 描述
inputSchemaMappingType 自定義對應的類型 必要) 「Json」 (
properties 輸入架構對應的 JSON 屬性 JsonInputSchemaMappingProperties

JsonInputSchemaMappingProperties

名稱 描述
dataVersion Event Grid 事件之 DataVersion 屬性的對應資訊。 JsonFieldWithDefault
eventTime Event Grid 事件之 EventTime 屬性的對應資訊。 JsonField
eventType Event Grid 事件之 EventType 屬性的對應資訊。 JsonFieldWithDefault
id Event Grid 事件之 Id 屬性的對應資訊。 JsonField
主旨 Event Grid 事件之 Subject 屬性的對應資訊。 JsonFieldWithDefault
主題 Event Grid 事件之 Topic 屬性的對應資訊。 JsonField

JsonFieldWithDefault

名稱 描述
defaultValue 未提供SourceField時要用於對應的預設值,或在已發佈的 JSON 事件承載中沒有具有指定名稱的屬性時使用。 字串
sourceField 輸入事件架構中要作為對應來源的功能變數名稱。 字串

JsonField

名稱 描述
sourceField 輸入事件架構中要作為對應來源的功能變數名稱。 字串