调用UpgradeGateway接口可以对指定的网关进行升级。

接口说明

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

  • 仅支持网关状态为运行中(Running)、已激活(Activated)时调用此接口。
  • 升级过程中,无法响应其他发送的请求。
警告 升级网关会导致您的业务暂时中断,请谨慎操作。

调试

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

请求参数

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

系统规定参数。取值:UpgradeGateway

GatewayId String gw-0001xv7je3580031y***

网关ID。

返回数据

名称 类型 示例值 描述
TaskId String t-0001xv7je3580412***

任务ID。

Message String successful

请求结果描述。

RequestId String CB300009-3850-4107-B291-59BDB4EDA183

请求ID。

Code String Code

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

Success Boolean true

请求是否成功。可取值如下:

  • true:成功。
  • false:失败。

示例

请求示例

http(s)://[Endpoint]/?Action=UpgradeGateway
&GatewayId=gw-0001xv7je3580031y***
&公共请求参数

正常返回示例

XML格式

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

<UpgradeGatewayResponse>
    <TaskId>t-0001xv7je3580412***</TaskId>
    <Message>successful</Message>
    <RequestId>CB300009-3850-4107-B291-59BDB4EDA183</RequestId>
    <Code>Code</Code>
    <Success>true</Success>
</UpgradeGatewayResponse>

JSON格式

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

{
  "TaskId" : "t-0001xv7je3580412***",
  "Message" : "successful",
  "RequestId" : "CB300009-3850-4107-B291-59BDB4EDA183",
  "Code" : "Code",
  "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 GatewayOperationNotAllowed You cannot perform the operation when the gateway is in the current state. 网关当前状态不允许执行该操作。
400 GatewayInOperation The gateway is processing requests . Try again later. 网关正在进行操作中,请稍后再试。
400 BadRequest Invalid request. You must specify valid parameters in the request.  非法请求,请检查请求参数。

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