tencent cloud

Feedback

DescribeBillResourceSummary

Last updated: 2024-05-16 15:10:04

    1. API Description

    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.

    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.
    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.

    3. Output Parameters

    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.

    4. Example

    Example1 Getting the bill summarized by instance

    This example shows you how to get the bill summarized by instance.

    Input Example

    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
    }
    

    Output Example

    {
        "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"
        }
    }
    

    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
    FailedOperation.SummaryDataNotReady Summary is being built. Please try again later.
    InternalError.GatewayError Gateway error.
    InternalError.UnknownError Undefined exception.
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support