你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Virtual Machine Images - Get
获取虚拟机映像。
GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions/{version}?api-version=2024-07-01
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
location
|
path | True |
string |
支持的 Azure 区域的名称。 |
offer
|
path | True |
string |
有效的映像发布者产品/服务。 |
publisher
|
path | True |
string |
有效的映像发布者。 |
skus
|
path | True |
string |
有效的映像 SKU。 |
subscription
|
path | True |
string |
唯一标识 azure 订阅Microsoft的订阅凭据。 订阅 ID 构成了每个服务调用的 URI 的一部分。 |
version
|
path | True |
string |
有效的映像 SKU 版本。 |
api-version
|
query | True |
string |
客户端 API 版本。 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
还行 |
|
Other Status Codes |
描述操作失败的原因的错误响应。 |
安全性
azure_auth
Azure Active Directory OAuth2 Flow
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
名称 | 说明 |
---|---|
user_impersonation | 模拟用户帐户 |
示例
Virtual |
Virtual |
VirtualMachineImage_Get_MaximumSet_Gen
示例请求
GET https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.Compute/locations/aaaaaa/publishers/aaa/artifacttypes/vmimage/offers/aaaaaaaaaaaaaaaaaaaaaaaaaaaaa/skus/aaaaaaaaaaaaaaaaaaaaaaaaaaa/versions/aaaaaaaaaaaaaaaaaaa?api-version=2024-07-01
示例响应
{
"properties": {
"plan": {
"publisher": "aaaaaaaaaaaaaaaaaaa",
"name": "aaaaaaaaa",
"product": "aaaaaaaaaaaaaa"
},
"osDiskImage": {
"operatingSystem": "Windows"
},
"dataDiskImages": [
{
"lun": 17
}
],
"automaticOSUpgradeProperties": {
"automaticOSUpgradeSupported": true
},
"hyperVGeneration": "V1",
"disallowed": {
"vmDiskType": "None"
},
"features": [
{
"name": "aaaaaaaaaaaaaaaaaaaaa",
"value": "aaaaaaaaaaaaaaaaaaaa"
}
],
"imageDeprecationStatus": {
"imageState": "ScheduledForDeprecation",
"scheduledDeprecationTime": "2023-01-13T00:00:00+00:00",
"alternativeOption": {
"type": "Offer",
"value": "aaaaaaa"
}
}
},
"name": "aaaaaaaaa",
"location": "aaaaa",
"tags": {
"key6817": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
},
"extendedLocation": {
"name": "aaaaaaaaaaaaaaaaaaaaa",
"type": "EdgeZone"
},
"id": "aaaaaaaaaaa"
}
VirtualMachineImage_Get_MinimumSet_Gen
示例请求
示例响应
{
"name": "aaaaaaaaa",
"location": "aaaaa",
"id": "aaaaaaaaaaa"
}
定义
名称 | 说明 |
---|---|
Alternative |
描述发布服务器在此映像弃用时为此映像指定的替代选项。 |
Alternative |
描述备用选项的类型。 |
Api |
Api 错误。 |
Api |
Api 错误基数。 |
Architecture |
指定体系结构类型 |
Automatic |
描述映像上的自动 OS 升级属性。 |
Cloud |
来自计算服务的错误响应。 |
Data |
包含数据磁盘映像信息。 |
Disallowed |
指定虚拟机映像不允许的配置。 |
Extended |
扩展位置的复杂类型。 |
Extended |
扩展位置的类型。 |
Hyper |
指定 HyperVGeneration 类型 |
Image |
描述映像上的映像弃用状态属性。 |
Image |
描述图像的状态。 |
Inner |
内部错误详细信息。 |
Operating |
osDiskImage 的操作系统。 |
OSDisk |
包含 os 磁盘映像信息。 |
Purchase |
用于通过 MarketPlace 建立任何第三方项目的购买上下文。 |
Virtual |
描述虚拟机映像。 |
Virtual |
指定映像支持的其他功能 |
Vm |
不允许的 VM 磁盘类型。 |
AlternativeOption
描述发布服务器在此映像弃用时为此映像指定的替代选项。
名称 | 类型 | 说明 |
---|---|---|
type |
描述备用选项的类型。 |
|
value |
string |
指示发布服务器指定的替代选项值。 当类型为“套餐”或“计划”名称时,这是套餐名称。 |
AlternativeType
描述备用选项的类型。
值 | 说明 |
---|---|
None | |
Offer | |
Plan |
ApiError
Api 错误。
名称 | 类型 | 说明 |
---|---|---|
code |
string |
错误代码。 |
details |
API 错误详细信息 |
|
innererror |
Api 内部错误 |
|
message |
string |
错误消息。 |
target |
string |
特定错误的目标。 |
ApiErrorBase
Api 错误基数。
名称 | 类型 | 说明 |
---|---|---|
code |
string |
错误代码。 |
message |
string |
错误消息。 |
target |
string |
特定错误的目标。 |
ArchitectureTypes
指定体系结构类型
值 | 说明 |
---|---|
Arm64 | |
x64 |
AutomaticOSUpgradeProperties
描述映像上的自动 OS 升级属性。
名称 | 类型 | 说明 |
---|---|---|
automaticOSUpgradeSupported |
boolean |
指定映像上是否支持自动 OS 升级。 |
CloudError
来自计算服务的错误响应。
名称 | 类型 | 说明 |
---|---|---|
error |
Api 错误。 |
DataDiskImage
包含数据磁盘映像信息。
名称 | 类型 | 说明 |
---|---|---|
lun |
integer |
指定数据磁盘的逻辑单元号。 此值用于标识 VM 中的数据磁盘,因此对于附加到 VM 的每个数据磁盘必须是唯一的。 |
DisallowedConfiguration
指定虚拟机映像不允许的配置。
名称 | 类型 | 说明 |
---|---|---|
vmDiskType |
不允许的 VM 磁盘类型。 |
ExtendedLocation
扩展位置的复杂类型。
名称 | 类型 | 说明 |
---|---|---|
name |
string |
扩展位置的名称。 |
type |
扩展位置的类型。 |
ExtendedLocationTypes
扩展位置的类型。
值 | 说明 |
---|---|
EdgeZone |
HyperVGenerationTypes
指定 HyperVGeneration 类型
值 | 说明 |
---|---|
V1 | |
V2 |
ImageDeprecationStatus
描述映像上的映像弃用状态属性。
名称 | 类型 | 说明 |
---|---|---|
alternativeOption |
描述发布服务器在此映像弃用时为此映像指定的替代选项。 |
|
imageState |
描述图像的状态。 |
|
scheduledDeprecationTime |
string |
将来,此映像将被标记为已弃用的时间。 发布服务器选择此计划时间。 |
ImageState
描述图像的状态。
值 | 说明 |
---|---|
Active | |
Deprecated | |
ScheduledForDeprecation |
InnerError
内部错误详细信息。
名称 | 类型 | 说明 |
---|---|---|
errordetail |
string |
内部错误消息或异常转储。 |
exceptiontype |
string |
异常类型。 |
OperatingSystemTypes
osDiskImage 的操作系统。
值 | 说明 |
---|---|
Linux | |
Windows |
OSDiskImage
包含 os 磁盘映像信息。
名称 | 类型 | 说明 |
---|---|---|
operatingSystem |
osDiskImage 的操作系统。 |
PurchasePlan
用于通过 MarketPlace 建立任何第三方项目的购买上下文。
名称 | 类型 | 说明 |
---|---|---|
name |
string |
计划 ID。 |
product |
string |
指定来自市场的映像的产品。 此值与 imageReference 元素下的 Offer 相同。 |
publisher |
string |
发布者 ID。 |
VirtualMachineImage
描述虚拟机映像。
名称 | 类型 | 说明 |
---|---|---|
extendedLocation |
虚拟机的扩展位置。 |
|
id |
string |
资源 ID |
location |
string |
资源支持的 Azure 位置。 |
name |
string |
资源的名称。 |
properties.architecture |
指定体系结构类型 |
|
properties.automaticOSUpgradeProperties |
描述映像上的自动 OS 升级属性。 |
|
properties.dataDiskImages |
包含数据磁盘映像信息。 |
|
properties.disallowed |
指定从映像创建的 VirtualMachine 的不允许配置 |
|
properties.features |
指定映像支持的其他功能 |
|
properties.hyperVGeneration |
指定 HyperVGeneration 类型 |
|
properties.imageDeprecationStatus |
描述映像上的映像弃用状态属性。 |
|
properties.osDiskImage |
包含 os 磁盘映像信息。 |
|
properties.plan |
用于通过 MarketPlace 建立任何第三方项目的购买上下文。 |
|
tags |
object |
指定分配给虚拟机的标记。 有关使用标记的详细信息,请参阅 使用标记来组织 Azure 资源。 |
VirtualMachineImageFeature
指定映像支持的其他功能
名称 | 类型 | 说明 |
---|---|---|
name |
string |
功能的名称。 |
value |
string |
该功能的相应值。 |
VmDiskTypes
不允许的 VM 磁盘类型。
值 | 说明 |
---|---|
None | |
Unmanaged |