Bicep 資源定義
計算機/擴充功能資源類型可以使用目標作業來部署:
如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。
使用範例
Azure 已驗證的模組
下列 Azure 驗證模組 可用來部署此資源類型。
若要建立 Microsoft.HybridCompute/machines/extensions 資源,請將下列 Bicep 新增至範本。
resource symbolicname 'Microsoft.HybridCompute/machines/extensions@2026-06-16-preview' = {
parent: resourceSymbolicName
location: 'string'
name: 'string'
properties: {
autoUpgradeMinorVersion: bool
enableAutomaticUpgrade: bool
forceUpdateTag: 'string'
instanceView: {
name: 'string'
status: {
code: 'string'
displayStatus: 'string'
level: 'string'
message: 'string'
time: 'string'
}
type: 'string'
typeHandlerVersion: 'string'
}
protectedSettings: {
{customized property}: any(...)
}
publisher: 'string'
settings: {
{customized property}: any(...)
}
type: 'string'
typeHandlerVersion: 'string'
}
tags: {
{customized property}: 'string'
}
}
屬性值
Microsoft.HybridCompute/machines/extensions
| 名稱 |
Description |
Value |
| 位置 |
資源所在的地理位置 |
字串 (必要) |
| 名字 |
資源名稱 |
字串 (必要) |
| 父代 |
在 Bicep 中,您可以指定子資源的父資源。 只有在父資源外部宣告子資源時,才需要新增這個屬性。
如需詳細資訊,請參閱 父資源外部的子資源。 |
類型資源的符號名稱:計算機 |
| 屬性 |
描述計算機延伸模組屬性。 |
MachineExtensionProperties |
| tags |
資源標籤 |
標記名稱和值的字典。 請參閱範本中的 標籤 |
MachineExtensionInstanceView
MachineExtensionInstanceViewStatus
| 名稱 |
Description |
Value |
| 字碼 |
狀態代碼。 |
字串 |
| displayStatus |
狀態的簡短可當地語系化標籤。 |
字串 |
| 水平儀 |
層級程序代碼。 |
“錯誤” 'Info' “警告” |
| 訊息 |
詳細的狀態消息,包括警示和錯誤訊息。 |
字串 |
| time |
狀態的時間。 |
字串 |
MachineExtensionProperties
| 名稱 |
Description |
Value |
| autoUpgradeMinorVersion |
指出如果部署期間有新的次要版本,擴充功能是否應該使用較新的次要版本。 不過,部署之後,除非重新部署,否則擴充功能不會升級次要版本,即使此屬性設定為 true 也一定會升級。 |
布爾 (bool) |
| 啟用自動升級 |
指出如果有較新版本可用,平臺是否應該自動升級延伸模組。 |
布爾 (bool) |
| forceUpdateTag |
即使延伸模組組態尚未變更,延伸模組處理程式也應該強制更新。 |
字串 |
| instanceView 實例檢視 |
計算機擴充實例檢視。 |
MachineExtensionInstanceView |
| protectedSettings |
延伸模組可以包含 protectedSettings 或 protectedSettingsFromKeyVault 或完全沒有受保護的設定。 |
MachineExtensionPropertiesProtectedSettings |
| 發行者 |
擴充處理程序發行者的名稱。 |
字串 |
| 設定 |
擴充功能的 Json 格式化公用設定。 |
MachineExtensionProperties設置 |
| 型別 |
指定延伸模組的類型;例如“CustomScriptExtension”。 |
字串 |
| typeHandlerVersion |
指定文稿處理程式的版本。 |
字串 |
MachineExtensionPropertiesProtectedSettings
MachineExtensionProperties設置
ARM 樣本資源定義
計算機/擴充功能資源類型可以使用目標作業來部署:
使用範例
若要建立 Microsoft.HybridCompute/machines/extensions 資源,請將下列 JSON 新增至範本。
{
"type": "Microsoft.HybridCompute/machines/extensions",
"apiVersion": "2026-06-16-preview",
"name": "string",
"location": "string",
"properties": {
"autoUpgradeMinorVersion": "bool",
"enableAutomaticUpgrade": "bool",
"forceUpdateTag": "string",
"instanceView": {
"name": "string",
"status": {
"code": "string",
"displayStatus": "string",
"level": "string",
"message": "string",
"time": "string"
},
"type": "string",
"typeHandlerVersion": "string"
},
"protectedSettings": {
"{customized property}": {}
},
"publisher": "string",
"settings": {
"{customized property}": {}
},
"type": "string",
"typeHandlerVersion": "string"
},
"tags": {
"{customized property}": "string"
}
}
屬性值
Microsoft.HybridCompute/machines/extensions
| 名稱 |
Description |
Value |
| apiVersion |
API 版本 |
『2026-06-16預覽』 |
| 位置 |
資源所在的地理位置 |
字串 (必要) |
| 名字 |
資源名稱 |
字串 (必要) |
| 屬性 |
描述計算機延伸模組屬性。 |
MachineExtensionProperties |
| tags |
資源標籤 |
標記名稱和值的字典。 請參閱範本中的 標籤 |
| 型別 |
資源類型 |
“Microsoft.HybridCompute/machines/extensions” |
MachineExtensionInstanceView
MachineExtensionInstanceViewStatus
| 名稱 |
Description |
Value |
| 字碼 |
狀態代碼。 |
字串 |
| displayStatus |
狀態的簡短可當地語系化標籤。 |
字串 |
| 水平儀 |
層級程序代碼。 |
“錯誤” 'Info' “警告” |
| 訊息 |
詳細的狀態消息,包括警示和錯誤訊息。 |
字串 |
| time |
狀態的時間。 |
字串 |
MachineExtensionProperties
| 名稱 |
Description |
Value |
| autoUpgradeMinorVersion |
指出如果部署期間有新的次要版本,擴充功能是否應該使用較新的次要版本。 不過,部署之後,除非重新部署,否則擴充功能不會升級次要版本,即使此屬性設定為 true 也一定會升級。 |
布爾 (bool) |
| 啟用自動升級 |
指出如果有較新版本可用,平臺是否應該自動升級延伸模組。 |
布爾 (bool) |
| forceUpdateTag |
即使延伸模組組態尚未變更,延伸模組處理程式也應該強制更新。 |
字串 |
| instanceView 實例檢視 |
計算機擴充實例檢視。 |
MachineExtensionInstanceView |
| protectedSettings |
延伸模組可以包含 protectedSettings 或 protectedSettingsFromKeyVault 或完全沒有受保護的設定。 |
MachineExtensionPropertiesProtectedSettings |
| 發行者 |
擴充處理程序發行者的名稱。 |
字串 |
| 設定 |
擴充功能的 Json 格式化公用設定。 |
MachineExtensionProperties設置 |
| 型別 |
指定延伸模組的類型;例如“CustomScriptExtension”。 |
字串 |
| typeHandlerVersion |
指定文稿處理程式的版本。 |
字串 |
MachineExtensionPropertiesProtectedSettings
MachineExtensionProperties設置
計算機/擴充功能資源類型可以使用目標作業來部署:
-
資源團體 關於每個 API 版本變更屬性的清單,請參見 變更日誌。
若要建立 Microsoft.HybridCompute/machines/extensions 資源,請將下列 Terraform 新增至您的範本。
resource "azapi_resource" "symbolicname" {
type = "Microsoft.HybridCompute/machines/extensions@2026-06-16-preview"
name = "string"
parent_id = "string"
location = "string"
tags = {
{customized property} = "string"
}
body = {
properties = {
autoUpgradeMinorVersion = bool
enableAutomaticUpgrade = bool
forceUpdateTag = "string"
instanceView = {
name = "string"
status = {
code = "string"
displayStatus = "string"
level = "string"
message = "string"
time = "string"
}
type = "string"
typeHandlerVersion = "string"
}
protectedSettings = {
{customized property} = ?
}
publisher = "string"
settings = {
{customized property} = ?
}
type = "string"
typeHandlerVersion = "string"
}
}
}
屬性值
Microsoft.HybridCompute/machines/extensions
| 名稱 |
Description |
Value |
| 位置 |
資源所在的地理位置 |
字串 (必要) |
| 名字 |
資源名稱 |
字串 (必要) |
| parent_id |
此資源為父系之資源的標識碼。 |
類型資源的標識碼:計算機 |
| 屬性 |
描述計算機延伸模組屬性。 |
MachineExtensionProperties |
| tags |
資源標籤 |
標記名稱和值的字典。 |
| 型別 |
資源類型 |
「Microsoft。HybridCompute/machines/extensions@2026-06-16-preview” |
MachineExtensionInstanceView
MachineExtensionInstanceViewStatus
| 名稱 |
Description |
Value |
| 字碼 |
狀態代碼。 |
字串 |
| displayStatus |
狀態的簡短可當地語系化標籤。 |
字串 |
| 水平儀 |
層級程序代碼。 |
“錯誤” 'Info' “警告” |
| 訊息 |
詳細的狀態消息,包括警示和錯誤訊息。 |
字串 |
| time |
狀態的時間。 |
字串 |
MachineExtensionProperties
| 名稱 |
Description |
Value |
| autoUpgradeMinorVersion |
指出如果部署期間有新的次要版本,擴充功能是否應該使用較新的次要版本。 不過,部署之後,除非重新部署,否則擴充功能不會升級次要版本,即使此屬性設定為 true 也一定會升級。 |
布爾 (bool) |
| 啟用自動升級 |
指出如果有較新版本可用,平臺是否應該自動升級延伸模組。 |
布爾 (bool) |
| forceUpdateTag |
即使延伸模組組態尚未變更,延伸模組處理程式也應該強制更新。 |
字串 |
| instanceView 實例檢視 |
計算機擴充實例檢視。 |
MachineExtensionInstanceView |
| protectedSettings |
延伸模組可以包含 protectedSettings 或 protectedSettingsFromKeyVault 或完全沒有受保護的設定。 |
MachineExtensionPropertiesProtectedSettings |
| 發行者 |
擴充處理程序發行者的名稱。 |
字串 |
| 設定 |
擴充功能的 Json 格式化公用設定。 |
MachineExtensionProperties設置 |
| 型別 |
指定延伸模組的類型;例如“CustomScriptExtension”。 |
字串 |
| typeHandlerVersion |
指定文稿處理程式的版本。 |
字串 |
MachineExtensionPropertiesProtectedSettings
MachineExtensionProperties設置