文档

DescribeGateways

调用DescribeGateways接口可以查询指定集群ID下的网关列表信息。包括网关ID,网关名称等。

调试

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

请求参数

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

系统规定参数。取值:DescribeGateways

StorageBundleId String sb-0001b2otnkdxrigeq***

网关集群ID。

PageNumber Integer 1

网关列表信息的页码。

  • 起始值:1。
  • 默认值:1。
PageSize Integer 10

分页查询时设置的每页行数。

  • 最大值:50。
  • 默认值:10。

返回数据

名称 类型 示例值 描述
TotalCount Integer 2

指定网关集群ID下的网关总数。

RequestId String 2C4A8287-66F4-45F9-84E3-866E4232C763

请求ID。

Message String successful

请求结果描述。

PageSize Integer 10

网关列表每页的行数。

PageNumber Integer 1

网关列表信息的页码。

Gateways Array of Gateway

网关列表信息。

Gateway
VpcId String vpc-bp1p0usrgr5z9e7lwr***

专有网络VPC ID。

Status String Running

网关状态。可能值:

  • Initialized:已初始化。
  • Deactivated:未激活。
  • Activated:已激活。
  • Deploying:部署中。
  • Running:运行中。
  • Stopping:停止中。
  • Stopped:已停止。
  • Starting:启动中。
  • Rebooting:重启中。
  • Deleting:删除中。
  • Failed:失败。
  • Upgrading:升级中。
  • Modifying:修改中。
  • Unknown:长时间没有心跳。
Type String File

参见GatewayType参数

Capacity Integer 500

容量

GatewayId String gw-0001b2odzvl3b1mhi***

网关ID。

IsReleaseAfterExpiration Boolean false

当付费类型为包年包月时,网关是否到期释放。可能值:

  • true:到期释放,直接收回。创建的云存储网关到期7天后,停止云存储网关服务。
  • false:创建的云存储网关到期后,转按量付费模式。
GatewayType String File

网关类型

  • File:文件网关
  • Iscsi:块网关
BuyURL String https://common-buy.aliyun.com/?commodityCode=hcs_sgw_csg_pre&request={"gateway_id":"gw-0007va9bnidei3s8a***”,”directBuy":"false","gateway_class":"standard","cache_cloud_efficiency_size":0}&regionId=cn-hangzhou#/buy

付费类型为包年包月时,返回购买链接。

EcsInstanceId String gw-0001b2onkdzvl3b***

ECS实例ID。

MaxThroughput Integer 30

最大吞吐量

GatewayClass String Advanced

网关规格。可能值:

  • Basic:基础型。
  • Standard:标准型。
  • Enhanced:增强型。
  • Advanced:性能型。
InnerIp String 172.16.0.21

挂载IP。

Description String 测试使用

网关描述。

Name String fio-weekly***

网关名称。

InnerIpv6Ip String 2408:4004:110:6000:4656:f88e:1c14:e578

IPv6地址。

CreatedTime Long 1577179604

网关创建时间。时间戳为秒(s)。

ExpireStatus Integer 0

网关是否过期状态。可能值:

  • 0:正常。
  • 1:将要过期。
  • 2:已经过期。
DataLoadInterval Integer 120

数据加载周期。

RenewURL String https://common-buy.aliyun.com/?commodityCode=hcs_sgw_csg_pre&orderType=RENEW&instanceId=ca-0007va9bnideidndnu72#/renew

续费链接。

IsPostPaid Boolean true

付费类型。可能值:

  • true:按量付费,即后付费。
  • false:包年包月,即预付费。
PublicNetworkBandwidth Integer 55

数据公网带宽。仅线上网关支持。

StorageBundleId String sb-0001b2otrigeqkso***

网关集群ID。

Ip String 47.111.145.66

公网IP。

LastErrorKey String InternalError

错误关键字。

ElasticNodes Array of String 172.16.0.23

弹性网关节点IP。

VSwitchId String vsw-bp1krhkgnahkb9stp0***

虚拟交换机vSwitch ID。

CommonBuyInstanceId String gw-0001b2onkdzvl3b***

付费类型为包年包月时,在售卖系统中的实例ID。

ExpiredTime Long 1532426471

到期时间。时间戳为秒(s)。

GatewayVersion String 1.2.6

网关版本。

DataLoadType String once

数据加载策略。可能值如下:

  • never:从不加载
  • once(默认):加载一次
  • periodical:按周期加载
ElasticGateway Boolean false

是否为弹性网关。可能值如下:

  • false:不是
  • true:是
Category String Aliyun

网关类别。

  • 默认:Aliyun。
ActivatedTime Long 1577179769

激活时间。时间戳为秒(s)。

TaskId String t-000978oflgrd8ah6p***

任务ID。

Location String Cloud

网关位置。可能值:

  • Cloud:线上网关。
  • On_Premise:线下网关。
Code String 200

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

Success Boolean true

请求是否成功。

示例

请求示例

http(s)://[Endpoint]/?Action=DescribeGateways
&StorageBundleId=sb-0001b2otnkdxrigeq***
&<公共请求参数>

正常返回示例

XML格式

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

