共用方式為


Microsoft.App managedEnvironments/daprSubscriptions

Bicep 資源定義

managedEnvironments/daprSubscriptions 資源類型可以使用目標作業來部署:

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

資源格式

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

resource symbolicname 'Microsoft.App/managedEnvironments/daprSubscriptions@2024-10-02-preview' = {
  parent: resourceSymbolicName
  name: 'string'
  properties: {
    bulkSubscribe: {
      enabled: bool
      maxAwaitDurationMs: int
      maxMessagesCount: int
    }
    deadLetterTopic: 'string'
    metadata: {
      {customized property}: 'string'
    }
    pubsubName: 'string'
    routes: {
      default: 'string'
      rules: [
        {
          match: 'string'
          path: 'string'
        }
      ]
    }
    scopes: [
      'string'
    ]
    topic: 'string'
  }
}

屬性值

DaprSubscriptionBulkSubscribeOptions

名字 描述 價值
啟用 啟用大量訂用帳戶 bool
maxAwaitDurationMs 傳送大量訊息至應用程式之前,以毫秒為單位的持續時間上限。 int
maxMessagesCount 大量訊息中要傳遞的訊息數目上限。 int

DaprSubscriptionProperties

名字 描述 價值
bulkSubscribe 大量訂用帳戶選項 DaprSubscriptionBulkSubscribeOptions
deadLetterTopic Deadletter 主題名稱 字串
元數據 訂用帳戶元數據 DaprSubscriptionPropertiesMetadata
pubsubName Dapr PubSub 元件名稱 字串
路線 訂用帳戶路由 DaprSubscriptionRoutes
範圍 將訂用帳戶限制為特定應用程式的應用程式範圍。 string[]
主題 主題名稱 字串

DaprSubscriptionPropertiesMetadata

名字 描述 價值

DaprSubscriptionRouteRule

名字 描述 價值
火柴 用來比對事件的選擇性 CEL 表達式。 如果未指定相符專案,則會將路由視為預設值。 規則會依照指定的順序進行測試,因此應該從最不具體的順序加以定義。 預設路由應該會顯示在清單中最後一個。 字串
路徑 符合此規則的事件路徑 字串

DaprSubscriptionRoutes

名字 描述 價值
違約 傳遞不符合任何規則之事件的預設路徑。 字串
規則 Dapr PubSub 事件訂用帳戶路由規則的清單。 DaprSubscriptionRouteRule[]

Microsoft.App/managedEnvironments/daprSubscriptions

名字 描述 價值
名字 資源名稱 字串 (必要)
父母 在 Bicep 中,您可以指定子資源的父資源。 只有在父資源外部宣告子資源時,才需要新增這個屬性。

如需詳細資訊,請參閱 父資源外部的子資源
類型資源的符號名稱:managedEnvironments
性能 Dapr PubSub 事件訂用帳戶資源特定屬性 DaprSubscriptionProperties

ARM 樣本資源定義

managedEnvironments/daprSubscriptions 資源類型可以使用目標作業來部署:

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

資源格式

若要建立 Microsoft.App/managedEnvironments/daprSubscriptions 資源,請將下列 JSON 新增至範本。

{
  "type": "Microsoft.App/managedEnvironments/daprSubscriptions",
  "apiVersion": "2024-10-02-preview",
  "name": "string",
  "properties": {
    "bulkSubscribe": {
      "enabled": "bool",
      "maxAwaitDurationMs": "int",
      "maxMessagesCount": "int"
    },
    "deadLetterTopic": "string",
    "metadata": {
      "{customized property}": "string"
    },
    "pubsubName": "string",
    "routes": {
      "default": "string",
      "rules": [
        {
          "match": "string",
          "path": "string"
        }
      ]
    },
    "scopes": [ "string" ],
    "topic": "string"
  }
}

屬性值

DaprSubscriptionBulkSubscribeOptions

名字 描述 價值
啟用 啟用大量訂用帳戶 bool
maxAwaitDurationMs 傳送大量訊息至應用程式之前,以毫秒為單位的持續時間上限。 int
maxMessagesCount 大量訊息中要傳遞的訊息數目上限。 int

DaprSubscriptionProperties

