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

Microsoft.Compute gallerys 2022-03-03

Bicep 资源定义

库资源类型可以使用面向以下对象的操作进行部署:

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

资源格式

若要创建 Microsoft.Compute/gallerys 资源,请将以下 Bicep 添加到模板。

resource symbolicname 'Microsoft.Compute/galleries@2022-03-03' = {
  name: 'string'
  location: 'string'
  tags: {
    tagName1: 'tagValue1'
    tagName2: 'tagValue2'
  }
  properties: {
    description: 'string'
    identifier: {}
    sharingProfile: {
      communityGalleryInfo: {
        eula: 'string'
        publicNamePrefix: 'string'
        publisherContact: 'string'
        publisherUri: 'string'
      }
      permissions: 'string'
    }
    softDeletePolicy: {
      isSoftDeleteEnabled: bool
    }
  }
}

属性值

galleries

名称 说明
name 资源名称 字符串 (必需)

字符限制:1-80

有效字符:
字母数字和句点。

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

GalleryProperties

名称 说明
description 此共享映像库资源的说明。 此属性可更新。 字符串
标识符 描述库唯一名称。 GalleryIdentifier
sharingProfile 用于将库共享到订阅或租户的配置文件 SharingProfile
softDeletePolicy 包含有关库的软删除策略的信息。 SoftDeletePolicy

GalleryIdentifier

此对象不包含在部署期间要设置的任何属性。 所有属性均为 ReadOnly。

SharingProfile

名称 说明
communityGalleryInfo 如果当前库共享到社区,则社区库的信息。 CommunityGalleryInfo
权限 此属性允许指定共享库的权限。

可能的值为:

专用



社区
“社区”
“组”
“Private”

CommunityGalleryInfo

名称 说明
eula 社区库映像的最终用户许可协议。 字符串
publicNamePrefix 将公开显示的库名称的前缀。 对所有用户可见。 字符串
publisherContact 社区库发布者支持电子邮件。 发布者的电子邮件地址。 对所有用户可见。 字符串
publisherUri 指向发布者网站的链接。 对所有用户可见。 字符串

SoftDeletePolicy

名称 说明
isSoftDeleteEnabled 为此库中的资源启用软删除,允许在保留期内恢复资源。 bool

快速入门模板

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

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

部署到 Azure
创建 Azure 映像生成器环境并生成应用了最新 Windows 汇报和 Azure Windows 基线的 Windows Server 映像。
创建 Azure Compute Gallery

部署到 Azure
本模块使用 apiVersion 2019-12-01 创建 Azure Compute Gallery 资源。
创建 Azure Compute Gallery

部署到 Azure
使用此模板可以创建 Azure 计算库。
配置 Dev Box 服务

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

ARM 模板资源定义

库资源类型可以使用面向以下对象的操作进行部署:

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

资源格式

若要创建 Microsoft.Compute/gallerys 资源,请将以下 JSON 添加到模板。

{
  "type": "Microsoft.Compute/galleries",
  "apiVersion": "2022-03-03",
  "name": "string",
  "location": "string",
  "tags": {
    "tagName1": "tagValue1",
    "tagName2": "tagValue2"
  },
  "properties": {
    "description": "string",
    "identifier": {},
    "sharingProfile": {
      "communityGalleryInfo": {
        "eula": "string",
        "publicNamePrefix": "string",
        "publisherContact": "string",
        "publisherUri": "string"
      },
      "permissions": "string"
    },
    "softDeletePolicy": {
      "isSoftDeleteEnabled": "bool"
    }
  }
}

属性值

galleries

名称 说明 Value
type 资源类型 “Microsoft.Compute/gallerys”
apiVersion 资源 API 版本 '2022-03-03'
name 资源名称 字符串 (必需)

字符限制:1-80

有效字符:
字母数字和句点。

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

GalleryProperties

