查询资源包(包含RI、scu)的使用量情况。
接口说明
限制:
仅支持查询最近 1 年的用量记录
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
bss:FrDeductLogQueryRequest |
get |
*全部资源
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| InstanceId |
string |
否 |
筛选查询的实例 ID,为空时返回所有的使用的实例明细。 |
oss-123123 |
| InstanceSpec |
string |
否 |
实例对应的规格。 |
Instancetyp |
| CommodityCode |
string |
否 |
商品 code,如 ecsRi、scu_bag 等。如果填写该字段,则 prodCode 字段不生效 |
ecsRi |
| DeductedInstanceId |
string |
否 |
被抵扣实例的 ID,为空时返回所有实例的明细数据。 |
oss-123123 |
| StartTime |
string |
是 |
开始时间,格式:YYYY-MM-dd HH:mm:ss。 |
2019-05-23 12:00:00 |
| EndTime |
string |
是 |
结束时间,格式:YYYY-MM-dd HH:mm:ss。 |
2019-05-23 12:00:00 |
| LastToken |
string |
否 |
查询从 LastToken 之后开始返回。第一次查询填 null,之后的从结果 NextToken 获取 |
CAESF***zNTAw |
| Limit |
integer |
否 |
每次查询条数,默认为 20,最大值为 300。 |
20 |
| IncludeShare |
boolean |
是 |
是否包含财务云子账号的资源包用量
|
true |
| ProdCode |
string |
否 |
产品 code,如:ecs |
oss |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| Code |
string |
状态码。 |
Success |
| Message |
string |
错误信息。 |
Successful! |
| RequestId |
string |
请求 ID。 |
DF58589C-A06C-4224-8615-7797E6474FA3 |
| Success |
boolean |
是否成功。 |
true |
| Data |
object |
返回数据。 |
|
| NextToken |
string |
下次请求查询开始标识,填充到 request 的 LastToken 字段中。如果返回为 null,则标识查询结束 |
CAESF***zNTAw |
| DetailList |
object |
||
| DetailList |
array<object> |
明细数组。 |
|
|
object |
|||
| DeductedInstanceId |
string |
被抵扣实例 ID。 |
oss-123123 |
| InstanceId |
string |
预留实例 ID。 |
oss-123123 |
| DeductHours |
number |
抵扣系数。 仅当 CommodityCode 为 ecsRi 有效。 |
24 |
| ShareUid |
integer |
抵扣实例所属 uid
|
1111111111 |
| DeductDate |
string |
抵扣日期,格式示例为 YYYY/M/D HH:mm。 |
2019/5/23 12:00 |
| InstanceSpec |
string |
被抵扣实例的规格。 |
rds.mysql.s3.large |
| DeductedCommodityCode |
string |
被抵扣商品 code。 |
rds |
| DeductedProductDetail |
string |
被抵商品(产品明细)名称。 |
云数据库RDS |
| DeductMeasure |
number |
原始计量量。表示用户在某段时间内实际使用的资源量,未经任何规则调整。 |
1 |
| Region |
string |
计量中 region,可以是空 |
cn-hangzhou |
| DeductQuantity |
number |
实际抵扣对应按量实例的算力或容量。 说明
实际抵扣量(DeductQuantity)是基于原始计量量(DeductMeasure)并结合具体抵扣规则计算得出的。 |
1 |
| DeductFactorTotal |
number |
RI 或 SCU 在该时间段的算力或容量总量。 |
1 |
| ResCode |
string |
计费项 |
PutRequest |
| Uid |
integer |
被抵扣实例的 uid |
1111111111 |
示例
正常返回示例
JSON格式
{
"Code": "Success",
"Message": "Successful!",
"RequestId": "DF58589C-A06C-4224-8615-7797E6474FA3",
"Success": true,
"Data": {
"NextToken": "CAESF***zNTAw",
"DetailList": {
"DetailList": [
{
"DeductedInstanceId": "oss-123123",
"InstanceId": "oss-123123",
"DeductHours": 24,
"ShareUid": 1111111111,
"DeductDate": "2019/5/23 12:00",
"InstanceSpec": "rds.mysql.s3.large",
"DeductedCommodityCode": "rds",
"DeductedProductDetail": "云数据库RDS",
"DeductMeasure": 1,
"Region": "cn-hangzhou ",
"DeductQuantity": 1,
"DeductFactorTotal": 1,
"ResCode": "PutRequest",
"Uid": 1111111111
}
]
}
}
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | InternalError | An error occurred in the internal server. | |
| 400 | InvalidOwner | The specified owner does not belong to caller. | |
| 400 | InvalidParameter | The specified request contains invalid parameters. | |
| 400 | MissingParameter | The specified request lacks essential parameters. | |
| 400 | NotApplicable | The specified API is not applicable for the user. | |
| 400 | NotAuthorized | The user is not authorized for the specified API. | |
| 400 | InvalidInstanceSpec | The specified Instance specification is not valid. | |
| 400 | InvalidQueryTime | The specified start time and end time are incorrect | |
| 400 | CommodityNotSupported | The specified commodity is not supported. |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。