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

Products - Validate Move

验证产品的费用是否可以移动到新的发票科目。 只有以定期费用购买的产品以及协议类型为Microsoft 客户协议的计费帐户,才支持此操作。

POST https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/products/{productName}/validateMoveEligibility?api-version=2020-05-01

URI 参数

名称 必需 类型 说明
billingAccountName
path True

string

唯一标识计费帐户的 ID。

productName
path True

string

唯一标识产品的 ID。

api-version
query True

string

要与客户端请求一起使用的 API 的版本。 当前版本为 2020-05-01。

请求正文

名称 类型 说明
destinationInvoiceSectionId

string

目标发票科目 ID。

响应

名称 类型 说明
200 OK

ValidateProductTransferEligibilityResult

没问题。 请求已成功。

Other Status Codes

ErrorResponse

描述操作失败原因的错误响应。

安全性

azure_auth

Azure Active Directory OAuth2 流。

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

名称 说明
user_impersonation 模拟用户帐户

示例

SubscriptionMoveValidateFailure
SubscriptionMoveValidateSuccess

SubscriptionMoveValidateFailure

Sample Request

POST https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/products/{productName}/validateMoveEligibility?api-version=2020-05-01

{
  "destinationInvoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{newInvoiceSectionName}"
}

Sample Response

{
  "isMoveEligible": false,
  "errorDetails": {
    "code": "ProductTypeNotSupported",
    "message": "Product '{productName}' is not allowed to be transferred."
  }
}

SubscriptionMoveValidateSuccess

Sample Request

POST https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/products/{productName}/validateMoveEligibility?api-version=2020-05-01

{
  "destinationInvoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{newInvoiceSectionName}"
}

Sample Response

{
  "isMoveEligible": true
}

定义

名称 说明
ErrorDetails

错误的详细信息。

ErrorResponse

错误响应指示服务无法处理传入请求。 错误消息中提供了原因。

ErrorSubDetails
ProductTransferValidationErrorCode

传输验证响应的错误代码。

TransferProductRequestProperties

要启动转移的产品的属性。

ValidateProductTransferEligibilityError

产品转移资格验证的错误详细信息。

ValidateProductTransferEligibilityResult

产品转移资格验证的结果。

ErrorDetails

错误的详细信息。

名称 类型 说明
code

string

错误代码。

details

ErrorSubDetails[]

错误的子详细信息。

message

string

指示操作失败原因的错误消息。

target

string

特定错误的目标。

ErrorResponse

错误响应指示服务无法处理传入请求。 错误消息中提供了原因。

名称 类型 说明
error

ErrorDetails

错误的详细信息。

ErrorSubDetails

名称 类型 说明
code

string

错误代码。

message

string

指示操作失败原因的错误消息。

target

string

特定错误的目标。

ProductTransferValidationErrorCode

传输验证响应的错误代码。

名称 类型 说明
CrossBillingAccountNotAllowed

string

DestinationBillingProfilePastDue

string

InsufficientPermissionOnDestination

string

InsufficientPermissionOnSource

string

InvalidSource

string

NotAvailableForDestinationMarket

string

OneTimePurchaseProductTransferNotAllowed

string

ProductNotActive

string

ProductTypeNotSupported

string

TransferProductRequestProperties

要启动转移的产品的属性。

名称 类型 说明
destinationInvoiceSectionId

string

目标发票科目 ID。

ValidateProductTransferEligibilityError

产品转移资格验证的错误详细信息。

名称 类型 说明
code

ProductTransferValidationErrorCode

产品转移验证的错误代码。

details

string

解释错误的详细错误消息。

message

string

错误消息。

ValidateProductTransferEligibilityResult

产品转移资格验证的结果。

名称 类型 说明
errorDetails

ValidateProductTransferEligibilityError

验证错误详细信息。

isMoveEligible

boolean

指定转移是否符合条件。