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

Microsoft.DeviceRegistry 资产 2023-11-01-preview

Bicep资源定义

可以使用目标操作部署资产资源类型:

有关每个 API 版本中已更改属性的列表,请参阅 更改日志。

资源格式

要创建 Microsoft.DeviceRegistry/assets 资源,请在模板中添加以下 Bicep。

resource symbolicname 'Microsoft.DeviceRegistry/assets@2023-11-01-preview' = {
  extendedLocation: {
    name: 'string'
    type: 'string'
  }
  location: 'string'
  name: 'string'
  properties: {
    assetEndpointProfileUri: 'string'
    assetType: 'string'
    attributes: {
      {customized property}: any(...)
    }
    dataPoints: [
      {
        capabilityId: 'string'
        dataPointConfiguration: 'string'
        dataSource: 'string'
        name: 'string'
        observabilityMode: 'string'
      }
    ]
    defaultDataPointsConfiguration: 'string'
    defaultEventsConfiguration: 'string'
    description: 'string'
    displayName: 'string'
    documentationUri: 'string'
    enabled: bool
    events: [
      {
        capabilityId: 'string'
        eventConfiguration: 'string'
        eventNotifier: 'string'
        name: 'string'
        observabilityMode: 'string'
      }
    ]
    externalAssetId: 'string'
    hardwareRevision: 'string'
    manufacturer: 'string'
    manufacturerUri: 'string'
    model: 'string'
    productCode: 'string'
    serialNumber: 'string'
    softwareRevision: 'string'
  }
  tags: {
    {customized property}: 'string'
  }
}

属性值

Microsoft.DeviceRegistry/assets

Name Description Value
extendedLocation 扩展位置。 ExtendedLocation (必填)
位置 资源所在的地理位置 string (必需)
name 资源名称 string

Constraints:
最小长度 = 3
最大长度 = 63
模式 = ^[a-z0-9][a-z0-9-]*[a-z0-9]$ (必需)
properties 此资源的资源特定属性。 AssetProperties
tags 资源标记 标记名称和值的字典。 请参阅模板 中的 标记

AssetProperties

Name Description Value
assetEndpointProfileUri 对中转站用来连接到提供此资产数据点的终结点的终结点配置文件(连接信息)的引用。 必须具有 <ModuleCR.metadata.namespace>/<ModuleCR.metadata.name>的格式。 string (必需)
assetType 资产类型(模型)定义的资源路径。 字符串
attributes 一组键值对,其中包含客户设置的自定义属性。 AssetPropertiesAttributes
dataPoints 属于资产的数据点数组。 每个数据点都可以引用资产类型功能并具有每个数据点配置。 DataPoint[]
defaultDataPointsConfiguration 字符串化 JSON,其中包含所有数据点的特定于协议的默认配置。 每个数据点都可以有自己的配置来替代此处的默认设置。 字符串
defaultEventsConfiguration 包含所有事件特定于连接器的默认配置的字符串化 JSON。 每个事件都可以有自己的配置来替代此处的默认设置。 字符串
description 资产的可读说明。 字符串
displayName 人工可读的显示名称。 字符串
documentationUri 对文档的引用。 字符串
enabled 资产的启用/禁用状态。 bool
events 属于资产的事件数组。 每个事件可以具有每个事件配置。 Event[]
externalAssetId 客户提供的资产 ID。 字符串
hardwareRevision 硬件的修订号。 字符串
制造商 资产制造商名称。 字符串
manufacturerUri 资产制造商 URI。 字符串
模型 资产模型名称。 字符串
productCode 资产错误代码。 字符串
serialNumber 资产序列号。 字符串
softwareRevision 软件的修订号。 字符串

AssetPropertiesAttributes

Name Description Value

DataPoint

