该API不再更新。请前往使用如下API获取对应分摊成本: DescribeInstanceAmortizedCostByAmortizationPeriod - 查询实例摊销月摊销成本; DescribeProductAmortizedCostByAmortizationPeriod- 查询产品摊销月摊销成本; DescribeInstanceAmortizedCostByConsumePeriod- 查询实例账期月摊销成本; DescribeProductAmortizedCostByConsumePeriod- 查询产品账期月摊销成本。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
下表是API对应的授权信息,可以在RAM权限策略语句的Action
元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:
- 操作:是指具体的权限点。
- 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
- 资源类型:是指操作中支持授权的资源类型。具体说明如下:
- 对于必选的资源类型,用前面加 * 表示。
- 对于不支持资源级授权的操作,用
全部资源
表示。
- 条件关键字:是指云产品自身定义的条件关键字。
- 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作 | 访问级别 | 资源类型 | 条件关键字 | 关联操作 |
---|---|---|---|---|
bss:DescribeGaapBill | get | *全部资源 * |
| 无 |
请求参数
名称 | 类型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
PageNum | integer | 否 | 页码,默认值为 1。 | 1 |
PageSize | integer | 否 | 每页数量,默认值:20,最大值:100。 | 20 |
BillingCycle | string | 是 | 账单日期,YYYY-MM。 | 2020-03 |
ProductCode | string | 否 | 产品代码。 | rds |
ProductType | string | 否 | 产品类型。 | rds |
SubscriptionType | string | 否 | 订阅类型。取值:
| PayAsYouGo |
返回参数
示例
正常返回示例
JSON
格式
{
"Code": "Success",
"Message": "Successful!",
"RequestId": "CCBB1BB9-22F1-4177-867B-7A75D665B488",
"Success": true,
"Data": {
"PageNum": 1,
"PageSize": 20,
"TotalCount": 20,
"HostId": "1.1.1.1",
"Modules": {
"Module": [
{
"GaapDeductedByCashCoupons": 0,
"SubscriptionType": "PayAsYouGo",
"MonthGaapPretaxAmount": 0,
"DeductedByCoupons": 0,
"SubOrderId": 12434345,
"Region": "cn-hangzhou",
"OrderType": "New",
"MonthGaapDeductedByPrepaidCard": 0,
"UnallocatedDeductedByCashCoupons": 0,
"PretaxAmountLocal": 0,
"BillingCycle": "2020-03",
"PayerAccount": 23534534,
"MonthGaapPretaxAmountLocal": 0.99,
"AccountingUnit": "无",
"GaapPretaxAmountLocal": 0,
"UnallocatedDeductedByPrepaidCard": 0,
"ProductType": "rds",
"PaymentAmount": 0,
"MonthGaapPretaxGrossAmount": 0.99,
"BillType": "SubscriptionOrder",
"PayTime": "2018-06-15 15:59:57",
"PretaxGrossAmount": 123,
"OrderId": 213123213123,
"UnallocatedPricingDiscount": 0,
"MonthGaapDeductedByCashCoupons": 0.75,
"UnallocatedPretaxGrossAmount": 0,
"InstanceID": "OSSBAG-cn-0xl0xxxxxx",
"Tag": "tag",
"Currency": "CNY",
"GaapDeductedByCoupons": 0,
"DeductedByCashCoupons": 0,
"GaapDeductedByPrepaidCard": 0,
"GaapPaymentAmount": 0,
"UnallocatedPretaxAmountLocal": 0,
"MonthGaapPricingDiscount": "0,.25",
"PricingDiscount": 1,
"GaapPricingDiscount": 0,
"ResourceGroup": "默认资源组",
"UnallocatedDeductedByCoupons": 0,
"PretaxAmount": 0,
"UnallocatedPretaxAmount": 0,
"GaapPretaxGrossAmount": 0,
"UnallocatedPaymentAmount": 0,
"PaymentCurrency": "CNY",
"OwnerID": 123213123123,
"DeductedByPrepaidCard": 0,
"GaapPretaxAmount": 0,
"MonthGaapDeductedByCoupons": 0,
"MonthGaapPaymentAmount": 0,
"UsageEndDate": "2019-05-01 00:00:00",
"UsageStartDate": "2019-04-01 00:00:00",
"ProductCode": "rds"
}
]
}
}
}
错误码
HTTP status code | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | NotApplicable | This API is not applicable for caller. | - |
400 | NotAuthorized | This API is not authorized for caller. | - |
400 | MissingParameter | Absent some mandatory parameter for this request. | - |
400 | InvalidParameter | This request contain some invalid parameter | - |
400 | InvalidOwner | The specified owner doesn't belong to caller. | 用户身份错误 |
400 | DurationInvalid | Parameter duration can only be positive integer. | - |
400 | ProductNotFound | Product not found. | - |
400 | InvalidBillingCycle | BillingCycle not Invalid. | - |
400 | ProdCodeNotFind | Product code not find. | - |
500 | InternalError | The request processing has failed due to some unknown error. | 内部服务器错误。 |
访问错误中心查看更多错误码。
变更历史
变更时间 | 变更内容概要 | 操作 |
---|---|---|
2024-05-16 | OpenAPI 描述信息更新、OpenAPI 错误码发生变更 | 查看变更详情 |
2022-12-26 | OpenAPI 错误码发生变更 | 查看变更详情 |
2022-12-26 | OpenAPI 错误码发生变更 | 查看变更详情 |