共用方式為


Get-AzReservationQuote

計算放置 ReservationOrder的價格。

語法

Get-AzReservationQuote
   [-AppliedScope <String[]>]
   [-AppliedScopePropertyDisplayName <String>]
   [-AppliedScopePropertyManagementGroupId <String>]
   [-AppliedScopePropertyResourceGroupId <String>]
   [-AppliedScopePropertySubscriptionId <String>]
   [-AppliedScopePropertyTenantId <String>]
   [-AppliedScopeType <AppliedScopeType>]
   [-BillingPlan <ReservationBillingPlan>]
   [-BillingScopeId <String>]
   [-DisplayName <String>]
   [-InstanceFlexibility <InstanceFlexibility>]
   [-Location <String>]
   [-Quantity <Int32>]
   [-Renew]
   [-ReservedResourceType <ReservedResourceType>]
   [-ReviewDateTime <DateTime>]
   [-Sku <String>]
   [-Term <ReservationTerm>]
   [-DefaultProfile <PSObject>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Get-AzReservationQuote
   -Body <IPurchaseRequest>
   [-DefaultProfile <PSObject>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

計算放置 ReservationOrder的價格。

範例

範例 1:使用「預付」計費方案取得保留價格

Get-AzReservationQuote -AppliedScopeType 'Shared' -BillingPlan 'Upfront' -billingScopeId '/subscriptions/b0f278e1-1f18-4378-84d7-b44dfa708665' -DisplayName 'yourRIName' -Location 'westus' -Quantity 1 -ReservedResourceType 'VirtualMachines' -Sku 'Standard_b1ls' -Term 'P1Y'

BillingCurrencyTotal    : {
                            "currencyCode": "GBP",
                            "amount": 24
                          }
GrandTotal              : 0
IsBillingPartnerManaged : 
IsTaxIncluded           : 
NetTotal                : 0
PaymentSchedule         : 
PricingCurrencyTotal    : {
                            "currencyCode": "GBP",
                            "amount": 24
                          }
ReservationOrderId      : 846655fa-d9e7-4fb8-9512-3ab7367352f1
SkuDescription          : Standard_b1ls
SkuTitle                : Reserved VM Instance, Standard_B1ls, US West, 1 Year
TaxTotal                : 0

使用「預付」計費方案取得保留價格

範例 2:使用「每月」計費方案取得保留價格

Get-AzReservationQuote -AppliedScopeType 'Shared' -BillingPlan 'Monthly' -billingScopeId '/subscriptions/b0f278e1-1f18-4378-84d7-b44dfa708665' -DisplayName 'yourRIName' -Location 'westus' -Quantity 1 -ReservedResourceType 'VirtualMachines' -Sku 'Standard_b1ls' -Term 'P1Y'

BillingCurrencyTotal    : {
                            "currencyCode": "GBP",
                            "amount": 24
                          }
GrandTotal              : 0
IsBillingPartnerManaged : 
IsTaxIncluded           : 
NetTotal                : 0
PaymentSchedule         : {{
                            "dueDate": "2022-07-07",
                            "pricingCurrencyTotal": {
                              "currencyCode": "GBP",
                              "amount": 2
                            },
                            "billingCurrencyTotal": {
                              "currencyCode": "GBP",
                              "amount": 2
                            },
                            "status": "Scheduled"
                          }, {
                            "dueDate": "2022-08-07",
                            "pricingCurrencyTotal": {
                              "currencyCode": "GBP",
                              "amount": 2
                            },
                            "status": "Scheduled"
                          }, {
                            "dueDate": "2022-09-07",
                            "pricingCurrencyTotal": {
                              "currencyCode": "GBP",
                              "amount": 2
                            },
                            "status": "Scheduled"
                          }, {
                            "dueDate": "2022-10-07",
                            "pricingCurrencyTotal": {
                              "currencyCode": "GBP",
                              "amount": 2
                            },
                            "status": "Scheduled"
                          }…}
PricingCurrencyTotal    : {
                            "currencyCode": "GBP",
                            "amount": 24
                          }
ReservationOrderId      : 23d4106a-8ec0-4709-839f-0e8073459e83
SkuDescription          : Standard_b1ls
SkuTitle                : Reserved VM Instance, Standard_B1ls, US West, 1 Year
TaxTotal                : 0

使用「每月」計費方案取得保留價格

參數

-AppliedScope

將套用權益的訂用帳戶清單。 請勿指定 AppliedScopeType 是否為 Shared。 此屬性將會取代為 Single AppliedScopeType,並取代為 appliedScopeProperties。

類型:String[]
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-AppliedScopePropertyDisplayName

顯示名稱

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-AppliedScopePropertyManagementGroupId

必須套用權益之管理群組的完整標識符。

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-AppliedScopePropertyResourceGroupId

資源群組的完整標識碼。

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-AppliedScopePropertySubscriptionId

訂用帳戶的完整標識碼。

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-AppliedScopePropertyTenantId

儲存方案應套用權益的租用戶標識碼。

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-AppliedScopeType

套用範圍的類型。

類型:AppliedScopeType
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-BillingPlan

代表計費方案。

類型:ReservationBillingPlan
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-BillingScopeId

購買保留或節省方案的訂用帳戶

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Body

要建構保留購買的要求,請參閱 BODY 屬性的 NOTES 一節,並建立哈希表。

類型:IPurchaseRequest
Position:Named
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-Confirm

在執行 Cmdlet 之前,提示您進行確認。

類型:SwitchParameter
別名:cf
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-DefaultProfile

DefaultProfile 參數無法運作。 如果針對不同的訂用帳戶執行 Cmdlet,請使用 SubscriptionId 參數。

類型:PSObject
別名:AzureRMContext, AzureCredential
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-DisplayName

保留的易記名稱

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-InstanceFlexibility

開啟此選項會將保留折扣套用至相同 VM 大小群組中的其他 VM。 只指定 VirtualMachines 保留的資源類型。

類型:InstanceFlexibility
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Location

保留資源所在的 Azure 區域。

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Quantity

屬於保留一部分的 SKU 數量。

類型:Int32
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Renew

將此設定為 true 會自動在到期日時間購買新的保留。

類型:SwitchParameter
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-ReservedResourceType

正在保留的資源類型。

類型:ReservedResourceType
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-ReviewDateTime

這是需要檢閱 Azure 混合式權益的日期時間。

類型:DateTime
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Sku

.

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Term

代表保留期限。

類型:ReservationTerm
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-WhatIf

顯示 Cmdlet 執行時會發生什麼事。 Cmdlet 未執行。

類型:SwitchParameter
別名:wi
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

輸入

輸出