1. 云硬盘详情

1.1. 描述

获取云硬盘详情

1.2. 请求地址

请求地址的格式如下:

https://<区域服务地址>/v1/volume/detail

1.3. 请求参数

参数名称 类型 是否必须 描述
projectId String 所属项目ID
id String 云盘ID

1.4. 请求示例

1.4.1. 请求地址

POST https://cn-east-1.api.yovole.com/v1/volume/detail HTTP/1.1
  x-ycs-timestamp: 2019-06-19T14:26:26Z
  x-ycs-requestid: 2a49cfa2-925b-11e9-bb3a-6c96cfdcd6b9
  x-ycs-security-authorization: Authorization: YCS1-HMAC-SHA1 Credential=08e206fb-7b41-45b7-8076-8d43e8aeea89,SignedHeaders=content-type;x-ycs-requestid;x-ycs-timestamp,Signature=2RFjU7C9gICCrQfpAIfAJHqRRlQ=

1.4.2. 接口请求参数

{
  "projectId": "xxxxxxxxxxx",
  "id": "xxxxxxxxxxxxxx"
}

1.5. 返回结果

1.5.1. 返回正确结果示例

{
  "requestId": "3f11c3d6-885f-47ee-b643-3fa18883a61f",
  "success": true,
  "code": 200,
  "message": null,
  "model": {
    "id": "38cea0f1-b09a-460c-b136-8a10f5a5c052",
    "name": "api",
    "sn": "VOL-218KP2Y",
    "regionSn": "CN-EAST-1",
    "azSn": "CN-EAST-1-A",
    "created": "2019-05-20 17:56:32",
    "size": 100,
    "description": null,
    "volumeTypeId": "hdd.common.2",
    "volumeTypeName": "普通云盘II型",
    "volumeType": {
      "id": "hdd.common.2",
      "name": "普通云盘II型",
      "sn": "cn-demo-1a-ceph-hdd1",
      "type": "HDD_DISK",
      "azId": "CN-EAST-1-A",
      "azName": "可用区A",
      "iops": 600,
      "throughput": 60,
      "limit": 1000,
      "usedCapacity": 299920,
      "public": true
    }
  }
}

1.5.2. 返回错误结果示例

{
  "requestId": "2a49cfa2-925b-11e9-bb3a-6c96cfdcd6b9",
  "success": false,
  "code": 400,
  "message": "Required attribute 'projectId' not specified",
  "errorCode": "Invalid argument"
}

1.6. 错误码

可以通过错误返回结果中的code、errorCode和message字段了解错误分类和具体的错误原因。

该接口没有特殊错误码,错误码信息和简单的错误分析方法可以参考公共错误码

results matching ""

    No results matching ""