调用DescribeGatewayBlockVolumes可以查询块网关卷详情,包括操作状态、总下载数据、地址、容量、端口、启用CHAP、是否启用CHAP、总上传数据、是否使用OSS Bucket SSL、LUN ID、卷状态、是否启用等信息。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String DescribeGatewayBlockVolumes

系统规定参数。取值:DescribeGatewayBlockVolumes

GatewayId String gw-000dt67z4ijngqvh***

网关ID。

IndexId String alex-or2020010816***

索引ID。如果该字段为空,则枚举该网关上的所有块网关卷的配置信息。

Refresh Boolean true

是否强制刷新缓存。取值范围入下:

  • true(默认):是。
  • false:否。

返回数据

名称 类型 示例值 描述
BlockVolumes Array of BlockVolume

块网关卷信息。

BlockVolume
Status Integer 0

操作状态。可能值:

  • 0:成功
  • 1:创建卷失败
  • 2:删除卷失败
  • 3:启用目标失败
  • 4:禁用目标失败
  • 5:数据库错误
  • 6:启用缓存失败
  • 7:禁用缓存失败
  • 8:系统错误
ChunkSize Integer 32768

存储分配单元,单位为Byte。存储分配单元包括8 k、16 k、32 k、64 k、128 k,默认为32 K。

TotalUpload Long 123214564

总上传数据量,单位为Byte。

DiskType String cloud_efficiency

缓存盘类型。本地网关此字段无意义。

默认值:cloud_efficiency(高效云盘)

DiskId String d-bp1a8athxvwbja18***

缓存盘ID。本地网关此字段无意义。

Port Integer 0

端口。

IndexId String alex-or2020010816***

索引ID。

TotalDownload Long 56342324

总下载数据量。单位为Byte。

ChapEnabled Boolean true

是否启用CHAP。

Enabled Boolean true

是否启用。

Address String 172.16.0.22

地址。

Name String alex

块网关名称。

Target String iqn**************

目标。

OssEndpoint String oss-cn-hangzhou-internal.aliyuncs.com

OSS端点。

OssBucketName String random***

OSS Bucket名称。

CacheMode String Cache

缓存模式。可能值:

  • Cache:缓存模式。
  • WriteThrough:写透模式。
  • Sync:缓存模式。
State String clean

缓存状态。可能值:

  • clean:同步完成
  • dirty:同步未完成
Protocol String iSCSI

协议。

LunId Integer 0

LUN ID。

OssBucketSsl Boolean true

是否使用OSS BUCKET SSL。

VolumeState Integer 1

卷状态。可能值:

  • 0:失败
  • 1:完成
  • 2:创建中
  • 3:删除中
  • 4:启用中
  • 5:禁用中
  • 6:运行中
LocalPath String /dev/vdb

缓存盘本地路径。

ChapInUser String alex***

入站CHAP用户。

Size Long 107374182400

容量。单位为Byte。

Message String successful

请求结果描述。

RequestId String 787D4AD4-5536-4C36-9FB0-D74C0554D344

请求ID。

Code String 200

状态码。状态码为200表示请求成功。

Success Boolean true

请求是否成功。

示例

请求示例

http(s)://[Endpoint]/?Action=DescribeGatewayBlockVolumes
&GatewayId=gw-000dt67z4ijngqvh***
&<公共请求参数>

正常返回示例

XML格式

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeGatewayBlockVolumesResponse>
    <BlockVolumes>
        <BlockVolume>
            <TotalDownload>0</TotalDownload>
            <Address>172.16.0.40</Address>
            <TotalUpload>0</TotalUpload>
            <ChapOutUser/>
            <LunId>0</LunId>
            <Size>107374182400</Size>
            <ChapEnabled>false</ChapEnabled>
            <Port>0</Port>
            <CacheMode>Cache</CacheMode>
            <LocalPath>/dev/vdb</LocalPath>
            <Name>alex</Name>
            <DiskType>cloud_efficiency</DiskType>
            <Target/>
            <OssEndpoint>oss-cn-hangzhou-internal.aliyuncs.com</OssEndpoint>
            <Protocol>iSCSI</Protocol>
            <Status>0</Status>
            <IndexId>alex-or20200108161***</IndexId>
            <Enabled>false</Enabled>
            <VolumeState>1</VolumeState>
            <OssBucketSsl>true</OssBucketSsl>
            <ChunkSize>32768</ChunkSize>
            <State>clean</State>
            <OssBucketName>random***</OssBucketName>
            <ChapInUser/>
            <DiskId>d-bp1a8athxvwbja18h***</DiskId>
        </BlockVolume>
    </BlockVolumes>
    <Message>successful</Message>
    <RequestId>787D4AD4-5536-4C36-9FB0-D74C0554D185</RequestId>
    <Code>200</Code>
    <Success>true</Success>
</DescribeGatewayBlockVolumesResponse>

JSON格式

HTTP/1.1 200 OK
Content-Type:application/json

{
  "BlockVolumes" : {
    "BlockVolume" : [ {
      "TotalDownload" : 0,
      "Address" : "172.16.0.40",
      "TotalUpload" : 0,
      "ChapOutUser" : "",
      "LunId" : 0,
      "Size" : 107374182400,
      "ChapEnabled" : false,
      "Port" : 0,
      "CacheMode" : "Cache",
      "LocalPath" : "/dev/vdb",
      "Name" : "alex",
      "DiskType" : "cloud_efficiency",
      "Target" : "",
      "OssEndpoint" : "oss-cn-hangzhou-internal.aliyuncs.com",
      "Protocol" : "iSCSI",
      "Status" : 0,
      "IndexId" : "alex-or20200108161***",
      "Enabled" : false,
      "VolumeState" : 1,
      "OssBucketSsl" : true,
      "ChunkSize" : 32768,
      "State" : "clean",
      "OssBucketName" : "random***",
      "ChapInUser" : "",
      "DiskId" : "d-bp1a8athxvwbja18h***"
    } ]
  },
  "Message" : "successful",
  "RequestId" : "787D4AD4-5536-4C36-9FB0-D74C0554D185",
  "Code" : "200",
  "Success" : true
}

错误码

HttpCode 错误码 错误信息 描述
400 EmptyGatewayId You must enter a valid ID for the gateway. 网关ID不能为空。
400 GatewayNotExist The specified gateway does not exist. You must specify a valid parameter. 网关不存在,请确认输入参数是否正确。
400 GatewayInUpgrading The gateway is upgrading. Try again later. 网关正在升级中,请稍后再试。
400 GatewayInOperation The gateway is processing requests . Try again later. 网关正在进行操作中,请稍后再试。

访问错误中心查看更多错误码。