Name Description Value
capabilityId 功能类型定义的路径(例如 DTMI、OPC UA 信息模型节点 ID 等),例如 dtmi:com:example:Robot:_contents:__prop1;1。 字符串
dataPointConfiguration 包含数据点特定连接器配置的字符串化 JSON。 对于 OPC UA,这可能包括配置,例如 publishingInterval、samplingInterval 和 queueSize。 字符串
dataSource 资产(例如 URL)中数据源的地址,以便客户端可以访问资产上的数据源。 string (必需)
name 数据点的名称。 字符串
observabilityMode 指示如何将数据点映射到 OpenTelemetry。 'counter'
'gauge'
'histogram'
'log'
'none'

Event

Name Description Value
capabilityId 功能类型定义的路径(例如 DTMI、OPC UA 信息模型节点 ID 等),例如 dtmi:com:example:Robot:_contents:__prop1;1。 字符串
eventConfiguration 包含事件特定于连接器配置的字符串化 JSON。 对于 OPC UA,这可能包括配置,例如 publishingInterval、samplingInterval 和 queueSize。 字符串
eventNotifier 资产中事件通知器的地址(例如 URL),以便客户端可以访问资产上的事件。 string (必需)
name 事件的名称。 字符串
observabilityMode 指示事件应如何映射到 OpenTelemetry。 'log'
'none'

ExtendedLocation

Name Description Value
name 扩展位置名称。 string (必需)
类型 扩展位置类型。 string (必需)

TrackedResourceTags

Name Description Value

ARM 模板资源定义

可以使用目标操作部署资产资源类型:

用法示例

资源格式

若要创建 Microsoft.DeviceRegistry/assets 资源,请将以下 JSON 添加到模板。

{
  "type": "Microsoft.DeviceRegistry/assets",
  "apiVersion": "2023-11-01-preview",
  "name": "string",
  "extendedLocation": {
    "name": "string",
    "type": "string"
  },
  "location": "string",
  "properties": {
    "assetEndpointProfileUri": "string",
    "assetType": "string",
    "attributes": {
      "{customized property}": {}
    },
    "dataPoints": [
      {
        "capabilityId": "string",
        "dataPointConfiguration": "string",
        "dataSource": "string",
        "name": "string",
        "observabilityMode": "string"
      }
    ],
    "defaultDataPointsConfiguration": "string",
    "defaultEventsConfiguration": "string",
    "description": "string",
    "displayName": "string",
    "documentationUri": "string",
    "enabled": "bool",
    "events": [
      {
        "capabilityId": "string",
        "eventConfiguration": "string",
        "eventNotifier": "string",
        "name": "string",
        "observabilityMode": "string"
      }
    ],
    "externalAssetId": "string",
    "hardwareRevision": "string",
    "manufacturer": "string",
    "manufacturerUri": "string",
    "model": "string",
    "productCode": "string",
    "serialNumber": "string",
    "softwareRevision": "string"
  },
  "tags": {
    "{customized property}": "string"
  }
}

属性值

Microsoft.DeviceRegistry/assets

Name Description Value
apiVersion API 版本 '2023-11-01-preview'
extendedLocation 扩展位置。 ExtendedLocation (必填)
位置 资源所在的地理位置 string (必需)
name 资源名称 string

Constraints:
最小长度 = 3
最大长度 = 63
模式 = ^[a-z0-9][a-z0-9-]*[a-z0-9]$ (必需)
properties 此资源的资源特定属性。 AssetProperties
tags 资源标记 标记名称和值的字典。 请参阅模板 中的 标记
类型 资源类型 'Microsoft.DeviceRegistry/assets'

AssetProperties

