Help Center/ Elastic Volume Service/ API Reference/ API/ Disk Management/ Querying Details About an EVS Disk
Updated on 2025-08-20 GMT+08:00

Querying Details About an EVS Disk

Function

This API is used to query details about a single EVS disk. Enterprise project authorization is supported.

Calling Method

For details, see Calling APIs.

URI

GET /v2/{project_id}/cloudvolumes/{volume_id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

The project ID.

For details about how to obtain the project ID, see Obtaining a Project ID.

Constraints

N/A

Range

N/A

Default Value

N/A

volume_id

Yes

String

Definition

The disk ID.

You can obtain it on the disk list page of the EVS console.

Constraints

N/A

Range

N/A

Default Value

N/A

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

The user token.

You can obtain it by calling the IAM API. The value of X-Subject-Token in the response header is the user token.

Constraints

N/A

Range

N/A

Default Value

N/A

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

volume

VolumeDetail object

Definition

The disk details.

Range

N/A

Table 4 VolumeDetail

Parameter

Type

Description

id

String

Definition

The disk ID.

Range

N/A

links

Array of Link objects

Definition

The disk URI.

Range

N/A

name

String

Definition

The disk name.

Range

N/A

status

String

Definition

The disk status. For details, see EVS Disk Status.

Range

N/A

attachments

Array of Attachment objects

Definition

The disk attachment information.

Range

N/A

availability_zone

String

Definition

The AZ to which the disk belongs.

Range

N/A

os-vol-host-attr:host

String

Definition

The reserved field.

Range

N/A

source_volid

String

Definition

The source disk ID. This parameter has a value if the disk is created from a source disk.

This field is currently not supported.

Range

N/A

snapshot_id

String

Definition

The snapshot ID. This parameter has a value if the disk is created from a snapshot.

Range

N/A

description

String

Definition

The disk description.

Range

N/A

created_at

String

Definition

The time when the disk was created.

Time format: UTC YYYY-MM-DDTHH:MM:SS.XXXXXX

Range

N/A

os-vol-tenant-attr:tenant_id

String

Definition

The ID of the tenant to which the disk belongs. The tenant ID is the same as the project ID.

Range

N/A

volume_image_metadata

Map<String,Object>

Definition

The metadata of the disk image.

For details about the volume_image_metadata field, see Querying Image Details (Native OpenStack API).

Range

N/A

volume_type

String

Definition

The disk type.

Range

The value can be SATA, SAS, GPSSD, SSD, ESSD, GPSSD2, or ESSD2.

  • SATA: the common I/O type (sold out)

  • SAS: the high I/O type

  • GPSSD: the general purpose SSD type

  • SSD: the ultra-high I/O type

  • ESSD: the extreme SSD type

  • GPSSD2: the general purpose SSD V2 type

  • ESSD2: the extreme SSD V2 type

size

Integer

Definition

The disk capacity, in GiB.

Range

N/A

consistencygroup_id

String

Definition

The reserved field.

Range

N/A

bootable

String

Definition

Whether the disk is bootable.

Range

true: The disk is bootable.

false: The disk is not bootable.

metadata

Map<String,Object>

Definition

The disk metadata information. Callers can add or remove the metadata information.

Range

The keys of this parameter used in EVS are described as follows:

  • __system__cmkid

    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.

    For details about how to obtain the key ID, see Querying the Key List.

  • __system__encrypted

    The encryption field in metadata. The value can be 0 (no encryption) or 1 (encryption).

    If this parameter is not specified, the encryption attribute of the disk is the same as that of the data source. If the disk is not created from a data source, the disk is not encrypted by default.

  • hw:passthrough

    • If this parameter value is true, the disk device type is SCSI, which allows ECS OSs to directly access the underlying storage media and supports SCSI reservation commands.

    • If this parameter value is false, the disk device type is VBD (default device type), which supports only simple SCSI read/write commands.

    • If this parameter is not specified, the disk device type is VBD.

  • orderID

    The parameter that describes the disk billing mode in metadata.

    If this parameter has a value, the disk is billed on a yearly/monthly basis. If this parameter is not specified, the disk is billed on a pay-per-use basis.

updated_at

String

Definition

The time when the disk was updated.

Time format: UTC YYYY-MM-DDTHH:MM:SS.XXXXXX

Range

N/A

encrypted

Boolean

Definition

This field is currently not supported.

Range

N/A

replication_status

String

Definition

The reserved field.

Range

N/A

os-volume-replication:extended_status

String

Definition

The reserved field.

Range

N/A

os-vol-mig-status-attr:migstat

String

Definition

The reserved field.

Range

N/A

os-vol-mig-status-attr:name_id

String

Definition

The reserved field.

Range

N/A

shareable

String

Definition

Whether the disk is shareable. The value can be true (shareable) or false (non-shareable).

This field has been deprecated. Use multiattach.

Range

N/A

user_id

String

Definition

The reserved field.

Range

N/A

service_type

String

Definition

The service type.

Range

EVS, DSS, or DESS

multiattach

Boolean

Definition

Whether the disk is shareable.

Range

N/A

dedicated_storage_id

String

Definition

The ID of the dedicated storage pool housing the disk.

Range

N/A

dedicated_storage_name

String

Definition

The name of the dedicated storage pool housing the disk.

Range

N/A

tags

Map<String,String>

Definition

The disk tags.

This field has values if the disk has tags. Or, it is left empty.

Range

N/A

wwn

String

Definition

The unique identifier used when attaching the disk.

Range

N/A

enterprise_project_id

String

Definition

The ID of the enterprise project that the disk has been added to.

For more information about enterprise projects and how to obtain enterprise project IDs, see Enterprise Management User Guide.

Range

N/A

serial_number

String

Definition

The disk serial number.

This field is only returned for non-HyperMetro SCSI disks and is used for disk mapping in the VM.

Range

N/A

iops

iops object

Definition

The disk IOPS information. This parameter only appears for general purpose SSD V2 or extreme SSD V2 disks.

Range

N/A

throughput

throughput object

Definition

The disk throughput information. This parameter only appears for general purpose SSD V2 disks.

Range

N/A

Table 6 Attachment

Parameter

Type

Description

attached_at

String

Definition

The time when the disk was attached.

Time format: UTC YYYY-MM-DDTHH:MM:SS.XXXXXX

Range

N/A

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 disk.

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

Table 7 iops

Parameter

Type

Description

frozened

Boolean

Definition

The frozen tag.

Range

N/A

id

String

Definition

The ID of the disk IOPS.

Range

N/A

total_val

Integer

Definition

The IOPS.

Range

N/A

Table 8 throughput

Parameter

Type

Description

frozened

Boolean

Definition

The frozen tag.

Range

N/A

id

String

Definition

The throughput ID.

Range

N/A

total_val

Integer

Definition

The throughput.

Range

N/A

Status code: 400

Table 9 Response body parameters

Parameter

Type

Description

error

Error object

Definition

The error code returned if an error occurs. For the error codes and their meanings, see Error Codes.

Range

N/A

Table 10 Error

Parameter

Type

Description

code

String

Definition

The error code returned if an error occurs.

Range

For the error codes and their meanings, see Error Codes.

message

String

Definition

The error message returned if an error occurs.

Range

N/A

Example Requests

GET https://{endpoint}/v2/{project_id}/cloudvolumes/{volume_id}

Example Responses

Status code: 200

The disk information is returned.

{
  "volume" : {
    "attachments" : [ ],
    "links" : [ {
      "href" : "https://volume.az0.dc1.domainname.com/v2/40acc331ac784f34842ba4f08ff2be48/volumes/591ac654-26d8-41be-bb77-4f90699d2d41",
      "rel" : "self"
    }, {
      "href" : "https://volume.az0.dc1.domainname.com/40acc331ac784f34842ba4f08ff2be48/volumes/591ac654-26d8-41be-bb77-4f90699d2d41",
      "rel" : "bookmark"
    } ],
    "availability_zone" : "az-dc-1",
    "os-vol-host-attr:host" : "az-dc-1#SSD",
    "multiattach" : true,
    "updated_at" : "2016-02-03T02:19:29.895237",
    "replication_status" : "disabled",
    "id" : "591ac654-26d8-41be-bb77-4f90699d2d41",
    "size" : 40,
    "user_id" : "fd03ee73295e45478d88e15263d2ee4e",
    "os-vol-tenant-attr:tenant_id" : "40acc331ac784f34842ba4f08ff2be48",
    "metadata" : { },
    "tags" : {
      "key1" : "value1",
      "key2" : "value2"
    },
    "status" : "available",
    "description" : "auto-created_from_restore_from_backup",
    "name" : "restore_backup_0115efb3-678c-4a9e-bff6-d3cd278238b9",
    "bootable" : "false",
    "created_at" : "2016-02-03T02:19:11.723797",
    "service_type" : "EVS",
    "wwn" : " 688860300000d136fa16f48f05992360"
  }
}

Status code: 400

Bad Request

{
  "error" : {
    "message" : "XXXX",
    "code" : "XXX"
  }
}

SDK Sample Code

The SDK sample code is as follows.

Java

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package com.huaweicloud.sdk.test;

import com.huaweicloud.sdk.core.auth.ICredential;
import com.huaweicloud.sdk.core.auth.BasicCredentials;
import com.huaweicloud.sdk.core.exception.ConnectionException;
import com.huaweicloud.sdk.core.exception.RequestTimeoutException;
import com.huaweicloud.sdk.core.exception.ServiceResponseException;
import com.huaweicloud.sdk.evs.v2.region.EvsRegion;
import com.huaweicloud.sdk.evs.v2.*;
import com.huaweicloud.sdk.evs.v2.model.*;


public class ShowVolumeSolution {

    public static void main(String[] args) {
        // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
        // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
        String ak = System.getenv("CLOUD_SDK_AK");
        String sk = System.getenv("CLOUD_SDK_SK");
        String projectId = "{project_id}";

        ICredential auth = new BasicCredentials()
                .withProjectId(projectId)
                .withAk(ak)
                .withSk(sk);

        EvsClient client = EvsClient.newBuilder()
                .withCredential(auth)
                .withRegion(EvsRegion.valueOf("<YOUR REGION>"))
                .build();
        ShowVolumeRequest request = new ShowVolumeRequest();
        request.withVolumeId("{volume_id}");
        try {
            ShowVolumeResponse response = client.showVolume(request);
            System.out.println(response.toString());
        } catch (ConnectionException e) {
            e.printStackTrace();
        } catch (RequestTimeoutException e) {
            e.printStackTrace();
        } catch (ServiceResponseException e) {
            e.printStackTrace();
            System.out.println(e.getHttpStatusCode());
            System.out.println(e.getRequestId());
            System.out.println(e.getErrorCode());
            System.out.println(e.getErrorMsg());
        }
    }
}

Python

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# coding: utf-8

import os
from huaweicloudsdkcore.auth.credentials import BasicCredentials
from huaweicloudsdkevs.v2.region.evs_region import EvsRegion
from huaweicloudsdkcore.exceptions import exceptions
from huaweicloudsdkevs.v2 import *

if __name__ == "__main__":
    # The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
    # In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
    ak = os.environ["CLOUD_SDK_AK"]
    sk = os.environ["CLOUD_SDK_SK"]
    projectId = "{project_id}"

    credentials = BasicCredentials(ak, sk, projectId)

    client = EvsClient.new_builder() \
        .with_credentials(credentials) \
        .with_region(EvsRegion.value_of("<YOUR REGION>")) \
        .build()

    try:
        request = ShowVolumeRequest()
        request.volume_id = "{volume_id}"
        response = client.show_volume(request)
        print(response)
    except exceptions.ClientRequestException as e:
        print(e.status_code)
        print(e.request_id)
        print(e.error_code)
        print(e.error_msg)

Go

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package main

import (
	"fmt"
	"github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic"
    evs "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/evs/v2"
	"github.com/huaweicloud/huaweicloud-sdk-go-v3/services/evs/v2/model"
    region "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/evs/v2/region"
)

func main() {
    // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
    // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
    ak := os.Getenv("CLOUD_SDK_AK")
    sk := os.Getenv("CLOUD_SDK_SK")
    projectId := "{project_id}"

    auth := basic.NewCredentialsBuilder().
        WithAk(ak).
        WithSk(sk).
        WithProjectId(projectId).
        Build()

    client := evs.NewEvsClient(
        evs.EvsClientBuilder().
            WithRegion(region.ValueOf("<YOUR REGION>")).
            WithCredential(auth).
            Build())

    request := &model.ShowVolumeRequest{}
	request.VolumeId = "{volume_id}"
	response, err := client.ShowVolume(request)
	if err == nil {
        fmt.Printf("%+v\n", response)
    } else {
        fmt.Println(err)
    }
}

More

For SDK sample code of more programming languages, see the Sample Code tab in API Explorer. SDK sample code can be automatically generated.

Status Codes

Status Code

Description

200

The disk information is returned.

400

Bad Request

Error Codes

See Error Codes.