You need to enable JavaScript to run this app.
导航

ModifyVpnGatewayAttributes

最近更新时间2024.04.18 17:23:56

首次发布时间2022.04.28 07:17:15

调用ModifyVpnGatewayAttributes修改VPN网关的基本信息,包括VPN网关的名称、带宽大小和描述信息。

调用说明

  • 已到期的包年包月VPN网关、已欠费关停的按量计费VPN网关,不支持修改带宽规格。

  • 包年包月VPN网关带宽规格修改成功后,新规格立即生效,到期时间不变。规格修改时界面展示的费用,是购买新规格费用与已实际支付费用的差价,详细变更费用介绍请参见变更包年包月资源规格

  • 按量计费VPN网关带宽规格修改成功后,新规格立即生效,并立即按照新规格的价格进行计费。在一个计费周期下修改VPN网关带宽规格,该计费周期下的费用计算方式为:旧规格单价 × 旧规格使用时间 + 新规格单价 × 新规格使用时间

  • 若从200Mbps及以下规格(5Mbps、10Mbps、20Mbps、50Mbps、100Mbps、200Mbps)修改到500Mbps、1Gbps规格,或从500Mbps、1Gbps规格修改到200Mbps及以下规格,会导致业务中断并重新建立连接,请在业务空闲时进行操作。

  • 若当前VPN网关版本过旧,VPN网关规格不支持从200Mbps及以下规格升配至500Mbps或1Gbps,也不支持从500Mbps或1Gbps降配至200Mbps及以下。如有需要,请先前往控制台更新VPN网关至最新版本,具体操作请参见升级VPN网关

调试

请求参数

名称类型是否必选示例值描述
ActionStringModifyVpnGatewayAttributes要执行的操作,取值:ModifyVpnGatewayAttributes。
VersionString2020-04-01API版本信息。
VpnGatewayIdStringvgw-12bfa2du7fojk17q7y1rk****VPN网关实例的ID。您可调用DescribeVpnGateways查询VPN网关的ID信息。

VpnGatewayName

String

VpnGateway-test

VPN网关实例的名称。

  • 以中文、字母、数字开头,只能包含中文、字母、数字、点号(.)、下划线(_)和短划线(-)。
  • 长度限制为1 ~ 128个字符。
  • 不填保持原有配置。

Description

String

This is a sample description

VPN网关实例的描述。

  • 以中文、字母、数字开头,只能包含中文、字母、数字、点号(.)、空格( )、下划线(_)、中划线(-)、等号(=)、英文逗号(,)、中文逗号(,)、中文句号(。)。
  • 长度限制为0 ~ 255个字符。
  • 不填保持原有配置。

Bandwidth

Integer

20

VPN网关实例的带宽规格单位:Mbps。

  • 不填保持原有配置。
  • 取值:5、10、20、50、100、200、500、1000。

说明

1000Mbps带宽规格VPN网关为邀测功能,仅开通此规格的用户可使用,未开通此规格Bandwidth请避免传入“1000”。如有需要,请联系客户经理申请试用。

IpsecEnabled

Boolean

true

是否开启IPSec功能。

  • true(默认值):开启

  • false:关闭

说明

IpsecEnabledSslEnabled不可同时传入false

SslEnabled

Boolean

false

是否开启SSL VPN功能。

  • true:开启

  • false(默认值):关闭

说明

IpsecEnabledSslEnabled不可同时传入false

SslMaxConnections

Integer

10

SSL VPN规格的最大连接数,仅SslEnabledtrue时可传入此参数。

  • 5(默认值)
  • 10
  • 20
  • 50
  • 100
  • 200

返回数据

名称类型
示例值
描述
RequestIdString202203211611080102121461940900****请求ID。
OrderIdStringBO702327073660581****订单ID。

请求示例

GET /?Action=ModifyVpnGatewayAttributes&Version=2020-04-01&VpnGatewayId=vgw-12bfa2du7fojk17q7y1rk****&VpnGatewayName=test&Description=test&Bandwidth=10 HTTP/1.1
Host: open.volcengineapi.com
ServiceName: vpn
Region: cn-beijing

返回示例

{
    "ResponseMetadata": {
        "RequestId": "202203211611080102121461940900****",
        "Action": "ModifyVpnGatewayAttributes",
        "Version": "2020-04-01",
        "Service": "vpn",
        "Region": "cn-beijing"
    },
    "Result": {
        "RequestId": "202203211611080102121461940900****",
        "OrderId":"BO702327073660581****"
    }
}

错误码

此处仅展示当前API的错误码,更多错误码请参见公共错误码

HttpCode错误码错误信息描述
400InvalidName.MalformedThe specified name is malformed.Ensure the maximum length of name is 128.指定的名称格式不合法。名称长度不能超过128个字符。
400InvalidName.MalformedThe specified name is malformed.指定的名称格式不合法。请修复名称格式后重试。
400InvalidDescription.MalformedThe specified description is malformed.Ensure the maximum length of description is 255.指定的描述格式不合法。描述长度不能超过255个字符。
400InvalidDescription.MalformedThe specified description is malformed.指定的描述格式不合法。请修复描述格式后重试。
400InvalidVpnGateway.InvalidStatusThe specified VPN gateway is not in the correct status for the request.指定的VPN网关所处的状态无法响应该请求。
400InvalidVpnGatewayBandwidth.MalformedThe specified VPN gateway bandwidth is malformed.指定的VPN网关带宽不支持。
400InsufficientResource.VpnGatewayThe specified region does not have enough resources for VPN gateway.VPN网关可用资源不足。
400OrderErrorFailed to create an order in one step.创建订单并支付失败。
400PreOrderErrorFailed to create pre order.创建配置单失败。
400UnsupportedOperationThe request on the specified instance is denied due to the account balance and available vouchers are less than 100 yuan in total.因账户余额及可用代金券共不足100元,对于该实例的操作请求被拒绝。
400UnsupportedOperationThe request on the specified instance is denied due to the account in arrears status.因账户处于欠费状态,对于该实例的操作请求被拒绝。
400InvalidIpsecEnabled.InUseThe specified VPN gateway has dependent resource of VPN connection.VPN网关上存在IPSec连接,无法关闭IPSec功能。
400InvalidSslEnabled.InUseThe specified VPN gateway has dependent resource of SSL server.VPN网关上存在SSL服务端,无法关闭SSL功能。
400InvalidSslMaxConnections.MalformedThe specified SSL max connection of VPN Gateway is malformed.指定的VPN网关SSL最大连接数不合法。
400InvalidVpnEnabled.MalformedIpsecEnabled and SslEnabled can not be set to false at the same time.IPSec功能与SSL功能不能同时关闭。
400InvalidVpnGateway.FirmwareNotSupportedThe specified features aren't supported by the VPN gateway, please upgrade your VPN gateway.VPN网关不支持所选择的功能,请升级您的VPN网关。
400InvalidVpnGateway.SslNotEnabledSSL of the specified VPN gateway is not enabled.当前VPN网关未开启SSL功能。
400InvalidSslMaxConnections.ClientIpPoolNotEnoughThe specified SslMaxConnections is larger than the support ip numbers of ssl server.SSL最大连接数大于当前SSL服务端支持的IP数量。
403ForbiddenThe specified service is temporarily unavailable. Please try again later.指定的服务暂时不可用,请稍后重试。
404InvalidVpnGateway.NotFoundThe specified VPN gateway does not exist.指定的VPN网关不存在。
404InvalidVpnGateway.GetInstanceDetailGet instance detail failed.获取实例信息失败。
412InvalidVpnGateway.ExpiredThe specified VPN gateway has expired.指定的VPN网关已过期。