共用方式為


Microsoft.Compute 資源庫

Bicep 資源定義

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

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

資源格式

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

resource symbolicname 'Microsoft.Compute/galleries@2023-07-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
    }
  }
}

屬性值

畫廊

名字 描述 價值
名字 資源名稱 字串 (必要)

字元限制:1-80

合法字元:
英數位元和句號。

以英數位元開頭和結尾。
位置 資源位置 字串 (必要)
標籤 資源標籤 標記名稱和值的字典。 請參閱範本中的 標籤
性能 描述共用映像庫的屬性。 GalleryProperties

GalleryProperties

名字 描述 價值
描述 此共用映像庫資源的描述。 這個屬性是可更新的。 字串
標識碼 描述資源庫的唯一名稱。 GalleryIdentifier
sharingProfile 資源庫共用至訂用帳戶或租使用者的配置檔 SharingProfile
softDeletePolicy 包含資源庫虛刪除原則的相關信息。 SoftDeletePolicy

GalleryIdentifier

此物件不包含在部署期間設定的任何屬性。 所有屬性都是 ReadOnly。

SharingProfile

名字 描述 價值
communityGalleryInfo 如果目前資源庫共用給社群,則社群資源庫的資訊。 CommunityGalleryInfo
權限 這個屬性可讓您指定共用資源庫的許可權。 可能的值為:Private、Groups、Community。 'Community'
'Groups'
'Private'

CommunityGalleryInfo

名字 描述 價值
eula 社群資源庫映像的使用者許可協定。 字串
publicNamePrefix 將公開顯示之資源庫名稱的前置詞。 所有使用者都能看見。 字串
publisherContact 社群資源庫發行者支持電子郵件。 發行者的電子郵件位址。 所有使用者都能看見。 字串
publisherUri 發行者網站的連結。 所有使用者都能看見。 字串

SoftDeletePolicy

名字 描述 價值
isSoftDeleteEnabled 針對此資源庫中的資源啟用虛刪除功能,使其可在保留時間內復原。 bool

快速入門範本

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

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

部署至 Azure
建立 Azure Image Builder 環境,並建置已套用最新 Windows Update 和 Azure Windows 基準的 Windows Server 映射。
建立 Azure Compute Gallery

部署至 Azure
此課程模組會使用 apiVersion 2019-12-01 建立 Azure 計算資源庫資源。
建立 Azure 計算資源庫

部署至 Azure
此範本可讓您建立 Azure 計算資源庫。
設定開發箱服務

部署至 Azure
此範本會根據 Dev Box 快速入門指南建立所有 Dev Box 系統管理員資源(https://learn.microsoft.com/azure/dev-box/quickstart-create-dev-box)。 您可以檢視所有建立的資源,或直接移至 DevPortal.microsoft.com 來建立您的第一個開發方塊。

ARM 樣本資源定義

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

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

資源格式

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

{
  "type": "Microsoft.Compute/galleries",
  "apiVersion": "2023-07-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"
    }
  }
}

屬性值

畫廊

名字 描述 價值
類型 資源類型 'Microsoft.Compute/galleries'
apiVersion 資源 API 版本 '2023-07-03'
名字 資源名稱 字串 (必要)

字元限制:1-80

合法字元:
英數位元和句號。

以英數位元開頭和結尾。
位置 資源位置 字串 (必要)
標籤 資源標籤 標記名稱和值的字典。 請參閱範本中的 標籤
性能 描述共用映像庫的屬性。 GalleryProperties

GalleryProperties

名字 描述 價值
描述 此共用映像庫資源的描述。 這個屬性是可更新的。 字串
標識碼 描述資源庫的唯一名稱。 GalleryIdentifier
sharingProfile 資源庫共用至訂用帳戶或租使用者的配置檔 SharingProfile
softDeletePolicy 包含資源庫虛刪除原則的相關信息。 SoftDeletePolicy

GalleryIdentifier

