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 (必填)
位置 資源所在的地理位置 字串 (必要)
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<格式 >。 字串 (必要)
assetType 資產類型 (model) 定義的資源路徑。 字串
attributes 一組索引鍵/值組,其中包含客戶所設定的自定義屬性。 AssetPropertiesAttributes
dataPoints 屬於資產一部分的數據點陣列。 每個數據點都可以參考資產類型功能,並具有個別數據點組態。 DataPoint[]
defaultDataPointsConfiguration 字串化 JSON,其中包含所有數據點的通訊協定特定預設組態。 每個數據點都可以有自己的組態來覆寫這裡的預設設定。 字串
defaultEventsConfiguration 字串化 JSON,其中包含所有事件的連接器特定預設組態。 每個事件都可以有自己的組態來覆寫這裡的預設設定。 字串
description 資產的人類可讀取描述。 字串
displayName 人類可讀取的顯示名稱。 字串
documentationUri 文件的參考。 字串
enabled 啟用/停用資產的狀態。 bool
events 屬於資產一部分的事件陣列。 每個事件都可以有個別事件組態。 Event[]
externalAssetId 客戶所提供的資產標識碼。 字串
hardwareRevision 硬體的修訂編號。 字串
製造商 資產製造商名稱。 字串
manufacturerUri 資產製造商 URI。 字串
型號 資產模型名稱。 字串
productCode 資產產品代碼。 字串
serialNumber 資產序號。 字串
softwareRevision 軟體的修訂編號。 字串

AssetPropertiesAttributes

Name Description Value

DataPoint

Name Description Value
capabilityId 功能類型定義的路徑(例如 DTMI、OPC UA 資訊模型節點標識碼等),例如 dtmi:com:example:Robot:_contents:__prop1;1。 字串
dataPointConfiguration 字串化 JSON,其中包含數據點的連接器特定組態。 針對 OPC UA,這可能包括設定,例如 publishingInterval、samplingInterval 和 queueSize。 字串
dataSource 資產中數據源的位址(例如 URL),讓用戶端可以存取資產上的資料源。 字串 (必要)
name 數據點的名稱。 字串
observabilityMode 數據點應如何對應至 OpenTelemetry 的指示。 'counter'
'gauge'
'histogram'
'log'
'none'

Event

Name Description Value
capabilityId 功能類型定義的路徑(例如 DTMI、OPC UA 資訊模型節點標識碼等),例如 dtmi:com:example:Robot:_contents:__prop1;1。 字串
eventConfiguration 包含事件連接器特定組態的字串化 JSON。 針對 OPC UA,這可能包括設定,例如 publishingInterval、samplingInterval 和 queueSize。 字串
eventNotifier 資產中事件的通知器位址(例如 URL),讓用戶端可以存取資產上的事件。 字串 (必要)
name 事件的名稱。 字串
observabilityMode 事件應如何對應至 OpenTelemetry 的指示。 'log'
'none'

ExtendedLocation

Name Description Value
name 擴充位置名稱。 字串 (必要)
型別 擴充位置類型。 字串 (必要)

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 (必填)
位置 資源所在的地理位置 字串 (必要)
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<格式 >。 字串 (必要)
assetType 資產類型 (model) 定義的資源路徑。 字串
attributes 一組索引鍵/值組,其中包含客戶所設定的自定義屬性。 AssetPropertiesAttributes
dataPoints 屬於資產一部分的數據點陣列。 每個數據點都可以參考資產類型功能,並具有個別數據點組態。 DataPoint[]
defaultDataPointsConfiguration 字串化 JSON,其中包含所有數據點的通訊協定特定預設組態。 每個數據點都可以有自己的組態來覆寫這裡的預設設定。 字串
defaultEventsConfiguration 字串化 JSON,其中包含所有事件的連接器特定預設組態。 每個事件都可以有自己的組態來覆寫這裡的預設設定。 字串
description 資產的人類可讀取描述。 字串
displayName 人類可讀取的顯示名稱。 字串
documentationUri 文件的參考。 字串
enabled 啟用/停用資產的狀態。 bool
events 屬於資產一部分的事件陣列。 每個事件都可以有個別事件組態。 Event[]
externalAssetId 客戶所提供的資產標識碼。 字串
hardwareRevision 硬體的修訂編號。 字串
製造商 資產製造商名稱。 字串
manufacturerUri 資產製造商 URI。 字串
型號 資產模型名稱。 字串
productCode 資產產品代碼。 字串
serialNumber 資產序號。 字串
softwareRevision 軟體的修訂編號。 字串

AssetPropertiesAttributes

Name Description Value

