# Clone Cloud Disk - CloneUDisk

## Overview

Create UDisk Clone from UDisk






## Definition

### Public Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Action**     | string  | Corresponding API command name, the current API is `CloneUDisk`.                      | **Yes** |
| **PublicKey**  | string  | The user's public key can be obtained from [Console](https://console.scloudsg.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) |**Yes**|
| **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|
| **Name** | string | Instance Name |**Yes**|
| **SourceId** | string | Clone Parent Disk's Id |**Yes**|
| **UDataArkMode** | string | [Data Ark Access Has Been Disabled] Do you want to enable Data Ark? Yes: Enable, No: Disable, Default value: No |No|
| **SnapshotService** | string | Enable snapshot service (Enabling snapshot service allows free activation of UDataArk). Yes: Enable, No: Do not enable, Default value: No |No|
| **Quantity** | int | Purchase Duration Default: 1 |No|
| **Comment** | string | Disk Annotation |No|
| **ChargeType** | string | Yearly, Monthly, Dynamic, Postpay, Trial Default: Monthly |No|
| **Tag** | string | Business Group Default: Default |No|
| **RdmaClusterId** | string | RDMA cluster id. Specifies the corresponding RDMA cluster to which the RSSD cloud disk is cloned. |No|
| **HostId** | string | Host Instance ID. The cloned cloud disk can be directly mounted to this host. |No|
| **Size** | int | The size of the newly cloned UDisk, unit: GB. The specified Size must be greater than or equal to the source disk Size. If it is smaller than the source disk Size or this parameter is not specified, the new disk will be cloned according to the source disk Size. Standard data disk: range [1\~8000]; SSD data disk, essential SSD data disk: range [1\~8000]; RSSD data disk, essential  RSSD data disk: range [1\~32000]; high-efficiency data disk: range [1\~32000] |No|
| **BackupMode** | string | Snapshot Service Backup Strategy. Standard Cloud Disk, SSD Cloud Disk, RSSD Cloud Disk Package Options: "Base": Basic Edition, "Ultimate": Flagship Edition, "Custom": Custom Backup Chain, default to Basic Edition package activation; ESSD Cloud Disk, ERSSD Cloud Disk Package: "Lite": Lite Edition, default to Lite Edition package activation. |No|
| **Journal** | int | When BackupMode is set to Custom, settings are made based on multiples of 12 hours in seconds, such as 12, 24, 36, 48. |No|
| **Hour** | int | When BackupMode is set to Custom, settings are made on a 24-hour basis and multiplied, such as 24, 48, 72, 96. |No|
| **Day** | int | When BackupMode is set to Custom, settings are made based on a multiple of 5 days, such as 5, 10, 15, 20, 25, 30. |No|
| **CouponId** | string | ID of the voucher used |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|
| **UDiskId** | array[string] | Create UDisk Id |No|




## Example

### Request Example
    
```
https://api.scloudsg.com/?Action=CloneUDisk
&Region=cn-bj2
&Zone=cn-bj2-04
&SourceId=bs-xxx
&ProjectId=org-xxx
&Name=xxx
&Tag=GtBUxADe
&SnapshotService=CdMIsrJf
&SnapshotService=xnbZYyFp
&SnapshotService=gXtrrouS
&RdmaClusterId=ULxDdlnG
&HostId=WUxuCEFj
&BackupMode=UDCXeirt
&Journal=1
&Hour=3
&Day=5
&Size=1
```

### Response Example
    
```json
{
  "Action": "CloneUDiskResponse",
  "RetCode": 0,
  "UDiskId": "bs-xxx"
}
```