Name Description Value
assetEndpointProfileUri 对中转站用来连接到提供此资产数据点的终结点的终结点配置文件(连接信息)的引用。 必须具有 <ModuleCR.metadata.namespace>/<ModuleCR.metadata.name>的格式。 string (必需)
assetType 资产类型(模型)定义的资源路径。 字符串
attributes 一组键值对,其中包含客户设置的自定义属性。 AssetPropertiesAttributes
dataPoints 属于资产的数据点数组。 每个数据点都可以引用资产类型功能并具有每个数据点配置。 DataPoint[]
defaultDataPointsConfiguration 字符串化 JSON,其中包含所有数据点的特定于协议的默认配置。 每个数据点都可以有自己的配置来替代此处的默认设置。 字符串
defaultEventsConfiguration 包含所有事件特定于连接器的默认配置的字符串化 JSON。 每个事件都可以有自己的配置来替代此处的默认设置。 字符串
description 资产的可读说明。 字符串
displayName 人工可读的显示名称。 字符串
documentationUri 对文档的引用。 字符串
enabled 资产的启用/禁用状态。 bool
events 属于资产的事件数组。 每个事件可以具有每个事件配置。 Event[]
externalAssetId 客户提供的资产 ID。 字符串
hardwareRevision 硬件的修订号。 字符串
制造商 资产制造商名称。 字符串
manufacturerUri 资产制造商 URI。 字符串
模型 资产模型名称。 字符串
productCode 资产错误代码。 字符串
serialNumber 资产序列号。 字符串
softwareRevision 软件的修订号。 字符串

AssetPropertiesAttributes

Name Description Value

DataPoint

Name Description Value
capabilityId 功能类型定义的路径(例如 DTMI、OPC UA 信息模型节点 ID 等),例如 dtmi:com:example:Robot:_contents:__prop1;1。 字符串
dataPointConfiguration 包含数据点特定连接器配置的字符串化 JSON。 对于 OPC UA,这可能包括配置,例如 publishingInterval、samplingInterval 和 queueSize。 字符串
dataSource 资产(例如 URL)中数据源的地址,以便客户端可以访问资产上的数据源。 string (必需)
name 数据点的名称。 字符串
observabilityMode 指示如何将数据点映射到 OpenTelemetry。 'counter'
'gauge'
'histogram'
'log'
'none'

Event

Name Description Value
capabilityId 功能类型定义的路径(例如 DTMI、OPC UA 信息模型节点 ID 等),例如 dtmi:com:example:Robot:_contents:__prop1;1。 字符串
eventConfiguration 包含事件特定于连接器配置的字符串化 JSON。 对于 OPC UA,这可能包括配置,例如 publishingInterval、samplingInterval 和 queueSize。 字符串
eventNotifier 资产中事件通知器的地址(例如 URL),以便客户端可以访问资产上的事件。 string (必需)
name 事件的名称。 字符串
observabilityMode 指示事件应如何映射到 OpenTelemetry。 'log'
'none'

ExtendedLocation

Name Description Value
name 扩展位置名称。 string (必需)
类型 扩展位置类型。 string (必需)

TrackedResourceTags

Name Description Value

Terraform (AzAPI 提供程序)资源定义

可以使用目标操作部署资产资源类型:

  • 资源组 关于每个API版本中变更属性的列表,请参见 更改日志。

资源格式

若要创建 Microsoft.DeviceRegistry/assets 资源,请将以下 Terraform 添加到模板。

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.DeviceRegistry/assets@2023-11-01-preview"
  name = "string"
  parent_id = "string"
  location = "string"
  tags = {
    {customized property} = "string"
  }
  body = {
    extendedLocation = {
      name = "string"
      type = "string"
    }
    properties = {
      assetEndpointProfileUri = "string"
      assetType = "string"
      attributes = {
        {customized property} = ?
      }
      dataPoints = [
        {
          capabilityId = "string"
          dataPointConfiguration = "string"
          dataSource = "string"
          name = "string"
          observabilityMode = "string"
        }
      ]
      defaultDataPointsConfiguration = "string"
      defaultEventsConfiguration = "string"
      description = "string"
      displayName = "string"
      documentationUri = "string"
      enabled = bool
      events = [
        {
          capabilityId = "string"
          eventConfiguration = "string"
          eventNotifier = "string"
          name = "string"
          observabilityMode = "string"
        }
      ]
      externalAssetId = "string"
      hardwareRevision = "string"
      manufacturer = "string"
      manufacturerUri = "string"
      model = "string"
      productCode = "string"
      serialNumber = "string"
      softwareRevision = "string"
    }
  }
}

