Mount UDisk - AttachUDisk
Overview
Mount an available UDisk to a certain host. After the UDisk is successfully mounted, file system operations still need to be performed inside the host.
Definition
Public Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Action | string | Corresponding API command name, the current API is AttachUDisk . | 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 | No |
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. | No |
UDiskId | string | The ID of the UDisk instance that needs to be mounted. | Yes |
UHostId | string | UHost Instance ID. [You must fill in either UHostId or HostId, this field is about to be deprecated, it is recommended to use HostId] | 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 | 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 |
UHostId | string | The mounted UHost instance ID. [Soon to be deprecated, it is recommended to use HostId] | No |
UDiskId | string | Mounted UDisk Instance ID | No |
DeviceName | string | Mounted Device Name | No |
HostId | string | Mounted Host Instance ID | No |
Example
Request Example
http://api.ucloud-global.com/?Action=AttachUDisk
&Region=cn-bj2
&Zone=cn-bj2-04
&UHostId=uhost-xxx
&UDiskId=bs-xxx
&MultiAttach=Yes
&HostId=gsFtgfaB
&HostProduct=NvgPjjXU
&HostId=IgHkaFCi
&HostProduct=LBhvDhDs
Response Example
{
"Action": "AttachUDiskResponse",
"DeviceName": "VidxyHWm",
"HostId": "EvMeOnjG",
"RetCode": 0,
"UDiskId": "bs-xxx",
"UHostId": "uhost-xxx"
}