共用方式為


Reservation Order - Calculate

計算的價格 ReservationOrder
計算放置 ReservationOrder的價格。

POST https://management.azure.com/providers/Microsoft.Capacity/calculatePrice?api-version=2022-11-01

URI 參數

名稱 位於 必要 類型 Description
api-version
query True

string

支援的版本。

要求本文

名稱 類型 Description
location

string

保留資源所在的 Azure 區域。

properties.appliedScopeProperties

AppliedScopeProperties

套用範圍類型的特定屬性。 如果不適用,則不需要。 如果 AppliedScopeType 是 ManagementGroup,則需要提供 tenantId 和 managementGroupId

properties.appliedScopeType

AppliedScopeType

套用範圍的類型。

properties.appliedScopes

string[]

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

properties.billingPlan

ReservationBillingPlan

代表計費方案。

properties.billingScopeId

string

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

properties.displayName

string

保留的易記名稱

properties.quantity

integer

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

properties.renew

boolean

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

properties.reservedResourceProperties

ReservedResourceProperties

每個保留資源類型的特定屬性。 如果不適用,則不需要。

properties.reservedResourceType

ReservedResourceType

要保留的資源類型。

properties.reviewDateTime

string

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

properties.term

ReservationTerm

代表保留期限。

sku

SkuName

sku 的名稱

回應

名稱 類型 Description
200 OK

CalculatePriceResponse

購買的詳細價格資訊 ReservationOrder

Other Status Codes

Error

未預期的錯誤

範例

CalculatePrice

Sample Request

POST https://management.azure.com/providers/Microsoft.Capacity/calculatePrice?api-version=2022-11-01

{
  "sku": {
    "name": "standard_D1"
  },
  "location": "westus",
  "properties": {
    "reservedResourceType": "VirtualMachines",
    "billingScopeId": "/subscriptions/ed3a1871-612d-abcd-a849-c2542a68be83",
    "term": "P1Y",
    "billingPlan": "Monthly",
    "quantity": 1,
    "displayName": "TestReservationOrder",
    "appliedScopes": null,
    "appliedScopeType": "Shared",
    "reservedResourceProperties": {
      "instanceFlexibility": "On"
    }
  }
}

Sample Response

{
  "properties": {
    "billingCurrencyTotal": {
      "currencyCode": "USD",
      "amount": 46
    },
    "reservationOrderId": "6d9cec54-7de8-abcd-9de7-80f5d634f2d2",
    "skuTitle": "Reserved VM Instance, Standard_D1, US West, 1 Year",
    "skuDescription": "standard_D1",
    "pricingCurrencyTotal": {
      "currencyCode": "USD",
      "amount": 46
    },
    "paymentSchedule": [
      {
        "dueDate": "2019-05-14",
        "pricingCurrencyTotal": {
          "currencyCode": "USD",
          "amount": 46
        },
        "billingCurrencyTotal": {
          "currencyCode": "EUR",
          "amount": 40
        }
      },
      {
        "dueDate": "2019-06-14",
        "pricingCurrencyTotal": {
          "currencyCode": "USD",
          "amount": 46
        }
      },
      {
        "dueDate": "2019-07-14",
        "pricingCurrencyTotal": {
          "currencyCode": "USD",
          "amount": 46
        }
      }
    ]
  }
}

定義

名稱 Description
AppliedScopeProperties

套用範圍類型的特定屬性。 如果不適用,則不需要。 如果 AppliedScopeType 是 ManagementGroup,則需要提供 tenantId 和 managementGroupId

AppliedScopeType

套用範圍的類型。

BillingCurrencyTotal

客戶將會以客戶的當地貨幣支付續約購買的貨幣和金額。 不包含稅金。

CalculatePriceResponse

計算保留價格的回應。

CalculatePriceResponseProperties

計算價格回應的屬性

Error

錯誤資訊

ErrorResponseCode

描述服務無法處理傳入要求原因的錯誤碼

ExtendedErrorInfo

擴充的錯誤資訊,包括錯誤碼和錯誤訊息

ExtendedStatusInfo
InstanceFlexibility

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

PaymentDetail

與保留訂單相關的付款相關信息。

PaymentStatus

描述付款是否已完成、失敗、取消或排程在未來。

Price

包含金額和貨幣代碼的定價資訊

PricingCurrencyTotal

Microsoft 用於記錄的數量。 在退款期間用於計算退款限制。 不包含稅金。 這會在到期前 30 天鎖定價格。

