Query Update Price

Last updated: 2017-12-13 16:57:32

1. API Description

This API (InquiryCdbUpgradePrice) is used to query the upgrade price of Cloud Database instances. Instance types include master instance, disaster recovery instance and read-only instance.
Domain for API request: cdb.api.qcloud.com

2. Input Parameters

The following request parameter list only provides API request parameters. Common request parameters need to be added when the API is called. For more information, refer to Common Request Parameters. The Action field for this API is InquiryCdbUpgradePrice.

Parameter Name Required Type Description
cdbInstanceId Yes String Instance ID, such as: cdb-c1nl9rpv. It is identical to the instance ID displayed in the Cloud Database console page and can be obtained using API Query List of Instances. Its value equals to the uInstanceId field value in the output parameter.
memory Yes Int Memory size after upgrade (unit: MB). To ensure the validity of the passed memory value, you can use API Query Supported Specifications (supporting custom availability zones and configurations) to acquire the available memory specifications
volume Yes Int Disk size after upgrade (unit: GB). To ensure the validity of the passed volume value, you can use API Query Supported Specifications (supporting custom availability zones and configurations) to acquire the available disk range
instanceRole No String Instance type. Default is master. Possible values include: master - master instance or disaster recovery instance, ro - read-only instance.
protectMode No Int Data copy method. Default is 0, supported values include: 0 - indicates asynchronous copy, 1 - indicates semi-synchronized copy, 2 - indicates strong synchronized copy. You can specify this parameter when querying master instances, while this parameter will be ignored when querying read-only instances or disaster recovery instances

3. Output Parameters

Parameter Name Type Description
code Int Common error code; 0: Succeeded; other values: Failed. For more information, please refer to Common Error Codes on the Error Code page.
message String Module error message description depending on API.
codeDesc String Error description
price Int Price for upgrading an instance (unit: RMB 0.01) For instances with an annual or monthly plan, the parameter represents the total price that needs to be paid for upgrading an instance. For instances paid by usage, the parameter represents the new billing rate after the instance is upgraded

4. Error Codes

The following error codes only include the business logic error codes for this API.

Error Code Error Message Error Description
9003 InvalidParameter Incorrect parameter
9006 InternalError Database internal error
9301 InvalidParameter Incorrect transaction parameter

5. Example

Input

https://cdb.api.qcloud.com/v2/index.php?Action=InquiryCdbUpgradePrice
&<Common request parameters>
&cdbInstanceId=cdb-jcti2cuw
&memory=2000
&volume=60
&instanceRole=master

Output

{
    "code":"0",
    "message":"",
    "codeDesc":"Success",
    "price":"73"
}