DescribeBillResourceSummary

最后更新时间:2021-12-03 16:58:02

1. API Description

Domain name for API request: billing.tencentcloudapi.com.

This API is used to query bill resources summary.

A maximum of 5 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common parameter. The value used for this API: DescribeBillResourceSummary.
Version Yes String Common parameter. The value used for this API: 2018-07-09.
Region No String Common parameter. This parameter is not required for this API.
Offset Yes Integer Offset
Limit Yes Integer Quantity, maximum is 1000
Month Yes String Month; format: yyyy-mm. This value cannot be earlier than the month when Bill 2.0 is enabled. Last 24 months data are available.
PeriodType No String The period type. byUsedTime: By usage period; byPayTime: by payment period. Must be the same as the period of the current monthly bill of the Billing Center. You can check your bill statistics period type at the top of the Bill Overview page.
NeedRecordNum No Integer Indicates whether or not the total number of records of accessing the list is required, used for frontend pages.
1 = yes, 0 = no
ActionType No String Action type to query. Valid values:
Purchase
Renewal
Modify
Refund
Deduction
Hourly settlement
Daily settlement
Monthly settlement
Offline project deduction
Offline deduction
adjust-CR
adjust-DR
One-off RI Fee
Spot
Hourly RI fee
New monthly subscription
Monthly subscription renewal
Monthly subscription specification adjustment
Monthly subscription specification adjustment
Monthly subscription refund
ResourceId No String ID of the instance to be queried
PayMode No String Billing mode. Valid values: prePay (prepaid), postPay (postpaid)
BusinessCode No String Business code
Note: To query business codes used in the current month, call DescribeBillSummaryByProduct.

3. Output Parameters

Parameter Name Type Description
ResourceSummarySet Array of BillResourceSummary Resource summary list
Total Integer Total number of resource summary lists
Note: This field may return null, indicating that no valid value was found.
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 Getting the bills summarized by instance

Input Example

https://billing.tencentcloudapi.com/?Action=DescribeBillResourceSummary
&Month=2018-08
&PeriodType=byPayTime
&Offset=0
&Limit=1
&ActionType=Pay-as-you-go deduction
&<Common request parameters>

Output Example

{
  "Response": {
    "Total": 103,
    "RequestId": "xx",
    "ResourceSummarySet": [
      {
        "ReduceType": "xx",
        "ProductCode": "xx",
        "FeeEndTime": "2020-09-22 00:00:00",
        "CashPayAmount": "xx",
        "ProductCodeName": "xx",
        "ActionTypeName": "xx",
        "Tags": [
          {
            "TagKey": "xx",
            "TagValue": "xx"
          }
        ],
        "ResourceId": "xx",
        "RegionId": 0,
        "ConfigDesc": "xx",
        "Discount": "xx",
        "ResourceName": "xx",
        "RegionName": "xx",
        "TotalCost": "xx",
        "BusinessCode": "xx",
        "RealTotalCost": "xx",
        "OwnerUin": "xx",
        "PayerUin": "xx",
        "ExtendField4": "xx",
        "OperateUin": "xx",
        "BusinessCodeName": "xx",
        "OrderId": "xx",
        "ExtendField1": "xx",
        "ExtendField2": "xx",
        "ExtendField3": "xx",
        "VoucherPayAmount": "xx",
        "ExtendField5": "xx",
        "PayModeName": "xx",
        "FeeBeginTime": "2020-09-22 00:00:00",
        "IncentivePayAmount": "xx",
        "ProjectName": "xx",
        "PayTime": "2020-09-22 00:00:00",
        "ZoneName": "xx"
      }
    ]
  }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
FailedOperation.SummaryDataNotReady Summary is being built. Please try again later.
InternalError.GatewayError Gateway error.