# Get the upgrade price for the mounted disk - GetAttachedDiskUpgradePrice

## Overview

Get the upgrade price for the mounted disk






## Definition

### Public Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Action**     | string  | Corresponding API command name, the current API is `GetAttachedDiskUpgradePrice`.                      | **Yes** |
| **PublicKey**  | string  | The user's public key can be obtained from [Console](https://console.genesissai.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](/docs/api/summary/regionlist) |**Yes**|
| **Zone** | string | Availability Zone. See [Availability Zone List](/docs/api/summary/regionlist) |No|
| **ProjectId** | string | Project ID. If not filled in, the default project is used, sub-accounts must be filled in. Please refer to the [GetProjectList interface](/docs/api/summary/get_project_list). |No|
| **DiskSpace** | int | Disk size, in GB. The value range should be larger than the current disk size, for the maximum value please refer to [Disk Type](api/uhost-api/disk_type). |**Yes**|
| **DiskId** | string | Disk ID. See [DescribeUHostInstance](api/uhost-api/describe_uhost_instance) return value in DiskSet. |**Yes**|
| **UHostId** | string | UHost Instance ID. See [DescribeUHostInstance](api/uhost-api/describe_uhost_instance). |**Yes**|
| **BackupMode** | string | Disk backup plan. Enumeration values: <br /><br /> > NONE, no backup <br /><br /> > DATAARK, UDataArk <br /><br />> SNAPSHOT (SNAPSHOT mode is currently only supported in Shanghai C), snapshot <br /><br /> The backup modes currently supported by the disk refer to [disk type](api/uhost-api/disk_type). The default value is the current backup mode. |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. |No|
| **OriginalPrice** | float | User's discounted price. The precision is up to 2 decimal places. |No|
| **ListPrice** | float | Original price. The precision is up to 2 decimal places. |No|
| **PriceDetail** | [*DiskUpgradePriceDetail*](#diskupgradepricedetail) | Details of upgrade price, accurate to two decimal places. |No|
| **OriginalPriceDetail** | [*DiskUpgradePriceDetail*](#diskupgradepricedetail) | Original price details, with a precision of two decimal places. |No|
| **ListPriceDetail** | [*DiskUpgradePriceDetail*](#diskupgradepricedetail) | Details of the original price, with a precision of two decimal places. |No|

#### Data Model


#### DiskUpgradePriceDetail

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **UDisk** | float | The price of the disk |No|
| **Snapshot** | float | The price of the snapshot |No|

## Example

### Request Example
    
```
https://api.genesissai.com/?Action=GetAttachedDiskUpgradePrice
&Region=mxTjdPUG
&Zone=GxCoXGWk
&ProjectId=abcdNzFG
&DiskSpace=8
&DiskId=zPpZIRGk
&UHostId=wRVYAONq
&BackupMode=NONE
```

### Response Example
    
```json
{
  "Action": "GetAttachedDiskUpgradePriceResponse",
  "ListPrice": 3.45338,
  "ListPriceDetail": {},
  "ListlPrice": 5.32126,
  "OriginalPrice": 1.85482,
  "OriginalPriceDetail": {},
  "Price": 3.26,
  "PriceDetail": {},
  "RetCode": 0
}
```





