Virtual Machine Templates - List By Resource Group
在资源组中实现 GET VirtualMachineTemplates。
资源组中的 VirtualMachineTemplates 列表。
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates?api-version=2025-03-13
URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
资源组的名称。 名称不区分大小写。 |
|
subscription
|
path | True |
string (uuid) |
目标订阅的 ID。 该值必须是 UUID。 |
|
api-version
|
query | True |
string minLength: 1 |
要用于此作的 API 版本。 |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 200 OK |
Azure 操作已成功完成。 |
|
| Other Status Codes |
意外的错误响应。 |
安全性
azure_auth
Azure Active Directory OAuth2 Flow。
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
| 名称 | 说明 |
|---|---|
| user_impersonation | 模拟用户帐户 |
示例
|
Virtual |
|
Virtual |
VirtualMachineTemplates_ListByResourceGroup_MaximumSet
示例请求
GET https://management.azure.com/subscriptions/79332E5A-630B-480F-A266-A941C015AB19/resourceGroups/rgscvmm/providers/Microsoft.ScVmm/virtualMachineTemplates?api-version=2025-03-13
示例响应
{
"value": [
{
"properties": {
"inventoryItemId": "qjrykoogccwlgkd",
"uuid": "12345678-1234-1234-1234-12345678abcd",
"vmmServerId": "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ScVmm/vmmServers/vmmServerName",
"osType": "Windows",
"osName": "qcbolnbisklo",
"computerName": "asxghqngsojdsdptpirbz",
"memoryMB": 24,
"cpuCount": 23,
"limitCpuForMigration": "true",
"dynamicMemoryEnabled": "true",
"isCustomizable": "true",
"dynamicMemoryMaxMB": 21,
"dynamicMemoryMinMB": 21,
"isHighlyAvailable": "true",
"generation": 16,
"networkInterfaces": [
{
"name": "kvofzqulbjlbtt",
"displayName": "yoayfd",
"ipv4Addresses": [
"eeunirpkpqazzxhsqonkxcfuks"
],
"ipv6Addresses": [
"pk"
],
"macAddress": "oaeqqegt",
"virtualNetworkId": "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ScVmm/virtualNetworks/virtualNetworkName",
"networkName": "lqbm",
"ipv4AddressType": "Dynamic",
"ipv6AddressType": "Dynamic",
"macAddressType": "Dynamic",
"nicId": "roxpsvlo"
}
],
"disks": [
{
"name": "fgnckfymwdsqnfxkdvexuaobe",
"displayName": "fgladknawlgjodo",
"diskId": "ltdrwcfjklpsimhzqyh",
"diskSizeGB": 30,
"maxDiskSizeGB": 18,
"bus": 8,
"lun": 10,
"busType": "zu",
"vhdType": "cnbeeeylrvopigdynvgpkfp",
"volumeType": "ckkymkuekzzqhexyjueruzlfemoeln",
"vhdFormatType": "vbcrrmhgahznifudvhxfagwoplcb",
"templateDiskId": "lcdwrokpyvekqccclf",
"storageQoSPolicy": {
"name": "ceiyfrflu",
"id": "o"
},
"createDiffDisk": "true"
}
],
"provisioningState": "Succeeded"
},
"extendedLocation": {
"type": "customLocation",
"name": "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ExtendedLocation/customLocations/customLocationName"
},
"tags": {
"key9494": "kkbmfpwhmvlobm"
},
"location": "ayxsyduviotylbojh",
"id": "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ScVmm/virtualMachineTemplates/virtualMachineTemplateName",
"name": "ioeuwaznkaayvhpqbnrwbr",
"type": "egfzqiscydkyddksvsjujdlee",
"systemData": {
"createdBy": "p",
"createdByType": "User",
"createdAt": "2024-01-29T22:28:00.094Z",
"lastModifiedBy": "goxcwpyyqlxndquly",
"lastModifiedByType": "User",
"lastModifiedAt": "2024-01-29T22:28:00.095Z"
}
}
],
"nextLink": "https://microsoft.com/atbdyyso"
}
VirtualMachineTemplates_ListByResourceGroup_MinimumSet
示例请求
GET https://management.azure.com/subscriptions/79332E5A-630B-480F-A266-A941C015AB19/resourceGroups/rgscvmm/providers/Microsoft.ScVmm/virtualMachineTemplates?api-version=2025-03-13
示例响应
{
"value": [
{
"id": "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.ScVmm/virtualMachineTemplates/virtualMachineTemplateName",
"extendedLocation": {},
"location": "ayxsyduviotylbojh"
}
]
}
定义
| 名称 | 说明 |
|---|---|
|
Allocation |
网络地址分配方法。 |
|
created |
创建资源的标识的类型。 |
|
Create |
创建差异磁盘。 |
|
Dynamic |
已启用动态内存。 |
|
Error |
资源管理错误附加信息。 |
|
Error |
错误详细信息。 |
|
Error |
错误响应 |
|
Extended |
扩展位置。 |
|
Is |
可自定义。 |
|
Is |
高度可用。 |
|
Limit |
限制迁移的 CPU。 |
|
Network |
网络接口模型 |
|
Os |
虚拟机操作系统类型。 |
|
Provisioning |
资源的预配状态。 |
|
Storage |
StorageQoSPolicyDetails 定义。 |
|
system |
与创建和上次修改资源相关的元数据。 |
|
Virtual |
虚拟磁盘模型 |
|
Virtual |
VirtualMachineTemplates 资源定义。 |
|
Virtual |
VirtualMachineTemplate 列表操作的响应。 |
AllocationMethod
网络地址分配方法。
| 值 | 说明 |
|---|---|
| Dynamic |
动态分配的地址。 |
| Static |
静态分配的地址。 |
createdByType
创建资源的标识的类型。
| 值 | 说明 |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
CreateDiffDisk
创建差异磁盘。
| 值 | 说明 |
|---|---|
| true |
启用创建差异磁盘。 |
| false |
禁用创建差异磁盘。 |
DynamicMemoryEnabled
已启用动态内存。
| 值 | 说明 |
|---|---|
| true |
启用动态内存。 |
| false |
禁用动态内存。 |
ErrorAdditionalInfo
资源管理错误附加信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| info |
object |
其他信息。 |
| type |
string |
其他信息类型。 |
ErrorDetail
错误详细信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| additionalInfo |
错误附加信息。 |
|
| code |
string |
错误代码。 |
| details |
错误详细信息。 |
|
| message |
string |
错误消息。 |
| target |
string |
错误目标。 |
ErrorResponse
错误响应
| 名称 | 类型 | 说明 |
|---|---|---|
| error |
错误对象。 |
ExtendedLocation
扩展位置。
| 名称 | 类型 | 说明 |
|---|---|---|
| name |
string (arm-id) |
扩展位置名称。 |
| type |
string |
扩展位置类型。 |
IsCustomizable
可自定义。
| 值 | 说明 |
|---|---|
| true |
启用可自定义。 |
| false |
禁用可自定义。 |
IsHighlyAvailable
高度可用。
| 值 | 说明 |
|---|---|
| true |
启用高可用性。 |
| false |
禁用高可用性。 |
LimitCpuForMigration
限制迁移的 CPU。
| 值 | 说明 |
|---|---|
| true |
为迁移启用限制 CPU。 |
| false |
禁用限制用于迁移的 CPU。 |
NetworkInterface
网络接口模型
| 名称 | 类型 | 说明 |
|---|---|---|
| displayName |
string |
获取网络接口的显示名称,如 vmmServer 中所示。 如果未设置名称,则这是 NIC 的回退标签。 |
| ipv4AddressType |
获取或设置 ipv4 地址类型。 |
|
| ipv4Addresses |
string[] |
获取 nic ipv4 地址。 |
| ipv6AddressType |
获取或设置 ipv6 地址类型。 |
|
| ipv6Addresses |
string[] |
获取 nic ipv6 地址。 |
| macAddress |
string |
获取或设置 nic MAC 地址。 |
| macAddressType |
获取或设置 mac 地址类型。 |
|
| name |
string |
获取或设置网络接口的名称。 |
| networkName |
string |
获取 nic 连接到的 vmmServer 中的虚拟网络的名称。 |
| nicId |
string |
获取或设置 nic ID。 |
| virtualNetworkId |
string (arm-id) |
获取或设置用于连接 nic 的 Microsoft.ScVmm/virtualNetwork 资源的 ARM ID。 |
OsType
虚拟机操作系统类型。
| 值 | 说明 |
|---|---|
| Windows |
Windows 操作系统。 |
| Linux |
Linux 操作系统。 |
| Other |
其他操作系统。 |
ProvisioningState
资源的预配状态。
| 值 | 说明 |
|---|---|
| Succeeded |
已创建资源。 |
| Failed |
资源创建失败。 |
| Canceled |
资源创建已取消。 |
| Provisioning |
资源正在预配。 |
| Updating |
资源正在更新。 |
| Deleting |
正在删除资源。 |
| Accepted |
资源已被接受。 |
| Created |
已创建资源。 |
StorageQosPolicyDetails
StorageQoSPolicyDetails 定义。
| 名称 | 类型 | 说明 |
|---|---|---|
| id |
string |
QoS 策略的 ID。 |
| name |
string |
策略的名称。 |
systemData
与创建和上次修改资源相关的元数据。
| 名称 | 类型 | 说明 |
|---|---|---|
| createdAt |
string (date-time) |
资源创建时间戳 (UTC) 。 |
| createdBy |
string |
创建资源的标识。 |
| createdByType |
创建资源的标识的类型。 |
|
| lastModifiedAt |
string (date-time) |
上次修改的资源时间戳(UTC) |
| lastModifiedBy |
string |
上次修改资源的标识。 |
| lastModifiedByType |
上次修改资源的标识的类型。 |
VirtualDisk
虚拟磁盘模型
| 名称 | 类型 | 说明 |
|---|---|---|
| bus |
integer (int32) |
获取或设置磁盘总线。 |
| busType |
string |
获取或设置磁盘总线类型。 |
| createDiffDisk |
获取或设置一个值,该值指示差异磁盘。 |
|
| diskId |
string |
获取或设置磁盘 ID。 |
| diskSizeGB |
integer (int32) |
获取或设置磁盘总大小。 |
| displayName |
string |
获取虚拟磁盘的显示名称,如 vmmServer 中所示。 如果未设置名称,则这是磁盘的回退标签。 |
| lun |
integer (int32) |
获取或设置磁盘 lun。 |
| maxDiskSizeGB |
integer (int32) |
获取最大磁盘大小。 |
| name |
string |
获取或设置磁盘的名称。 |
| storageQoSPolicy |
磁盘的 QoS 策略。 |
|
| templateDiskId |
string |
获取或设置模板中的磁盘 ID。 |
| vhdFormatType |
string |
获取磁盘 vhd 格式类型。 |
| vhdType |
string |
获取或设置磁盘 vhd 类型。 |
| volumeType |
string |
获取磁盘卷类型。 |
VirtualMachineTemplate
VirtualMachineTemplates 资源定义。
| 名称 | 类型 | 说明 |
|---|---|---|
| extendedLocation |
扩展位置。 |
|
| id |
string (arm-id) |
资源的完全限定资源 ID。 例如“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}” |
| location |
string |
资源所在的地理位置 |
| name |
string |
资源的名称 |
| properties.computerName |
string |
获取计算机名称。 |
| properties.cpuCount |
integer (int32) |
获取 vm 的所需 vCPU 数。 |
| properties.disks |
获取模板的磁盘。 |
|
| properties.dynamicMemoryEnabled |
获取一个值,该值指示是否启用动态内存。 |
|
| properties.dynamicMemoryMaxMB |
integer (int32) |
获取 vm 的最大动态内存。 |
| properties.dynamicMemoryMinMB |
integer (int32) |
获取 vm 的最小动态内存。 |
| properties.generation |
integer (int32) |
获取 VM 的生成。 |
| properties.inventoryItemId |
string |
获取或设置资源的清单项 ID。 |
| properties.isCustomizable |
获取一个值,该值指示 VM 模板是否可自定义。 |
|
| properties.isHighlyAvailable |
获取高度可用的属性。 |
|
| properties.limitCpuForMigration |
获取一个值,该值指示是否为 VM 的实时迁移启用处理器兼容性模式。 |
|
| properties.memoryMB |
integer (int32) |
MemoryMB 是虚拟机内存的所需大小(以 MB 为单位)。 |
| properties.networkInterfaces |
获取模板的网络接口。 |
|
| properties.osName |
string |
获取 os 名称。 |
| properties.osType |
获取 os 的类型。 |
|
| properties.provisioningState |
资源的预配状态。 |
|
| properties.uuid |
string pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$ |
虚拟机模板的唯一 ID。 |
| properties.vmmServerId |
string (arm-id) |
此资源所在的 vmmServer 资源的 ARM ID。 |
| systemData |
包含 createdBy 和 modifiedBy 信息的 Azure 资源管理器元数据。 |
|
| tags |
object |
资源标记。 |
| type |
string |
资源的类型。 例如“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts” |
VirtualMachineTemplateListResult
VirtualMachineTemplate 列表操作的响应。
| 名称 | 类型 | 说明 |
|---|---|---|
| nextLink |
string (uri) |
指向下一页项的链接 |
| value |
此页上的 VirtualMachineTemplate 项 |