你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Virtual Machine Templates - List

在订阅中实现 GET virtualMachineTemplates。
订阅中的 virtualMachineTemplates 列表。

GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineTemplates?api-version=2023-12-01

URI 参数

名称 必需 类型 说明
subscriptionId
path True

string

订阅 ID。

api-version
query True

string

客户端 API 版本。

响应

名称 类型 说明
200 OK

VirtualMachineTemplatesList

成功

Other Status Codes

ErrorResponse

描述操作失败的原因的错误响应。

安全性

azure_auth

Azure Active Directory OAuth2 Flow。

类型: oauth2
流向: implicit
授权 URL: https://login.microsoftonline.com/common/oauth2/authorize

作用域

名称 说明
user_impersonation 模拟用户帐户

示例

ListVirtualMachineTemplates

示例请求

GET https://management.azure.com/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineTemplates?api-version=2023-12-01

示例响应

{
  "value": [
    {
      "id": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VirtualMachineTemplates/WebFrontEndTemplate",
      "name": "WebFrontEndTemplate",
      "type": "Microsoft.ConnectedVMwarevSphere/VirtualMachineTemplates",
      "location": "East US",
      "extendedLocation": {
        "type": "customLocation",
        "name": "/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"
      },
      "properties": {
        "vCenterId": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter",
        "moRefId": "aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
        "provisioningState": "Succeeded"
      }
    }
  ]
}

定义

名称 说明
createdByType

创建资源的标识的类型。

DiskMode

定义不同类型的磁盘模式。

DiskType

定义不同类型的磁盘。

ErrorAdditionalInfo

资源管理错误附加信息。

ErrorDetail

错误详细信息。

ErrorResponse

错误响应

ExtendedLocation

扩展位置。

FirmwareType

固件类型

IPAddressAllocationMethod

IP 地址分配方法。

NetworkInterface

网络接口模型

NicIPAddressSettings

构造报告的虚拟网络适配器的 IP 地址信息。

NicIPSettings

定义网络接口 IP 设置。

NICType

NIC 类型

OsType

定义不同类型的 VM 来宾操作系统。

PowerOnBootOption

定义启动时电源的选项。

ProvisioningState

获取预配状态。

ResourceStatus

资源状态信息。

systemData

与创建和上次修改资源相关的元数据。

VirtualDisk

虚拟磁盘模型

VirtualMachineTemplate

定义 virtualMachineTemplate。

VirtualMachineTemplatesList

VirtualMachineTemplates 的列表。

createdByType

创建资源的标识的类型。

说明
User
Application
ManagedIdentity
Key

DiskMode

定义不同类型的磁盘模式。

说明
persistent
independent_persistent
independent_nonpersistent

DiskType

定义不同类型的磁盘。

说明
flat
pmem
rawphysical
rawvirtual
sparse
sesparse
unknown

ErrorAdditionalInfo

资源管理错误附加信息。

名称 类型 说明
info

object

其他信息。

type

string

其他信息类型。

ErrorDetail

错误详细信息。

名称 类型 说明
additionalInfo

ErrorAdditionalInfo[]

错误附加信息。

code

string

错误代码。

details

ErrorDetail[]

错误详细信息。

message

string

错误消息。

target

string

错误目标。

ErrorResponse

错误响应

名称 类型 说明
error

ErrorDetail

错误对象。

ExtendedLocation

扩展位置。

名称 类型 说明
name

string

扩展位置名称。

type

string

扩展位置类型。

FirmwareType

固件类型

说明
bios
efi

IPAddressAllocationMethod

IP 地址分配方法。

说明
unset
dynamic
static
linklayer
random
other

NetworkInterface

网络接口模型

名称 类型 说明
deviceKey

integer (int32)

获取或设置设备密钥值。

ipAddresses

string[]

获取或设置 nic IP 地址。

ipSettings

NicIPSettings

获取或设置 ipsettings。

label

string

获取或设置 vCenter 中 nic 连接到的虚拟网络的标签。

macAddress

string

获取或设置 NIC MAC 地址。

name

string

获取或设置网络接口的名称。

networkId

string

获取或设置用于连接虚拟机的网络资源的 ARM ID。

networkMoName

string

获取或设置 nic 连接到的 vCenter 中虚拟网络的名称。

networkMoRefId

string

获取或设置 nic 连接到的虚拟网络的 vCenter MoRef(托管对象引用)ID。

nicType

NICType

NIC 类型

powerOnBoot

PowerOnBootOption

获取或设置启动时电源。

NicIPAddressSettings

构造报告的虚拟网络适配器的 IP 地址信息。

名称 类型 说明
allocationMethod

string

获取 IP 地址分配方法。

ipAddress

string

获取 nic 的 IP 地址。

subnetMask

string

获取掩码。

NicIPSettings

定义网络接口 IP 设置。

名称 类型 说明
allocationMethod

IPAddressAllocationMethod

