tencent cloud

Feedback

DescribeDiskDiscount

Last updated: 2022-09-26 17:00:27

1. API Description

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

This API is used to query the discount information of a cloud disk.

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: DescribeDiskDiscount.
Version Yes String Common Params. The value used for this API: 2020-03-24.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
DiskType Yes String Cloud disk type. Valid values: "CLOUD_PREMIUM".
DiskSize Yes Integer Cloud disk size.
DiskBackupQuota No Integer Specify the quota of disk backups. No quota if it’s left empty. Only one quota is allowed.

3. Output Parameters

Parameter Name Type Description
Currency String Currency: CNY, USD.
DiscountDetail Array of DiscountDetail Discount tier details. The information of each tier includes the duration, discounted quantity, total price, discounted price, and discount details (user discount, official website discount, or final discount).
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 Querying the discount information of cloud disks

Input Example

POST / HTTP/1.1
Host: lighthouse.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeDiskDiscount
<Common request parameters>

{
    "DiskType": "CLOUD_PREMIUM",
    "DiskSize": 50
}

Output Example

{
    "Response": {
        "Currency": "CNY",
        "DiscountDetail": [
            {
                "TimeSpan": 1,
                "TimeUnit": "m",
                "TotalCost": 15.0,
                "RealTotalCost": 15.0,
                "Discount": 100,
                "PolicyDetail": {
                    "UserDiscount": 100,
                    "CommonDiscount": 100,
                    "FinalDiscount": 100
                }
            },
            {
                "TimeSpan": 2,
                "TimeUnit": "m",
                "TotalCost": 30.0,
                "RealTotalCost": 30.0,
                "Discount": 100,
                "PolicyDetail": {
                    "UserDiscount": 100,
                    "CommonDiscount": 100,
                    "FinalDiscount": 100
                }
            },
            {
                "TimeSpan": 3,
                "TimeUnit": "m",
                "TotalCost": 45.0,
                "RealTotalCost": 45.0,
                "Discount": 100,
                "PolicyDetail": {
                    "UserDiscount": 100,
                    "CommonDiscount": 100,
                    "FinalDiscount": 100
                }
            },
            {
                "TimeSpan": 4,
                "TimeUnit": "m",
                "TotalCost": 60.0,
                "RealTotalCost": 60.0,
                "Discount": 100,
                "PolicyDetail": {
                    "UserDiscount": 100,
                    "CommonDiscount": 100,
                    "FinalDiscount": 100
                }
            },
            {
                "TimeSpan": 5,
                "TimeUnit": "m",
                "TotalCost": 75.0,
                "RealTotalCost": 75.0,
                "Discount": 100,
                "PolicyDetail": {
                    "UserDiscount": 100,
                    "CommonDiscount": 100,
                    "FinalDiscount": 100
                }
            },
            {
                "TimeSpan": 6,
                "TimeUnit": "m",
                "TotalCost": 90.0,
                "RealTotalCost": 90.0,
                "Discount": 100,
                "PolicyDetail": {
                    "UserDiscount": 100,
                    "CommonDiscount": 100,
                    "FinalDiscount": 100
                }
            },
            {
                "TimeSpan": 7,
                "TimeUnit": "m",
                "TotalCost": 105.0,
                "RealTotalCost": 105.0,
                "Discount": 100,
                "PolicyDetail": {
                    "UserDiscount": 100,
                    "CommonDiscount": 100,
                    "FinalDiscount": 100
                }
            },
            {
                "TimeSpan": 8,
                "TimeUnit": "m",
                "TotalCost": 120.0,
                "RealTotalCost": 120.0,
                "Discount": 100,
                "PolicyDetail": {
                    "UserDiscount": 100,
                    "CommonDiscount": 100,
                    "FinalDiscount": 100
                }
            },
            {
                "TimeSpan": 9,
                "TimeUnit": "m",
                "TotalCost": 135.0,
                "RealTotalCost": 135.0,
                "Discount": 100,
                "PolicyDetail": {
                    "UserDiscount": 100,
                    "CommonDiscount": 100,
                    "FinalDiscount": 100
                }
            },
            {
                "TimeSpan": 10,
                "TimeUnit": "m",
                "TotalCost": 150.0,
                "RealTotalCost": 150.0,
                "Discount": 100,
                "PolicyDetail": {
                    "UserDiscount": 100,
                    "CommonDiscount": 100,
                    "FinalDiscount": 100
                }
            },
            {
                "TimeSpan": 11,
                "TimeUnit": "m",
                "TotalCost": 165.0,
                "RealTotalCost": 165.0,
                "Discount": 100,
                "PolicyDetail": {
                    "UserDiscount": 100,
                    "CommonDiscount": 100,
                    "FinalDiscount": 100
                }
            },
            {
                "TimeSpan": 12,
                "TimeUnit": "m",
                "TotalCost": 180.0,
                "RealTotalCost": 180.0,
                "Discount": 100,
                "PolicyDetail": {
                    "UserDiscount": 100,
                    "CommonDiscount": 100,
                    "FinalDiscount": 100
                }
            },
            {
                "TimeSpan": 24,
                "TimeUnit": "m",
                "TotalCost": 360.0,
                "RealTotalCost": 360.0,
                "Discount": 100,
                "PolicyDetail": {
                    "UserDiscount": 100,
                    "CommonDiscount": 100,
                    "FinalDiscount": 100
                }
            },
            {
                "TimeSpan": 36,
                "TimeUnit": "m",
                "TotalCost": 540.0,
                "RealTotalCost": 540.0,
                "Discount": 100,
                "PolicyDetail": {
                    "UserDiscount": 100,
                    "CommonDiscount": 100,
                    "FinalDiscount": 100
                }
            },
            {
                "TimeSpan": 48,
                "TimeUnit": "m",
                "TotalCost": 720.0,
                "RealTotalCost": 720.0,
                "Discount": 100,
                "PolicyDetail": {
                    "UserDiscount": 100,
                    "CommonDiscount": 100,
                    "FinalDiscount": 100
                }
            },
            {
                "TimeSpan": 60,
                "TimeUnit": "m",
                "TotalCost": 900.0,
                "RealTotalCost": 900.0,
                "Discount": 100,
                "PolicyDetail": {
                    "UserDiscount": 100,
                    "CommonDiscount": 100,
                    "FinalDiscount": 100
                }
            }
        ],
        "RequestId": "0b8d268d-be74-4b91-b624-7a29d70cabb0"
    }
}

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
InternalError.RequestError There was an error in the request.
InternalError.TradeGetPriceFailed Failed to get the price.
InvalidParameterValue Incorrect parameter value.
UnauthorizedOperation.NoPermission No permission
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