<DescribeGatewaysResponse>
    <TotalCount>2</TotalCount>
    <Message>successful</Message>
    <PageSize>10</PageSize>
    <RequestId>2C4A8287-66F4-45F9-84E3-866E4232C763</RequestId>
    <PageNumber>1</PageNumber>
    <Gateways>
        <Gateway>
            <Status>Running</Status>
            <Description>测试使用</Description>
            <CreatedTime>1577179604</CreatedTime>
            <Category>Aliyun</Category>
            <InnerIp>172.16.0.22</InnerIp>
            <Ip>47.111.145.88</Ip>
            <VSwitchId>vsw-bp1krhlx3nahkb9s***</VSwitchId>
            <ExpireStatus>0</ExpireStatus>
            <StorageBundleId>sb-0001b2tnkdxrige***</StorageBundleId>
            <GatewayId>gw-00012otnkdzvl3b1***</GatewayId>
            <GatewayClass>Advanced</GatewayClass>
            <Name>fio-weekly-smb</Name>
            <EcsInstanceId>i-bpni2h3217hlt5y***</EcsInstanceId>
            <IsPostPaid>true</IsPostPaid>
            <Type>File</Type>
            <ActivatedTime>1577179769</ActivatedTime>
            <VpcId>vpc-bp1phx50urgr5z9e7***</VpcId>
            <CommonBuyInstanceId>gw-0001b2onkdzvl3b1***</CommonBuyInstanceId>
            <GatewayVersion>1.2.6</GatewayVersion>
            <Location>Cloud</Location>
            <IsReleaseAfterExpiration>false</IsReleaseAfterExpiration>
        </Gateway>
        <Gateway>
            <Status>Running</Status>
            <CreatedTime>1576824278</CreatedTime>
            <Category>Aliyun</Category>
            <InnerIp>172.16.0.102</InnerIp>
            <Ip>47.111.147.36</Ip>
            <VSwitchId>vsw-bp1rhkglx3nahkb9***</VSwitchId>
            <ExpireStatus>0</ExpireStatus>
            <StorageBundleId>sb-0001b2otkdxrigeqk***</StorageBundleId>
            <GatewayId>gw-0001b2otnrigepgqo***</GatewayId>
            <GatewayClass>Advanced</GatewayClass>
            <Name>fio-smb</Name>
            <EcsInstanceId>i-bp16u1etze9wem1u9***</EcsInstanceId>
            <IsPostPaid>true</IsPostPaid>
            <Type>File</Type>
            <ActivatedTime>1576824436</ActivatedTime>
            <VpcId>vpc-bp1phxsrgr5z9e7lwr***</VpcId>
            <CommonBuyInstanceId>gw-0001bnkdxrigepgqo***</CommonBuyInstanceId>
            <GatewayVersion>1.1.0</GatewayVersion>
            <Location>Cloud</Location>
            <IsReleaseAfterExpiration>false</IsReleaseAfterExpiration>
        </Gateway>
    </Gateways>
    <Code>200</Code>
    <Success>true</Success>
</DescribeGatewaysResponse>

JSON格式

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

{
  "TotalCount" : 2,
  "Message" : "successful",
  "PageSize" : 10,
  "RequestId" : "2C4A8287-66F4-45F9-84E3-866E4232C763",
  "PageNumber" : 1,
  "Gateways" : {
    "Gateway" : [ {
      "Status" : "Running",
      "Description" : "测试使用",
      "CreatedTime" : 1577179604,
      "Category" : "Aliyun",
      "InnerIp" : "172.16.0.22",
      "Ip" : "47.111.145.88",
      "VSwitchId" : "vsw-bp1krhlx3nahkb9s***",
      "ExpireStatus" : 0,
      "StorageBundleId" : "sb-0001b2tnkdxrige***",
      "GatewayId" : "gw-00012otnkdzvl3b1***",
      "GatewayClass" : "Advanced",
      "Name" : "fio-weekly-smb",
      "EcsInstanceId" : "i-bpni2h3217hlt5y***",
      "IsPostPaid" : true,
      "Type" : "File",
      "ActivatedTime" : 1577179769,
      "VpcId" : "vpc-bp1phx50urgr5z9e7***",
      "CommonBuyInstanceId" : "gw-0001b2onkdzvl3b1***",
      "GatewayVersion" : "1.2.6",
      "Location" : "Cloud",
      "IsReleaseAfterExpiration" : false
    }, {
      "Status" : "Running",
      "CreatedTime" : 1576824278,
      "Category" : "Aliyun",
      "InnerIp" : "172.16.0.102",
      "Ip" : "47.111.147.36",
      "VSwitchId" : "vsw-bp1rhkglx3nahkb9***",
      "ExpireStatus" : 0,
      "StorageBundleId" : "sb-0001b2otkdxrigeqk***",
      "GatewayId" : "gw-0001b2otnrigepgqo***",
      "GatewayClass" : "Advanced",
      "Name" : "fio-smb",
      "EcsInstanceId" : "i-bp16u1etze9wem1u9***",
      "IsPostPaid" : true,
      "Type" : "File",
      "ActivatedTime" : 1576824436,
      "VpcId" : "vpc-bp1phxsrgr5z9e7lwr***",
      "CommonBuyInstanceId" : "gw-0001bnkdxrigepgqo***",
      "GatewayVersion" : "1.1.0",
      "Location" : "Cloud",
      "IsReleaseAfterExpiration" : false
    } ]
  },
  "Code" : "200",
  "Success" : true
}

错误码

HttpCode 错误码 错误信息 描述
400 EmptyStorageBundleId You must enter a valid ID for the gateway cluster. 网关集群ID不能为空。
400 BadPageSize The specified number of pages is invalid. The number ranges from 1 to 50. 无效的页数,取值范围:1~50。
400 BadPageNumber The specified page number is invalid. The page number must be greater than 0. 无效的页码,不能小于0。
404 StorageBundleNotExist The name you specified for the gateway cluster does not exist. You must specify a valid parameter. 网关集群不存在,请确认输入参数是否正确。

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

  • 本页导读 (1)
文档反馈