最近更新时间:2024-01-30 10:57:48
本文档为您介绍如何获取成本账单。注意:只⽀持查询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 | 否 | 客户名称 |
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 | 是 | 期末未分摊 |
{
"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 | 否 | 客户名称 |
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 | 是 | 期末未分摊 |
{
"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
}
纯净模式