表單檢視中支援的元素

本文為範本規範入口表單所使用的 表單視圖 (uiFormDefinition.json)的元素支援清單。 Azure 受控應用程式的話,改用 createUiDefinition.json 元素。

表單檢視重用與 CreateUiDefinition 相同的基線元素契約:nameconstraintslabelvisibletypedefaultValuetoolTipoptions除非表單視圖專屬條目另有說明,否則屬性含義相同。 為避免重複共享結構, 參考 欄位會連結到現有的 CreateUiDefinition 元素頁面,以呈現在兩種格式下行為相同的控制項。 可用性由本頁的支援名單決定,而非連結文章的實體資料夾。

支援元素

以下列出的元素類型在表單檢視中皆有支援。

元素 Purpose 參考
Microsoft.Common.CheckBox 布林核取方塊。 Microsoft。Common.CheckBox
Microsoft.Common.DropDown 單選或多選下拉選單。 Microsoft。共通。下拉選單
Microsoft.Common.EditableGrid 可編輯的列與欄。 輸出一個陣列。 Microsoft。Common.EditableGrid
Microsoft.Common.FileUpload 上傳本地檔案(文字內容或 blob URL)。 Microsoft。Common.FileUpload
Microsoft.Common.Grid 唯讀的表格顯示,並具備新增與編輯刀片功能。 Microsoft。Common.Grid
Microsoft.Common.InfoBox 內嵌資訊、警告或錯誤橫幅。 Microsoft。Common.InfoBox
Microsoft.Common.LocationSelector 獨立的區域選擇器。 Microsoft。Common.LocationSelector
Microsoft.Common.ManagementGroupSelector 獨立的管理團隊選擇器。 Microsoft。Common.管理組選擇器
Microsoft.Common.OptionsGroup Pivot風格的廣播團體。 Microsoft。Common.OptionsGroup
Microsoft.Common.PasswordBox 蒙面輸入,並可選確認欄位。 Microsoft。Common.PasswordBox
Microsoft.Common.ResourceGroupSelector 獨立的資源群組選擇器(現有或新建)。 Microsoft。Common.ResourceGroupSelector
Microsoft.Common.ResourceScope 部署範圍的複合訂閱、資源群組和位置選擇器。 Microsoft。Common.ResourceScope
Microsoft.Common.Section 群組中的兒童控制項目。 不穩定。 Microsoft。Common.Section
Microsoft.Common.ServicePrincipalSelector 揀一個 Microsoft Entra 服務主體。 Microsoft。共同服務首席選擇者
Microsoft.Common.Slider 在範圍內的數字滑桿。 Microsoft。通用。滑桿
Microsoft.Common.SubscriptionSelector 獨立訂閱選擇器。 Microsoft。Common.訂閱選擇器
Microsoft.Common.TagsByResource 標準標籤控制。 Microsoft。共通。標籤按資源
Microsoft.Common.TenantSelector 目前租戶的唯讀顯示。 Microsoft。共同。租戶選擇器
Microsoft.Common.TextBlock 靜態描述文字。 Microsoft。通用.TextBlock
Microsoft.Common.TextBox 單行或多行文字輸入。 Microsoft。Common.TextBox
Microsoft.Compute.CredentialsCombo 使用者名稱 +(密碼或 SSH 金鑰)用於建立虛擬機。 需要判 osPlatform 別器("Linux" 或 "Windows");詳見下方說明。 Microsoft。Compute.CredentialsCombo
Microsoft.Compute.SizeSelector VM SKU 選擇器。 Microsoft。Compute.SizeSelector
Microsoft.Compute.UserNameTextBox 使用者名稱文字框,搭配 Azure 虛擬機使用者名稱驗證。 Microsoft。Compute.UserNameTextBox
Microsoft.KeyVault.KeyVaultCertificateSelector 從 金鑰保存庫 選一張證書。 Microsoft。KeyVault.KeyVaultCertificateSelector
Microsoft.ManagedIdentity.IdentitySelector 系統與使用者指派的管理身份。 Microsoft。ManagedIdentity.IdentitySelector
Microsoft.Network.PublicIpAddressCombo 現有或新的公共 IP。 Microsoft。Network.PublicIpAddressCombo
Microsoft.Network.VirtualNetworkCombo 現有或新的虛擬網路與子網。 Microsoft。網路.虛擬網路Combo
Microsoft.Solutions.ArmApiControl 發送 Azure Resource Manager 呼叫,並將回應綁定為表單狀態(無 UI)。 Microsoft。解決方案.ArmApiControl
Microsoft.Solutions.BladeInvokeControl 打開 Azure 入口網站刀片,將回傳的資料綁定到表單狀態(沒有 UI)。 Microsoft。解決方案.BladeInvokeControl
Microsoft.Solutions.ResourceSelector 資源圖支持的 ARM 資源選擇器。 Microsoft。Solutions.ResourceSelector
Microsoft.Storage.MultiStorageAccountCombo 多個儲存帳號並有複製選項。 Microsoft。Storage.MultiStorageAccountCombo
Microsoft.Storage.StorageAccountSelector 現有或新儲存帳戶。 Microsoft。Storage.StorageAccountSelector
Microsoft.Storage.StorageBlobSelector 在儲存帳號裡選一個 blob。 Microsoft。Storage.StorageBlobSelector

與 CreateUiDefinition 元素的差異

這兩種格式有重疊,但不能互換:

  • 表單視圖有自己的支援清單。 不要因為某個元素出現在本頁,就認為它在 uiFormDefinition.json 中有效,或因為某個元素出現在本頁上,就認為它在 createUiDefinition.json 中有效。

  • 在表單檢視中沒有 basics() 函式。 表單檢視沒有隱含的基礎步驟;訂閱、資源群組和位置選擇器是明確的元素(Microsoft.Common.SubscriptionSelector, Microsoft.Common.ResourceGroupSelector, Microsoft.Common.LocationSelector),放置在你選擇的步驟中,而它們的輸出則像其他控制點一樣被參考 steps(...) 。

  • 表單檢視具有明確的範圍選擇元素。Microsoft.Common.ResourceScope、 Microsoft.Common.SubscriptionSelector、 Microsoft.Common.ResourceGroupSelector、 Microsoft.Common.LocationSelectorMicrosoft.Common.ManagementGroupSelectorMicrosoft.Common.TenantSelector 、 ,這些都是表單檢視的標準文件。 在 CreateUiDefinition 中,訂閱、資源群組和位置則由隱含的 Basics 步驟提供。

  • Microsoft.Compute.CredentialsCombo 需要一個 osPlatform 識別者。 type值始終為字串"Microsoft.Compute.CredentialsCombo";Linux 與 Windows 版本則透過元素"osPlatform": "Linux""osPlatform": "Windows"設定或選擇。 這兩種變體的模式 並不 完全相同:

    • Linux 版本必須包含 label.authenticationType、 label.password、 label.confirmPassword和 label.sshPublicKey,並支援 SSH 金鑰驗證模式及旗 options.hidePassword 標。
    • Windows 版本只需 label.password 和 label.confirmPassword;它不接受與 SSH 相關的 label、 toolTip或 options 欄位。

    內部架構定義 Microsoft.Compute.CredentialsCombo-Linux 名稱為 和 Microsoft.Compute.CredentialsCombo-Windows ,是用來強制執行這些平台形狀的 JSON 架構定義名稱——它們不是你輸入 type的值。

下一步