全部文档
当前文档

暂无内容

如果没有找到您期望的内容,请尝试其他搜索词

文档中心

获取成本账单

最近更新时间:2024-01-30 10:57:48

DescribeCostBill(查询成本账单)

本文档为您介绍如何获取成本账单。注意:只⽀持查询2021年1月开始的数据。

请求参数

参数

必选

类型

说明

billMonth

int

账单月,支持从2021年1月份开始的账单查询,比如202101

statisticalItem

int

统计项,0:按实例;1:按产品

instanceIds

string list

实例id列表,仅当statisticalItem=0时有效

pageNo

int

分页page no,默认为1

pageSize

int

分页page size,最大为2000,默认500

返回元素(按实例统计)

字段

类型

必选

说明

billMonth

string

分摊月,比如2021-01

customerId

long

客户id

customerName

string

客户名称

email

string

客户邮箱

productGroupId

long

产品线id

productGroupName

string

产品线名称

payType

int

计费类别,当前固定为"0:预付费"

payTypeName

string

计费类别名称,当前固定为"预付费"

currency

string

币种,USD:美元;RMB:人民币

productTypeId

long

产品类型id

productTypeName

string

产品类型名称

instanceId

string

实例id

instanceName

string

实例名称

serviceStartTime

string

账单开始时间,格式为"yyyy-MM-dd HH:mm:ss"

serviceEndTime

string

账单结束时间,格式为"yyyy-MM-dd HH:mm:ss"

billType

int

计费方式,0:包年包月;801:一次性预付费

billTypeName

string

计费方式名称

region

string

机房

availableZone

string

可用区

duration

string

计费时长,单位:天。
当计费方式是一次性预付费时,该字段为""

projectId

long

项目制id

projectName

string

项目名称

totalBalance

decimal

应付金额,两位小数

costAtBeginning

decimal

期初已分摊

totalCost

decimal

本月分摊

voucherCost

decimal

代金券分摊

cloudTicketCost

decimal

云票分摊

rewardCost

decimal

赠送金分摊

realCost

decimal

现金分摊

balanceAtEnd

decimal

期末未分摊

实例统计json输出样例
{
    "Status": 200,
    "RequestId": "b9b09505-e24b-4be6-ad5b-58a6e734e797",
    "Data": {
        "page": 1,
        "size": 2,
        "total": 15,
        "bills": [
            {
                "billMonth": "2021-11",
                "customerId": 73400575,
                "customerName": "北京金山云网络技术有限公司",
                "email": "ksc_test14@kingsoft.com",
                "productGroupId": 100,
                "productGroupName": "云服务器",
                "payType": 0,
                "payTypeName": "预付费",
                "currency": "RMB",
                "totalBalance": "2.30",
                "costAtBeginning": "0.00",
                "totalCost": "2.30",
                "voucherCost": "0.00",
                "cloudTicketCost": "0.00",
                "rewardCost": "0.00",
                "realCost": "2.30",
                "balanceAtEnd": "0.00",
                "productTypeId": 151,
                "productTypeName": "通用型N3",
                "instanceId": "9c91c3a8-7e81-447d-941b-b019fb4e05df",
                "instanceName": "KSC-IN-E85BCF7BB5",
                "serviceStartTime": "2021-11-16 19:35:23",
                "serviceEndTime": "2021-11-16 19:35:33",
                "billType": 1,
                "billTypeName": "包年包月",
                "region": "华北1(北京)",
                "availableZone": "华北1(北京)可用区A",
                "duration": "1",
                "projectId": 0,
                "projectName": "默认项目"
            },
            {
                "billMonth": "2021-11",
                "customerId": 73400575,
                "customerName": "北京金山云网络技术有限公司",
                "email": "ksc_test14@kingsoft.com",
                "productGroupId": 100,
                "productGroupName": "云服务器",
                "payType": 0,
                "payTypeName": "预付费",
                "currency": "RMB",
                "totalBalance": "62.10",
                "costAtBeginning": "0.00",
                "totalCost": "12.00",
                "voucherCost": "0.00",
                "cloudTicketCost": "0.00",
                "rewardCost": "0.00",
                "realCost": "12.00",
                "balanceAtEnd": "50.10",
                "productTypeId": 151,
                "productTypeName": "通用型N3",
                "instanceId": "824c725e-c207-4080-80db-345b6e4aba13",
                "instanceName": "KSC-IN-D6A055CE63",
                "serviceStartTime": "2021-11-25 20:52:34",
                "serviceEndTime": "2021-12-25 23:59:59",
                "billType": 1,
                "billTypeName": "包年包月",
                "region": "华北1(北京)",
                "availableZone": "华北1(北京)可用区A",
                "duration": "6",
                "projectId": 0,
                "projectName": "默认项目"
            }
        ]
    },
    "Error": null
}

