tencent cloud

文档反馈

InquiryPriceCreateDisks

最后更新时间:2023-06-21 15:01:16

1. API Description

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

This API is used to query the price of creating cloud disks.

  • You can query the price of creating multiple cloud disks in a single request. In this case, the price returned will be the total price.

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: InquiryPriceCreateDisks.
Version Yes String Common Params. The value used for this API: 2017-03-12.
Region No String Common Params. This parameter is not required for this API.
DiskChargeType Yes String Cloud disk billing mode.
  • POSTPAID_BY_HOUR: Hourly pay-as-you-go.
  • DiskType Yes String Cloud disk media type. Valid values:
  • CLOUD_BASIC: HDD Cloud Storage
  • CLOUD_PREMIUM: Premium Cloud Disk
  • CLOUD_SSD: SSD
  • CLOUD_HSSD: Enhanced SSD
  • CLOUD_TSSD: ulTra SSD.
  • DiskSize Yes Integer Cloud disk size in GB. For the value range, see Cloud Disk Types.
    ProjectId No Integer ID of the project to which the cloud disk belongs.
    DiskCount No Integer Number of cloud disks to be purchased. If it is not specified, 1 will be used by default.
    ThroughputPerformance No Integer Extra performance in MB/s purchased for a cloud disk.
    This parameter is only valid for Enhanced SSD (CLOUD_HSSD) and ulTra SSD (CLOUD_TSSD).
    DiskChargePrepaid No DiskChargePrepaid Relevant parameter settings for the prepaid mode (i.e., monthly subscription). The monthly subscription cloud disk purchase attributes such as usage period and whether or not auto-renewal is set up can be specified using this parameter.
    This parameter is required when creating a prepaid cloud disk. This parameter is not required when creating an hourly postpaid cloud disk.
    DiskBackupQuota No Integer Specifies the cloud disk backup point quota.

    3. Output Parameters

    Parameter Name Type Description
    DiskPrice Price Describes the price of newly purchased cloud disks.
    RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

    4. Example

    Example1 Querying the price of purchasing a 500 GB ulTra SSD cloud disk with the extra performance of 100 MB/s for one month

    Input Example

    https://cbs.tencentcloudapi.com/?Action=InquiryPriceCreateDisks
    &DiskType=CLOUD_TSSD
    &DiskCount=1
    &DiskSize=500
    &DiskChargeType=PREPAID
    &DiskChargePrepaid.Period=1
    &ThroughputPerformance=100
    &<Common request parameters>
    

    Output Example

    {
        "Response": {
            "RequestId": "55e84d71-26f1-4b7c-8dc4-6bc2611d0a2411",
            "DiskPrice": {
                "DiscountPrice": 800.0,
                "UnitPriceHigh": null,
                "OriginalPriceHigh": "800",
                "OriginalPrice": 800.0,
                "UnitPriceDiscount": null,
                "UnitPriceDiscountHigh": null,
                "DiscountPriceHigh": "800",
                "UnitPrice": null,
                "ChargeUnit": null
            }
        }
    }
    

    Example2 Querying the price of purchasing an hourly pay-as-you-go cloud disk

    This example shows you how to query the price of purchasing an hourly pay-as-you-go 100 GB premium cloud disk.

    Input Example

    https://cbs.tencentcloudapi.com/?Action=InquiryPriceCreateDisks
    &DiskType=CLOUD_PREMIUM
    &DiskSize=100
    &DiskCount=1
    &DiskChargeType=POSTPAID_BY_HOUR
    &<Common request parameters>
    

    Output Example

    {
        "Response": {
            "RequestId": "55e84d71-26f1-4b7c-8dc4-6bc26d0a2411",
            "DiskPrice": {
                "DiscountPrice": null,
                "UnitPrice": 0.04,
                "UnitPriceHigh": "0.042",
                "OriginalPriceHigh": null,
                "OriginalPrice": null,
                "UnitPriceDiscount": 0.04,
                "UnitPriceDiscountHigh": "0.042",
                "DiscountPriceHigh": null,
                "ChargeUnit": "HOUR"
            }
        }
    }
    

    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
    InvalidParameterValue Invalid parameter value.
    MissingParameter Missing parameter.