DataPoint

Name Description Value
capabilityId 功能類型定義的路徑(例如 DTMI、OPC UA 資訊模型節點標識碼等),例如 dtmi:com:example:Robot:_contents:__prop1;1。 字串
dataPointConfiguration 字串化 JSON,其中包含數據點的連接器特定組態。 針對 OPC UA,這可能包括設定,例如 publishingInterval、samplingInterval 和 queueSize。 字串
dataSource 資產中數據源的位址(例如 URL),讓用戶端可以存取資產上的資料源。 字串 (必要)
name 數據點的名稱。 字串
observabilityMode 數據點應如何對應至 OpenTelemetry 的指示。 'counter'
'gauge'
'histogram'
'log'
'none'

Event

Name Description Value
capabilityId 功能類型定義的路徑(例如 DTMI、OPC UA 資訊模型節點標識碼等),例如 dtmi:com:example:Robot:_contents:__prop1;1。 字串
eventConfiguration 包含事件連接器特定組態的字串化 JSON。 針對 OPC UA,這可能包括設定,例如 publishingInterval、samplingInterval 和 queueSize。 字串
eventNotifier 資產中事件的通知器位址(例如 URL),讓用戶端可以存取資產上的事件。 字串 (必要)
name 事件的名稱。 字串
observabilityMode 事件應如何對應至 OpenTelemetry 的指示。 'log'
'none'

ExtendedLocation

Name Description Value
name 擴充位置名稱。 字串 (必要)
型別 擴充位置類型。 字串 (必要)

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 (必填)
位置 資源所在的地理位置 字串 (必要)
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<格式 >。 字串 (必要)
assetType 資產類型 (model) 定義的資源路徑。 字串
attributes 一組索引鍵/值組,其中包含客戶所設定的自定義屬性。 AssetPropertiesAttributes
dataPoints 屬於資產一部分的數據點陣列。 每個數據點都可以參考資產類型功能,並具有個別數據點組態。 DataPoint[]
defaultDataPointsConfiguration 字串化 JSON,其中包含所有數據點的通訊協定特定預設組態。 每個數據點都可以有自己的組態來覆寫這裡的預設設定。 字串
defaultEventsConfiguration 字串化 JSON,其中包含所有事件的連接器特定預設組態。 每個事件都可以有自己的組態來覆寫這裡的預設設定。 字串
description 資產的人類可讀取描述。 字串
displayName 人類可讀取的顯示名稱。 字串
documentationUri 文件的參考。 字串
enabled 啟用/停用資產的狀態。 bool
events 屬於資產一部分的事件陣列。 每個事件都可以有個別事件組態。 Event[]
externalAssetId 客戶所提供的資產標識碼。 字串
hardwareRevision 硬體的修訂編號。 字串
製造商 資產製造商名稱。 字串
manufacturerUri 資產製造商 URI。 字串
型號 資產模型名稱。 字串
productCode 資產產品代碼。 字串
serialNumber 資產序號。 字串
softwareRevision 軟體的修訂編號。 字串

AssetPropertiesAttributes

Name Description Value

DataPoint

Name Description Value
capabilityId 功能類型定義的路徑(例如 DTMI、OPC UA 資訊模型節點標識碼等),例如 dtmi:com:example:Robot:_contents:__prop1;1。 字串
dataPointConfiguration 字串化 JSON,其中包含數據點的連接器特定組態。 針對 OPC UA,這可能包括設定,例如 publishingInterval、samplingInterval 和 queueSize。 字串
dataSource 資產中數據源的位址(例如 URL),讓用戶端可以存取資產上的資料源。 字串 (必要)
name 數據點的名稱。 字串
observabilityMode 數據點應如何對應至 OpenTelemetry 的指示。 'counter'
'gauge'
'histogram'
'log'
'none'

Event

Name Description Value
capabilityId 功能類型定義的路徑(例如 DTMI、OPC UA 資訊模型節點標識碼等),例如 dtmi:com:example:Robot:_contents:__prop1;1。 字串
eventConfiguration 包含事件連接器特定組態的字串化 JSON。 針對 OPC UA,這可能包括設定,例如 publishingInterval、samplingInterval 和 queueSize。 字串
eventNotifier 資產中事件的通知器位址(例如 URL),讓用戶端可以存取資產上的事件。 字串 (必要)
name 事件的名稱。 字串
observabilityMode 事件應如何對應至 OpenTelemetry 的指示。 'log'
'none'

ExtendedLocation

Name Description Value
name 擴充位置名稱。 字串 (必要)
型別 擴充位置類型。 字串 (必要)

TrackedResourceTags

Name Description Value