返回元素(按产品统计)

字段

类型

必选

说明

billMonth

string

分摊月,比如2021-01

customerId

long

客户id

customerName

string

客户名称

email

string

客户邮箱

productGroupId

long

产品线id

productGroupName

string

产品线名称

payType

int

计费类别,当前固定为"0:预付费"

payTypeName

string

计费类别名称,当前固定为"预付费"

currency

string

币种,USD:美元;RMB:人民币

totalBalance

decimal

应付金额,两位小数

costAtBeginning

decimal

期初已分摊

totalCost

decimal

本月分摊

voucherCost

decimal

代金券分摊

cloudTicketCost

decimal

云票分摊

rewardCost

decimal

赠送金分摊

realCost

decimal

现金分摊

balanceAtEnd

decimal

期末未分摊

产品统计json输出样例
{
    "Status": 200,
    "RequestId": "9dd04b93-8b17-4cfa-827b-d1615e8c480a",
    "Data": {
        "page": 1,
        "size": 5,
        "total": 9,
        "bills": [
            {
                "billMonth": "2021-11",
                "customerId": 73400575,
                "customerName": "北京金山云网络技术有限公司",
                "email": "ksc_test14@kingsoft.com",
                "productGroupId": 100,
                "productGroupName": "云服务器",
                "payType": 0,
                "payTypeName": "预付费",
                "currency": "RMB",
                "totalBalance": "125.90",
                "costAtBeginning": "15.96",
                "totalCost": "39.34",
                "voucherCost": "0.00",
                "cloudTicketCost": "0.00",
                "rewardCost": "0.00",
                "realCost": "39.34",
                "balanceAtEnd": "70.60"
            },
            {
                "billMonth": "2021-11",
                "customerId": 73400575,
                "customerName": "北京金山云网络技术有限公司",
                "email": "ksc_test14@kingsoft.com",
                "productGroupId": 101,
                "productGroupName": "云硬盘",
                "payType": 0,
                "payTypeName": "预付费",
                "currency": "RMB",
                "totalBalance": "7.20",
                "costAtBeginning": "4.18",
                "totalCost": "3.02",
                "voucherCost": "0.00",
                "cloudTicketCost": "0.00",
                "rewardCost": "0.00",
                "realCost": "3.02",
                "balanceAtEnd": "0.00"
            },
            {
                "billMonth": "2021-11",
                "customerId": 73400575,
                "customerName": "北京金山云网络技术有限公司",
                "email": "ksc_test14@kingsoft.com",
                "productGroupId": 102,
                "productGroupName": "弹性IP",
                "payType": 0,
                "payTypeName": "预付费",
                "currency": "RMB",
                "totalBalance": "57.50",
                "costAtBeginning": "13.30",
                "totalCost": "34.40",
                "voucherCost": "0.00",
                "cloudTicketCost": "0.00",
                "rewardCost": "0.00",
                "realCost": "34.40",
                "balanceAtEnd": "9.80"
            },
            {
                "billMonth": "2021-11",
                "customerId": 73400575,
                "customerName": "北京金山云网络技术有限公司",
                "email": "ksc_test14@kingsoft.com",
                "productGroupId": 106,
                "productGroupName": "云数据库Redis",
                "payType": 0,
                "payTypeName": "预付费",
                "currency": "RMB",
                "totalBalance": "7.50",
                "costAtBeginning": "0.00",
                "totalCost": "1.44",
                "voucherCost": "0.00",
                "cloudTicketCost": "0.00",
                "rewardCost": "0.00",
                "realCost": "1.44",
                "balanceAtEnd": "6.06"
            },
            {
                "billMonth": "2021-11",
                "customerId": 73400575,
                "customerName": "北京金山云网络技术有限公司",
                "email": "ksc_test14@kingsoft.com",
                "productGroupId": 180,
                "productGroupName": "对象存储 (KS3)资源包",
                "payType": 0,
                "payTypeName": "预付费",
                "currency": "RMB",
                "totalBalance": "11.00",
                "costAtBeginning": "0.00",
                "totalCost": "5.25",
                "voucherCost": "0.00",
                "cloudTicketCost": "0.00",
                "rewardCost": "0.00",
                "realCost": "5.25",
                "balanceAtEnd": "5.75"
            }
        ]
    },
    "Error": null
}

文档导读
纯净模式常规模式

纯净模式

点击可全屏预览文档内容
文档反馈