共用方式為


Microsoft.Compute 資源庫/映射 2021-07-01

Bicep 資源定義

資源庫/映射資源類型可以使用目標作業來部署:

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄

資源格式

若要建立 Microsoft.Compute/galleries/images 資源,請將下列 Bicep 新增至您的範本。

resource symbolicname 'Microsoft.Compute/galleries/images@2021-07-01' = {
  name: 'string'
  location: 'string'
  tags: {
    tagName1: 'tagValue1'
    tagName2: 'tagValue2'
  }
  parent: resourceSymbolicName
  properties: {
    description: 'string'
    disallowed: {
      diskTypes: [
        'string'
      ]
    }
    endOfLifeDate: 'string'
    eula: 'string'
    features: [
      {
        name: 'string'
        value: 'string'
      }
    ]
    hyperVGeneration: 'string'
    identifier: {
      offer: 'string'
      publisher: 'string'
      sku: 'string'
    }
    osState: 'string'
    osType: 'string'
    privacyStatementUri: 'string'
    purchasePlan: {
      name: 'string'
      product: 'string'
      publisher: 'string'
    }
    recommended: {
      memory: {
        max: int
        min: int
      }
      vCPUs: {
        max: int
        min: int
      }
    }
    releaseNoteUri: 'string'
  }
}

屬性值

galleries/images

名稱 描述
NAME 資源名稱

瞭解如何在 Bicep 中設定子資源的名稱和類型。
字串 (必要)

字元限制:1-80

合法字元:
英數字元、底線、連字號和句號。

以英數字元開頭及結尾。
location 資源位置 字串 (必要)
tags 資源標籤 標記名稱和值的字典。 請參閱 範本中的標記
父系 (parent) 在 Bicep 中,您可以指定子資源的父資源。 只有在父資源之外宣告子資源時,才需要新增這個屬性。

如需詳細資訊,請參閱 父資源外部的子資源
類型資源的符號名稱: 資源庫
properties 描述資源庫映像定義的屬性。 GalleryImageProperties

GalleryImageProperties

