az sig image-definition

注意

此命令群組具有 Azure CLI 和至少一個擴充功能中定義的命令。 安裝每個擴充功能以受益於其擴充功能。 深入了解擴充功能。

使用 VM 管理共用資源庫映像。

命令

名稱 Description 類型 狀態
az sig image-definition create

建立資源庫映像定義。

核心 GA
az sig image-definition delete

刪除資源庫映像。

核心 GA
az sig image-definition list

列出資源庫中的圖庫映像定義。

核心 GA
az sig image-definition list-community

列出資源庫社群中的 VM 映像定義。

核心 GA
az sig image-definition list-community (image-gallery 擴充功能)

列出資源庫社群中的 VM 映像定義(預覽版)。

副檔名 實驗性
az sig image-definition list-shared

列出直接與您的訂用帳戶或租用戶共享的資源庫中的 VM 映像定義。

核心 GA
az sig image-definition show

取得資源庫映像定義的相關信息。

核心 GA
az sig image-definition show-community

取得社群資源庫映像。

核心 GA
az sig image-definition show-community (image-gallery 擴充功能)

在資源庫社群中取得影像(預覽版)。

副檔名 實驗性
az sig image-definition show-shared

取得共享資源庫映像。

核心 GA
az sig image-definition update

更新 VM 映像定義。

核心 GA
az sig image-definition wait

將 CLI 置於等候狀態,直到符合條件為止。

核心 GA

az sig image-definition create

建立資源庫映像定義。

az sig image-definition create --gallery-image-definition
                               --gallery-name
                               --offer
                               --os-type {Linux, Windows}
                               --publisher
                               --resource-group
                               --sku
                               [--architecture {Arm64, x64}]
                               [--description]
                               [--disallowed-disk-types]
                               [--end-of-life-date]
                               [--eula]
                               [--features]
                               [--hyper-v-generation {V1, V2}]
                               [--location]
                               [--maximum-cpu-core]
                               [--maximum-memory]
                               [--minimum-cpu-core]
                               [--minimum-memory]
                               [--os-state {Generalized, Specialized}]
                               [--plan-name]
                               [--plan-product]
                               [--plan-publisher]
                               [--privacy-statement-uri]
                               [--release-note-uri]
                               [--tags]

範例

建立特製化Linux映像的映像定義

az sig image-definition create --resource-group MyResourceGroup \
--gallery-name MyGallery --gallery-image-definition MyImage \
--publisher GreatPublisher --offer GreatOffer --sku GreatSku \
--os-type linux --os-state Specialized

建立一般化 Linux 映像的映像定義

az sig image-definition create --resource-group MyResourceGroup \
--gallery-name MyGallery --gallery-image-definition MyImage \
--publisher GreatPublisher --offer GreatOffer --sku GreatSku \
--os-type linux --os-state Generalized

建立特製化 Windows 映射的映像定義

az sig image-definition create --resource-group MyResourceGroup \
--gallery-name MyGallery --gallery-image-definition MyImage \
--publisher GreatPublisher --offer GreatOffer --sku GreatSku \
--os-type windows --os-state Specialized

建立一般化 Windows 映射的映像定義

az sig image-definition create --resource-group MyResourceGroup \
--gallery-name MyGallery --gallery-image-definition MyImage \
--publisher GreatPublisher --offer GreatOffer --sku GreatSku \
--os-type windows --os-state Generalized

使用計劃資訊建立映像定義

az sig image-definition create --resource-group MyResourceGroup \
--gallery-name MyGallery --gallery-image-definition MyImage \
--publisher GreatPublisher --offer GreatOffer --sku GreatSku \
--os-type linux --os-state Specialized --plan-name PlanName \
--plan-product PlanProduct --plan-publisher PlanPublisher

為支援休眠功能的映像建立映像定義

az sig image-definition create --resource-group MyResourceGroup \
--gallery-name MyGallery --gallery-image-definition MyImage \
--publisher GreatPublisher --offer GreatOffer --sku GreatSku \
--os-type linux --os-state Specialized \
--features IsHibernateSupported=true

