你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

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

名字 描述 价值
名字 资源名称 string (必需)
父母 在 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'
名字 资源名称 string (必需)
性能 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

名字 描述 价值
名字 资源名称 string (必需)
parent_id 此资源的父资源的 ID。 类型资源的 ID:managedEnvironments
性能 Dapr PubSub 事件订阅资源特定属性 DaprSubscriptionProperties
类型 资源类型 “Microsoft.App/managedEnvironments/daprSubscriptions@2024-10-02-preview”