tencent cloud

フィードバック

DescribeVoucherUsageDetails

最終更新日:2024-05-16 15:10:20

    1. API Description

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

    This API is used to query voucher usage details.

    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: DescribeVoucherUsageDetails.
    Version Yes String Common Params. The value used for this API: 2018-07-09.
    Region Yes String Common Params. For more information, please see the list of regions supported by the product.
    Limit Yes Integer The number of records per page. The default is 20, and the maximum is 1,000.
    Offset Yes Integer The page number the records start from. The default is 1.
    VoucherId No String The voucher ID.
    Operator No String The operator. The default is the UIN of the current.

    3. Output Parameters

    Parameter Name Type Description
    TotalCount Integer The total number of vouchers.
    TotalUsedAmount Integer The total amount used. The value of this parameter is the total amount used (USD, rounded to 8 decimal places) multiplied by 100,000,000.
    UsageRecords Array of UsageRecords The usage details.
    Note: This field may return null, indicating that no valid value was found.
    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 voucher usage details

    This example shows you how to query voucher usage details.

    Input Example

    https://billing.tencentcloudapi.com/?Action=DescribeVoucherUsageDetails
    &Limit=10
    &Offset=1
    &VoucherId="abc"
    &Operator="abc"
    &<Common request parameters>
    

    Output Example

    {
        "Response": {
            "TotalCount": "1",
            "TotalUsedAmount": 18000000000,
            "UsageRecords": [
                {
                    "UsedAmount": 18000000000,
                    "UsedTime": "2021-01-01 00:00:00",
                    "UsageDetails": [
                        {
                            "ProductName": "Lighthouse",
                            "SubProductName": "Lighthouse (General - 2-core 2 GB - 50 GB - 500 GB)"
                        }
                    ]
                }
            ],
            "RequestId": "76cf663e-f683-41b9-b44d-849123783bf4"
        }
    }
    

    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.InvalidAppId Invalid App ID.
    InternalError Internal error.
    InternalError.GatewayError Gateway error.
    InvalidParameter Invalid parameter.
    UnauthorizedOperation.CamNoAuth The account does not have CAM permission.
    お問い合わせ

    カスタマーサービスをご提供できるため、ぜひお気軽にお問い合わせくださいませ。

    テクニカルサポート

    さらにサポートが必要な場合は、サポートチケットを送信して弊社サポートチームにお問い合わせください。24時間365日のサポートをご提供します。

    電話サポート(24 時間365日対応)