全部产品
云市场

实例账单查询服务

更新时间:2019-08-08 14:30:49

接口名

QueryInstanceBill

描述

查询用户某个账期内所有商品实例或计费项的消费汇总。

请求参数

名称 类型 是否必填 说明
Action String 要执行的操作,取值:QueryInstanceBill
BillingCycle String 账期YYYY-MM。样例:2018-07
ProductCode String 产品代码
ProductType String 产品类型
SubscriptionType String 订阅类型 Subscription/PayAsYouGo,必须和ProductCode参数一起使用
IsBillingItem String 是否按照计费项维度拉取数据,默认否:False(即:实例维度);是:True
IsHideZeroCharge String 是:True,否:False。根据原价(PretaxGrossAmount)和应付(PretaxAmount)是否都为0做过滤,默认为否(兼容现有逻辑)
PageNum Integer 页码,默认值为1
PageSize Integer 每页数量,默认值:20,最大值:300
OwnerId Long 资源所有者的阿里云账号ID,通常为16位的数字。BID场景/分销场景OwnerID必须指定

返回参数

名称 类型 说明
BillingCycle String 账期,格式:YYYY-MM
AccountID String 账号ID
AccountName String 账号
TotalCount String 总记录数
PageNum Integer 页码
PageSize Integer 每页数量
Items Item 账单详情

Item:

名称 类型 说明
OwnerID String 子账号AccountID(多账号代付场景)
CostUnit String 财务单元
SubscriptionType String 订阅类型 Subscription/PayAsYouGo
Item String 账单类型:SubscriptionOrder/PayAsYouGoBill/Refund/Adjustment
ProductCode String 产品代码
ProductName String 产品名称
ProductType String 产品类型
ProductDetail String 产品明细
BillingType String 计费方式,比如:月95,日均峰值
InstanceID String 实例id
NickName String 实例昵称
ResourceGroup String 资源组
Tag String 实例Tag,格式:key1:value1;key2:value2…
InstanceConfig String 实例详细配置:亚太东南3 可用区A;实例规格名称:ecs.sn1ne.3xlarge;CPU:12;内存:24576;磁盘:100;带宽:-1;OS:1970324836975976;是否io优化:1 ecs.sn1ne.3xlarge
InstanceSpec String 实例规格:ecs.sn1ne.3xlarge
InternetIP String 公网IP
IntranetIP String 内网IP
Region String 地域
Zone String 可用区
BillingItem String 计费项
ListPrice String 单价
ListPriceUnit String 单价单位
Usage String 用量
UsageUnit String 用量单位
DeductedByResourcePackage String 资源包抵扣
PretaxGrossAmount Double 原始金额
InvoiceDiscount Double 优惠金额
DeductedByCoupons Double 优惠券优惠金额
PretaxAmount Double 应付金额
DeductedByCashCoupons Double 代金券抵扣
DeductedByPrepaidCard Double 储值卡抵扣
PaymentAmount Double 现金支付
OutstandingAmount Double 未结清金额
Currency String 币种 CNY/USD/JPY

注1:实例账单是根据账单数据拆分生成,一般会有一天延迟;

注2:实例信息在账期内会变化,月汇总的实例Config和Spec对应记录生成时间信息,如需详情可参考对应明细账单;

注3:实例和计费项账单不包含阿里通信和域名产品。

请求示例

  1. &Action=QueryInstanceBill
  2. &BillingCycle=2018-10
  3. &其他参数

返回示例

  1. {
  2. "Data": {
  3. "Items": {
  4. "Item": [
  5. {
  6. "ListPrice": "",
  7. "BillingItem": "",
  8. "NickName": "",
  9. "PretaxAmount": 208.32,
  10. "Usage": "",
  11. "Region": "华东2(上海)",
  12. "InstanceConfig": "",
  13. "Item": "PayAsYouGoBill",
  14. "UsageUnit": "",
  15. "IntranetIP": "",
  16. "Tag": "",
  17. "ProductType": "",
  18. "ProductName": "共享带宽",
  19. "Zone": "",
  20. "PretaxGrossAmount": 208.32,
  21. "Currency": "CNY",
  22. "InvoiceDiscount": 0,
  23. "ResourceGroup": "",
  24. "SubscriptionType": "PayAsYouGo",
  25. "ProductCode": "cbwp",
  26. "InstanceID": "cbwp-uf***qop",
  27. "ProductDetail": "共享带宽(后付费)",
  28. "DeductedByPrepaidCard": 0,
  29. "ListPriceUnit": "",
  30. "CostUnit": "未分配",
  31. "DeductedByResourcePackage": "",
  32. "InternetIP": "",
  33. "DeductedByCoupons": 0,
  34. "PaymentAmount": 0,
  35. "OutstandingAmount": 208.32,
  36. "InstanceSpec": "",
  37. "DeductedByCashCoupons": 0,
  38. "OwnerID": "169***013",
  39. "BillingType": "其它"
  40. },
  41. {
  42. "ListPrice": "",
  43. "BillingItem": "",
  44. "NickName": "",
  45. "PretaxAmount": 14.88,
  46. "Usage": "",
  47. "Region": "华东2(上海)",
  48. "InstanceConfig": "",
  49. "Item": "PayAsYouGoBill",
  50. "UsageUnit": "",
  51. "IntranetIP": "",
  52. "Tag": "",
  53. "ProductType": "",
  54. "ProductName": "弹性公网IP",
  55. "Zone": "",
  56. "PretaxGrossAmount": 14.88,
  57. "Currency": "CNY",
  58. "InvoiceDiscount": 0,
  59. "ResourceGroup": "默认资源组",
  60. "SubscriptionType": "PayAsYouGo",
  61. "ProductCode": "eip",
  62. "InstanceID": "eip-uf***da",
  63. "ProductDetail": "弹性公网IP",
  64. "DeductedByPrepaidCard": 0,
  65. "ListPriceUnit": "",
  66. "CostUnit": "未分配",
  67. "DeductedByResourcePackage": "",
  68. "InternetIP": "",
  69. "DeductedByCoupons": 0,
  70. "PaymentAmount": 0,
  71. "OutstandingAmount": 14.88,
  72. "InstanceSpec": "",
  73. "DeductedByCashCoupons": 0,
  74. "OwnerID": "169***013",
  75. "BillingType": "其它"
  76. }
  77. ]
  78. },
  79. "TotalCount": 55,
  80. "BillingCycle": "2019-07",
  81. "AccountID": "169***013",
  82. "PageSize": 20,
  83. "AccountName": "zho***18",
  84. "PageNum": 1
  85. },
  86. "Message": "Successful!",
  87. "RequestId": "8E3E3111-B1D1-48FB-A388-A02D**7600",
  88. "Success": true,
  89. "Code": "Success"
  90. }