名称 说明
description 此共享映像库资源的说明。 此属性可更新。 字符串
标识符 描述库唯一名称。 GalleryIdentifier
sharingProfile 用于将库共享到订阅或租户的配置文件 SharingProfile
softDeletePolicy 包含有关库的软删除策略的信息。 SoftDeletePolicy

GalleryIdentifier

此对象不包含在部署期间要设置的任何属性。 所有属性均为 ReadOnly。

SharingProfile

名称 说明
communityGalleryInfo 如果当前库共享到社区,则社区库的信息。 CommunityGalleryInfo
权限 此属性允许指定共享库的权限。

可能的值为:

专用



社区
“社区”
“组”
“Private”

CommunityGalleryInfo

名称 说明
eula 社区库映像的最终用户许可协议。 字符串
publicNamePrefix 将公开显示的库名称的前缀。 对所有用户可见。 字符串
publisherContact 社区库发布者支持电子邮件。 发布者的电子邮件地址。 对所有用户可见。 字符串
publisherUri 指向发布者网站的链接。 对所有用户可见。 字符串

SoftDeletePolicy

名称 说明
isSoftDeleteEnabled 为此库中的资源启用软删除,允许在保留期内恢复这些资源。 bool

快速入门模板

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

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

部署到 Azure
创建 Azure 映像生成器环境,并生成应用了最新 Windows 汇报和 Azure Windows 基线的 Windows Server 映像。
创建 Azure Compute Gallery

部署到 Azure
本模块使用 apiVersion 2019-12-01 创建 Azure Compute Gallery 资源。
创建 Azure Compute Gallery

部署到 Azure
此模板允许创建 Azure Compute Gallery。
配置 Dev Box 服务

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

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

库资源类型可以使用面向以下对象的操作进行部署:

  • 资源组

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

资源格式

若要创建 Microsoft.Compute/gallerys 资源,请将以下 Terraform 添加到模板。

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Compute/galleries@2022-03-03"
  name = "string"
  location = "string"
  parent_id = "string"
  tags = {
    tagName1 = "tagValue1"
    tagName2 = "tagValue2"
  }
  body = jsonencode({
    properties = {
      description = "string"
      identifier = {}
      sharingProfile = {
        communityGalleryInfo = {
          eula = "string"
          publicNamePrefix = "string"
          publisherContact = "string"
          publisherUri = "string"
        }
        permissions = "string"
      }
      softDeletePolicy = {
        isSoftDeleteEnabled = bool
      }
    }
  })
}

属性值

galleries

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

字符限制:1-80

有效字符:
字母数字和句点。

以字母数字开头和结尾。
location 资源位置 字符串 (必需)
parent_id 若要部署到资源组,请使用该资源组的 ID。 字符串 (必需)
标记 资源标记 标记名称和值的字典。
properties 描述共享映像库的属性。 GalleryProperties

GalleryProperties

名称 说明
description 此共享映像库资源的说明。 此属性可更新。 字符串
标识符 描述库的唯一名称。 GalleryIdentifier
sharingProfile 用于与订阅或租户共享库的配置文件 SharingProfile
softDeletePolicy 包含有关库的软删除策略的信息。 SoftDeletePolicy

GalleryIdentifier

此对象不包含部署期间要设置的任何属性。 所有属性均为 ReadOnly。

SharingProfile

名称 说明
communityGalleryInfo 如果当前库共享到社区,则社区库的信息。 CommunityGalleryInfo
权限 此属性允许指定共享库的权限。

可能的值为:

专用



社区
“Community”
“组”
“Private”

CommunityGalleryInfo

名称 说明
eula 社区库映像的最终用户许可协议。 字符串
publicNamePrefix 将公开显示的库名称的前缀。 对所有用户可见。 字符串
publisherContact 社区库发布者支持电子邮件。 发布者的电子邮件地址。 对所有用户可见。 字符串
publisherUri 指向发布者网站的链接。 对所有用户可见。 字符串

SoftDeletePolicy

名称 说明
isSoftDeleteEnabled 为此库中的资源启用软删除,允许在保留期内恢复这些资源。 bool