属性值

Microsoft.DeviceRegistry/assets

Name Description Value
extendedLocation 扩展位置。 ExtendedLocation (必填)
位置 资源所在的地理位置 string (必需)
name 资源名称 string

Constraints:
最小长度 = 3
最大长度 = 63
模式 = ^[a-z0-9][a-z0-9-]*[a-z0-9]$ (必需)
properties 此资源的资源特定属性。 AssetProperties
tags 资源标记 标记名称和值的字典。
类型 资源类型 "Microsoft.DeviceRegistry/assets@2023-11-01-preview"

AssetProperties

Name Description Value
assetEndpointProfileUri 对中转站用来连接到提供此资产数据点的终结点的终结点配置文件(连接信息)的引用。 必须具有 <ModuleCR.metadata.namespace>/<ModuleCR.metadata.name>的格式。 string (必需)
assetType 资产类型(模型)定义的资源路径。 字符串
attributes 一组键值对,其中包含客户设置的自定义属性。 AssetPropertiesAttributes
dataPoints 属于资产的数据点数组。 每个数据点都可以引用资产类型功能并具有每个数据点配置。 DataPoint[]
defaultDataPointsConfiguration 字符串化 JSON,其中包含所有数据点的特定于协议的默认配置。 每个数据点都可以有自己的配置来替代此处的默认设置。 字符串
defaultEventsConfiguration 包含所有事件特定于连接器的默认配置的字符串化 JSON。 每个事件都可以有自己的配置来替代此处的默认设置。 字符串
description 资产的可读说明。 字符串
displayName 人工可读的显示名称。 字符串
documentationUri 对文档的引用。 字符串
enabled 资产的启用/禁用状态。 bool
events 属于资产的事件数组。 每个事件可以具有每个事件配置。 Event[]
externalAssetId 客户提供的资产 ID。 字符串
hardwareRevision 硬件的修订号。 字符串
制造商 资产制造商名称。 字符串
manufacturerUri 资产制造商 URI。 字符串
模型 资产模型名称。 字符串
productCode 资产错误代码。 字符串
serialNumber 资产序列号。 字符串
softwareRevision 软件的修订号。 字符串

AssetPropertiesAttributes

Name Description Value

DataPoint

Name Description Value
capabilityId 功能类型定义的路径(例如 DTMI、OPC UA 信息模型节点 ID 等),例如 dtmi:com:example:Robot:_contents:__prop1;1。 字符串
dataPointConfiguration 包含数据点特定连接器配置的字符串化 JSON。 对于 OPC UA,这可能包括配置,例如 publishingInterval、samplingInterval 和 queueSize。 字符串
dataSource 资产(例如 URL)中数据源的地址,以便客户端可以访问资产上的数据源。 string (必需)
name 数据点的名称。 字符串
observabilityMode 指示如何将数据点映射到 OpenTelemetry。 'counter'
'gauge'
'histogram'
'log'
'none'

Event

Name Description Value
capabilityId 功能类型定义的路径(例如 DTMI、OPC UA 信息模型节点 ID 等),例如 dtmi:com:example:Robot:_contents:__prop1;1。 字符串
eventConfiguration 包含事件特定于连接器配置的字符串化 JSON。 对于 OPC UA,这可能包括配置,例如 publishingInterval、samplingInterval 和 queueSize。 字符串
eventNotifier 资产中事件通知器的地址(例如 URL),以便客户端可以访问资产上的事件。 string (必需)
name 事件的名称。 字符串
observabilityMode 指示事件应如何映射到 OpenTelemetry。 'log'
'none'

ExtendedLocation

Name Description Value
name 扩展位置名称。 string (必需)
类型 扩展位置类型。 string (必需)

TrackedResourceTags

Name Description Value