DescribeBillSummaryByTag

Last updated: 2020-09-25 14:18:05

1. API Description

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

This API is used to get the cost distribution over different tags.

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 parameter. The value used for this API: DescribeBillSummaryByTag.
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.
PayerUin Yes String Payer UIN
BeginTime Yes String Currently the period to be queried must start from a time point in the current month, and the starting time and the end time must be in the same month. Example: 2018-09-01 00:00:00.
EndTime Yes String Currently the period to be queried must end at a time point in the current month, and the starting time and the end time must be in the same month. Example: 2018-09-30 23:59:59.
TagKey Yes String Cost allocation tag key

3. Output Parameters

Parameter Name Type Description
Ready Integer Indicates whether or not the data is ready. 0: not ready; 1: ready.
SummaryOverview Array of TagSummaryOverviewItem Details about cost distribution over different tags
Note: This field may return null, indicating that no valid values can be obtained.
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 Getting cost distribution over different tags

Input Example

https://billing.tencentcloudapi.com/?Action=DescribeBillSummaryByTag
&PayerUin=100000007615
&BeginTime=9/1/2019 00:00:00
&EndTime=9/30/2019 23:59:59
&TagKey=province
&<Common request parameters>

Output Example

{
    "Response": {
        "Ready": 1,
        "SummaryOverview": [
            {
                "TagValue": "",
                “RealTotalCost": "0.30",
                "RealTotalCostRatio": "17.08"
            },
            {
                "TagValue": "shanghai",
                “RealTotalCost": "0.26",
                "RealTotalCostRatio": "15.21"
            },
            {
                "TagValue": "beijing",
                “RealTotalCost": "0.26",
                "RealTotalCostRatio": "15.21"
            },
            {
                "TagValue": "guangdong",
                “RealTotalCost": "0.26",
                "RealTotalCostRatio": "15.21"
            },
            {
                "TagValue": "xiamen",
                “RealTotalCost": "0.22",
                "RealTotalCostRatio": "12.43"
            },
            {
                "TagValue": "tianjin",
                “RealTotalCost": "0.22",
                "RealTotalCostRatio": "12.43"
            },
            {
                "TagValue": "sichuan",
                “RealTotalCost": "0.22",
                "RealTotalCostRatio": "12.43"
            }
        ],
        "SummaryTotal": {
            "RealTotalCost": "1.74"
        },
        "RequestId": "b7649c63-59e5-49d3-bbde-64292cc4174d"
    }
}

5. Developer Resources

API Explorer

This tool allows online call, signature authentication, SDK code generation and quick search of APIs to greatly improve the efficiency of using TencentCloud APIs.

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.TagKeyNotExist This cost allocation tag key does not exist.

Was this page helpful?

Was this page helpful?

  • Not at all
  • Not very helpful
  • Somewhat helpful
  • Very helpful
  • Extremely helpful
Send Feedback
Help