名稱 描述
description 此資源庫映像定義資源的描述。 這個屬性是可更新的。 字串
禁止 描述不允許的磁碟類型。 禁止
endOfLifeDate 資源庫映像定義的生命週期結束日期。 這個屬性可用於解除委任目的。 這個屬性是可更新的。 字串
Eula 資源庫映像定義的 Eula 合約。 字串
特性 資源庫映像功能的清單。 GalleryImageFeature[]
hyperVGeneration 虛擬機的 Hypervisor 產生。 僅適用於OS磁碟。 'V1'
'V2'
識別碼 (identifier) 這是資源庫映像定義標識碼。 GalleryImageIdentifier (必要)
osState 此屬性可讓使用者指定在此映射下建立的虛擬機是否為「一般化」或「特製化」。 'Generalized'
必要) (「特製化」
osType 這個屬性可讓您指定從受控映射建立 VM 時,磁碟中包含的 OS 類型。

可能的值包括:

Windows

Linux
'Linux'
'Windows' (必要)
privacyStatementUri 隱私聲明 URI。 字串
purchasePlan 描述資源庫映像定義購買方案。 Marketplace 映射會使用此映像。 ImagePurchasePlan
建議使用 這些屬性描述此映像定義的建議計算機組態。 這些屬性是可更新的。 RecommendedMachineConfiguration
releaseNoteUri 版本附註 URI。 字串

不允許

名稱 描述
diskTypes 磁碟類型的清單。 string[]

GalleryImageFeature

名稱 描述
NAME 資源庫映像功能的名稱。 字串
value 資源庫映像功能的值。 字串

GalleryImageIdentifier

名稱 描述
供應項目 資源庫映像定義供應項目的名稱。 字串 (必要)
publisher 資源庫映像定義發行者的名稱。 字串 (必要)
sku 資源庫映像定義 SKU 的名稱。 字串 (必要)

ImagePurchasePlan

名稱 描述
NAME 方案標識碼。 字串
產品 產品識別碼。 字串
publisher 發行者標識碼。 字串

RecommendedMachineConfiguration

名稱 描述
記憶體 描述資源範圍。 ResourceRange
vCPU 描述資源範圍。 ResourceRange

ResourceRange

名稱 描述
最大值 資源的最大數目。 int
分鐘 資源的最小數目。 int

快速入門範本

下列快速入門範本會部署此資源類型。

範本 描述
使用 Azure Windows 基準的 Azure Image Builder

部署至 Azure
建立 Azure Image Builder 環境並建置 Windows Server 映射,並套用最新的 Windows 匯報 和 Azure Windows 基準。
在 Azure 計算資源庫中建立映像定義

部署至 Azure
此範本可讓您在 Azure 計算資源庫中建立簡單的映像定義。 部署此範本之前,請確定您已執行 共用映像庫 101 範本。
設定開發箱服務

部署至 Azure
此範本會根據 Dev Box 快速入門指南建立所有 Dev Box 系統管理員資源。 您可以檢視所有已建立的資源,或直接移至 DevPortal.microsoft.com,以建立您的第一個開發箱。

ARM 範本資源定義

資源庫/映射資源類型可以使用目標作業來部署:

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄

資源格式

若要建立 Microsoft.Compute/galleries/images 資源,請將下列 JSON 新增至您的範本。

{
  "type": "Microsoft.Compute/galleries/images",
  "apiVersion": "2021-07-01",
  "name": "string",
  "location": "string",
  "tags": {
    "tagName1": "tagValue1",
    "tagName2": "tagValue2"
  },
  "properties": {
    "description": "string",
    "disallowed": {
      "diskTypes": [ "string" ]
    },
    "endOfLifeDate": "string",
    "eula": "string",
    "features": [
      {
        "name": "string",
        "value": "string"
      }
    ],
    "hyperVGeneration": "string",
    "identifier": {
      "offer": "string",
      "publisher": "string",
      "sku": "string"
    },
    "osState": "string",
    "osType": "string",
    "privacyStatementUri": "string",
    "purchasePlan": {
      "name": "string",
      "product": "string",
      "publisher": "string"
    },
    "recommended": {
      "memory": {
        "max": "int",
        "min": "int"
      },
      "vCPUs": {
        "max": "int",
        "min": "int"
      }
    },
    "releaseNoteUri": "string"
  }
}

屬性值

galleries/images

名稱 描述
類型 資源類型 'Microsoft.Compute/galleries/images'
apiVersion 資源 API 版本 '2021-07-01'
NAME 資源名稱

請參閱如何在 JSON ARM 樣本中設定子資源的名稱和類型。
字串 (必要)

字元限制:1-80

合法字元:
英數字元、底線、連字號和句號。

以英數字元開頭及結尾。
location 資源位置 字串 (必要)
tags 資源標籤 標記名稱和值的字典。 請參閱 範本中的標記
properties 描述資源庫映像定義的屬性。 GalleryImageProperties

GalleryImageProperties

名稱 描述
description 此資源庫映像定義資源的描述。 這個屬性是可更新的。 字串
禁止 描述不允許的磁碟類型。 禁止
endOfLifeDate 資源庫映像定義的生命週期結束日期。 這個屬性可用於解除委任目的。 這個屬性是可更新的。 字串
Eula 資源庫映像定義的 Eula 合約。 字串
特性 資源庫映像功能的清單。 GalleryImageFeature[]
hyperVGeneration 虛擬機的 Hypervisor 產生。 僅適用於OS磁碟。 'V1'
'V2'
識別碼 (identifier) 這是資源庫映像定義標識碼。 GalleryImageIdentifier (必要)
osState 此屬性可讓使用者指定在此映射下建立的虛擬機是否為「一般化」或「特製化」。 'Generalized'
必要) (「特製化」
osType 這個屬性可讓您指定從受控映射建立 VM 時,磁碟中包含的 OS 類型。

可能的值包括:

Windows

Linux
'Linux'
'Windows' (必要)
privacyStatementUri 隱私聲明 URI。 字串
purchasePlan 描述資源庫映像定義購買方案。 Marketplace 映射會使用此映像。 ImagePurchasePlan
建議使用 這些屬性描述此映像定義的建議計算機組態。 這些屬性是可更新的。 RecommendedMachineConfiguration
releaseNoteUri 版本附註 URI。 字串

不允許

名稱 描述
diskTypes 磁碟類型的清單。 string[]

GalleryImageFeature

名稱 描述
NAME 資源庫映像功能的名稱。 字串
value 資源庫映像功能的值。 字串

GalleryImageIdentifier

名稱 描述
供應項目 資源庫映像定義供應項目的名稱。 字串 (必要)
publisher 資源庫映像定義發行者的名稱。 字串 (必要)
sku 資源庫映像定義 SKU 的名稱。 字串 (必要)

ImagePurchasePlan

名稱 描述
NAME 方案標識碼。 字串
產品 產品識別碼。 字串
publisher 發行者標識碼。 字串

RecommendedMachineConfiguration

名稱 描述
記憶體 描述資源範圍。 ResourceRange
vCPU 描述資源範圍。 ResourceRange

ResourceRange

名稱 描述
最大值 資源的最大數目。 int
分鐘 資源的最小數目。 int

快速入門範本

下列快速入門範本會部署此資源類型。

範本 描述
使用 Azure Windows 基準的 Azure Image Builder

部署至 Azure
建立 Azure Image Builder 環境,並建置 Windows Server 映射,並套用最新的 Windows 匯報 和 Azure Windows 基準。
在 Azure 計算資源庫中建立映像定義

部署至 Azure
此範本可讓您在 Azure 計算資源庫中建立簡單的映像定義。 部署此範本之前,請確定您已執行 共用映像庫 101 範本。
設定開發箱服務

部署至 Azure
此範本會根據 Dev Box 快速入門指南建立所有 Dev Box 系統管理員資源。 您可以檢視所有已建立的資源,或直接移至 DevPortal.microsoft.com,以建立您的第一個開發箱。

Terraform (AzAPI 提供者) 資源定義

資源庫/映射資源類型可以使用目標作業來部署:

  • 資源群組

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄

資源格式

若要建立 Microsoft.Compute/galleries/images 資源,請將下列 Terraform 新增至您的範本。

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Compute/galleries/images@2021-07-01"
  name = "string"
  location = "string"
  parent_id = "string"
  tags = {
    tagName1 = "tagValue1"
    tagName2 = "tagValue2"
  }
  body = jsonencode({
    properties = {
      description = "string"
      disallowed = {
        diskTypes = [
          "string"
        ]
      }
      endOfLifeDate = "string"
      eula = "string"
      features = [
        {
          name = "string"
          value = "string"
        }
      ]
      hyperVGeneration = "string"
      identifier = {
        offer = "string"
        publisher = "string"
        sku = "string"
      }
      osState = "string"
      osType = "string"
      privacyStatementUri = "string"
      purchasePlan = {
        name = "string"
        product = "string"
        publisher = "string"
      }
      recommended = {
        memory = {
          max = int
          min = int
        }
        vCPUs = {
          max = int
          min = int
        }
      }
      releaseNoteUri = "string"
    }
  })
}

