Domain name for API request: billing.tencentcloudapi.com.
This API is used to get the bill summarized by instance.
A maximum of 5 requests can be initiated per second for this API.
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. |
Offset | Yes | Integer | Pagination offset. If Offset is 0 , it indicates the first page. If Limit is 100 , "Offset = 100 " indicates the second page, then "Offset = 200 " indicates the third page, and so on. |
Limit | Yes | Integer | Quantity, maximum is 1000 |
Month | Yes | String | Bill month in the format of "yyyy-mm". This value must be no earlier than March 2019, when Bill 2.0 was launched. |
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 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. |
PayerUin | No | String | The account ID of the payer, which is the unique identifier of a Tencent Cloud user. This account is allowed to query its own bills by default. If an organization admin account needs to query the self-pay bills of members, this field should be specified as the member account ID. |
TagKey | No | String | Cost allocation tag key, which can be customized. This parameter can be used for querying bills after January 2021. |
TagValue | No | String | Resource tag value. If it is left empty, there are no records with tag values set under this tag key. This parameter can be used for querying bills after January 2021. |
Parameter Name | Type | Description |
---|---|---|
ResourceSummarySet | Array of BillResourceSummary | Resource summary list |
Total | Integer | Total number of resource summary lists, which will not be returned when NeedRecordNum is 0 . 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. |
This example shows you how to get the bill summarized by instance.
POST / HTTP/1.1
Host: billing.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeBillResourceSummary
{
"Offset": 0,
"Limit": 1,
"PeriodType": "byPayTime",
"Month": "2022-01",
"NeedRecordNum": 1
}
{
"Response": {
"ResourceSummarySet": [
{
"BusinessCodeName": "abc",
"ProductCodeName": "abc",
"PayModeName": "abc",
"ProjectName": "abc",
"RegionName": "abc",
"ZoneName": "abc",
"ResourceId": "abc",
"ResourceName": "abc",
"ActionTypeName": "abc",
"OrderId": "abc",
"PayTime": "2020-09-22 00:00:00",
"FeeBeginTime": "2020-09-22 00:00:00",
"FeeEndTime": "2020-09-22 00:00:00",
"ConfigDesc": "abc",
"ExtendField1": "abc",
"ExtendField2": "abc",
"TotalCost": "abc",
"Discount": "abc",
"ReduceType": "abc",
"RealTotalCost": "abc",
"VoucherPayAmount": "abc",
"CashPayAmount": "abc",
"IncentivePayAmount": "abc",
"TransferPayAmount": "abc",
"ExtendField3": "abc",
"ExtendField4": "abc",
"ExtendField5": "abc",
"Tags": [
{
"TagKey": "abc",
"TagValue": "abc"
}
],
"PayerUin": "abc",
"OwnerUin": "abc",
"OperateUin": "abc",
"BusinessCode": "abc",
"ProductCode": "abc",
"RegionId": 0,
"InstanceType": "abc",
"OriginalCostWithRI": "abc",
"SPDeduction": "abc",
"OriginalCostWithSP": "abc"
}
],
"Total": 0,
"RequestId": "abc"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
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. |
InternalError.UnknownError | Undefined exception. |
Was this page helpful?