获取或设置 nic 分配方法。

dnsServers

string[]

获取或设置 dns 服务器。

gateway

string[]

获取或设置网关。

ipAddress

string

获取或设置 nic 的 IP 地址。

ipAddressInfo

NicIPAddressSettings[]

获取或设置报告此 NIC 的 IP 地址信息。 这包含上述相同的 IPv4 信息以及 IPV6 信息。

primaryWinsServer

string

获取或设置主服务器。

secondaryWinsServer

string

获取或设置辅助服务器。

subnetMask

string

获取或设置掩码。

NICType

NIC 类型

说明
vmxnet3
vmxnet2
vmxnet
e1000
e1000e
pcnet32

OsType

定义不同类型的 VM 来宾操作系统。

说明
Windows
Linux
Other

PowerOnBootOption

定义启动时电源的选项。

说明
enabled
disabled

ProvisioningState

获取预配状态。

说明
Succeeded
Failed
Canceled
Provisioning
Updating
Deleting
Accepted
Created

ResourceStatus

资源状态信息。

名称 类型 说明
lastUpdatedAt

string (date-time)

此条件的上次更新时间。

message

string

一条可读消息,指示有关状态的详细信息。

reason

string

条件状态的原因。

severity

string

处理此类条件失败的严重性。

status

string

条件的状态。

type

string

条件的类型。

systemData

与创建和上次修改资源相关的元数据。

名称 类型 说明
createdAt

string (date-time)

资源创建时间戳(UTC)。

createdBy

string

创建资源的标识。

createdByType

createdByType

创建资源的标识的类型。

lastModifiedAt

string (date-time)

上次修改的资源时间戳(UTC)

lastModifiedBy

string

上次修改资源的标识。

lastModifiedByType

createdByType

上次修改资源的标识的类型。

VirtualDisk

虚拟磁盘模型

名称 类型 说明
controllerKey

integer (int32)

获取或设置控制器 ID。

deviceKey

integer (int32)

获取或设置设备密钥值。

deviceName

string

获取或设置设备名称。

diskMode

DiskMode

获取或设置磁盘模式。

diskObjectId

string

获取或设置磁盘对象 ID。

diskSizeGB

integer (int32)

获取或设置磁盘总大小。

diskType

DiskType

获取或设置磁盘支持类型。

label

string

获取或设置 vCenter 中虚拟磁盘的标签。

name

string

获取或设置虚拟磁盘的名称。

unitNumber

integer (int32)

获取或设置控制器上磁盘的单位号。

VirtualMachineTemplate

定义 virtualMachineTemplate。

名称 类型 说明
extendedLocation

ExtendedLocation

获取或设置扩展位置。

id

string

获取或设置 ID。

kind

string

门户/工具等用于为相同类型的资源呈现不同的 UX 体验的元数据;例如,ApiApps 是一种 Microsoft.Web/sites 类型。 如果受支持,资源提供程序必须验证并保留此值。

location

string

获取或设置位置。

name

string

获取或设置名称。

properties.customResourceName

string

获取 Kubernetes 中相应资源的名称。

properties.disks

VirtualDisk[]

获取或设置模板的磁盘。

properties.firmwareType

FirmwareType

固件类型

properties.folderPath

string

获取或设置模板的文件夹路径。

properties.inventoryItemId

string

获取或设置虚拟机模板的清单项 ID。

properties.memorySizeMB

integer (int32)

获取或设置模板的 MB 中的内存大小。

properties.moName

string

获取或设置虚拟机模板的 vCenter 托管对象名称。

properties.moRefId

string

获取或设置虚拟机模板的 vCenter MoRef(托管对象引用)ID。

properties.networkInterfaces

NetworkInterface[]

获取或设置模板的网络接口。

properties.numCPUs

integer (int32)

获取或设置模板的 vCPU 数。

properties.numCoresPerSocket

integer (int32)

获取或设置模板的每个套接字的核心数。 如果未指定,则默认值为 1。

properties.osName

string

获取或设置 os 名称。

properties.osType

OsType

获取或设置 os 的类型。

properties.provisioningState

ProvisioningState

获取预配状态。

properties.statuses

ResourceStatus[]

资源状态信息。

properties.toolsVersion

string

获取或设置 VMware 工具的当前版本。

properties.toolsVersionStatus

string

获取或设置来宾操作系统中安装的 VMware 工具的当前版本状态。

properties.uuid

string

获取或设置此资源的唯一标识符。

properties.vCenterId

string

获取或设置此模板所在的 vCenter 资源的 ARM ID。

systemData

systemData

系统数据。

tags

object

获取或设置资源标记。

type

string

获取或设置资源的类型。

VirtualMachineTemplatesList

VirtualMachineTemplates 的列表。

名称 类型 说明
nextLink

string

要遵循的 URL 以获取 VirtualMachineTemplates 的下一页。

value

VirtualMachineTemplate[]

VirtualMachineTemplates 数组