Updating an EVS Disk
Function
This API is used to update an EVS disk.
Calling Method
For details, see Calling APIs.
URI
PUT /v3/{project_id}/volumes/{volume_id}
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
The project ID. For details, see Obtaining a Project ID. |
|
volume_id |
Yes |
String |
The disk ID. |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
The user token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
volume |
Yes |
CinderUpdateVolumeOption object |
The disk information to be updated. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
name |
No |
String |
The disk name. You can enter up to 64 characters. |
|
description |
No |
String |
The disk description. You can enter up to 85 characters. |
|
metadata |
No |
Map<String,String> |
The disk metadata. The length of key or value under metadata can contain no more than 255 bytes. |
|
display_description |
No |
String |
The disk description. You can specify either description or display_description. If they are both specified, the description value is used. You can enter up to 85 characters. |
|
display_name |
No |
String |
The disk name. You can specify either name or display_name. If they are both specified, the name value is used. You can enter up to 64 characters. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
The disk ID. |
|
links |
Array of Link objects |
The disk URI. |
|
name |
String |
The disk name. |
|
status |
String |
The disk status. For details, see EVS Disk Status. |
|
attachments |
Array of VolumeAttachment objects |
The attachment information. |
|
availability_zone |
String |
The AZ to which the disk belongs. |
|
disaster_recovery_azs |
Array of strings |
The AZs to which the DR disk belongs. |
|
bootable |
String |
Whether the disk is bootable. true: The disk is bootable. false: The disk is not bootable. |
|
encrypted |
Boolean |
This field is currently not supported. |
|
created_at |
String |
The time when the disk was created. Time format: UTC YYYY-MM-DDTHH:MM:SS.XXXXXX |
|
description |
String |
The disk description. |
|
volume_type |
String |
The disk type. The value can be SATA, SAS, GPSSD, SSD, ESSD, or GPSSD2.
If the specified disk type is not available in the AZ, the disk will fail to be created. |
|
replication_status |
String |
The reserved field. |
|
consistencygroup_id |
String |
The ID of the consistency group where the disk belongs. |
|
source_volid |
String |
The source disk ID. This field is currently not supported. |
|
snapshot_id |
String |
The snapshot ID. |
|
metadata |
VolumeMetadata object |
The metadata. |
|
size |
Integer |
The disk size, in GiB. |
|
user_id |
String |
The ID of the user that uses the disk. |
|
updated_at |
String |
The time when the disk was updated. |
|
shareable |
Boolean |
Whether the disk is shareable. Note: This field has been deprecated. Use multiattach. |
|
multiattach |
Boolean |
Whether the disk is shareable. true: The disk is shareable. false: The disk is not shareable. |
|
storage_cluster_id |
String |
The reserved field. |
|
Parameter |
Type |
Description |
|---|---|---|
|
href |
String |
Definition The corresponding shortcut link. Range N/A |
|
rel |
String |
Definition The shortcut link marker name. Range N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
attached_at |
String |
Definition The time when the disk was attached. Range Time format: UTC YYYY-MM-DDTHH:MM:SS.XXXXXX |
|
attachment_id |
String |
Definition The attachment ID. Range N/A |
|
device |
String |
Definition The device name. Range N/A |
|
host_name |
String |
Definition The name of the physical host housing the cloud server to which the disk is attached. Range N/A |
|
id |
String |
Definition The ID of the attached resource. Range N/A |
|
server_id |
String |
Definition The ID of the server to which the disk is attached. Range N/A |
|
volume_id |
String |
Definition The disk ID. Range N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
__system__cmkid |
String |
Definition The encryption CMK ID in metadata. This parameter is used together with __system__encrypted for encryption. The length of cmkid is fixed at 36 bytes. Range Use an HTTPS request to obtain the key ID. For details, see Querying the Key List. |
|
__system__encrypted |
String |
Definition The encryption field in metadata. If this parameter does not appear, the disk is unencrypted. Range
|
|
hw:passthrough |
String |
Definition The parameter that describes the disk device type in metadata. If this parameter does not appear, the disk device type is VBD. Range
|
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error |
Error object |
Definition The error information returned if an error occurs. Range N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
code |
String |
Definition The error code returned if an error occurs. Range For details about the error code, see Error Codes. |
|
message |
String |
Definition The error message returned if an error occurs. Range N/A |
Example Requests
PUT https://{endpoint}/v3/{project_id}/volumes/{volume_id}
{
"volume" : {
"name" : "test_volume",
"description" : "test"
}
}
Example Responses
Status code: 200
OK
{
"volume" : {
"attachments" : [ ],
"availability_zone" : "az-dc-1",
"bootable" : "false",
"consistencygroup_id" : null,
"created_at" : "2016-05-25T02:38:40.392463",
"description" : "create for api test",
"encrypted" : false,
"id" : "8dd7c486-8e9f-49fe-bceb-26aa7e312b66",
"links" : [ {
"href" : "https://volume.localdomain.com:8776/v2/5dd0b0056f3d47b6ab4121667d35621a/volumes/8dd7c486-8e9f-49fe-bceb-26aa7e312b66",
"rel" : "self"
}, {
"href" : "https://volume.localdomain.com:8776/5dd0b0056f3d47b6ab4121667d35621a/volumes/8dd7c486-8e9f-49fe-bceb-26aa7e312b66",
"rel" : "bookmark"
} ],
"metadata" : {
"volume_owner" : "openapi"
},
"name" : "openapi_vol01",
"replication_status" : "disabled",
"multiattach" : false,
"size" : 40,
"snapshot_id" : null,
"source_volid" : null,
"status" : "creating",
"updated_at" : null,
"user_id" : "39f6696ae23740708d0f358a253c2637",
"volume_type" : "SATA"
}
}
Status code: 400
Bad Request
{
"error" : {
"message" : "XXXX",
"code" : "XXX"
}
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
OK |
|
400 |
Bad Request |
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