為支援加速網路的映像建立映像定義

az sig image-definition create --resource-group MyResourceGroup \
--gallery-name MyGallery --gallery-image-definition MyImage \
--publisher GreatPublisher --offer GreatOffer --sku GreatSku \
--os-type linux --os-state Specialized \
--features IsAcceleratedNetworkSupported=true

針對只能用來建立受信任 VM 的映像建立映像定義。 只有信任的 VM 才能從此映像建立。

az sig image-definition create --resource-group MyResourceGroup \
--gallery-name MyGallery --gallery-image-definition MyImage \
--publisher GreatPublisher --offer GreatOffer --sku GreatSku \
--os-type linux --os-state Specialized \
--features SecurityType=TrustedLaunch

為可用來建立機密 VM 的映像建立映像定義。

az sig image-definition create --resource-group MyResourceGroup \
--gallery-name MyGallery --gallery-image-definition MyImage \
--publisher GreatPublisher --offer GreatOffer --sku GreatSku \
--os-type linux --os-state Specialized \
--features SecurityType=ConfidentialVmSupported

針對只能用來建立機密 VM 的映像建立映像定義。 只能從此映像建立機密 VM。

az sig image-definition create --resource-group MyResourceGroup \
--gallery-name MyGallery --gallery-image-definition MyImage \
--publisher GreatPublisher --offer GreatOffer --sku GreatSku \
--os-type linux --os-state Specialized \
--features SecurityType=ConfidentialVM

為可用來建立 Gen2 或 TrustedLaunchSupported VM 的映像建立映像定義。

az sig image-definition create --resource-group MyResourceGroup \
--gallery-name MyGallery --gallery-image-definition MyImage \
--publisher GreatPublisher --offer GreatOffer --sku GreatSku \
--os-type linux --os-state Specialized \
--features SecurityType=TrustedLaunchSupported

針對可用來建立 Gen2、TrustedLaunch 或機密 VM 的映像建立映像定義。

az sig image-definition create --resource-group MyResourceGroup \
--gallery-name MyGallery --gallery-image-definition MyImage \
--publisher GreatPublisher --offer GreatOffer --sku GreatSku \
--os-type linux --os-state Specialized \
--features SecurityType=TrustedLaunchAndConfidentialVmSupported

建立映像定義並指出生命周期結束日期

az sig image-definition create --resource-group MyResourceGroup \
--gallery-name MyGallery --gallery-image-definition MyImage \
--publisher GreatPublisher --offer GreatOffer --sku GreatSku \
--os-type linux --os-state Specialized \
--end-of-life-date YYYY-MM-DDTHH:MM:SS+00:00

建立映像定義,並建議最小和最大 CPU 和記憶體 (GB)

az sig image-definition create --resource-group MyResourceGroup \
--gallery-name MyGallery --gallery-image-definition MyImage \
--publisher GreatPublisher --offer GreatOffer --sku GreatSku \
--os-type linux --os-state Specialized \
--minimum-cpu-core myMinCPU --maximum-cpu-core myMaxCPU \
--minimum-memory myMinMemory --maximum-memory myMaxMemory

建立映像定義,並指出映像不建議使用哪些 OS 磁碟類型

az sig image-definition create --resource-group MyResourceGroup \
--gallery-name MyGallery --gallery-image-definition MyImage \
--publisher GreatPublisher --offer GreatOffer --sku GreatSku \
--os-type linux --os-state Specialized \
--disallowed-disk-types Standard_LRS

建立映像定義並提供EULA、隱私聲明URI和版本資訊URI

az sig image-definition create --resource-group MyResourceGroup \
--gallery-name MyGallery --gallery-image-definition MyImage \
--publisher GreatPublisher --offer GreatOffer --sku GreatSku \
--os-type linux --os-state Specialized \
--eula path_to_eula --privacy-statement-uri path_to_statement \
--release-note-uri path_to_release_notes

必要參數

--gallery-image-definition -i

資源庫映像定義。

--gallery-name -r

資源庫名稱。

