tencent cloud



最后更新时间:2022-08-25 10:25:27

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 Params. The value used for this API: DescribeBillResourceSummary.
Version Yes String Common Params. The value used for this API: 2018-07-09.
Region No String Common Params. 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:
Hourly settlement
Daily settlement
Monthly settlement
Offline project deduction
Offline deduction
One-off RI Fee
Hourly RI fee
New monthly subscription
Monthly subscription renewal
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 Product code
Note: To query the product 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 a bill summary by instance

Input Example

&ActionType=Pay-as-you-go deduction
&<Common request parameters>

Output Example

    "Response": {
        "Total": 103,
        "RequestId": "xx",
        "ResourceSummarySet": [
                "ReduceType": "xx",
                "SPDeduction": "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",
                "InstanceType": "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",
                "OriginalCostWithRI": "xx",
                "FeeBeginTime": "2020-09-22 00:00:00",
                "IncentivePayAmount": "xx",
                "ProjectName": "xx",
                "PayTime": "2020-09-22 00:00:00",
                "OriginalCostWithSP": "xx",
                "ZoneName": "xx"

5. Developer Resources


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.




7x24 电话支持