屬性值

galleries/images

名稱 描述
類型 資源類型 “Microsoft.Compute/galleries/images@2021-07-01”
NAME 資源名稱 字串 (必要)

字元限制:1-80

合法字元:
英數字元、底線、連字號和句號。

以英數字元開頭及結尾。
location 資源位置 字串 (必要)
parent_id 此資源之父系的資源標識碼。 類型資源的標識碼: 資源庫
tags 資源標籤 標記名稱和值的字典。
properties 描述資源庫映像定義的屬性。 GalleryImageProperties

GalleryImageProperties

名稱 描述
description 此資源庫映像定義資源的描述。 這個屬性是可更新的。 字串
禁止 描述不允許的磁碟類型。 禁止
endOfLifeDate 資源庫映像定義的生命週期結束日期。 這個屬性可用於解除委任目的。 這個屬性是可更新的。 字串
Eula 資源庫映像定義的 Eula 合約。 字串
特性 資源庫映像功能的清單。 GalleryImageFeature[]
hyperVGeneration 虛擬機的 Hypervisor 產生。 僅適用於OS磁碟。 “V1”
“V2”
識別碼 (identifier) 這是資源庫映像定義標識碼。 GalleryImageIdentifier (必要)
osState 此屬性可讓使用者指定在此映射下建立的虛擬機是否為「一般化」或「特製化」。 “一般化”
必要) 「特製化」 (
osType 這個屬性可讓您指定從受控映射建立 VM 時,磁碟中包含的 OS 類型。

可能的值包括:

Windows

Linux
"Linux"
“Windows” (必要)
privacyStatementUri 隱私聲明 URI。 字串
purchasePlan 描述資源庫映像定義購買方案。 Marketplace 映射會使用此映像。 ImagePurchasePlan
建議使用 這些屬性描述此映像定義的建議計算機組態。 這些屬性是可更新的。 RecommendedMachineConfiguration
releaseNoteUri 版本附註 URI。 字串

不允許

名稱 描述
diskTypes 磁碟類型的清單。 string[]

GalleryImageFeature

名稱 描述
NAME 資源庫映像功能的名稱。 字串
value 資源庫映像功能的值。 字串

GalleryImageIdentifier

名稱 描述
供應項目 資源庫映像定義供應項目的名稱。 字串 (必要)
publisher 資源庫映像定義發行者的名稱。 字串 (必要)
sku 資源庫映像定義 SKU 的名稱。 字串 (必要)

ImagePurchasePlan

名稱 描述
NAME 方案標識碼。 字串
產品 產品識別碼。 字串
publisher 發行者標識碼。 字串

RecommendedMachineConfiguration

名稱 描述
記憶體 描述資源範圍。 ResourceRange
vCPU 描述資源範圍。 ResourceRange

ResourceRange

名稱 描述
最大值 資源的最大數目。 int
分鐘 資源的最小數目。 int