Bicep 資源定義
命名空間/群組資源類型可部署為以下操作:
- 資源群組 - 請參見 資源群組部署指令
如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。
資源格式
要建立一個 Microsoft.DeviceRegistry/命名空間/群組資源,請將以下 Bicep 加入你的範本。
resource symbolicname 'Microsoft.DeviceRegistry/namespaces/groups@2026-11-02-preview' = {
parent: resourceSymbolicName
location: 'string'
name: 'string'
properties: {
description: 'string'
displayName: 'string'
groupType: 'string'
queryFilter: 'string'
}
tags: {
{customized property}: 'string'
}
}
屬性值
Microsoft。裝置登錄/命名空間/群組
| Name | Description | 價值觀 |
|---|---|---|
| 位置 | 資源所在的地理位置 | 字串 (必要) |
| 名字 | 資源名稱 | string 約束: 最小長度 = 3 最大長度 = 63 模式 = ^[0-9a-zA-Z][a-zA-Z0-9-]*$ (必要) |
| 父代 | 在 Bicep 中,您可以指定子資源的父資源。 只有在父資源外部宣告子資源時,才需要新增這個屬性。 如需詳細資訊,請參閱 父資源外部的子資源。 |
類型的資源符號名稱:命名空間 |
| properties | 此資源的資源特定屬性。 | 組屬性 |
| tags | 資源標籤 | 標記名稱和值的字典。 請參考模板中的標籤 |
組屬性
| Name | Description | 價值觀 |
|---|---|---|
| description | 資源的易讀描述。 | string 約束: 最大長度 = 1024 |
| displayName | 資源的可讀顯示名稱。 | string 約束: 最大長度 = 256 |
| groupType | 決定哪些資源可以成為成員的團體類型。 | 「RegistryDevice」(必填) |
| queryFilter | 用來判斷群組成員資格的過濾字串。 若要定義包含命名空間中所有裝置的群組,請使用「*」。 | 字串 (必要) |
TrackedResourceTags
| Name | Description | 價值觀 |
|---|
ARM 樣本資源定義
命名空間/群組資源類型可部署為以下操作:
使用範例
資源格式
要建立一個 Microsoft.DeviceRegistry/namespaces/groups 資源,請將以下 JSON 加入你的範本。
{
"type": "Microsoft.DeviceRegistry/namespaces/groups",
"apiVersion": "2026-11-02-preview",
"name": "string",
"location": "string",
"properties": {
"description": "string",
"displayName": "string",
"groupType": "string",
"queryFilter": "string"
},
"tags": {
"{customized property}": "string"
}
}
屬性值
Microsoft。裝置登錄/命名空間/群組
| Name | Description | 價值觀 |
|---|---|---|
| apiVersion | API 版本 | 『2026-11-02-預覽』 |
| 位置 | 資源所在的地理位置 | 字串 (必要) |
| 名字 | 資源名稱 | string 約束: 最小長度 = 3 最大長度 = 63 模式 = ^[0-9a-zA-Z][a-zA-Z0-9-]*$ (必要) |
| properties | 此資源的資源特定屬性。 | 組屬性 |
| tags | 資源標籤 | 標記名稱和值的字典。 請參考模板中的標籤 |
| 型別 | 資源類型 | 「Microsoft。裝置登錄/命名空間/群組」 |
組屬性
| Name | Description | 價值觀 |
|---|---|---|
| description | 資源的易讀描述。 | string 約束: 最大長度 = 1024 |
| displayName | 資源的可讀顯示名稱。 | string 約束: 最大長度 = 256 |
| groupType | 決定哪些資源可以成為成員的團體類型。 | 「RegistryDevice」(必填) |
| queryFilter | 用來判斷群組成員資格的過濾字串。 若要定義包含命名空間中所有裝置的群組,請使用「*」。 | 字串 (必要) |
TrackedResourceTags
| Name | Description | 價值觀 |
|---|
Terraform (AzAPI 提供者) 資源定義
命名空間/群組資源類型可部署為以下操作:
- 資源團體 關於每個 API 版本變更屬性的清單,請參見 變更日誌。
資源格式
要建立 Microsoft.DeviceRegistry/命名空間/群組資源,請將以下 Terraform 加入你的範本。
resource "azapi_resource" "symbolicname" {
type = "Microsoft.DeviceRegistry/namespaces/groups@2026-11-02-preview"
name = "string"
parent_id = "string"
location = "string"
tags = {
{customized property} = "string"
}
body = {
properties = {
description = "string"
displayName = "string"
groupType = "string"
queryFilter = "string"
}
}
}
屬性值
Microsoft。裝置登錄/命名空間/群組
| Name | Description | 價值觀 |
|---|---|---|
| 位置 | 資源所在的地理位置 | 字串 (必要) |
| 名字 | 資源名稱 | string 約束: 最小長度 = 3 最大長度 = 63 模式 = ^[0-9a-zA-Z][a-zA-Z0-9-]*$ (必要) |
| parent_id | 此資源為父系之資源的標識碼。 | 類型的資源標識碼:命名空間 |
| properties | 此資源的資源特定屬性。 | 組屬性 |
| tags | 資源標籤 | 標記名稱和值的字典。 |
| 型別 | 資源類型 | 「Microsoft。裝置登錄/命名空間/groups@2026-11-02-預覽」 |
組屬性
| Name | Description | 價值觀 |
|---|---|---|
| description | 資源的易讀描述。 | string 約束: 最大長度 = 1024 |
| displayName | 資源的可讀顯示名稱。 | string 約束: 最大長度 = 256 |
| groupType | 決定哪些資源可以成為成員的團體類型。 | 「RegistryDevice」(必填) |
| queryFilter | 用來判斷群組成員資格的過濾字串。 若要定義包含命名空間中所有裝置的群組,請使用「*」。 | 字串 (必要) |
TrackedResourceTags
| Name | Description | 價值觀 |
|---|