获取产品汇总费用分布

最近更新时间:2020-07-13 08:09:10

1. 接口描述

接口请求域名: billing.tencentcloudapi.com 。

获取产品汇总费用分布

默认接口请求频率限制:20次/秒。

推荐使用 API Explorer
点击调试
API Explorer 提供了在线调用、签名验证、SDK 代码生成和快速检索接口等能力。您可查看每次调用的请求内容和返回结果以及自动生成 SDK 调用示例。

2. 输入参数

以下请求参数列表仅列出了接口请求参数和部分公共参数,完整公共参数列表见 公共请求参数

参数名称 必选 类型 描述
Action String 公共参数,本接口取值:DescribeBillSummaryByProduct。
Version String 公共参数,本接口取值:2018-07-09。
Region String 公共参数,本接口不需要传递此参数。
PayerUin String 查询账单数据的用户UIN
BeginTime String 目前只支持传当月开始,且必须和EndTime为相同月份,例 2018-09-01 00:00:00
EndTime String 目前只支持传当月结束,且必须和BeginTime为相同月份,例 2018-09-30 23:59:59

3. 输出参数

参数名称 类型 描述
Ready Integer 数据是否准备好,0未准备好,1准备好
SummaryTotal BusinessSummaryTotal 总花费详情
注意:此字段可能返回 null,表示取不到有效值。
SummaryOverview Array of BusinessSummaryOverviewItem 各产品花费分布
注意:此字段可能返回 null,表示取不到有效值。
RequestId String 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。

4. 示例

示例1 获取产品汇总费用分布

输入示例

https://billing.tencentcloudapi.com/?Action=DescribeBillSummaryByProduct
&PayerUin=909619400
&BeginTime=2018-11-01 00:00:00
&EndTime=2018-11-01 23:59:59
&<公共请求参数>

输出示例

{
  "Response": {
    "Ready": 1,
    "SummaryTotal": {
      "RealTotalCost": "1596.49",
      "VoucherPayAmount": "176.00",
      "IncentivePayAmount": "0.00",
      "CashPayAmount": "1420.49"
    },
    "SummaryOverview": [
      {
        "BusinessCode": "p_cvm",
        "RealTotalCost": "540.00",
        "CashPayAmount": "540.00",
        "IncentivePayAmount": "0.00",
        "VoucherPayAmount": "0.00",
        "RealTotalCostRatio": "33.77",
        "BillMonth": "2018-11",
        "BusinessCodeName": "云服务器CVM"
      },
      {
        "BusinessCode": "p_cbs",
        "RealTotalCost": "536.54",
        "CashPayAmount": "536.54",
        "IncentivePayAmount": "0.00",
        "VoucherPayAmount": "0.00",
        "RealTotalCostRatio": "33.57",
        "BillMonth": "2018-11",
        "BusinessCodeName": "云硬盘CBS"
      },
      {
        "BusinessCode": "p_cos",
        "RealTotalCost": "219.44",
        "CashPayAmount": "219.44",
        "IncentivePayAmount": "0.00",
        "VoucherPayAmount": "0.00",
        "RealTotalCostRatio": "13.73",
        "BillMonth": "2018-11",
        "BusinessCodeName": "COS 对象存储"
      },
      {
        "BusinessCode": "p_ai_image_ocr",
        "RealTotalCost": "169.83",
        "CashPayAmount": "0.01",
        "IncentivePayAmount": "0.00",
        "VoucherPayAmount": "169.82",
        "RealTotalCostRatio": "10.62",
        "BillMonth": "2018-11",
        "BusinessCodeName": "OCR文字识别"
      },
      {
        "BusinessCode": "p_yunjing",
        "RealTotalCost": "81.00",
        "CashPayAmount": "81.00",
        "IncentivePayAmount": "0.00",
        "VoucherPayAmount": "0.00",
        "RealTotalCostRatio": "5.07",
        "BillMonth": "2018-11",
        "BusinessCodeName": "云镜(主机安全)"
      },
      {
        "BusinessCode": "p_blackstone_eip",
        "RealTotalCost": "45.00",
        "CashPayAmount": "45.00",
        "IncentivePayAmount": "0.00",
        "VoucherPayAmount": "0.00",
        "RealTotalCostRatio": "2.82",
        "BillMonth": "2018-11",
        "BusinessCodeName": "黑石弹性公网IP"
      },
      {
        "BusinessCode": "p_ai_image",
        "RealTotalCost": "4.78",
        "CashPayAmount": "0.00",
        "IncentivePayAmount": "0.00",
        "VoucherPayAmount": "4.78",
        "RealTotalCostRatio": "0.30",
        "BillMonth": "2018-11",
        "BusinessCodeName": "图像识别"
      },
      {
        "BusinessCode": "p_ai_image_facerecognize",
        "RealTotalCost": "1.39",
        "CashPayAmount": "0.00",
        "IncentivePayAmount": "0.00",
        "VoucherPayAmount": "1.39",
        "RealTotalCostRatio": "0.09",
        "BillMonth": "2018-11",
        "BusinessCodeName": "人脸识别"
      },
      {
        "BusinessCode": "p_cdn",
        "RealTotalCost": "0.46",
        "CashPayAmount": "0.46",
        "IncentivePayAmount": "0.00",
        "VoucherPayAmount": "0.00",
        "RealTotalCostRatio": "0.03",
        "BillMonth": "2018-11",
        "BusinessCodeName": "内容分发网络CDN"
      },
      {
        "BusinessCode": "p_ci",
        "RealTotalCost": "0.00",
        "CashPayAmount": "0.00",
        "IncentivePayAmount": "0.00",
        "VoucherPayAmount": "0.00",
        "RealTotalCostRatio": "0.00",
        "BillMonth": "2018-11",
        "BusinessCodeName": "数据万象CI"
      },
      {
        "BusinessCode": "p_cmq",
        "RealTotalCost": "0.00",
        "CashPayAmount": "0.00",
        "IncentivePayAmount": "0.00",
        "VoucherPayAmount": "0.00",
        "RealTotalCostRatio": "0.00",
        "BillMonth": "2018-11",
        "BusinessCodeName": "消息服务CMQ"
      },
      {
        "BusinessCode": "billVirtualId",
        "RealTotalCost": "-1.95",
        "CashPayAmount": "-1.96",
        "IncentivePayAmount": "0.00",
        "VoucherPayAmount": "0.01",
        "RealTotalCostRatio": "0.00",
        "BillMonth": "2018-11",
        "BusinessCodeName": "月度计费精度差异"
      }
    ],
    "RequestId": "8a57841e-ef77-413d-a8ba-4c607173663c"
  }
}

5. 开发者资源

API Explorer

该工具提供了在线调用、签名验证、SDK 代码生成和快速检索接口等能力,能显著降低使用云 API 的难度,推荐使用。

SDK

云 API 3.0 提供了配套的开发工具集(SDK),支持多种编程语言,能更方便的调用 API。

命令行工具

6. 错误码

该接口暂无业务逻辑相关的错误码,其他错误码详见 公共错误码

目录