--offer -f

映射供應專案。

--os-type

從使用者映像或特製化 VHD 建立 VM 時,磁碟包含的 OS 類型。

接受的值: Linux, Windows
--publisher -p

映像發行者。

--resource-group -g

資源群組的名稱。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--sku -s

映像 SKU。

選擇性參數

--architecture

CPU 架構。

接受的值: Arm64, x64
--description

資源庫映像定義的描述。

--disallowed-disk-types

無法與映像搭配使用的磁碟類型,例如Standard_LRS。

--end-of-life-date

生命周期結束日期,例如 『2020-12-31』。

--eula

資源庫映像的 Eula 合約。

--features

資源庫映像功能的清單。 例如“IsSecureBootSupported=true IsMeasuredBootSupported=false”。

--hyper-v-generation

虛擬機的 Hypervisor 產生。 僅適用於OS磁碟。

接受的值: V1, V2
預設值: V1
--location -l

位置。​​ 來自的值: az account list-locations。 您可以使用 az configure --defaults location=<location> 設定預設位置。

--maximum-cpu-core

CPU 核心上限。

--maximum-memory

以 MB 為單位的最大記憶體。

--minimum-cpu-core

CPU 核心下限。

--minimum-memory

以 MB 為單位的最小記憶體。

--os-state

此屬性可讓使用者指定在此映射下建立的虛擬機是「一般化」或「特製化」。

接受的值: Generalized, Specialized
預設值: Generalized
--plan-name

方案名稱。

--plan-product

規劃產品。

--plan-publisher

方案發行者。

--privacy-statement-uri

隱私聲明 URI。

--release-note-uri

版本附註 URI。

--tags

以空格分隔的標記:key[=value] [key[=value] ...]。使用 「清除現有的標記」。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az sig image-definition delete

刪除資源庫映像。

