Mounting a Disk to a Lite Server
Function
This API is used to mount an additional disk to a Lite Server. It is used when you need to expand the storage space of a Lite Server to meet larger data storage requirements. Before using this API, ensure that the Lite Server has been created and is running or stopped, you have the permission to mount disks, and the specified disk exists and is not used by other servers. After the mounting, the disk is mounted to the Lite Server, and you can access and use the new storage space. If the Lite Server does not exist, the specified disk does not exist or is in use, or you do not have the required permission, the API returns an error message.
Constraints
Only for A3.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, no identity policy-based permission required for calling this API.
URI
POST /v1/{project_id}/dev-servers/{id}/attachvolume
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
id |
Yes |
String |
Definition: Lite Server instance ID. Constraints: N/A Range: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ Default Value: N/A |
|
project_id |
Yes |
String |
Definition: Project ID. For details, see Obtaining a Project ID and Name. Constraints: The value can contain 1 to 64 characters. Letters, digits, and hyphens (-) are allowed. Range: N/A Default Value: N/A |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
volume_id |
Yes |
String |
Parameter description: ID of the disk to be attached. Constraints: N/A. ** Value range: **:^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$. **Default value * *: N/A. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
X-Request-Id |
String |
LinkTrace ID |
|
Parameter |
Type |
Description |
|---|---|---|
|
operation_id |
String |
Parameter description: operation ID. ** Value range: **:^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$. |
|
operation_status |
String |
Parameter description: operation status. Value Range: -Success succeeded. |
|
operation_type |
String |
Parameter description: operation type. **Value range: node_attach_volume |
Example Requests
POST https://{endpoint}/v1/{project_id}/dev-servers/{id}/attachvolume
{
"volume_id" : "1e79eff7-c02b-4dfd-a0d6-f76c90d9b4e0"
}
Example Responses
Status code: 200
{
"operation_id" : "b894b879-a3c0-49ee-b5cb-92202b2794e2",
"operation_status" : "pending",
"operation_type" : "node_attach_volume"
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot