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

Microsoft.Compute gallerys/images 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 资源位置 字符串 (必需)
标记 资源标记 标记名称和值的字典。 请参阅 模板中的标记
父级 (parent) 在 Bicep 中,可以为子资源指定父资源。 仅当子资源在父资源外部声明时,才需要添加此属性。

有关详细信息,请参阅 父资源之外的子资源
类型为:gallerys 的资源的符号名称
properties 描述库映像定义的属性。 GalleryImageProperties

GalleryImageProperties

名称 说明
description 此库映像定义资源的说明。 此属性可更新。 字符串
不允许 描述不允许的磁盘类型。 禁止
endOfLifeDate 库映像定义的生命周期结束日期。 此属性可用于解除授权目的。 此属性可更新。 字符串
eula 库映像定义的 Eula 协议。 字符串
features 库映像功能的列表。 GalleryImageFeature[]
hyperVGeneration 虚拟机的虚拟机监控程序生成。 仅适用于 OS 磁盘。 “V1”
“V2”
标识符 这是库映像定义标识符。 GalleryImageIdentifier (必需)
osState 此属性允许用户指定在此映像下创建的虚拟机是“通用化”还是“专用”。 “通用化”
“专用化” ()
osType 此属性允许指定从托管映像创建 VM 时磁盘中包含的 OS 类型。

可能的值为:

Windows

Linux
'Linux'
“Windows” (必需)
privacyStatementUri 隐私声明 URI。 字符串
purchasePlan 介绍库映像定义购买计划。 这由市场映像使用。 ImagePurchasePlan
建议 属性描述此映像定义的建议计算机配置。 这些属性是可更新的。 RecommendedMachineConfiguration
releaseNoteUri 发行说明 URI。 字符串

已禁止

名称 说明
diskTypes 磁盘类型的列表。 string[]

GalleryImageFeature

名称 说明
name 库映像功能的名称。 string
value 库映像功能的值。 字符串

GalleryImageIdentifier

名称 说明
offer 库映像定义产品/服务的名称。 字符串 (必需)
发布者 库映像定义发布者的名称。 字符串 (必需)
sku 库映像定义 SKU 的名称。 字符串 (必需)

ImagePurchasePlan

名称 说明
name 计划 ID。 字符串
product 产品 ID。 字符串
发布者 发布者 ID。 字符串

RecommendedMachineConfiguration

名称 说明
内存 描述资源范围。 ResourceRange
vCPU 描述资源范围。 ResourceRange

ResourceRange

名称 说明
max 资源的最大数目。 int
分钟 资源的最小数目。 int

快速入门模板

以下快速入门模板部署此资源类型。

模板 说明
使用 Azure Windows 基线的 Azure 映像生成器

部署到 Azure
创建 Azure 映像生成器环境并生成应用了最新 Windows 汇报和 Azure Windows 基线的 Windows Server 映像。
在 Azure 计算库中创建映像定义

部署到 Azure
此模板允许你在 Azure 计算库中创建简单的映像定义。 在部署此模板之前,请确保已运行 共享映像库 101 模板。
配置 Dev Box 服务

部署到 Azure
此模板将按照 Dev Box 快速入门指南创建所有 Dev Box 管理员资源。 可以查看创建的所有资源,也可以直接转到 DevPortal.microsoft.com 创建第一个 Dev Box。

ARM 模板资源定义

库/映像资源类型可以通过针对以下操作进行部署:

有关每个 API 版本中更改的属性的列表,请参阅 更改日志

资源格式

若要创建 Microsoft.Compute/gallerys/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

名称 说明 Value
type 资源类型 “Microsoft.Compute/gallerys/images”
apiVersion 资源 API 版本 '2021-07-01'
name 资源名称

了解如何在 JSON ARM 模板中为子资源设置名称和类型。
字符串 (必需)

字符限制:1-80

有效字符:
字母数字、下划线字符、连字符和句点。

以字母数字开头和结尾。
location 资源位置 字符串 (必需)
标记 资源标记 标记名称和值的字典。 请参阅 模板中的标记
properties 描述库映像定义的属性。 GalleryImageProperties

GalleryImageProperties

名称 说明
description 此库映像定义资源的说明。 此属性可更新。 字符串
不允许 介绍不允许的磁盘类型。 禁止
endOfLifeDate 库映像定义的生命周期结束日期。 此属性可用于解除授权。 此属性可更新。 字符串
eula 库映像定义的 Eula 协议。 字符串
features 库映像功能的列表。 GalleryImageFeature[]
hyperVGeneration 虚拟机的虚拟机监控程序生成。 仅适用于 OS 磁盘。 “V1”
“V2”
标识符 这是库映像定义标识符。 所需的 GalleryImageIdentifier ()
osState 此属性允许用户指定在此映像下创建的虚拟机是“通用化”还是“专用”。 “通用化”
需要“专用” ()
osType 此属性允许指定从托管映像创建 VM 时磁盘中包含的 OS 类型。