az sig image-definition delete [--gallery-image-definition]
                               [--gallery-name]
                               [--ids]
                               [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                               [--resource-group]
                               [--subscription]

選擇性參數

--gallery-image-definition --gallery-image-name -i

要刪除的資源庫映像定義名稱。

--gallery-name -r

要刪除影像定義的 共用映像庫 名稱。

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。

--no-wait

請勿等候長時間執行的作業完成。

接受的值: 0, 1, f, false, n, no, t, true, y, yes
--resource-group -g

資源群組的名稱。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az sig image-definition list

列出資源庫中的圖庫映像定義。

az sig image-definition list --gallery-name
                             --resource-group

必要參數

--gallery-name -r

要從中列出影像定義 共用映像庫 的名稱。

--resource-group -g

資源群組的名稱。 您可以使用 來設定預設群組 az configure --defaults group=<name>

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az sig image-definition list-community

列出資源庫社群中的 VM 映像定義。

az sig image-definition list-community [--ids]
                                       [--location]
                                       [--marker]
                                       [--public-gallery-name]
                                       [--show-next-marker]
                                       [--subscription]

範例

列出資源庫社群中的映像定義。

az sig image-definition list-community --public-gallery-name publicGalleryName \
--location myLocation

選擇性參數

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。

--location -l

位置。​​ 來自的值: az account list-locations。 您可以使用 az configure --defaults location=<location> 設定預設位置。

--marker

字串值,識別要隨著下一個清單作業傳回之容器清單的部分。 如果清單作業未傳回剩餘的所有容器,則此作業會傳回響應主體內的 NextMarker 值,以與目前頁面一起列出。 如果指定,這個產生器會從前一個產生器停止的點開始傳回結果。

--public-gallery-name

社群資源庫的公用名稱。

--show-next-marker

指定時,在結果中顯示 nextMarker。

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az sig image-definition list-community (image-gallery 擴充功能)

實驗

此命令是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

列出資源庫社群中的 VM 映像定義(預覽版)。

列出資源庫社群中的 VM 映像定義(私人預覽功能,請透過電子郵件 sigpmdev@microsoft.com 連絡社群映像庫小組,以註冊預覽版,如果您有興趣使用此功能)。

az sig image-definition list-community [--ids]
                                       [--location]
                                       [--marker]
                                       [--public-gallery-name]
                                       [--show-next-marker]
                                       [--subscription]

範例

列出資源庫社群中的映像定義。

az sig image-definition list-community --public-gallery-name publicGalleryName \
--location myLocation

選擇性參數

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。

--location -l

位置。​​ 來自的值: az account list-locations。 您可以使用 az configure --defaults location=<location> 設定預設位置。

--marker

字串值,識別要隨著下一個清單作業傳回之容器清單的部分。 如果清單作業未傳回剩餘的所有容器,則此作業會傳回響應主體內的 NextMarker 值,以與目前頁面一起列出。 如果指定,這個產生器會從前一個產生器停止的點開始傳回結果。

--public-gallery-name

社群資源庫的公用名稱。

--show-next-marker

指定時,在結果中顯示 nextMarker。

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az sig image-definition list-shared

列出直接與您的訂用帳戶或租用戶共享的資源庫中的 VM 映像定義。

az sig image-definition list-shared [--gallery-unique-name]
                                    [--ids]
                                    [--location]
                                    [--marker]
                                    [--shared-to {tenant}]
                                    [--show-next-marker]
                                    [--subscription]

範例

列出資源庫中的映像定義,該映像定義會直接共用至指定位置中的訂用帳戶。

az sig image-definition list-shared --gallery-unique-name galleryUniqueName \
--location myLocation

列出資源庫中的映像定義,該映像定義會直接共用至指定位置的租使用者。

az sig image-definition list-shared --gallery-unique-name galleryUniqueName \
--location myLocation --shared-to tenant

選擇性參數

--gallery-unique-name

共用資源庫的唯一名稱。

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。

--location -l

位置。​​ 來自的值: az account list-locations。 您可以使用 az configure --defaults location=<location> 設定預設位置。

--marker

字串值,識別要隨著下一個清單作業傳回之容器清單的部分。 如果清單作業未傳回剩餘的所有容器,則此作業會傳回響應主體內的 NextMarker 值,以與目前頁面一起列出。 如果指定,這個產生器會從前一個產生器停止的點開始傳回結果。

--shared-to

查詢參數,決定執行清單作業時要擷取的共用資源庫。 如果未指定,請依訂用帳戶標識碼列出。

接受的值: tenant
--show-next-marker

指定時,在結果中顯示 nextMarker。

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az sig image-definition show

取得資源庫映像定義的相關信息。

az sig image-definition show [--gallery-image-definition]
                             [--gallery-name]
                             [--ids]
                             [--resource-group]
                             [--subscription]

選擇性參數

--gallery-image-definition --gallery-image-name -i

要擷取的資源庫映像定義名稱。

--gallery-name -r

要從中擷取影像定義的 共用映像庫 名稱。

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。

--resource-group -g

資源群組的名稱。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az sig image-definition show-community

取得社群資源庫映像。

az sig image-definition show-community [--gallery-image-definition]
                                       [--ids]
                                       [--location]
                                       [--public-gallery-name]
                                       [--subscription]

選擇性參數

--gallery-image-definition -i

要列出映像版本的社群資源庫映像定義名稱。

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。

--location -l

位置。​​ 來自的值: az account list-locations。 您可以使用 az configure --defaults location=<location> 設定預設位置。

--public-gallery-name

社群資源庫的公用名稱。

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az sig image-definition show-community (image-gallery 擴充功能)

實驗

此命令是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

在資源庫社群中取得影像(預覽版)。

取得資源庫社群中的影像(私人預覽功能,請透過電子郵件 sigpmdev@microsoft.com 連絡社群映射庫小組,以註冊預覽版,如果您有興趣使用此功能)。

az sig image-definition show-community [--gallery-image-definition]
                                       [--ids]
                                       [--location]
                                       [--public-gallery-name]
                                       [--subscription]

範例

在指定位置的資源庫社群中取得映像定義。

az sig image-definition show-community --public-gallery-name publicGalleryName \
--gallery-image-definition myGalleryImageName --location myLocation

選擇性參數

--gallery-image-definition -i

要列出映像版本的社群資源庫映像定義名稱。

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。

--location -l

位置。​​ 來自的值: az account list-locations。 您可以使用 az configure --defaults location=<location> 設定預設位置。

--public-gallery-name

社群資源庫的公用名稱。

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az sig image-definition show-shared

取得共享資源庫映像。

取得已直接共用至訂用帳戶或租用戶的共享資源庫映像。

az sig image-definition show-shared [--gallery-image-definition]
                                    [--gallery-unique-name]
                                    [--ids]
                                    [--location]
                                    [--subscription]

範例

取得資源庫中的映像定義,直接共用至指定位置中的訂用帳戶或租使用者。

az sig image-definition show-shared --gallery-unique-name galleryUniqueName --gallery-image-definition myGalleryImageName --location myLocation

選擇性參數

--gallery-image-definition --gallery-image-name -i

要列出映像版本的共享資源庫映像定義名稱。

--gallery-unique-name

共用資源庫的唯一名稱。

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。

--location -l

位置。​​ 來自的值: az account list-locations。 您可以使用 az configure --defaults location=<location> 設定預設位置。

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az sig image-definition update

更新 VM 映像定義。

az sig image-definition update --gallery-image-definition
                               --gallery-name
                               --resource-group
                               [--add]
                               [--force-string]
                               [--remove]
                               [--set]

範例

變更共用映像定義的建議組態

az sig image-definition update --resource-group MyResourceGroup \
--gallery-name MyGallery --gallery-image-definition MyImage \
--resource-group MyResourceGroup --set recommended.vCpUs.min=myNewvCpUsMin \
recommended.vCpUs.max=myNewvCpUsMax recommended.memory.min=myNewMemoryMin \
recommended.memory.max=myNewMemoryMax description="newDescription"

拿掉共用映像定義的組態屬性

az sig image-definition update --resource-group MyResourceGroup \
--gallery-name MyGallery --gallery-image-definition MyImage \
--resource-group MyResourceGroup --remove recommended.vCpUs.min

必要參數

--gallery-image-definition -i

資源庫映像定義。

--gallery-name -r

資源庫名稱。

--resource-group -g

資源群組的名稱。 您可以使用 來設定預設群組 az configure --defaults group=<name>

選擇性參數

--add

藉由指定路徑和索引鍵值組,將物件加入物件清單。 範例:--add property.listProperty <key=value, string or JSON string>

預設值: []
--force-string

使用 'set' 或 'add' 時,請保留字串常值,而不是嘗試轉換成 JSON。

預設值: False
--remove

從清單中移除屬性或專案。 範例: --remove property.list <indexToRemove>--remove propertyToRemove

預設值: []
--set

指定要設定的屬性路徑和值,以更新物件。 範例:--set property1.property2=<value>

預設值: []
全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az sig image-definition wait

將 CLI 置於等候狀態,直到符合條件為止。

az sig image-definition wait [--created]
                             [--custom]
                             [--deleted]
                             [--exists]
                             [--gallery-image-definition]
                             [--gallery-name]
                             [--ids]
                             [--interval]
                             [--resource-group]
                             [--subscription]
                             [--timeout]
                             [--updated]

選擇性參數

--created

請等候在 'Succeeded' 使用 'provisioningState' 建立。

預設值: False
--custom

等到條件符合自定義 JMESPath 查詢為止。 例如 provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running']。

--deleted

等到刪除為止。

預設值: False
--exists

等候資源存在。

預設值: False
--gallery-image-definition --gallery-image-name -i

要擷取的資源庫映像定義名稱。

--gallery-name -r

要從中擷取影像定義 共用映像庫 的名稱。

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。

--interval

輪詢間隔以秒為單位。

預設值: 30
--resource-group -g

資源群組的名稱。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--timeout

以秒為單位的等候上限。

預設值: 3600
--updated

等到 provisioningState 更新為 'Succeeded'。

預設值: False
全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。