tencent cloud

APIs

DescribeAllocationSummaryByResource

Focus Mode
Font Size
Last updated: 2026-04-24 15:08:18

1. API Description

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

This API is used to query the details of a cost allocation bill by resource.

A maximum of 20 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: DescribeAllocationSummaryByResource.
Version Yes String Common Params. The value used for this API: 2018-07-09.
Region No String Common Params. This parameter is not required.
Limit Yes Integer Quantity, with the maximum value of 1,000

Offset Yes Integer Pagination offset. If Offset is 0, it indicates the first page. If Limit is 100, then Offset is 100, and it indicates the second page. If Offset is 200, it indicates the third page, and so on.
Month No String Bill month, in the format of 2024-02, which is the current month by default if not provided

PeriodType No String Statistical period, with the enumerated values as follows:
month - Month
day - Day
TreeNodeUniqKeys.N No Array of String Unique identifier of a billing unit, used for filtering
Sort No String Sorting field, with the enumerated values as follows:
RiTimeSpan - Deduction duration of a reserved instance
ExtendPayAmount1 - Original price for the deduction duration of a reserved instance
RealCost - Discounted total
CashPayAmount - Cash amount
VoucherPayAmount - Amount of promo voucher
IncentivePayAmount - Amount of free credit
TransferPayAmount - Royalty amount
Cost - Original price of a component
SortType No String Sorting type, with the enumerated values as follows:
asc - Ascending
desc - Descending
BillDates.N No Array of String Date, used for filtering
BusinessCodes.N No Array of String Product code, used for filtering
OwnerUins.N No Array of String User UIN, used for filtering
OperateUins.N No Array of String Operator UIN, used for filtering
PayModes.N No Array of String Billing mode code, used for filtering
ActionTypes.N No Array of String Transaction type code, used for filtering
ProductCodes.N No Array of String Subproduct code, used for filtering
RegionIds.N No Array of String Region ID, used for filtering
ZoneIds.N No Array of String Availability zone (AZ) ID, used for filtering
InstanceTypes.N No Array of String Instance type code, used for filtering
Tag.N No Array of String Tag, used for filtering
SearchKey No String Fuzzy search: supports tag, resource ID, and resource alias
ProjectIds.N No Array of Integer Project ID, used for filtering
AllocationType.N No Array of Integer Cost collection type, with the enumerated values as follows:
0 - Allocation
1 - Collection
-1 - Unallocated

3. Output Parameters

Parameter Name Type Description
RecordNum Integer Total quantity.
Total AllocationOverviewTotal Total amount of a cost allocation bill
Detail Array of AllocationSummaryByResource Detailed summary of the cost allocation bill by resource
RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

4. Example

Example1 Querying Details of a Cost Allocation Bill by Resource

Input Example

POST / HTTP/1.1
Host: billing.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeAllocationSummaryByResource
<Common request parameters>

{
    "Month": "2022-11-01 00:00:00",
    "Limit": 30,
    "Offset": 0,
    "PeriodType": "month"
}

Output Example

{
    "Response": {
        "Detail": [
            {
                "ActionType": "postpay_deduct_d",
"ActionTypeName": "Pay-as-you-go daily billing"
                "AllocationType": 1,
                "BillDate": "2024-02-01",
                "BusinessCode": "p_cos",
"BusinessCodeName": "Cloud Object Storage (COS)"
                "CashPayAmount": "0.00001027",
"ComponentConfig": "Cloud Object Storage (COS) Standard Storage Capacity: 0.00390625 GB"
                "FeeBeginTime": "2024-02-01 00:00:00",
                "FeeEndTime": "2024-02-01 23:59:59",
                "IncentivePayAmount": "0.00000000",
                "InstanceType": "",
                "InstanceTypeName": "",
                "OperateUin": "909619400",
                "OwnerUin": "909619400",
                "PayMode": "postPay",
"PayModeName": "Pay-as-you-go"
                "PayerUin": "909619400",
                "ProductCode": "sp_cos_std",
"ProductCodeName": "Cloud Object Storage (COS) Standard Storage"
                "ProjectId": 0,
"ProjectName": "Default Project",
                "RealTotalCost": "0.00001027",
                "RegionId": 33,
"RegionName": "East China (Nanjing)"
                "RegionType": "domestic",
"RegionTypeName": "Domestic"
                "ResourceId": "909619400-std_storage-19",
                "ResourceName": "",
                "RiCost": "0.00000000",
                "RiTimeSpan": "0.00000000",
                "SPCost": "0.00000000",
                "SplitItemId": "1234567-1251007194",
                "SplitItemName": "1234567",
                "Tag": [
                    {
"TagKey": "Game project team",
"TagValue": "Naruto"
                    }
                ],
                "TotalCost": "0.00001537",
                "TransferPayAmount": "0.00000000",
                "TreeNodeUniqKey": "909619400-659bb8eb2830e",
"TreeNodeUniqKeyName": "Research Group",
                "VoucherPayAmount": "0.00000000",
                "ZoneId": 330001,
"ZoneName": "Nanjing Zone 1"
            }
        ],
        "RecordNum": 30592,
        "RequestId": "4b163951-0990-442b-922c-cf5145fd1e56",
        "Total": {
            "CashPayAmount": "1630.93000000",
            "IncentivePayAmount": "31062.86000000",
            "RealTotalCost": "32953.81000000",
            "TransferPayAmount": "0.00000000",
            "VoucherPayAmount": "260.02000000"
        }
    }
}

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
AuthFailure CAM signature/authentication error.
AuthFailure.UnauthorizedOperation No permission.
InternalError Internal error.
InvalidParameter Invalid parameter.
InvalidParameterValue Invalid parameter value.
MissingParameter Parameters are missing

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback