InquiryPriceRenewDisks

Last updated: 2020-02-03 20:13:09
This document is currently invalid. Please refer to the documentation page of the product.

    1. API Description

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

    This API is used to query the price of renewing one or more cloud disks.

    • You can query the price for renewing cloud disks together with their bound instances. To do so, you need to specify CurInstanceDeadline in the DiskChargePrepaid parameter, In this case, the API will query the price for renewing the cloud disk to the expiration time of the bound instance.
    • You can specify different renewal lengths for multiple cloud disks in a single request. In such cases, the price returned will be the total price of renewing multiple cloud disks.

    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

    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: InquiryPriceRenewDisks
    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.
    DiskIds.N Yes Array of String ID of the cloud disk, which can be queried via the API DescribeDisks.
    DiskChargePrepaids.N No Array of DiskChargePrepaid Relevant parameter settings for the prepaid mode (i.e., monthly subscription). The monthly subscription cloud disk purchase usage period can be specified using this parameter. If this parameter is specified as CurInstanceDeadline, then it will be renewed according to the aligned CVM expiration time. If it is a batch renewal price query, then this parameter will correspond to the Disks parameter, and the element quantity needs to be kept the same.
    NewDeadline No String Specify the new expiration time of the cloud disk, in such format as 2017-12-17 00:00:00. The parameters NewDeadline and DiskChargePrepaids are two options to specify the inquiry length, and you must specify at least one.
    ProjectId No Integer ID of project the cloud disk belongs to. If selected, it can only be used for authentication.

    3. Output Parameters

    Parameter Name Type Description
    DiskPrice PrepayPrice Describes the price of renewing the 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 Price for 1-Month Cloud Disk Renewal

    Input Example

    https://cbs.tencentcloudapi.com/?Action=InquiryPriceRenewDisks
    &DiskIds.0=disk-jwk0zvrg
    &DiskChargePrepaids.0.Period=1
    &<common request parameters>

    Output Example

    {
      "Response": {
        "DiskPrice": {
          "DiscountPrice": 33.26,
          "OriginalPrice": 37.8
        },
        "RequestId": "7269a7c9-daa0-48aa-372a-5a1f8029a4f4"
      }
    }

    Example2 When renewing an instance, you need to renew the mounted prepaid cloud disk to make its expiration time the same as that of the instance.

    The current expiration time of the instance is: 2018-03-17 15:15:03, which needs to be renewed for one month. You can call this API to renew the prepaid cloud disk mounted on the instance to make its expiration time the same as that of the instance.

    Input Example

    https://cbs.tencentcloudapi.com/?Action=InquiryPriceRenewDisks
    &DiskIds.0=disk-jwk0zvrg
    &DiskChargePrepaids.0.Period=1
    &DiskChargePrepaids.0.CurInstanceDeadline=2018-03-17 15:15:03
    &<common request parameters>

    Output Example

    {
      "Response": {
        "RequestId": "f31302ca-7e60-412c-9d84-0675e09db295",
        "DiskPrice": {
          "DiscountPrice": 6.0,
          "OriginalPrice": 6.0
        }
      }
    }

    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
    InvalidDisk.NotPortable Non-elastic cloud disk not supported.
    InvalidDiskId.NotFound The ‘DiskId’ entered does not exist.
    InvalidParameterValue Invalid parameter value. Parameter value format error or parameter value not supported.
    MissingParameter Missing parameter. Request does not include the required parameter.

    Was this page helpful?

    Was this page helpful?

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