PurchaseRequest

購買保留的要求

ReservationBillingPlan

代表計費方案。

ReservationStatusCode
ReservationTerm

代表保留期限。

ReservedResourceProperties

每個保留資源類型的特定屬性。 如果不適用,則不需要。

ReservedResourceType

要保留的資源類型。

SkuName

sku 的名稱

AppliedScopeProperties

套用範圍類型的特定屬性。 如果不適用,則不需要。 如果 AppliedScopeType 是 ManagementGroup,則需要提供 tenantId 和 managementGroupId

名稱 類型 Description
displayName

string

顯示名稱

managementGroupId

string

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

resourceGroupId

string

資源群組的完整標識碼。

subscriptionId

string

訂用帳戶的完整標識碼。

tenantId

string

節省方案應套用權益的租用戶標識碼。

AppliedScopeType

套用範圍的類型。

名稱 類型 Description
ManagementGroup

string

Shared

string

Single

string

BillingCurrencyTotal

客戶將會以客戶的當地貨幣支付續約購買的貨幣和金額。 不包含稅金。

名稱 類型 Description
amount

number

currencyCode

string

此購買記錄所使用貨幣的 ISO 4217 3 字母貨幣代碼。

CalculatePriceResponse

計算保留價格的回應。

名稱 類型 Description
properties

CalculatePriceResponseProperties

計算價格回應的屬性

CalculatePriceResponseProperties

計算價格回應的屬性

名稱 類型 Description
billingCurrencyTotal

BillingCurrencyTotal

客戶的貨幣和金額將會以客戶的當地貨幣收費。 不包含稅金。

grandTotal

number

定價貨幣的總金額。

isBillingPartnerManaged

boolean

True 是表示 如果計費是由 Microsoft 合作夥伴管理。 僅用於 CSP 帳戶。

isTaxIncluded

boolean

是否在總計中包含稅金

netTotal

number

定價貨幣的凈總金額。

paymentSchedule

PaymentDetail[]

與保留訂單相關的付款相關信息。

pricingCurrencyTotal

PricingCurrencyTotal

Microsoft 用於記錄的數量。 在退款期間用於計算退款限制。 不包含稅金。

reservationOrderId

string

GUID,表示可在計算價格之後放置的保留訂單。

skuDescription

string

正在購買的 SKU 描述。

skuTitle

string

正在購買的 SKU 標題。

taxTotal

number

定價貨幣的稅額。

Error

錯誤資訊

名稱 類型 Description
error

ExtendedErrorInfo

擴充的錯誤資訊,包括錯誤碼和錯誤訊息

ErrorResponseCode

描述服務無法處理傳入要求原因的錯誤碼

名稱 類型 Description
ActivateQuoteFailed

string

AppliedScopesNotAssociatedWithCommerceAccount

string

AppliedScopesSameAsExisting

string

AuthorizationFailed

string

BadRequest

string

BillingCustomerInputError

string

BillingError

string

BillingPaymentInstrumentHardError

string

BillingPaymentInstrumentSoftError

string

BillingScopeIdCannotBeChanged

string

BillingTransientError

string

CalculatePriceFailed

string

CapacityUpdateScopesFailed

string

ClientCertificateThumbprintNotSet

string

CreateQuoteFailed

string

Forbidden

string

FulfillmentConfigurationError

string

FulfillmentError

string

FulfillmentOutOfStockError

string

FulfillmentTransientError

string

HttpMethodNotSupported

string

InternalServerError

string

InvalidAccessToken

string

InvalidFulfillmentRequestParameters

string

InvalidHealthCheckType

string

InvalidLocationId

string

InvalidRefundQuantity

string

InvalidRequestContent

string

InvalidRequestUri

string

InvalidReservationId

string

InvalidReservationOrderId

string

InvalidSingleAppliedScopesCount

string

InvalidSubscriptionId

string

InvalidTenantId

string

MissingAppliedScopesForSingle

string

MissingTenantId

string

NoValidReservationsToReRate

string

NonsupportedAccountId

string

NotSpecified

string

NotSupportedCountry

string

OperationCannotBePerformedInCurrentState

string

OperationFailed

string

PatchValuesSameAsExisting

string

PaymentInstrumentNotFound

string

PurchaseError

string

ReRateOnlyAllowedForEA

string

RefundLimitExceeded

string

ReservationIdNotInReservationOrder

string

ReservationOrderCreationFailed

string

ReservationOrderIdAlreadyExists

string

