InquiryPriceCreateDisks

Last updated: 2020-10-16 18:49:00

1. API Description

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

This API (InquiryPriceCreateDisks) is used to inquire the price for cloud disk creation.

  • It supports inquiring the price for the creation of multiple cloud disks. The total price for the creation is returned.

A maximum of 20 requests can be initiated per second for this API.

Note: This API supports Finance regions. If the common parameter Region is a Finance region, a domain name with the Finance region needs to be specified, for example: cbs.ap-shanghai-fsi.tencentcloudapi.com

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 parameter. The value used for this API: InquiryPriceCreateDisks.
Version Yes String Common parameter. The value used for this API: 2017-03-12.
Region Yes String Common parameter. For more information, please see the list of regions supported by the product.
DiskType Yes String Type of cloud hard disk. Value range:
  • Ordinary cloud disk: CLOUD_BASIC
  • Premium cloud storage: CLOUD_PREMIUM
  • SSD cloud disk: CLOUD_SSD.
  • DiskSize Yes Integer Cloud disk size (in GB). For the value range of the cloud disk sizes, see cloud disk Product Types.
    DiskChargeType Yes String Cloud disk billing method.
  • POSTPAID_BY_HOUR: Pay-as-you-go on an hourly basis
  • 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.
    DiskCount No Integer Quantity of cloud disks purchased. If left empty, default is 1.
    ProjectId No Integer ID of project the cloud disk belongs to.

    3. Output Parameters

    Parameter Name Type Description
    DiskPrice Price Describes the price of purchasing new cloud disk.
    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 for purchasing a 50 GB HDD cloud disk for 6 months

    Input Example

    https://cbs.tencentcloudapi.com/?Action=InquiryPriceCreateDisks
    &DiskType=CLOUD_BASIC
    &DiskCount=1
    &DiskSize=50
    &DiskChargeType=PREPAID
    &DiskChargePrepaid.Period=6
    &<Common Request Parameters>

    Output Example

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

    Example2 Querying the price of a pay-as-you-go cloud disk billed hourly

    This example shows you how to query the price of a pay-as-you-go premium cloud disk billed hourly with the capacity of 100 GB

    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

    API Explorer

    This tool allows online call, signature authentication, SDK code generation and quick search of APIs to greatly improve the efficiency of using TencentCloud APIs.

    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.

    Was this page helpful?

    Was this page helpful?

    • Not at all
    • Not very helpful
    • Somewhat helpful
    • Very helpful
    • Extremely helpful
    Send Feedback
    Help