Create and Mount Cloud Disk - CreateAttachUDisk
Overview
Create and Mount UDisk Disk
💡 17092": "The disk version is too low to enable UDataArk
Definition
Public Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Action | string | Corresponding API command name, the current API is CreateAttachUDisk . | Yes |
PublicKey | string | The user's public key can be obtained from Console (opens in a new tab) | Yes |
Signature | string | User signature generated based on public key and API command, see Signature Algorithm | Yes |
Request Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Region | string | Region. See List of Regions and Availability Zones | Yes |
Zone | string | Availability Zone. See Availability Zone List | 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. | No |
Size | int | Purchase UDisk size, unit: GB, ordinary data disk: range [1~8000]; SSD data disk: range [1~8000]; RSSD data disk: range [1~32000]; High-efficiency data disk: range [1~32000]. | Yes |
Name | string | Instance Name | Yes |
UHostId | string | UHost Instance ID. When creating a cloud disk of type RSSDDataDisk, a cloud disk is created in the same PodId as the virtual machine based on the input UHostId. [Either UHostId or HostId must be filled in, this field will soon be deprecated, it is recommended to use HostId] | No |
ChargeType | string | Year, Month, Dynamic, Postpay, Trial. When Size is less than or equal to 2000, the default is Dynamic; When Size is greater than 2000, the default is Month. | No |
Quantity | int | Purchase Duration Default: 1 | No |
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 |
Tag | string | Business Group Default: Default | No |
DiskType | string | UDisk Type: DataDisk (Ordinary Data Disk), SSDDataDisk (SSD Data Disk), RSSDDataDisk (RSSD Data Disk), EfficiencyDataDisk (High Efficiency Data Disk), Default Value (DataDisk) | No |
UKmsMode | string | Is it encrypted. Yes: Encrypted, No: Not encrypted, Default value (No) | No |
CmkId | string | The CMK ID required for encryption, must be filled when UKmsMode is 'Yes'. | No |
MultiAttach | string | Allow multiple mount points? (Yes: Allow multiple mount points, No: Do not allow multiple mount points, default is Yes if not filled in) | No |
HostId | string | Host Instance ID. When creating a cloud disk of type RSSDDataDisk, a cloud disk is created in the same PodId as the virtual machine according to the passed-in HostId. | No |
BackupMode | string | Snapshot Service Backup Strategy. The basic package is activated by default, 'Base': Basic Edition, 'Ultimate': Flagship Edition, 'Custom': Custom Backup Chain. | 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 | string | Mounted UDisk Instance ID | No |
UHostId | string | The mounted UHost instance ID. [Soon to be deprecated, it is recommended to use HostId] | No |
HostId | string | Mounted Host Instance ID | No |
DeviceName | string | Mount Device Name | No |
Example
Request Example
https://api.surfercloud.com/?Action=CreateAttachUDisk
&Region=fePADFDK
&Zone=nZVkTEeG
&ProjectId=lBYhRYwK
&Size=2
&Name=dRnLmEsF
&ChargeType=Year
&Quantity=3
&UDataArkMode=Yes
&Tag=ANUJBMxl
&DiskType=rdyjaTAh
&UKmsMode=UWdWyhmS
&CmkId=XYYNHuCm
&UHostIdForAttachment=hgLBzxKT
&CouponId=XHavHbdB
&MultiAttach=yyMqSgep
&MultiAttach=ejvSWdAP
&SnapshotService=VlgfpSlc
&HostId=FKnpCGZT
&HostProduct=VGePkIjN
&BackupMode=aAvKfYBB
&Journal=6
&Hour=3
&Day=1
Response Example
{
"Action": "CreateAttachUDiskResponse",
"DeviceName": "lGfgoKdq",
"HostId": "PIUVdtUD",
"RetCode": 0,
"UDiskId": [
"lVjpdPEC"
],
"UHostId": "gZjemlLv"
}