此物件不包含在部署期間設定的任何屬性。 所有屬性都是 ReadOnly。

SharingProfile

名字 描述 價值
communityGalleryInfo 如果目前資源庫共用給社群,則社群資源庫的資訊。 CommunityGalleryInfo
權限 這個屬性可讓您指定共用資源庫的許可權。 可能的值為:Private、Groups、Community。 'Community'
'Groups'
'Private'

CommunityGalleryInfo

名字 描述 價值
eula 社群資源庫映像的使用者許可協定。 字串
publicNamePrefix 將公開顯示之資源庫名稱的前置詞。 所有使用者都能看見。 字串
publisherContact 社群資源庫發行者支持電子郵件。 發行者的電子郵件位址。 所有使用者都能看見。 字串
publisherUri 發行者網站的連結。 所有使用者都能看見。 字串

SoftDeletePolicy

名字 描述 價值
isSoftDeleteEnabled 針對此資源庫中的資源啟用虛刪除功能,使其可在保留時間內復原。 bool

快速入門範本

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

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

部署至 Azure
建立 Azure Image Builder 環境,並建置已套用最新 Windows Update 和 Azure Windows 基準的 Windows Server 映射。
建立 Azure Compute Gallery

部署至 Azure
此課程模組會使用 apiVersion 2019-12-01 建立 Azure 計算資源庫資源。
建立 Azure 計算資源庫

部署至 Azure
此範本可讓您建立 Azure 計算資源庫。
設定開發箱服務

部署至 Azure
此範本會根據 Dev Box 快速入門指南建立所有 Dev Box 系統管理員資源(https://learn.microsoft.com/azure/dev-box/quickstart-create-dev-box)。 您可以檢視所有建立的資源,或直接移至 DevPortal.microsoft.com 來建立您的第一個開發方塊。

Terraform (AzAPI 提供者) 資源定義

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

  • 資源群組

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

資源格式

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

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Compute/galleries@2023-07-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
      }
    }
  })
}

屬性值

畫廊

名字 描述 價值
類型 資源類型 “Microsoft.Compute/galleries@2023-07-03”
名字 資源名稱 字串 (必要)

字元限制:1-80

合法字元:
英數位元和句號。

以英數位元開頭和結尾。
位置 資源位置 字串 (必要)
parent_id 若要部署至資源群組,請使用該資源群組的標識碼。 字串 (必要)
標籤 資源標籤 標記名稱和值的字典。
性能 描述共用映像庫的屬性。 GalleryProperties

GalleryProperties

名字 描述 價值
描述 此共用映像庫資源的描述。 這個屬性是可更新的。 字串
標識碼 描述資源庫的唯一名稱。 GalleryIdentifier
sharingProfile 資源庫共用至訂用帳戶或租使用者的配置檔 SharingProfile
softDeletePolicy 包含資源庫虛刪除原則的相關信息。 SoftDeletePolicy

GalleryIdentifier

此物件不包含在部署期間設定的任何屬性。 所有屬性都是 ReadOnly。

SharingProfile

名字 描述 價值
communityGalleryInfo 如果目前資源庫共用給社群,則社群資源庫的資訊。 CommunityGalleryInfo
權限 這個屬性可讓您指定共用資源庫的許可權。 可能的值為:Private、Groups、Community。 “Community”
“Groups”
“Private”

CommunityGalleryInfo

名字 描述 價值
eula 社群資源庫映像的使用者許可協定。 字串
publicNamePrefix 將公開顯示之資源庫名稱的前置詞。 所有使用者都能看見。 字串
publisherContact 社群資源庫發行者支持電子郵件。 發行者的電子郵件位址。 所有使用者都能看見。 字串
publisherUri 發行者網站的連結。 所有使用者都能看見。 字串

SoftDeletePolicy

名字 描述 價值
isSoftDeleteEnabled 針對此資源庫中的資源啟用虛刪除功能,使其可在保留時間內復原。 bool