Virtual Machine Image Templates - List By Resource Group
获取与指定资源组关联的 VM 映像模板的相关信息。
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VirtualMachineImages/imageTemplates?api-version=2022-07-01
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
resource
|
path | True |
string |
资源组的名称。 |
subscription
|
path | True |
string |
唯一标识 azure 订阅Microsoft的订阅凭据。 订阅 ID 构成了每个服务调用的 URI 的一部分。 |
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 | 模拟用户帐户 |
示例
List images by resource group
示例请求
GET https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates?api-version=2022-07-01
示例响应
{
"value": [
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate",
"name": "myImageTemplate",
"location": "westus",
"type": "Microsoft.VirtualMachineImages/imageTemplates",
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity_1": {
"clientId": "00000000-0000-0000-0000-000000000000",
"principalId": "00000000-0000-0000-0000-000000000000"
}
}
},
"properties": {
"source": {
"type": "ManagedImage",
"imageId": "/subscriptions/{subscription-id}/resourceGroups/source_rg/providers/Microsoft.Compute/images/source_image"
},
"customize": [
{
"type": "Shell",
"name": "Shell customization example",
"scriptUri": "https://example.com/path/to/script.sh"
}
],
"distribute": [
{
"type": "ManagedImage",
"location": "1_location",
"runOutputName": "image_it_pir_1",
"imageId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/image_it_1",
"artifactTags": {
"tagName": "value"
}
}
],
"vmProfile": {
"vmSize": "Standard_D2s_v3",
"osDiskSizeGB": 64
}
}
},
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myOtherImageTemplate",
"name": "myOtherImageTemplate",
"location": "eastus",
"type": "Microsoft.VirtualMachineImages/imageTemplates",
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity_1": {
"clientId": "00000000-0000-0000-0000-000000000000",
"principalId": "00000000-0000-0000-0000-000000000000"
}
}
},
"properties": {
"source": {
"type": "PlatformImage",
"publisher": "Canonical",
"offer": "UbuntuServer",
"sku": "18.04-LTS",
"version": "18.04.201902121",
"planInfo": {
"planName": "example_plan_name",
"planProduct": "example_plan_product",
"planPublisher": "example_plan_publisher"
}
},
"customize": [
{
"type": "Shell",
"name": "Shell customization example",
"scriptUri": "https://example.com/path/to/script.sh"
}
],
"distribute": [
{
"type": "ManagedImage",
"location": "centralus",
"runOutputName": "singleImage",
"imageId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/baseimage-cus"
},
{
"type": "SharedImage",
"galleryImageId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/gallery/baseimages/images/baseimage",
"replicationRegions": [
"eastus",
"westus"
],
"runOutputName": "gallery",
"excludeFromLatest": true,
"storageAccountType": "Standard_LRS"
}
],
"vmProfile": {
"vmSize": "Standard_D8s_v3",
"osDiskSizeGB": 64
}
}
}
],
"nextLink": "/subscriptions/{subscription-id}/resourceGroup/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates?api-version=2022-07-01&skip-token=2"
}
定义
名称 | 说明 |
---|---|
Cloud |
Azure VM 映像生成器服务的错误响应。 |
Cloud |
Azure VM 映像生成器服务的错误响应。 |
created |
创建资源的标识的类型。 |
Distribute |
生成基于现有版本号的最新版本号。 |
Distribute |
根据源映像的版本号生成版本号 |
Image |
映像模板是由 Microsoft.VirtualMachineImages 提供程序管理的 ARM 资源 |
Image |
将文件上传到 VM(Linux、Windows)。 对应于 Packer 文件预配程序 |
Image |
将验证所需的文件上传到 VM(Linux、Windows)。 对应于 Packer 文件预配程序 |
Image |
映像模板的标识。 |
Image |
描述运行映像模板的最新状态 |
Image |
列表图像模板操作的结果 |
Image |
作为托管磁盘映像进行分发。 |
Image |
描述客户订阅中托管映像的映像源。 此映像必须与映像生成器模板位于同一订阅和区域中。 |
Image |
|
Image |
在 VM(Windows)上运行指定的 PowerShell。 对应于 Packer powershell 预配程序。 只能指定“scriptUri”或“内联”之一。 |
Image |
在验证阶段(Windows)期间运行指定的 PowerShell 脚本。 对应于 Packer powershell 预配程序。 只能指定“scriptUri”或“内联”之一。 |
Image |
重新启动 VM 并等待 VM 重新联机(Windows)。 对应于 Packer windows-restart 预配程序 |
Image |
通过 Azure 计算库进行分发。 |
Image |
描述在 Azure 计算库或直接共享库中是映像版本的映像源。 |
Image |
在自定义阶段(Linux)中运行 shell 脚本。 对应于 Packer shell 预配程序。 只能指定“scriptUri”或“内联”之一。 |
Image |
在验证阶段(Linux)中运行指定的 shell 脚本。 对应于 Packer shell 预配程序。 只能指定“scriptUri”或“内联”之一。 |
Image |
在存储帐户中通过 VHD 进行分发。 |
Image |
描述用于生成和验证映像的虚拟机 |
Image |
安装 Windows 更新。 对应于 Packer Windows 更新预配程序(https://github.com/rgl/packer-provisioner-windows-update) |
Optimize |
指定要对图像执行的优化。 |
Platform |
平台映像的购买计划配置。 |
Provisioning |
描述创建或更新映像模板时发生的错误 |
Provisioning |
预配失败的错误代码 |
Provisioning |
资源的预配状态 |
Resource |
用于映像模板的标识类型。 类型“None”将从映像模板中删除任何标识。 |
Run |
上次运行的状态 |
Run |
上次运行的子状态 |
Shared |
指定要用于存储 Azure 计算库映像版本的存储帐户类型。 |
system |
与创建和上次修改资源相关的元数据。 |
Target |
描述目标区域信息。 |
User |
用户分配的标识属性 |
Validate |
要对生成的映像执行的验证的配置选项和列表。 |
Virtual |
虚拟网络配置。 |
Vm |
优化在映像上应用,以便更快地启动 VM。 |
VMBoot |
启用此字段将通过优化最终自定义映像输出来提高 VM 启动时间。 |
CloudError
Azure VM 映像生成器服务的错误响应。
名称 | 类型 | 说明 |
---|---|---|
error |
有关错误的详细信息。 |
CloudErrorBody
Azure VM 映像生成器服务的错误响应。
名称 | 类型 | 说明 |
---|---|---|
code |
string |
错误的标识符。 代码是固定的,旨在以编程方式使用。 |
details |
有关错误的其他详细信息的列表。 |
|
message |
string |
描述错误的消息,旨在适合在用户界面中显示。 |
target |
string |
特定错误的目标。 例如,错误属性的名称。 |
createdByType
创建资源的标识的类型。
值 | 说明 |
---|---|
Application | |
Key | |
ManagedIdentity | |
User |
DistributeVersionerLatest
生成基于现有版本号的最新版本号。
名称 | 类型 | 默认值 | 说明 |
---|---|---|---|
major |
integer (int32) minimum: -1 |
-1 |
生成的版本号的主要版本。 根据此值作为主要版本的版本确定什么是“最新”。 -1 等效于将其保留为未设置。 |
scheme |
string:
Latest |
要使用的版本号方案。 |
DistributeVersionerSource
根据源映像的版本号生成版本号
名称 | 类型 | 说明 |
---|---|---|
scheme |
string:
Source |
要使用的版本号方案。 |
ImageTemplate
映像模板是由 Microsoft.VirtualMachineImages 提供程序管理的 ARM 资源
名称 | 类型 | 默认值 | 说明 |
---|---|---|---|
id |
string |
资源的完全限定资源 ID。 Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
|
identity |
映像模板的标识(如果已配置)。 |
||
location |
string |
资源所在的地理位置 |
|
name |
string |
资源的名称 |
|
properties.buildTimeoutInMinutes |
integer (int32) minimum: 0maximum: 960 |
0 |
生成映像模板时等待的最大持续时间(包括所有自定义、优化、验证和分发)。 省略或指定 0 以使用默认值 (4 小时)。 |
properties.customize | ImageTemplateCustomizer[]: |
指定用于描述映像的自定义步骤的属性,如图像源等 |
|
properties.distribute | ImageTemplateDistributor[]: |
映像输出需要转到的分发目标。 |
|
properties.exactStagingResourceGroup |
string |
与用于生成映像的映像模板相同的订阅中的暂存资源组 ID。 仅当“stagingResourceGroup”字段中指定的值为空时,此只读字段与“stagingResourceGroup”不同。 |
|
properties.lastRunStatus |
当前正在执行的或上次执行的“run”状态。 |
||
properties.optimize |
指定要对图像执行的优化。 |
||
properties.provisioningError |
预配错误(如果有) |
||
properties.provisioningState |
资源的预配状态 |
||
properties.source | ImageTemplateSource: |
指定用于描述源图像的属性。 |
|
properties.stagingResourceGroup |
string |
与用于生成映像的映像模板相同的订阅中的暂存资源组 ID。 如果此字段为空,则会创建一个具有随机名称的资源组。 如果此字段中指定的资源组不存在,则会创建具有相同名称的资源组。 如果指定的资源组存在,则它必须是空的,并且与映像模板位于同一区域中。 如果此字段为空或指定的资源组不存在,则在模板删除期间将删除创建的资源组,但在模板删除期间将删除资源组中创建的资源,并且资源组本身将保留。 |
|
properties.validate |
要对生成的映像执行的验证的配置选项和列表。 |
||
properties.vmProfile |
描述如何设置虚拟机以生成映像 |
||
systemData |
包含 createdBy 和 modifiedBy 信息的 Azure 资源管理器元数据。 |
||
tags |
object |
资源标记。 |
|
type |
string |
资源的类型。 例如“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts” |
ImageTemplateFileCustomizer
将文件上传到 VM(Linux、Windows)。 对应于 Packer 文件预配程序
名称 | 类型 | 说明 |
---|---|---|
destination |
string |
文件(已创建嵌套目录结构)的绝对路径,该文件(来自 sourceUri)将上传到 VM 中 |
name |
string |
用于提供此自定义步骤的上下文的友好名称 |
sha256Checksum |
string |
上述 sourceUri 字段中提供的文件的 SHA256 校验和 |
sourceUri |
string |
要上传的文件的 URI,用于自定义 VM。 它可以是 github 链接、Azure 存储的 SAS URI 等 |
type |
string:
File |
要在映像上使用的自定义工具的类型。 例如,“Shell”可以是 shell 定制器 |
ImageTemplateFileValidator
将验证所需的文件上传到 VM(Linux、Windows)。 对应于 Packer 文件预配程序
名称 | 类型 | 说明 |
---|---|---|
destination |
string |
文件(已创建嵌套目录结构)的绝对路径,该文件(来自 sourceUri)将上传到 VM 中 |
name |
string |
用于提供此验证步骤的上下文的友好名称 |
sha256Checksum |
string |
上述 sourceUri 字段中提供的文件的 SHA256 校验和 |
sourceUri |
string |
要上传到 VM 进行验证的文件的 URI。 它可以是 github 链接、Azure 存储 URI(已授权或 SAS),等等 |
type |
string:
File |
要在映像上使用的验证类型。 例如,“Shell”可以是 shell 验证 |
ImageTemplateIdentity
映像模板的标识。
名称 | 类型 | 说明 |
---|---|---|
type |
用于映像模板的标识类型。 类型“None”将从映像模板中删除任何标识。 |
|
userAssignedIdentities |
<string,
User |
User-Assigned 标识 |
ImageTemplateLastRunStatus
描述运行映像模板的最新状态
名称 | 类型 | 说明 |
---|---|---|
endTime |
string (date-time) |
上次运行的结束时间(UTC) |
message |
string |
有关上次运行状态的详细信息 |
runState |
上次运行的状态 |
|
runSubState |
上次运行的子状态 |
|
startTime |
string (date-time) |
上次运行的开始时间(UTC) |
ImageTemplateListResult
列表图像模板操作的结果
名称 | 类型 | 说明 |
---|---|---|
nextLink |
string |
延续标记。 |
value |
图像模板数组 |
ImageTemplateManagedImageDistributor
作为托管磁盘映像进行分发。
名称 | 类型 | 说明 |
---|---|---|
artifactTags |
object |
分发服务器创建/更新项目后,将应用于项目的标记。 |
imageId |
string |
托管磁盘映像的资源 ID |
location |
string |
映像的 Azure 位置应匹配(如果映像已存在) |
runOutputName |
string pattern: ^[A-Za-z0-9-_.]{1,64}$ |
要用于关联的 RunOutput 的名称。 |
type |
string:
Managed |
分布类型。 |
ImageTemplateManagedImageSource
描述客户订阅中托管映像的映像源。 此映像必须与映像生成器模板位于同一订阅和区域中。
名称 | 类型 | 说明 |
---|---|---|
imageId |
string |
客户订阅中托管映像的 ARM 资源 ID |
type |
string:
Managed |
指定要从其开始的源图像的类型。 |
ImageTemplatePlatformImageSource
名称 | 类型 | 说明 |
---|---|---|
exactVersion |
string |
Azure 库映像中的映像版本。 仅当“version”字段中指定的值为“latest”时,此只读字段与“version”不同。 |
offer |
string |
azure 库映像 |
planInfo |
平台映像的购买计划的可选配置。 |
|
publisher |
string |
|
sku |
string |
Azure 库映像中的映像 SKU。 |
type |
string:
Platform |
指定要从其开始的源图像的类型。 |
version |
string |
Azure 库映像中的映像版本。 如果在此处指定了“latest”,则会在映像生成发生时评估版本,而不是提交模板时评估版本。 |
ImageTemplatePowerShellCustomizer
在 VM(Windows)上运行指定的 PowerShell。 对应于 Packer powershell 预配程序。 只能指定“scriptUri”或“内联”之一。
名称 | 类型 | 默认值 | 说明 |
---|---|---|---|
inline |
string[] |
要执行的 PowerShell 命令数组 |
|
name |
string |
用于提供此自定义步骤的上下文的友好名称 |
|
runAsSystem |
boolean |
False |
如果指定,将使用本地系统用户提升的权限运行 PowerShell 脚本。 仅当上面的 runElevated 字段设置为 true 时,才能为 true。 |
runElevated |
boolean |
False |
如果指定,将使用提升的权限运行 PowerShell 脚本 |
scriptUri |
string |
要运行用于自定义的 PowerShell 脚本的 URI。 它可以是 github 链接、Azure 存储的 SAS URI 等 |
|
sha256Checksum |
string |
上述 scriptUri 字段中提供的 power shell 脚本的 SHA256 校验和 |
|
type |
string:
Power |
要在映像上使用的自定义工具的类型。 例如,“Shell”可以是 shell 定制器 |
|
validExitCodes |
integer[] (int32) |
PowerShell 脚本的有效退出代码。 [默认值: 0] |
ImageTemplatePowerShellValidator
在验证阶段(Windows)期间运行指定的 PowerShell 脚本。 对应于 Packer powershell 预配程序。 只能指定“scriptUri”或“内联”之一。
名称 | 类型 | 默认值 | 说明 |
---|---|---|---|
inline |
string[] |
要执行的 PowerShell 命令数组 |
|
name |
string |
用于提供此验证步骤的上下文的友好名称 |
|
runAsSystem |
boolean |
False |
如果指定,将使用本地系统用户提升的权限运行 PowerShell 脚本。 仅当上面的 runElevated 字段设置为 true 时,才能为 true。 |
runElevated |
boolean |
False |
如果指定,将使用提升的权限运行 PowerShell 脚本 |
scriptUri |
string |
要运行的 PowerShell 脚本的 URI 进行验证。 它可以是 github 链接、Azure 存储 URI 等 |
|
sha256Checksum |
string |
上述 scriptUri 字段中提供的 power shell 脚本的 SHA256 校验和 |
|
type |
string:
Power |
要在映像上使用的验证类型。 例如,“Shell”可以是 shell 验证 |
|
validExitCodes |
integer[] (int32) |
PowerShell 脚本的有效退出代码。 [默认值: 0] |
ImageTemplateRestartCustomizer
重新启动 VM 并等待 VM 重新联机(Windows)。 对应于 Packer windows-restart 预配程序
名称 | 类型 | 说明 |
---|---|---|
name |
string |
用于提供此自定义步骤的上下文的友好名称 |
restartCheckCommand |
string |
用于检查重启是否成功的命令 [默认值: ''] |
restartCommand |
string |
执行重启的命令 [Default: 'shutdown /r /f /t 0 /c 'packer restart'] |
restartTimeout |
string |
指定为数量级和单位字符串的重启超时,例如“5m”(5 分钟)或“2h”(2 小时)[默认值:“5m”] |
type |
string:
Windows |
要在映像上使用的自定义工具的类型。 例如,“Shell”可以是 shell 定制器 |
ImageTemplateSharedImageDistributor
通过 Azure 计算库进行分发。
名称 | 类型 | 默认值 | 说明 |
---|---|---|---|
artifactTags |
object |
分发服务器创建/更新项目后,将应用于项目的标记。 |
|
excludeFromLatest |
boolean |
False |
指示是否应从最新版本中排除创建的映像版本的标志。 省略使用默认值(false)。 |
galleryImageId |
string |
Azure 计算库映像的资源 ID |
|
replicationRegions |
string[] |
[已弃用]将映像复制到的区域列表。 仅当未指定 targetRegions 时,才能指定此列表。 此字段已弃用 - 请改用 targetRegions。 |
|
runOutputName |
string pattern: ^[A-Za-z0-9-_.]{1,64}$ |
要用于关联的 RunOutput 的名称。 |
|
storageAccountType |
[已弃用]用于存储共享映像的存储帐户类型。 省略使用默认值(Standard_LRS)。 仅当指定 replicationRegions 时,才能指定此字段。 此字段已弃用 - 请改用 targetRegions。 |
||
targetRegions |
要将分布式映像版本复制到的目标区域。 此对象取代 replicationRegions,仅当未指定 replicationRegions 时才能指定。 |
||
type |
string:
Shared |
分布类型。 |
|
versioning | DistributeVersioner: |
介绍如何为分发生成新的 x.y.z 版本号。 |
ImageTemplateSharedImageVersionSource
描述在 Azure 计算库或直接共享库中是映像版本的映像源。
名称 | 类型 | 说明 |
---|---|---|
exactVersion |
string |
映像版本的确切 ARM 资源 ID。 仅当“imageVersionId”字段中指定的版本名称为“latest”时,此只读字段与“imageVersionId”中的映像版本 ID 不同。 |
imageVersionId |
string |
映像版本的 ARM 资源 ID。 当映像版本名称为“latest”时,将在映像生成发生时评估版本。 |
type |
string:
Shared |
指定要从其开始的源图像的类型。 |
ImageTemplateShellCustomizer
在自定义阶段(Linux)中运行 shell 脚本。 对应于 Packer shell 预配程序。 只能指定“scriptUri”或“内联”之一。
名称 | 类型 | 说明 |
---|---|---|
inline |
string[] |
要执行的 shell 命令数组 |
name |
string |
用于提供此自定义步骤的上下文的友好名称 |
scriptUri |
string |
要运行用于自定义的 shell 脚本的 URI。 它可以是 github 链接、Azure 存储的 SAS URI 等 |
sha256Checksum |
string |
scriptUri 字段中提供的 shell 脚本的 SHA256 校验和 |
type |
string:
Shell |
要在映像上使用的自定义工具的类型。 例如,“Shell”可以是 shell 定制器 |
ImageTemplateShellValidator
在验证阶段(Linux)中运行指定的 shell 脚本。 对应于 Packer shell 预配程序。 只能指定“scriptUri”或“内联”之一。
名称 | 类型 | 说明 |
---|---|---|
inline |
string[] |
要执行的 shell 命令数组 |
name |
string |
用于提供此验证步骤的上下文的友好名称 |
scriptUri |
string |
要运行的 shell 脚本的 URI 进行验证。 它可以是 github 链接、Azure 存储 URI 等 |
sha256Checksum |
string |
scriptUri 字段中提供的 shell 脚本的 SHA256 校验和 |
type |
string:
Shell |
要在映像上使用的验证类型。 例如,“Shell”可以是 shell 验证 |
ImageTemplateVhdDistributor
在存储帐户中通过 VHD 进行分发。
名称 | 类型 | 说明 |
---|---|---|
artifactTags |
object |
分发服务器创建/更新项目后,将应用于项目的标记。 |
runOutputName |
string pattern: ^[A-Za-z0-9-_.]{1,64}$ |
要用于关联的 RunOutput 的名称。 |
type |
string:
VHD |
分布类型。 |
uri |
string |
分布式 VHD Blob 的可选 Azure 存储 URI。 省略使用默认的(空字符串),在这种情况下,VHD 将发布到暂存资源组中的存储帐户。 |
ImageTemplateVmProfile
描述用于生成和验证映像的虚拟机
名称 | 类型 | 默认值 | 说明 |
---|---|---|---|
osDiskSizeGB |
integer (int32) minimum: 0 |
0 |
OS 磁盘的大小(以 GB 为单位)。 省略或指定 0 以使用 Azure 的默认 OS 磁盘大小。 |
userAssignedIdentities |
string[] |
要在生成 VM 和验证 VM 上配置的用户分配托管标识的资源 ID 的可选数组。 这可能包括映像模板的标识。 |
|
vmSize |
string |
用于生成、自定义和捕获映像的虚拟机的大小。 省略或指定空字符串以使用默认值(第 1 代映像Standard_D1_v2,并为 Gen2 映像指定Standard_D2ds_v4)。 |
|
vnetConfig |
用于部署生成 VM 和验证 VM 的虚拟网络的可选配置。 如果不需要使用任何特定的虚拟网络,则省略。 |
ImageTemplateWindowsUpdateCustomizer
安装 Windows 更新。 对应于 Packer Windows 更新预配程序(https://github.com/rgl/packer-provisioner-windows-update)
名称 | 类型 | 默认值 | 说明 |
---|---|---|---|
filters |
string[] |
要选择要应用的更新的筛选器数组。 省略或指定空数组以使用默认值(无筛选器)。 有关此字段的示例和详细说明,请参阅上面的链接。 |
|
name |
string |
用于提供此自定义步骤的上下文的友好名称 |
|
searchCriteria |
string |
搜索更新的条件。 省略或指定空字符串以使用默认值(全部搜索)。 有关此字段的示例和详细说明,请参阅上面的链接。 |
|
type |
string:
Windows |
要在映像上使用的自定义工具的类型。 例如,“Shell”可以是 shell 定制器 |
|
updateLimit |
integer (int32) minimum: 0 |
0 |
一次应用的最大更新数。 省略或指定 0 以使用默认值 (1000) |
Optimize
指定要对图像执行的优化。
名称 | 类型 | 说明 |
---|---|---|
vmBoot |
优化在映像上应用,以便更快地启动 VM。 |
PlatformImagePurchasePlan
平台映像的购买计划配置。
名称 | 类型 | 说明 |
---|---|---|
planName |
string |
购买计划的名称。 |
planProduct |
string |
购买计划的产品。 |
planPublisher |
string |
购买计划的发布者。 |
ProvisioningError
描述创建或更新映像模板时发生的错误
名称 | 类型 | 说明 |
---|---|---|
message |
string |
有关预配失败的详细错误消息 |
provisioningErrorCode |
预配失败的错误代码 |
ProvisioningErrorCode
预配失败的错误代码
值 | 说明 |
---|---|
BadCustomizerType | |
BadDistributeType | |
BadManagedImageSource | |
BadPIRSource | |
BadSharedImageDistribute | |
BadSharedImageVersionSource | |
BadSourceType | |
BadStagingResourceGroup | |
BadValidatorType | |
NoCustomizerScript | |
NoValidatorScript | |
Other | |
ServerError | |
UnsupportedCustomizerType | |
UnsupportedValidatorType |
ProvisioningState
资源的预配状态
值 | 说明 |
---|---|
Canceled | |
Creating | |
Deleting | |
Failed | |
Succeeded | |
Updating |
ResourceIdentityType
用于映像模板的标识类型。 类型“None”将从映像模板中删除任何标识。
值 | 说明 |
---|---|
None | |
UserAssigned |
RunState
上次运行的状态
值 | 说明 |
---|---|
Canceled | |
Canceling | |
Failed | |
PartiallySucceeded | |
Running | |
Succeeded |
RunSubState
上次运行的子状态
值 | 说明 |
---|---|
Building | |
Customizing | |
Distributing | |
Optimizing | |
Queued | |
Validating |
SharedImageStorageAccountType
指定要用于存储 Azure 计算库映像版本的存储帐户类型。
值 | 说明 |
---|---|
Premium_LRS | |
Standard_LRS | |
Standard_ZRS |
systemData
与创建和上次修改资源相关的元数据。
名称 | 类型 | 说明 |
---|---|---|
createdAt |
string (date-time) |
资源创建时间戳(UTC)。 |
createdBy |
string |
创建资源的标识。 |
createdByType |
创建资源的标识的类型。 |
|
lastModifiedAt |
string (date-time) |
上次修改的资源时间戳(UTC) |
lastModifiedBy |
string |
上次修改资源的标识。 |
lastModifiedByType |
上次修改资源的标识的类型。 |
TargetRegion
描述目标区域信息。
名称 | 类型 | 默认值 | 说明 |
---|---|---|---|
name |
string |
区域的名称。 |
|
replicaCount |
integer (int32) minimum: 1 |
1 |
要在此区域中创建的映像版本的副本数。 省略使用默认值 (1)。 |
storageAccountType |
指定要用于在此区域中存储映像的存储帐户类型。 省略使用默认值(Standard_LRS)。 |
UserAssignedIdentity
用户分配的标识属性
名称 | 类型 | 说明 |
---|---|---|
clientId |
string |
分配的标识的客户端 ID。 |
principalId |
string |
已分配标识的主体 ID。 |
Validate
要对生成的映像执行的验证的配置选项和列表。
名称 | 类型 | 默认值 | 说明 |
---|---|---|---|
continueDistributeOnFailure |
boolean |
False |
如果验证失败,并且此字段设置为 false,则不会分发输出图像。 这是默认行为。 如果验证失败,并且此字段设置为 true,则输出图像(s)仍将分布。 请谨慎使用此选项,因为它可能会导致分发错误的图像以供使用。 在任一情况下(true 或 false),在验证失败时,将报告端到端映像运行失败。 [注意:如果验证成功,此字段无效。] |
inVMValidations | ImageTemplateInVMValidator[]: |
要执行的验证列表。 |
|
sourceValidationOnly |
boolean |
False |
如果此字段设置为 true,则直接验证“source”部分中指定的图像。 不会运行单独的生成来生成并验证自定义映像。 |
VirtualNetworkConfig
虚拟网络配置。
名称 | 类型 | 说明 |
---|---|---|
proxyVmSize |
string |
用于将流量传递到生成 VM 和验证 VM 的代理虚拟机的大小。 省略或指定空字符串以使用默认值(Standard_A1_v2)。 |
subnetId |
string |
预先存在的子网的资源 ID。 |
VmBoot
优化在映像上应用,以便更快地启动 VM。
名称 | 类型 | 说明 |
---|---|---|
state |
启用此字段将通过优化最终自定义映像输出来提高 VM 启动时间。 |
VMBootOptimizationState
启用此字段将通过优化最终自定义映像输出来提高 VM 启动时间。
值 | 说明 |
---|---|
Disabled | |
Enabled |