名字 描述 價值
bulkSubscribe 大量訂用帳戶選項 DaprSubscriptionBulkSubscribeOptions
deadLetterTopic Deadletter 主題名稱 字串
元數據 訂用帳戶元數據 DaprSubscriptionPropertiesMetadata
pubsubName Dapr PubSub 元件名稱 字串
路線 訂用帳戶路由 DaprSubscriptionRoutes
範圍 將訂用帳戶限制為特定應用程式的應用程式範圍。 string[]
主題 主題名稱 字串

DaprSubscriptionPropertiesMetadata

名字 描述 價值

DaprSubscriptionRouteRule

名字 描述 價值
火柴 用來比對事件的選擇性 CEL 表達式。 如果未指定相符專案,則會將路由視為預設值。 規則會依照指定的順序進行測試,因此應該從最不具體的順序加以定義。 預設路由應該會顯示在清單中最後一個。 字串
路徑 符合此規則的事件路徑 字串

DaprSubscriptionRoutes

名字 描述 價值
違約 傳遞不符合任何規則之事件的預設路徑。 字串
規則 Dapr PubSub 事件訂用帳戶路由規則的清單。 DaprSubscriptionRouteRule[]

Microsoft.App/managedEnvironments/daprSubscriptions

名字 描述 價值
apiVersion API 版本 '2024-10-02-preview'
名字 資源名稱 字串 (必要)
性能 Dapr PubSub 事件訂用帳戶資源特定屬性 DaprSubscriptionProperties
類型 資源類型 'Microsoft.App/managedEnvironments/daprSubscriptions'

Terraform (AzAPI 提供者) 資源定義

managedEnvironments/daprSubscriptions 資源類型可以使用目標作業來部署:

  • 資源群組

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

資源格式

若要建立 Microsoft.App/managedEnvironments/daprSubscriptions 資源,請將下列 Terraform 新增至範本。

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.App/managedEnvironments/daprSubscriptions@2024-10-02-preview"
  name = "string"
  body = jsonencode({
    properties = {
      bulkSubscribe = {
        enabled = bool
        maxAwaitDurationMs = int
        maxMessagesCount = int
      }
      deadLetterTopic = "string"
      metadata = {
        {customized property} = "string"
      }
      pubsubName = "string"
      routes = {
        default = "string"
        rules = [
          {
            match = "string"
            path = "string"
          }
        ]
      }
      scopes = [
        "string"
      ]
      topic = "string"
    }
  })
}

屬性值

DaprSubscriptionBulkSubscribeOptions

名字 描述 價值
啟用 啟用大量訂用帳戶 bool
maxAwaitDurationMs 傳送大量訊息至應用程式之前,以毫秒為單位的持續時間上限。 int
maxMessagesCount 大量訊息中要傳遞的訊息數目上限。 int

DaprSubscriptionProperties

名字 描述 價值
bulkSubscribe 大量訂用帳戶選項 DaprSubscriptionBulkSubscribeOptions
deadLetterTopic Deadletter 主題名稱 字串
元數據 訂用帳戶元數據 DaprSubscriptionPropertiesMetadata
pubsubName Dapr PubSub 元件名稱 字串
路線 訂用帳戶路由 DaprSubscriptionRoutes
範圍 將訂用帳戶限制為特定應用程式的應用程式範圍。 string[]
主題 主題名稱 字串

DaprSubscriptionPropertiesMetadata

名字 描述 價值

DaprSubscriptionRouteRule

名字 描述 價值
火柴 用來比對事件的選擇性 CEL 表達式。 如果未指定相符專案,則會將路由視為預設值。 規則會依照指定的順序進行測試,因此應該從最不具體的順序加以定義。 預設路由應該會顯示在清單中最後一個。 字串
路徑 符合此規則的事件路徑 字串

DaprSubscriptionRoutes

名字 描述 價值
違約 傳遞不符合任何規則之事件的預設路徑。 字串
規則 Dapr PubSub 事件訂用帳戶路由規則的清單。 DaprSubscriptionRouteRule[]

Microsoft.App/managedEnvironments/daprSubscriptions

名字 描述 價值
名字 資源名稱 字串 (必要)
parent_id 此資源為父系之資源的標識碼。 類型的資源標識碼:managedEnvironments
性能 Dapr PubSub 事件訂用帳戶資源特定屬性 DaprSubscriptionProperties
類型 資源類型 “Microsoft.App/managedEnvironments/daprSubscriptions@2024-10-02-preview”