tencent cloud

APIs

DescribeGatherResource

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

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: DescribeGatherResource.
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.
TreeNodeUniqKey No String Unique identifier of a billing unit, used for filtering
GatherType No String Resource directory category, with the enumerated values as follows:
all - All
none - Not collected
Sort No String Sorting field, with the enumerated values as follows:
realCost - Discounted total
cashPayAmount - Cash amount
voucherPayAmount - Amount of promo voucher
incentivePayAmount - Amount of free credit
transferPayAmount - Royalty amount
SortType No String Sorting type, with the enumerated values as follows:
asc - Ascending
desc - Descending
BusinessCodes.N No Array of String Product code, used for filtering
ProductCodes.N No Array of String Subproduct code, used for filtering
ItemCodes.N No Array of String Component name code, used for filtering
RegionIds.N No Array of Integer Region ID, used for filtering
InstanceTypes.N No Array of String Instance type code, used for filtering
PayModes.N No Array of String Billing mode code, used for filtering
OperateUins.N No Array of String Operator UIN, used for filtering
OwnerUins.N No Array of String User UIN, used for filtering
SearchKey No String Fuzzy search: supports tag, resource ID, and resource alias.
Tag.N No Array of String Tag, used for filtering
ProjectIds.N No Array of String Project ID, used for filtering
ActionTypes.N No Array of String Transaction type code, used for filtering

3. Output Parameters

Parameter Name Type Description
RecordNum Integer Total quantity.
GatherResourceSummary Array of GatherResourceSummary Resource collection summary

Note: This field may return null, indicating that no valid values can be obtained.
LastUpdateTime String Data update time

Note: This field may return null, indicating that no valid values can be obtained.
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

This example shows you how to query 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: DescribeGatherResource
<Common request parameters>

{
    "Month": "2024-02",
    "Limit": 1,
    "Offset": 0
}

Output Example

{
    "Response": {
        "GatherResourceSummary": [
            {
                "ActionType": "prepay_renew",
"ActionTypeName": "Monthly Subscription Renewal",
                "AllocationType": 1,
                "BelongRule": {
                    "RuleId": 862324,
"RuleName": "Sharing rule"
                },
                "BelongTreeNodeUniqKey": {
                    "TreeNodeUniqKey": "909619400-6391dae9802da",
"TreeNodeUniqKeyName": "Customer Application Group"
                },
                "BusinessCode": "p_mongodb",
"BusinessCodeName": "TencentDB for MongoDB",
                "CashPayAmount": "176.43419703",
                "IncentivePayAmount": "0.00000000",
                "InstanceType": "",
                "InstanceTypeName": "",
                "ItemCode": "sv_mongodb_mem_replica",
"ItemCodeName": "TencentDB for MongoDB - Replica Set - Memory",
                "OperateUin": "909619400",
                "OtherRules": [
                    {
                        "RuleId": 124,
"RuleName": "Allocation Rule 1"
                    }
                ],
                "OtherTreeNodeUniqKeys": [
                    {
                        "TreeNodeUniqKey": "909619400-67290cae5",
"TreeNodeUniqKeyName": "z-Auto Creation"
                    },
                    {
                        "TreeNodeUniqKey": "909619400-447c2c41d",
"TreeNodeUniqKeyName": "f-Group 2"
                    }
                ],
                "OwnerUin": "909619400",
                "PayMode": "prePay",
"PayModeName": "Monthly Subscription",
                "PayerUin": "909619400",
                "ProductCode": "sp_mongodb_replica",
"ProductCodeName": "TencentDB for MongoDB-Replica Set",
                "ProjectId": 0,
"ProjectName": "Default Project",
                "RealTotalCost": "176.43419703",
                "RegionId": 1,
"RegionName": "South China (Guangzhou)",
                "ResourceId": "cmgo-p46bysvb",
                "ResourceName": "",
                "RuleId": 191027,
"RuleName": "Public service sharing"
                "SplitItemId": "",
                "SplitItemName": "",
                "Tag": [
                    {
                        "TagKey": "dms-common",
                        "TagValue": "prod"
                    }
                ],
                "TransferPayAmount": "0.00000000",
                "TreeNodeUniqKey": "909619400-6391dae9802da",
"TreeNodeUniqKeyName": "Customer application group"
                "VoucherPayAmount": "0.00000000"
            }
        ],
        "LastUpdateTime": "2024-03-02 13:17:07",
        "RecordNum": 3792,
        "RequestId": "b8bedd7a-da43-4cce-ab6e-2fa66ffe1455"
    }
}

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

There is no error code related to the API business logic. For other error codes, please see Common Error Codes.

Help and Support

Was this page helpful?

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

Feedback