ReservationOrderNotEnabled

string

ReservationOrderNotFound

string

RiskCheckFailed

string

RoleAssignmentCreationFailed

string

SelfServiceRefundNotSupported

string

ServerTimeout

string

UnauthenticatedRequestsThrottled

string

UnsupportedReservationTerm

string

ExtendedErrorInfo

擴充的錯誤資訊,包括錯誤碼和錯誤訊息

名稱 類型 Description
code

ErrorResponseCode

描述服務無法處理傳入要求原因的錯誤碼

message

string

ExtendedStatusInfo

名稱 類型 Description
message

string

提供狀態代碼詳細資訊的訊息。

statusCode

ReservationStatusCode

InstanceFlexibility

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

名稱 類型 Description
Off

string

On

string

PaymentDetail

與保留訂單相關的付款相關信息。

名稱 類型 Description
billingAccount

string

顯示支付此付款費用的帳戶。

billingCurrencyTotal

Price

以計費貨幣收費的金額。 不包含稅金。 未來付款為 Null

dueDate

string

付款需要完成的日期。

extendedStatusInfo

ExtendedStatusInfo

paymentDate

string

交易完成的日期。 排程時為 null。

pricingCurrencyTotal

Price

定價貨幣金額。 不包含稅金。

status

PaymentStatus

描述付款是否已完成、失敗、取消或排程在未來。

PaymentStatus

描述付款是否已完成、失敗、取消或排程在未來。

名稱 類型 Description
Cancelled

string

Failed

string

Scheduled

string

Succeeded

string

Price

包含金額和貨幣代碼的定價資訊

名稱 類型 Description
amount

number

currencyCode

string

此購買記錄所使用貨幣的 ISO 4217 3 字母貨幣代碼。

PricingCurrencyTotal

Microsoft 用於記錄的數量。 在退款期間用於計算退款限制。 不包含稅金。 這會在到期前 30 天鎖定價格。

名稱 類型 Description
amount

number

currencyCode

string

此購買記錄所使用貨幣的 ISO 4217 3 字母貨幣代碼。

PurchaseRequest

購買保留的要求

名稱 類型 預設值 Description
location

string

保留資源所在的 Azure 區域。

properties.appliedScopeProperties

AppliedScopeProperties

套用範圍類型的特定屬性。 如果不適用,則不需要。 如果 AppliedScopeType 是 ManagementGroup,則需要提供 tenantId 和 managementGroupId

properties.appliedScopeType

AppliedScopeType

套用範圍的類型。

properties.appliedScopes

string[]

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

properties.billingPlan

ReservationBillingPlan

代表計費方案。

properties.billingScopeId

string

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

properties.displayName

string

保留的易記名稱

properties.quantity

integer

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

properties.renew

boolean

False

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

properties.reservedResourceProperties

ReservedResourceProperties

每個保留資源類型的特定屬性。 如果不適用,則不需要。

properties.reservedResourceType

ReservedResourceType

要保留的資源類型。

properties.reviewDateTime

string

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

properties.term

ReservationTerm

代表保留期限。

sku

SkuName

sku 的名稱

ReservationBillingPlan

代表計費方案。

名稱 類型 Description
Monthly

string

Upfront

string

ReservationStatusCode

名稱 類型 Description
Active

string

Expired

string

Merged

string

None

string

PaymentInstrumentError

string

Pending

string

Processing

string

PurchaseError

string

Split

string

Succeeded

string

ReservationTerm

代表保留期限。

名稱 類型 Description
P1Y

string

P3Y

string

P5Y

string

ReservedResourceProperties

每個保留資源類型的特定屬性。 如果不適用,則不需要。

名稱 類型 Description
instanceFlexibility

InstanceFlexibility

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

ReservedResourceType

要保留的資源類型。

名稱 類型 Description
AVS

string

AppService

string

AzureDataExplorer

string

AzureFiles

string

BlockBlob

string

CosmosDb

string

DataFactory

string

Databricks

string

DedicatedHost

string

ManagedDisk

string

MariaDb

string

MySql

string

NetAppStorage

string

PostgreSql

string

RedHat

string

RedHatOsa

string

RedisCache

string

SapHana

string

SqlAzureHybridBenefit

string

SqlDataWarehouse

string

SqlDatabases

string

SqlEdge

string

SuseLinux

string

VMwareCloudSimple

string

VirtualMachineSoftware

string

VirtualMachines

string

SkuName

sku 的名稱

名稱 類型 Description
name

string