共用方式為


Microsoft.EventGrid 主題 2020-01-01-preview

Bicep 資源定義

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

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

資源格式

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

resource symbolicname 'Microsoft.EventGrid/topics@2020-01-01-preview' = {
  location: 'string'
  name: 'string'
  properties: {
    inputSchema: 'string'
    inputSchemaMapping: {
      inputSchemaMappingType: 'string'
      // For remaining properties, see InputSchemaMapping objects
    }
  }
  tags: {
    {customized property}: 'string'
  }
}

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'
    }
  }
}

屬性值

InputSchemaMapping

名字 描述 價值
inputSchemaMappingType 針對 jsonInputSchemaMapping 類型設定為 'Json', 'Json' (必要)

JsonField

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

JsonFieldWithDefault

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

JsonInputSchemaMapping

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

JsonInputSchemaMappingProperties

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

Microsoft.EventGrid/topics

名字 描述 價值
位置 資源的位置 字串 (必要)
名字 資源名稱 字串 (必要)
性能 主題的屬性 TopicProperties
標籤 資源標籤 標記名稱和值的字典。 請參閱範本中的 標籤

TopicProperties

名字 描述 價值
inputSchema 這會決定事件方格針對發佈至主題的連入事件所應預期的格式。 'CloudEventSchemaV1_0'
'CustomEventSchema'
'EventGridSchema'
inputSchemaMapping 這可讓您使用自定義事件架構發佈。 您可以指定 InputSchemaMapping,將來源架構的各種屬性對應至 EventGridEvent 架構的各種必要屬性。 InputSchemaMapping

TrackedResourceTags

名字 描述 價值

快速入門範例

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

Bicep 檔案 描述
建立 Azure 事件方格自定義主題和佇列訂用帳戶 建立 Azure 事件方格自定義主題和服務總線佇列訂用帳戶。 範本最初由 Markus Meyer 撰寫。
建立 Azure 事件方格自定義主題和訂用帳戶 建立 Azure 事件方格自定義主題和 Webhook 訂用帳戶。 範本最初由John Downs 撰寫。

ARM 樣本資源定義

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

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

資源格式

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

{
  "type": "Microsoft.EventGrid/topics",
  "apiVersion": "2020-01-01-preview",
  "name": "string",
  "location": "string",
  "properties": {
    "inputSchema": "string",
    "inputSchemaMapping": {
      "inputSchemaMappingType": "string"
      // For remaining properties, see InputSchemaMapping objects
    }
  },
  "tags": {
    "{customized property}": "string"
  }
}

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"
    }
  }
}

屬性值

InputSchemaMapping

名字 描述 價值
inputSchemaMappingType 針對 jsonInputSchemaMapping 類型設定為 'Json', 'Json' (必要)

JsonField

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

JsonFieldWithDefault

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

JsonInputSchemaMapping

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

JsonInputSchemaMappingProperties

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

Microsoft.EventGrid/topics

名字 描述 價值
apiVersion API 版本 '2020-01-01-preview'
位置 資源的位置 字串 (必要)
名字 資源名稱 字串 (必要)
性能 主題的屬性 TopicProperties
標籤 資源標籤 標記名稱和值的字典。 請參閱範本中的 標籤
類型 資源類型 'Microsoft.EventGrid/topics'

TopicProperties

名字 描述 價值
inputSchema 這會決定事件方格針對發佈至主題的連入事件所應預期的格式。 'CloudEventSchemaV1_0'
'CustomEventSchema'
'EventGridSchema'
inputSchemaMapping 這可讓您使用自定義事件架構發佈。 您可以指定 InputSchemaMapping,將來源架構的各種屬性對應至 EventGridEvent 架構的各種必要屬性。 InputSchemaMapping

TrackedResourceTags

名字 描述 價值

快速入門範本

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

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

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

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

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

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

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

Terraform (AzAPI 提供者) 資源定義

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

  • 資源群組

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

資源格式

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

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.EventGrid/topics@2020-01-01-preview"
  name = "string"
  location = "string"
  tags = {
    {customized property} = "string"
  }
  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"
    }
  }
}

屬性值

InputSchemaMapping

名字 描述 價值
inputSchemaMappingType 針對 jsonInputSchemaMapping 類型設定為 'Json', 'Json' (必要)

JsonField

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

JsonFieldWithDefault

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

JsonInputSchemaMapping

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

JsonInputSchemaMappingProperties

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

Microsoft.EventGrid/topics

名字 描述 價值
位置 資源的位置 字串 (必要)
名字 資源名稱 字串 (必要)
性能 主題的屬性 TopicProperties
標籤 資源標籤 標記名稱和值的字典。
類型 資源類型 “Microsoft.EventGrid/topics@2020-01-01-preview”

TopicProperties

名字 描述 價值
inputSchema 這會決定事件方格針對發佈至主題的連入事件所應預期的格式。 'CloudEventSchemaV1_0'
'CustomEventSchema'
'EventGridSchema'
inputSchemaMapping 這可讓您使用自定義事件架構發佈。 您可以指定 InputSchemaMapping,將來源架構的各種屬性對應至 EventGridEvent 架構的各種必要屬性。 InputSchemaMapping

TrackedResourceTags

名字 描述 價值