Microsoft.VirtualMachineImages imageTemplates 2018-02-01-preview
Bicep 資源定義
imageTemplates 資源類型可以部署到:
- 資源群組 - 請參閱 資源群組部署命令
如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄。
資源格式
若要建立 Microsoft.VirtualMachineImages/imageTemplates 資源,請將下列 Bicep 新增至您的範本。
resource symbolicname 'Microsoft.VirtualMachineImages/imageTemplates@2018-02-01-preview' = {
name: 'string'
location: 'string'
tags: {
tagName1: 'tagValue1'
tagName2: 'tagValue2'
}
properties: {
customize: [
{
name: 'string'
type: 'string'
// For remaining properties, see ImageTemplateCustomizer objects
}
]
distribute: [
{
artifactTags: {}
runOutputName: 'string'
type: 'string'
// For remaining properties, see ImageTemplateDistributor objects
}
]
source: {
type: 'string'
// For remaining properties, see ImageTemplateSource objects
}
}
}
ImageTemplateCustomizer 物件
設定 type 屬性以指定物件的類型。
針對 殼層,請使用:
type: 'shell'
script: 'string'
ImageTemplateDistributor 物件
設定 type 屬性以指定物件的類型。
針對 managedImage,請使用:
type: 'managedImage'
imageId: 'string'
location: 'string'
針對 sharedImage,請使用:
type: 'sharedImage'
galleryImageId: 'string'
replicationRegions: [
'string'
]
ImageTemplateSource 物件
設定 type 屬性以指定物件的類型。
針對 ISO,請使用:
type: 'ISO'
sha256Checksum: 'string'
sourceURI: 'string'
針對 PlatformImage,請使用:
type: 'PlatformImage'
offer: 'string'
publisher: 'string'
sku: 'string'
version: 'string'
屬性值
imageTemplates
名稱 | 描述 | 值 |
---|---|---|
NAME | 資源名稱 | 字串 (必要) |
location | 資源位置 | 字串 (必要) |
tags | 資源標籤 | 標記名稱和值的字典。 請參閱 範本中的標記 |
properties | ImageTemplateProperties |
ImageTemplateProperties
名稱 | 描述 | 值 |
---|---|---|
自訂 | 指定用來描述影像自定義步驟的屬性,例如影像來源等 | ImageTemplateCustomizer[] |
散發 (distribute) | 映像輸出必須移至其中的散發目標。 | ImageTemplateDistributor[] (必要) |
來源 | 指定用來描述來源影像的屬性。 | ImageTemplateSource (必要) |
ImageTemplateCustomizer
名稱 | 描述 | 值 |
---|---|---|
NAME | 易記名稱,提供此自定義步驟的內容 | 字串 |
type | 設定物件類型 | 需要殼層 () |
ImageTemplateShellCustomizer
名稱 | 描述 | 值 |
---|---|---|
類型 | 您想要在映像上使用的自訂工具類型。 例如,“shell” 可以是 shellCustomizer | 'shell' (必要) |
指令碼 | 要執行以進行自定義的殼層腳本。 它可以是 github 連結、適用於 Azure 記憶體的 SAS URI 等等 | 字串 |
ImageTemplateDistributor
名稱 | 描述 | 值 |
---|---|---|
artifactTags | 散發者建立/更新成品后,將套用至成品的標記。 | 物件 (object) |
runOutputName | 要用於相關聯 RunOutput 的名稱。 | 字串 (必要) |
類型 | 設定物件類型 | managedImage sharedImage (必要) |
ImageTemplateManagedImageDistributor
名稱 | 描述 | 值 |
---|---|---|
類型 | 散發類型。 | 'managedImage' (必要) |
imageId | 受控磁碟映像的資源標識碼 | 需要字串 () |
location | 映射的 Azure 位置,如果映射已存在,則應該符合 | 需要字串 () |
ImageTemplateSharedImageDistributor
名稱 | 描述 | 值 |
---|---|---|
類型 | 分佈類型。 | 需要 『sharedImage』 () |
galleryImageId | 共用映像庫 映像的資源標識碼 | 需要字串 () |
replicationRegions | string[] (必要) |
ImageTemplateSource
名稱 | 描述 | 值 |
---|---|---|
類型 | 設定物件類型 | ISO PlatformImage (必要) |
ImageTemplateIsoSource
名稱 | 描述 | 值 |
---|---|---|
類型 | 指定您想要開頭的來源影像類型。 | 需要 『ISO』 () |
sha256Checksum | ISO 映射的SHA256總和檢查碼。 | 需要字串 () |
sourceURI | 取得 ISO 映像的 URL。 在建立 imageTemplate 時,資源提供者必須能夠存取此 URL。 | 需要字串 () |
ImageTemplatePlatformImageSource
名稱 | 描述 | 值 |
---|---|---|
類型 | 指定您想要開頭的來源影像類型。 | 'PlatformImage' (必要) |
供應項目 | 來自 Azure 資源庫映射的映像供應專案。 | 字串 |
publisher | Azure 資源庫映射中的映像發行者。 | 字串 |
sku | 來自 Azure 資源庫映像的映像 SKU。 | 字串 |
version | 來自 Azure 資源庫映像的映像版本。 | 字串 |
快速入門範本
下列快速入門範本會部署此資源類型。
範本 | 描述 |
---|---|
使用 Azure Windows 基準的 Azure Image Builder |
建立 Azure Image Builder 環境,並建置 Windows Server 映射,並套用最新的 Windows 匯報 和 Azure Windows 基準。 |
設定開發箱服務 |
此範本會根據 Dev Box 快速入門指南建立所有 Dev Box 系統管理員資源。 您可以檢視所有已建立的資源,或直接移至 DevPortal.microsoft.com 以建立您的第一個 Dev Box。 |
ARM 範本資源定義
imageTemplates 資源類型可以部署到:
- 資源群組 - 請參閱 資源群組部署命令
如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。
資源格式
若要建立 Microsoft.VirtualMachineImages/imageTemplates 資源,請將下列 JSON 新增至範本。
{
"type": "Microsoft.VirtualMachineImages/imageTemplates",
"apiVersion": "2018-02-01-preview",
"name": "string",
"location": "string",
"tags": {
"tagName1": "tagValue1",
"tagName2": "tagValue2"
},
"properties": {
"customize": [
{
"name": "string",
"type": "string"
// For remaining properties, see ImageTemplateCustomizer objects
}
],
"distribute": [
{
"artifactTags": {},
"runOutputName": "string",
"type": "string"
// For remaining properties, see ImageTemplateDistributor objects
}
],
"source": {
"type": "string"
// For remaining properties, see ImageTemplateSource objects
}
}
}
ImageTemplateCustomizer 物件
設定 type 屬性以指定物件的類型。
針對 殼層,請使用:
"type": "shell",
"script": "string"
ImageTemplateDistributor 物件
設定 type 屬性以指定物件的類型。
針對 managedImage,請使用:
"type": "managedImage",
"imageId": "string",
"location": "string"
針對 sharedImage,請使用:
"type": "sharedImage",
"galleryImageId": "string",
"replicationRegions": [ "string" ]
ImageTemplateSource 物件
設定 type 屬性以指定物件的類型。
針對 ISO,請使用:
"type": "ISO",
"sha256Checksum": "string",
"sourceURI": "string"
針對 PlatformImage,請使用:
"type": "PlatformImage",
"offer": "string",
"publisher": "string",
"sku": "string",
"version": "string"
屬性值
imageTemplates
名稱 | 描述 | 值 |
---|---|---|
類型 | 資源類型 | 'Microsoft.VirtualMachineImages/imageTemplates' |
apiVersion | 資源 API 版本 | '2018-02-01-preview' |
NAME | 資源名稱 | 字串 (必要) |
location | 資源位置 | 字串 (必要) |
tags | 資源標籤 | 標記名稱和值的字典。 請參閱 範本中的標記 |
properties | ImageTemplateProperties |
ImageTemplateProperties
名稱 | 描述 | 值 |
---|---|---|
自訂 | 指定用來描述影像自定義步驟的屬性,例如影像來源等 | ImageTemplateCustomizer[] |
散發 (distribute) | 映像輸出必須移至其中的散發目標。 | ImageTemplateDistributor[] (必要) |
來源 | 指定用來描述來源影像的屬性。 | ImageTemplateSource (必要) |
ImageTemplateCustomizer
名稱 | 描述 | 值 |
---|---|---|
NAME | 易記名稱,提供此自定義步驟的內容 | 字串 |
type | 設定物件類型 | 需要殼層 () |
ImageTemplateShellCustomizer
名稱 | 描述 | 值 |
---|---|---|
類型 | 您想要在映像上使用的自訂工具類型。 例如,“shell” 可以是 shellCustomizer | 'shell' (必要) |
指令碼 | 要執行以進行自定義的殼層腳本。 它可以是 github 連結、適用於 Azure 記憶體的 SAS URI 等等 | 字串 |
ImageTemplateDistributor
名稱 | 描述 | 值 |
---|---|---|
artifactTags | 散發者建立/更新成品后,將套用至成品的標記。 | 物件 (object) |
runOutputName | 要用於相關聯 RunOutput 的名稱。 | 字串 (必要) |
類型 | 設定物件類型 | managedImage sharedImage (必要) |
ImageTemplateManagedImageDistributor
名稱 | 描述 | 值 |
---|---|---|
類型 | 散發類型。 | 'managedImage' (必要) |
imageId | 受控磁碟映像的資源標識碼 | 字串 (必要) |
location | 映射的 Azure 位置,如果映射已經存在,則應該符合 | 字串 (必要) |
ImageTemplateSharedImageDistributor
名稱 | 描述 | 值 |
---|---|---|
類型 | 散發類型。 | 'sharedImage' (必要) |
galleryImageId | 共用映像庫 映像的資源標識碼 | 字串 (必要) |
replicationRegions | string[] (必要) |
ImageTemplateSource
名稱 | 描述 | 值 |
---|---|---|
類型 | 設定物件類型 | ISO PlatformImage (必要) |
ImageTemplateIsoSource
名稱 | 描述 | 值 |
---|---|---|
類型 | 指定您想要開頭的來源影像類型。 | 'ISO' (必要) |
sha256Checksum | ISO 映射的SHA256總和檢查碼。 | 字串 (必要) |
sourceURI | 取得 ISO 映像的 URL。 建立 imageTemplate 時,資源提供者必須能夠存取此 URL。 | 字串 (必要) |
ImageTemplatePlatformImageSource
名稱 | 描述 | 值 |
---|---|---|
類型 | 指定您想要開頭的來源影像類型。 | 'PlatformImage' (必要) |
供應項目 | Azure 資源庫映射的映像供應專案。 | 字串 |
publisher | Azure 資源庫映射中的映像發行者。 | 字串 |
sku | Azure 資源庫映射中的映射 SKU。 | 字串 |
version | Azure 資源庫映射的映射版本。 | 字串 |
快速入門範本
下列快速入門範本會部署此資源類型。
範本 | 描述 |
---|---|
使用 Azure Windows 基準的 Azure Image Builder |
建立 Azure Image Builder 環境,並建置已套用最新 Windows 匯報 和 Azure Windows 基準的 Windows Server 映射。 |
設定開發箱服務 |
此範本會根據 Dev Box 快速入門指南建立所有 Dev Box 系統管理員資源。 您可以檢視所有已建立的資源,或直接移至 DevPortal.microsoft.com,以建立您的第一個開發箱。 |
Terraform (AzAPI 提供者) 資源定義
imageTemplates 資源類型可以部署到:
- 資源群組
如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄。
資源格式
若要建立 Microsoft.VirtualMachineImages/imageTemplates 資源,請將下列 Terraform 新增至您的範本。
resource "azapi_resource" "symbolicname" {
type = "Microsoft.VirtualMachineImages/imageTemplates@2018-02-01-preview"
name = "string"
location = "string"
parent_id = "string"
tags = {
tagName1 = "tagValue1"
tagName2 = "tagValue2"
}
body = jsonencode({
properties = {
customize = [
{
name = "string"
type = "string"
// For remaining properties, see ImageTemplateCustomizer objects
}
]
distribute = [
{
artifactTags = {}
runOutputName = "string"
type = "string"
// For remaining properties, see ImageTemplateDistributor objects
}
]
source = {
type = "string"
// For remaining properties, see ImageTemplateSource objects
}
}
})
}
ImageTemplateCustomizer 物件
設定 type 屬性以指定物件的類型。
針對 殼層,請使用:
type = "shell"
script = "string"
ImageTemplateDistributor 物件
設定 type 屬性以指定物件的類型。
針對 managedImage,請使用:
type = "managedImage"
imageId = "string"
location = "string"
針對 sharedImage,請使用:
type = "sharedImage"
galleryImageId = "string"
replicationRegions = [
"string"
]
ImageTemplateSource 物件
設定 type 屬性以指定物件的類型。
針對 ISO,請使用:
type = "ISO"
sha256Checksum = "string"
sourceURI = "string"
針對 PlatformImage,請使用:
type = "PlatformImage"
offer = "string"
publisher = "string"
sku = "string"
version = "string"
屬性值
imageTemplates
名稱 | 描述 | 值 |
---|---|---|
類型 | 資源類型 | “Microsoft.VirtualMachineImages/imageTemplates@2018-02-01-preview” |
NAME | 資源名稱 | 字串 (必要) |
location | 資源位置 | 字串 (必要) |
parent_id | 若要部署至資源群組,請使用該資源群組的標識碼。 | 字串 (必要) |
tags | 資源標籤 | 標記名稱和值的字典。 |
properties | ImageTemplateProperties |
ImageTemplateProperties
名稱 | 描述 | 值 |
---|---|---|
自訂 | 指定用來描述影像自定義步驟的屬性,例如影像來源等 | ImageTemplateCustomizer[] |
散發 (distribute) | 映像輸出必須移至其中的散發目標。 | ImageTemplateDistributor[] (必要) |
來源 | 指定用來描述來源影像的屬性。 | ImageTemplateSource (必要) |
ImageTemplateCustomizer
名稱 | 描述 | 值 |
---|---|---|
NAME | 易記名稱,提供此自定義步驟的內容 | 字串 |
type | 設定物件類型 | 需要殼層 () |
ImageTemplateShellCustomizer
名稱 | 描述 | 值 |
---|---|---|
類型 | 您想要在映像上使用的自訂工具類型。 例如,“shell” 可以是 shellCustomizer | 「殼層」 (必要) |
指令碼 | 要執行以進行自定義的殼層腳本。 它可以是 github 連結、適用於 Azure 記憶體的 SAS URI 等等 | 字串 |
ImageTemplateDistributor
名稱 | 描述 | 值 |
---|---|---|
artifactTags | 散發者建立/更新成品后,將套用至成品的標記。 | 物件 (object) |
runOutputName | 要用於相關聯 RunOutput 的名稱。 | 字串 (必要) |
類型 | 設定物件類型 | managedImage sharedImage (必要) |
ImageTemplateManagedImageDistributor
名稱 | 描述 | 值 |
---|---|---|
類型 | 散發類型。 | 必要 (「managedImage」) |
imageId | 受控磁碟映像的資源標識碼 | 字串 (必要) |
location | 映射的 Azure 位置,如果映射已經存在,則應該符合 | 字串 (必要) |
ImageTemplateSharedImageDistributor
名稱 | 描述 | 值 |
---|---|---|
類型 | 散發類型。 | 必要 (“sharedImage”) |
galleryImageId | 共用映像庫 映像的資源標識碼 | 字串 (必要) |
replicationRegions | string[] (必要) |
ImageTemplateSource
名稱 | 描述 | 值 |
---|---|---|
類型 | 設定物件類型 | ISO PlatformImage (必要) |
ImageTemplateIsoSource
名稱 | 描述 | 值 |
---|---|---|
類型 | 指定您想要開頭的來源影像類型。 | 「ISO」 (必要) |
sha256Checksum | ISO 映射的SHA256總和檢查碼。 | 字串 (必要) |
sourceURI | 取得 ISO 映像的 URL。 建立 imageTemplate 時,資源提供者必須能夠存取此 URL。 | 字串 (必要) |
ImageTemplatePlatformImageSource
名稱 | 描述 | 值 |
---|---|---|
類型 | 指定您想要開頭的來源影像類型。 | “PlatformImage” (必要) |
供應項目 | Azure 資源庫映射的映像供應專案。 | 字串 |
publisher | Azure 資源庫映射中的映像發行者。 | 字串 |
sku | Azure 資源庫映射中的映射 SKU。 | 字串 |
version | Azure 資源庫映射的映射版本。 | 字串 |