az reservations reservation-order
備註
此參考是 Azure CLI 的 保留 延伸模組的一部分(2.50.0 版或更高版本)。 當您第一次執行 az reservations reservation-order 命令 時,擴充功能會自動安裝。 深入瞭解擴充功能。
命令群組 『reservations』 處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus
保留訂單。
命令
名稱 | Description | 類型 | 狀態 |
---|---|---|---|
az reservations reservation-order calculate |
計算放置 |
擴充套件 | 預覽 |
az reservations reservation-order calculate-refund |
如果沒有任何原則錯誤,則計算傳回 |
擴充套件 | 預覽 |
az reservations reservation-order change-directory |
將 |
擴充套件 | 預覽 |
az reservations reservation-order list |
用戶有權在目前租使用者中存取的所有 |
擴充套件 | 預覽 |
az reservations reservation-order purchase |
建立 |
擴充套件 | 預覽 |
az reservations reservation-order return |
傳回保留。 |
擴充套件 | 預覽 |
az reservations reservation-order show |
取得 |
擴充套件 | 預覽 |
az reservations reservation-order wait |
將 CLI 置於等候狀態,直到符合條件為止。 |
擴充套件 | 預覽 |
az reservations reservation-order calculate
命令群組 『reservations』 處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus
計算放置 ReservationOrder
的價格。
az reservations reservation-order calculate [--applied-scope]
[--applied-scope-property]
[--applied-scope-type {ManagementGroup, Shared, Single}]
[--billing-plan {Monthly, Upfront}]
[--billing-scope]
[--display-name]
[--instance-flexibility {Off, On}]
[--location]
[--quantity]
[--renew {0, 1, f, false, n, no, t, true, y, yes}]
[--reserved-resource-type {AVS, AppService, AzureDataExplorer, AzureFiles, BlockBlob, CosmosDb, DataFactory, Databricks, DedicatedHost, ManagedDisk, MariaDb, MySql, NetAppStorage, PostgreSql, RedHat, RedHatOsa, RedisCache, SapHana, SqlAzureHybridBenefit, SqlDataWarehouse, SqlDatabases, SqlEdge, SuseLinux, VMwareCloudSimple, VirtualMachineSoftware, VirtualMachines}]
[--review-date-time]
[--sku]
[--term {P1Y, P3Y, P5Y}]
範例
計算價格
az reservations reservation-order calculate --applied-scope-type Shared --billing-scope 50000000-aaaa-bbbb-cccc-100000000002 --display-name name1 --quantity 1 --reserved-resource-type VirtualMachines --sku Standard_B1s --term P1Y --billing-plan Monthly --location eastus
選擇性參數
將會套用權益的訂用帳戶。 如果 --applied-scope-type 為 Single,則為必要專案。 請勿指定 --applied-scope-type 是否為 Shared。 支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。
套用範圍類型的特定屬性。 如果不適用,則不需要。 如果 AppliedScopeType 是 ManagementGroup 支援速記語法、json-file 和 yaml-file,則需要提供 tenantId 和 managementGroupId。 請嘗試 “??” 以顯示更多。
套用範圍的類型。
代表計費方案。
將針對購買保留付費的訂用帳戶。
保留的易記名稱。
開啟此選項會將保留折扣套用至相同 VM 大小群組中的其他 VM。 只指定 VirtualMachines 保留的資源類型。
保留資源所在的 Azure 區域。
屬於保留一部分的 SKU 數量。
將此設定為 true 會自動在到期日時間購買新的保留。
正在保留的資源類型。
這是需要檢閱 Azure 混合式權益的日期時間。
購買的Sku名稱。
代表保留的字詞。
全域參數
提高日誌詳細程度以顯示所有調試日誌。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID
來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
az reservations reservation-order calculate-refund
命令群組 『reservations』 處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus
如果沒有任何原則錯誤,則計算傳回 Reservations
的價格。
az reservations reservation-order calculate-refund --reservation-order-id
[--id]
[--quantity]
[--reservation-id]
[--scope]
範例
計算退款
az reservations reservation-order calculate-refund --reservation-order-id 0000000-aaaa-bbbb-cccc-20000000001 --id /providers/microsoft.capacity/reservationOrders/0000000-aaaa-bbbb-cccc-20000000001 --scope Reservation --quantity 1 --reservation-id /providers/microsoft.capacity/reservationOrders/0000000-aaaa-bbbb-cccc-20000000001/reservations/50000000-aaaa-bbbb-cccc-200000000000
必要參數
保留的訂單標識碼。
選擇性參數
傳回之保留訂單的完整標識碼。
要傳回的數量。 必須大於零。
傳回保留的完整標識碼。
退款的範圍,例如保留。
全域參數
提高日誌詳細程度以顯示所有調試日誌。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID
來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
az reservations reservation-order change-directory
命令群組 『reservations』 處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus
將 ReservationOrder
的目錄(租使用者)和其下的所有 Reservation
變更為指定的租用戶標識碼。
az reservations reservation-order change-directory --reservation-order-id
[--destination-tenant-id]
範例
將保留訂單變更為另一個租使用者
az reservations reservation-order change-directory --reservation-order-id 50000000-aaaa-bbbb-cccc-200000000000 --destination-tenant-id 10000000-aaaa-bbbb-cccc-200000000011
必要參數
保留的訂單標識碼。
選擇性參數
要轉移保留訂單的租用戶標識碼 GUID。
全域參數
提高日誌詳細程度以顯示所有調試日誌。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID
來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
az reservations reservation-order list
命令群組 『reservations』 處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus
用戶有權在目前租使用者中存取的所有 ReservationOrder
清單。
az reservations reservation-order list [--max-items]
[--next-token]
範例
用戶有權在目前租使用者中存取的所有保留訂單清單。
az reservations reservation-order list
選擇性參數
命令輸出中要傳回的項目總數。 如果可用的專案總數超過指定的值,則會在命令的輸出中提供令牌。 若要繼續分頁,請在後續命令的 --next-token
自變數中提供令牌值。
標記,指定要開始分頁的位置。 這是先前截斷回應中的令牌值。
全域參數
提高日誌詳細程度以顯示所有調試日誌。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID
來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
az reservations reservation-order purchase
命令群組 『reservations』 處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus
建立 ReservationOrder
,並在指定的 URI 下建立資源。
az reservations reservation-order purchase --reservation-order-id
[--applied-scope]
[--applied-scope-property]
[--applied-scope-type {ManagementGroup, Shared, Single}]
[--billing-plan {Monthly, Upfront}]
[--billing-scope]
[--display-name]
[--instance-flexibility {Off, On}]
[--location]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--quantity]
[--renew {0, 1, f, false, n, no, t, true, y, yes}]
[--reserved-resource-type {AVS, AppService, AzureDataExplorer, AzureFiles, BlockBlob, CosmosDb, DataFactory, Databricks, DedicatedHost, ManagedDisk, MariaDb, MySql, NetAppStorage, PostgreSql, RedHat, RedHatOsa, RedisCache, SapHana, SqlAzureHybridBenefit, SqlDataWarehouse, SqlDatabases, SqlEdge, SuseLinux, VMwareCloudSimple, VirtualMachineSoftware, VirtualMachines}]
[--review-date-time]
[--sku]
[--term {P1Y, P3Y, P5Y}]
範例
購買單一範圍保留
az reservations reservation-order purchase --reservation-order-id 40000000-aaaa-bbbb-cccc-200000000005 --applied-scope-type Single --billing-scope 50000000-aaaa-bbbb-cccc-200000000005 --reserved-resource-type VirtualMachines --display-name name1 --quantity 1 --sku Standard_B1s --term P1Y --billing-plan Monthly --location eastus --applied-scope 50000000-aaaa-bbbb-cccc-200000000010
使用資源群組保留購買單一範圍
az reservations reservation-order purchase --reservation-order-id 40000000-aaaa-bbbb-cccc-200000000005 --applied-scope-type Single --billing-scope 50000000-aaaa-bbbb-cccc-200000000005 --reserved-resource-type VirtualMachines --display-name testername1 --quantity 1 --sku Standard_B1s --term P1Y --billing-plan Monthly --location eastus --applied-scope '/subscriptions/50000000-aaaa-bbbb-cccc-200000000005/resourceGroups/rg1' --instance-flexibility Off
必要參數
保留的訂單標識碼。
選擇性參數
將會套用權益的訂用帳戶。 如果 --applied-scope-type 為 Single,則為必要專案。 請勿指定 --applied-scope-type 是否為 Shared。 支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。
套用範圍類型的特定屬性。 如果不適用,則不需要。 如果 AppliedScopeType 是 ManagementGroup 支援速記語法、json-file 和 yaml-file,則需要提供 tenantId 和 managementGroupId。 請嘗試 “??” 以顯示更多。
套用範圍的類型。
代表計費方案。
將針對購買保留付費的訂用帳戶。
保留的易記名稱。
開啟此選項會將保留折扣套用至相同 VM 大小群組中的其他 VM。 只指定 VirtualMachines 保留的資源類型。
保留資源所在的 Azure 區域。
請勿等候長時間執行的作業完成。
屬於保留一部分的 SKU 數量。
將此設定為 true 會自動在到期日時間購買新的保留。
正在保留的資源類型。
這是需要檢閱 Azure 混合式權益的日期時間。
購買的Sku名稱。
代表保留的字詞。
全域參數
提高日誌詳細程度以顯示所有調試日誌。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID
來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
az reservations reservation-order return
命令群組 『reservations』 處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus
傳回保留。
az reservations reservation-order return --reservation-order-id
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--quantity]
[--reservation-id]
[--return-reason]
[--scope]
[--session-id]
範例
傳回保留
az reservations reservation-order return --reservation-order-id 50000000-aaaa-bbbb-cccc-200000000000 --return-reason mockReason --scope Reservation --quantity 1 --reservation-id /providers/microsoft.capacity/reservationOrders/50000000-aaaa-bbbb-cccc-200000000000/reservations/30000000-aaaa-bbbb-cccc-200000000011 --session-id 40000000-aaaa-bbbb-cccc-200000000020
必要參數
保留的訂單標識碼。
選擇性參數
請勿等候長時間執行的作業完成。
要傳回的數量。 必須大於零。
傳回保留的完整標識碼。
傳回保留的原因。
退款的範圍,例如保留。
CalculateRefund API 所傳回的 SessionId。
全域參數
提高日誌詳細程度以顯示所有調試日誌。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID
來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
az reservations reservation-order show
命令群組 『reservations』 處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus
取得 ReservationOrder
的詳細數據。
az reservations reservation-order show --reservation-order-id
[--expand]
範例
取得保留訂單的詳細數據
az reservations reservation-order show --reservation-order-id 50000000-aaaa-bbbb-cccc-200000000005
必要參數
保留的訂單標識碼。
選擇性參數
可用來展開 planInformation。
全域參數
提高日誌詳細程度以顯示所有調試日誌。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID
來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
az reservations reservation-order wait
命令群組 『reservations』 處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus
將 CLI 置於等候狀態,直到符合條件為止。
az reservations reservation-order wait --reservation-order-id
[--created]
[--custom]
[--deleted]
[--exists]
[--expand]
[--interval]
[--timeout]
[--updated]
必要參數
保留的訂單標識碼。
選擇性參數
請等候在 'Succeeded' 使用 'provisioningState' 建立。
等到條件符合自定義 JMESPath 查詢為止。 例如 provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running']。
等到刪除為止。
等候資源存在。
可用來展開 planInformation。
輪詢間隔以秒為單位。
以秒為單位的等候上限。
等到 provisioningState 更新為 'Succeeded'。
全域參數
提高日誌詳細程度以顯示所有調試日誌。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID
來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。