可能的值为:

Windows

Linux
“Linux”
“Windows” (必需)
privacyStatementUri 隐私声明 URI。 字符串
purchasePlan 介绍库映像定义购买计划。 这由市场映像使用。 ImagePurchasePlan
建议 这些属性描述了此映像定义的建议计算机配置。 这些属性可更新。 RecommendedMachineConfiguration
releaseNoteUri 发行说明 URI。 字符串

已禁止

名称 说明
diskTypes 磁盘类型的列表。 string[]

GalleryImageFeature

名称 说明
name 库映像功能的名称。 string
value 库映像功能的值。 字符串

GalleryImageIdentifier

名称 说明
offer 库映像定义产品/服务的名称。 字符串 (必需)
发布者 库映像定义发布者的名称。 字符串 (必需)
sku 库映像定义 SKU 的名称。 字符串 (必需)

ImagePurchasePlan

名称 说明
name 计划 ID。 字符串
product 产品 ID。 字符串
发布者 发布者 ID。 字符串

RecommendedMachineConfiguration

名称 说明
内存 描述资源范围。 ResourceRange
vCPU 描述资源范围。 ResourceRange

ResourceRange

名称 说明
max 资源的最大数目。 int
分钟 资源的最小数目。 int

快速入门模板

以下快速入门模板部署此资源类型。

模板 说明
使用 Azure Windows 基线的 Azure 映像生成器

部署到 Azure
创建 Azure 映像生成器环境并生成应用了最新 Windows 汇报和 Azure Windows 基线的 Windows Server 映像。
在 Azure 计算库中创建映像定义

部署到 Azure
此模板允许你在 Azure 计算库中创建简单的映像定义。 在部署此模板之前,请确保已运行 共享映像库 101 模板。
配置 Dev Box 服务

部署到 Azure
此模板将按照 Dev Box 快速入门指南创建所有 Dev Box 管理员资源。 可以查看创建的所有资源,也可以直接转到 DevPortal.microsoft.com 创建第一个 Dev Box。

Terraform (AzAPI 提供程序) 资源定义

库/映像资源类型可以通过针对以下操作进行部署:

  • 资源组

有关每个 API 版本中更改的属性的列表,请参阅 更改日志

资源格式

若要创建 Microsoft.Compute/gallerys/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

名称 说明 Value
type 资源类型 “Microsoft.Compute/galleries/images@2021-07-01”
name 资源名称 字符串 (必需)

字符限制:1-80

有效字符:
字母数字、下划线字符、连字符和句点。

以字母数字开头和结尾。
location 资源位置 字符串 (必需)
parent_id 此资源的父资源 ID。 类型为:的资源的 ID
标记 资源标记 标记名称和值的字典。
properties 描述库映像定义的属性。 GalleryImageProperties

GalleryImageProperties

名称 说明
description 此库映像定义资源的说明。 此属性可更新。 字符串
不允许 介绍不允许的磁盘类型。 禁止
endOfLifeDate 库映像定义的生命周期结束日期。 此属性可用于解除授权。 此属性可更新。 字符串
eula 库映像定义的 Eula 协议。 字符串
features 库映像功能的列表。 GalleryImageFeature[]
hyperVGeneration 虚拟机的虚拟机监控程序生成。 仅适用于 OS 磁盘。 “V1”
“V2”
标识符 这是库映像定义标识符。 GalleryImageIdentifier (必需)
osState 此属性允许用户指定在此映像下创建的虚拟机是“通用化”还是“专用”。 “通用化”
需要“专用化” ()
osType 此属性允许指定从托管映像创建 VM 时磁盘中包含的 OS 类型。

可能的值为:

Windows

Linux
“Linux”
“Windows” (必需)
privacyStatementUri 隐私声明 URI。 字符串
purchasePlan 介绍库映像定义购买计划。 这由市场映像使用。 ImagePurchasePlan
建议 属性描述此映像定义的建议计算机配置。 这些属性是可更新的。 RecommendedMachineConfiguration
releaseNoteUri 发行说明 URI。 字符串

已禁止

名称 说明
diskTypes 磁盘类型的列表。 string[]

GalleryImageFeature

名称 说明
name 库映像功能的名称。 string
value 库映像功能的值。 字符串

GalleryImageIdentifier

名称 说明
offer 库映像定义产品/服务的名称。 字符串 (必需)
发布者 库映像定义发布者的名称。 字符串 (必需)
sku 库映像定义 SKU 的名称。 字符串 (必需)

ImagePurchasePlan

名称 说明
name 计划 ID。 字符串
product 产品 ID。 字符串
发布者 发布者 ID。 字符串

RecommendedMachineConfiguration

名称 说明
内存 描述资源范围。 ResourceRange
vCPU 描述资源范围。 ResourceRange

ResourceRange

名称 说明
max 资源的最大数目。 int
分钟 资源的最小数目。 int