# Get the upgrade price for mounting cloud disk on physical cloud BareMetal - GetPHostDiskUpgradePrice

## Overview

Get the upgrade price for mounting a disk on a physical cloud BareMetal



 > ℹ️ This interface is only valid for BareMetal machine types.


## Definition

### Public Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Action**     | string  | Corresponding API command name, the current API is `GetPHostDiskUpgradePrice`.                      | **Yes** |
| **PublicKey**  | string  | The user's public key can be obtained from [Console](https://console.dezai.com/uaccount/api_manage)                                             | **Yes** |
| **Signature**  | string  | User signature generated based on public key and API command, see [Signature Algorithm](/docs/api/summary/signature.md)  | **Yes** |

### Request Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Region** | string | Region. See [List of Regions and Availability Zones](api/summary/regionlist) |**Yes**|
| **Zone** | string | Availability Zone. See [Availability Zone List](api/summary/regionlist) |**Yes**|
| **ProjectId** | string | Project ID. If not filled in, the default project is used, and the sub-account must be filled in. Please refer to the [GetProjectList interface](api/summary/get_project_list). |No|
| **PHostId** | string | UPHost Instance ID. |**Yes**|
| **DiskSpace** | int | Disk size, in GB, must be an integer multiple of 10GB. System disk 20-500GB, single data disk 20-32000GB. |**Yes**|
| **UDiskId** | string | Disk ID. Required for obtaining expansion price (can only expand, not reduce); No need to fill when reinstalling (determined by the selected disk size) |No|
| **ReinstallTag** | boolean | Whether to get the price for reinstallation. Reuse this interface. Expansion can only increase the size of the cloud disk. There are no restrictions for reinstallation. Enumeration value: true/false |No|

### Response Field

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **RetCode** | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. |**Yes**|
| **Action** | string | Operation command name. |**Yes**|
| **Message** | string | Returns an error message, providing detailed description when `RetCode` is non-zero. |No|
| **Price** | float | Upgrade price difference. Precision is up to 2 decimal places. |**Yes**|
| **OriginalPrice** | float | Price increase difference original price. The precision is to the second decimal place. |No|




## Example

### Request Example
    
```
https://api.dezai.com/?Action=GetPHostDiskUpgradePrice
&Region=cn-zj
&Zone=cn-zj-01
&ProjectId=btTvhpal
&PHostId=APyurAbq
&DiskSpace=5
&UDiskId=GcwAWPhw
&ReinstallTag=false
```

### Response Example
    
```json
{
  "Action": "GetPHostDiskUpgradePriceResponse",
  "OriginalPrice": 1.85835,
  "Price": 8.55895,
  "RetCode": 0
}
```





