调用ModifyGatewayClass可修改指定线上网关的网关规格,进行网关升配。

调用该接口时,您需要注意:

  • 请确保在使用该接口前,已充分了解混合云存储网关产品的收费方式和价格
  • 如果您的网关为包年包月类型,即预付费时,您必须通过接口返回的购买链接进行购买,才能完成网关升配。
  • 你可以通过DescribeGatewayModificationClasses接口查询指定线上网关可升配的规格信息。
  • 只能升级线上网关可升配规格的规格,且线上网关只能升配不能降配。

调试

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

请求参数

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

系统规定参数。取值:ModifyGatewayClass。

GatewayClass String Enhanced

升级的网关规格。可升配的规格可以通过DescribeGatewayModificationClasses接口查询。可能值:

  • Basic:基础型。
  • Standard:标准型。
  • Enhanced:增强型。
  • Advanced:性能型。
GatewayId String gw-0001xv7580031yzun***

网关ID。

返回数据

名称 类型 示例值 描述
RequestId String 395B1136-982E-4F95-BDCE-7323FFEF499E

请求ID。

Success Boolean true

请求是否成功。

Code String 200

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

Message String successful

请求结果描述。

TaskId String t-0001xv7je3580bx6v***

任务ID。

BuyURL String https://common-buy.aliyun.com/?commodityCode=hcs_sgw_csg_pre&orderType=UPGRADE&instanceId=gw-000c6hshwukjwc7e1***#/upgrade

付费类型为包年包月时,网关升配的购买链接。

示例

请求示例

http(s)://[Endpoint]/?Action=ModifyGatewayClass
&GatewayClass=Enhanced
&GatewayId=gw-0001xv7580031yzun***
&<公共请求参数>

正常返回示例

XML 格式

<ModifyGatewayClassResponse>
      <TaskId>t-0001xv7je3580bx6v***</TaskId>
      <BuyURL>https://common-buy.aliyun.com/?commodityCode=hcs_sgw_csg_pre&amp;orderType=UPGRADE&amp;instanceId=gw-000c6hshwukjwc7e1***#/upgrade</BuyURL>
      <Message>successful</Message>
      <RequestId>395B1136-982E-4F95-BDCE-7323FFEF499E</RequestId>
      <Code>200</Code>
      <Success>true</Success>
</ModifyGatewayClassResponse>

JSON 格式

{
    "TaskId":"t-0001xv7je3580bx6v***",
    "BuyURL":"https://common-buy.aliyun.com/?commodityCode=hcs_sgw_csg_pre&orderType=UPGRADE&instanceId=gw-000c6hshwukjwc7e1***#/upgrade",
    "Message":"successful",
    "RequestId":"395B1136-982E-4F95-BDCE-7323FFEF499E",
    "Code":"200",
    "Success":true
}

错误码

HttpCode 错误码 错误信息 描述
400 EmptyGatewayId You must enter a valid ID for the gateway. 网关ID不能为空。
400 InvalidGatewayClass The specified specification of the gateway is invalid. 无效的网关规格。
400 GatewayNotExist The specified gateway does not exist. You must specify a valid parameter. 网关不存在,请确认输入参数是否正确。
400 LocationCloudRequired You must specify a cloud gateway. Try again later. 需要网关为线上网关,请检查后重试。
400 GatewayStatusRunningRequired The gateway is not in the Running state. Try again later. 需要网关为启动状态,请稍后再试。
400 GatewayClassUpgradeOnly You can upgrade only the specification of the gateway. 当前网关规格仅支持升配。
400 NoAvailableOnlineResource There are no cloud gateways available. We recommend that you select a different specification or VSwitch that resides in another zone. 当前没有可用的线上网关资源,请选择其他规格或者其他可用区虚拟交换机。
400 GatewayInOperation The gateway is processing requests . Try again later. 网关正在进行操作中,请稍后再试。

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