InquiryPriceResetInstance

Last updated: 2018-10-12 16:02:43

1. API Description

Domain name for API request: cvm.tencentcloudapi.com

This API (InquiryPriceResetInstance) is used to inquire the prices of reinstalled instances. If you have specified ImageId parameter, the price inquiry is performed with the specified image. Otherwise, the image used by the current instance is used. You can use this API to inquire prices after the operating system switch between Linux and Windows only for the instances with a system disk type of CLOUD_BASIC, CLOUD_PREMIUM and CLOUD_SSD. * For the instances in overseas regions, this operation is not supported.

A maximum of 10 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: cvm.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: InquiryPriceResetInstance
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.
InstanceId Yes String Instance ID You can obtain the parameter value from the InstanceId field value in the returned result of API DescribeInstances.
ImageId No String Specifies a valid image ID, such as img-xxx. There are four types of images:
  • Public image
  • Custom image
  • Shared image
  • Marketplace image

  • You can obtain the available image IDs by either of the following ways:
  • Query the image ID of a public image, custom image or shared image by logging in to the Console; query the image ID of a marketplace image via Cloud Marketplace.
  • Call the API DescribeImages to obtain the ImageId field value in the returned result.
  • SystemDisk No SystemDisk Configuration information of the system disk in the instance. For the instances with a cloud disk as the system disk, you can specify the system disk capacity after re-installation using this parameter to allow the capacity expansion of the system disk. If the parameter is not specified, the system disk capacity remains unchanged by default. You can only expand the system disk capacity (capacity reduction is not supported for a system disk). Re-installing the system can only modify the system disk capacity, and cannot modify the system disk type.
    LoginSettings No LoginSettings Login settings of an instance. This parameter is used to set the instance login method, password and key, or to keep the original login settings of image. By default, a password is generated randomly and notified to the user via internal message.
    EnhancedService No EnhancedService Enables enhanced services. This parameter is used to specify whether to enable Cloud Security, Cloud Monitor and other services. If this parameter is not specified, Cloud Monitor and Cloud Security services are enabled by default.

    3. Output Parameters

    Parameter Name Type Description
    Price Price Indicates the price of the reinstalled instance.
    RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

    4. Error Codes

    The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

    Error Code Description
    InternalServerError Internal error.
    InvalidInstance.NotSupported Unsupported instance.
    InvalidInstanceId.Malformed Invalid instance ID. Specified instance ID is not in a correct format. For example, ins-1122 has an invalid instance ID length.
    InvalidInstanceId.NotFound No instance found.
    InvalidParameterValue Invalid parameter value. The parameter value is in an incorrect format or is not supported.
    MissingParameter Parameter is missing. A required parameter is missing in the request.

    5. Example

    Example 1 Inquire the price of a postpaid instance after adjusting its configuration

    Input example

    https://cvm.tencentcloudapi.com/?Action=InquiryPriceResetInstancesType
    &InstanceId=ins-fd8spnmq
    InternetAccessible.InternetMaxBandwidthOut=20
    &<Common request parameters>

    Output example

    {
      "Response": {
        "Price": {
          "InstancePrice": {
            "ChargeUnit": "HOUR",
            "UnitPrice": 0.66
          }
        },
        "RequestId": "56d68b92-7004-4716-b3bf-3c2c231035c9"
      }
    }