你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Reservation Order - Calculate

计算 的价格 ReservationOrder
计算放置 ReservationOrder的价格。

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

URI 参数

名称 必需 类型 说明
api-version
query True

string

受支持的版本。

请求正文

名称 类型 说明
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 的名称

响应

名称 类型 说明
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
        }
      }
    ]
  }
}

定义

名称 说明
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

名称 类型 说明
displayName

string

显示名称

managementGroupId

string

必须应用权益的管理组的完全限定标识符。

resourceGroupId

string

资源组的完全限定标识符。

subscriptionId

string

订阅的完全限定标识符。

tenantId

string

节省计划应应用权益的租户 ID。

AppliedScopeType

应用范围的类型。

名称 类型 说明
ManagementGroup

string

Shared

string

Single

string

BillingCurrencyTotal

续订购买的货币和金额将以客户的当地货币收取。 不包括税款。

名称 类型 说明
amount

number

currencyCode

string

此购买记录使用的货币的 ISO 4217 3 字母货币代码。

CalculatePriceResponse

预留的计算价格的响应。

名称 类型 说明
properties

CalculatePriceResponseProperties

计算价格响应的属性

CalculatePriceResponseProperties

计算价格响应的属性

名称 类型 说明
billingCurrencyTotal

BillingCurrencyTotal

客户将按当地货币收取货币和金额。 不包括税款。

grandTotal

number

定价货币的总金额。

isBillingPartnerManaged

boolean

如此 如果计费由 Microsoft 合作伙伴管理。 仅用于 CSP 帐户。

isTaxIncluded

boolean

税款是否包含在总计中

netTotal

number

定价货币的净总额。

paymentSchedule

PaymentDetail[]

与预留订单相关的付款信息。

pricingCurrencyTotal

PricingCurrencyTotal

Microsoft 用于记录的金额。 在退款期间用于计算退款限制。 不包括税款。

reservationOrderId

string

GUID,表示可以在计算价格后下达的预留订单。

skuDescription

string

正在购买的 SKU 的说明。

skuTitle

string

正在购买的 SKU 的标题。

taxTotal

number

定价货币的税额。

Error

错误信息

名称 类型 说明
error

ExtendedErrorInfo

扩展的错误信息,包括错误代码和错误消息

ErrorResponseCode

描述服务无法处理传入请求的原因的错误代码

名称 类型 说明
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

扩展的错误信息,包括错误代码和错误消息

名称 类型 说明
code

ErrorResponseCode

描述服务无法处理传入请求的原因的错误代码

message

string

ExtendedStatusInfo

名称 类型 说明
message

string

消息提供有关状态代码的详细信息。

statusCode

ReservationStatusCode

InstanceFlexibility

启用此功能会将预留折扣应用于同一 VM 大小组中的其他 VM。 仅指定 VirtualMachines 保留资源类型。

名称 类型 说明
Off

string

On

string

PaymentDetail

与预留订单相关的付款信息。

名称 类型 说明
billingAccount

string

显示为此付款收费的帐户。

billingCurrencyTotal

Price

以计费货币收取的金额。 不包括税款。 对于将来的付款,为 null

dueDate

string

需要付款的日期。

extendedStatusInfo

ExtendedStatusInfo

paymentDate

string

事务完成的日期。 计划时为 null。

pricingCurrencyTotal

Price

定价货币金额。 不包括税款。

status

PaymentStatus

描述付款是在将来完成、失败、取消还是计划付款。

PaymentStatus

描述付款是在将来完成、失败、取消还是计划付款。

名称 类型 说明
Cancelled

string

Failed

string

Scheduled

string

Succeeded

string

Price

包含金额和货币代码的定价信息

名称 类型 说明
amount

number

currencyCode

string

此购买记录使用的货币的 ISO 4217 3 字母货币代码。

PricingCurrencyTotal

Microsoft 用于记录的金额。 在退款期间用于计算退款限制。 不包括税款。 这是在到期前 30 天锁定的价格。

名称 类型 说明
amount

number

currencyCode

string

此购买记录使用的货币的 ISO 4217 3 字母货币代码。

PurchaseRequest

预留购买请求

名称 类型 默认值 说明
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

表示计费计划。

名称 类型 说明
Monthly

string

Upfront

string

ReservationStatusCode

名称 类型 说明
Active

string

Expired

string

Merged

string

None

string

PaymentInstrumentError

string

Pending

string

Processing

string

PurchaseError

string

Split

string

Succeeded

string

ReservationTerm

表示预留期限。

名称 类型 说明
P1Y

string

P3Y

string

P5Y

string

ReservedResourceProperties

特定于每个保留资源类型的属性。 如果不适用,则不需要。

名称 类型 说明
instanceFlexibility

InstanceFlexibility

启用此功能会将预留折扣应用于同一 VM 大小组中的其他 VM。 仅指定 VirtualMachines 保留资源类型。

ReservedResourceType

正在保留的资源的类型。

名称 类型 说明
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 的名称

名称 类型 说明
name

string