You need to enable JavaScript to run this app.
文档中心
VPN连接

VPN连接

复制全文
下载 pdf
VPN网关
ModifyVpnGatewayAttributes-修改VPN网关
复制全文
下载 pdf
ModifyVpnGatewayAttributes-修改VPN网关
调用ModifyVpnGatewayAttributes修改VPN网关的基本信息,包括VPN网关的名称、带宽大小和描述信息。​
使用说明​
  • 已到期的包年包月VPN网关、已欠费关停的按量计费VPN网关,不支持修改带宽规格。​
  • 包年包月VPN网关带宽规格修改成功后,新规格立即生效,到期时间不变。规格修改时界面展示的费用,是购买新规格费用与已实际支付费用的差价,详细变更费用介绍请参见变更包年包月资源规格。​
  • 按量计费VPN网关带宽规格修改成功后,新规格立即生效,并立即按照新规格的价格进行计费。在一个计费周期下修改VPN网关带宽规格,该计费周期下的费用计算方式为:旧规格单价 × 旧规格使用时间 + 新规格单价 × 新规格使用时间。​
  • 若当前VPN网关版本过旧,VPN网关规格不支持从200Mbps及以下规格升配至300Mbps、400Mbps、500Mbps、1Gbps、3Gbps,也不支持从300Mbps、400Mbps、500Mbps、1Gbps、3Gbps降配至200Mbps及以下。如有需要,请先前往控制台更新VPN网关至最新版本,具体操作请参见升级VPN网关。​
  • 以下操作会导致连接中断,请在业务空闲时操作:​
  • 修改SSL连接数规格SslMaxConnections。​
  • 从200Mbps及以下规格(5Mbps、10Mbps、20Mbps、50Mbps、100Mbps、200Mbps)修改到300Mbps、400Mbps、500Mbps、1Gbps、3Gbps规格,或从300Mbps、400Mbps、500Mbps、1Gbps、3Gbps规格修改到200Mbps及以下规格。​
调试​
API Explorer
您可以通过 API Explorer 在线发起调用,无需关注签名生成过程,快速获取调用结果。
​
请求参数​
下方仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。​
Action String 必选 示例值:ModifyVpnGatewayAttributes​
要执行的操作,取值:ModifyVpnGatewayAttributes。​
​
Version String 必选 示例值:2020-04-01​
API版本信息。​
​
VpnGatewayId String 必选 示例值:vgw-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、300、400、500、1000、3000。​
说明​
1000Mbps、3000Mbps带宽规格VPN网关为邀测功能,仅开通此规格的用户可使用,未开通此规格Bandwidth请避免传入。如有需要,请联系客户经理申请试用。
​
IpsecEnabled Boolean 可选 示例值:true​
是否开启IPSec功能。​
  • true:开启​
  • false:关闭​
说明​
IpsecEnabled和SslEnabled不可同时传入false。
​
SslEnabled Boolean 可选 示例值:false​
是否开启SSL VPN功能。​
  • true:开启​
  • false:关闭​
说明​
IpsecEnabled和SslEnabled不可同时传入false。
​
SslMaxConnections Integer 可选 示例值:10​
SSL VPN规格的最大连接数,仅SslEnabled为true时可传入此参数。​
  • 5​
  • 10​
  • 20​
  • 50​
  • 100​
  • 200​
​
Asn Integer 可选 示例值:64512​
VPN网关的ASN。仅支持首次配置ASN,即原先VPN网关未配置ASN可通过配置此参数设置ASN,如果VPN网关已配置ASN,则不允许修改。​
  • VPN网关ASN的取值范围:64512~65534,4200000000~4294967294。​
  • 不填保持原有配置。​
​
​
返回参数​
下方仅列出本接口特有的返回参数。更多信息请参见返回结构。​
RequestId String 可选 示例值:202203211611080102121461940900****​
请求ID。​
​
OrderId String 可选 示例值:BO702327073660581****​
订单ID。​
​
​
请求示例​
​
GET /?Action=ModifyVpnGatewayAttributes&Version=2020-04-01&VpnGatewayId=vgw-12bfa2du7fojk17q7y1rk****&VpnGatewayName=test&Description=test&Bandwidth=10 HTTP/1.1​
Host: vpn.cn-beijing.volcengineapi.com​
X-Date: 20251029T033538Z​
Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20251029/cn-beijing/vpn/request, SignedHeaders=host;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f​
​
返回示例​
​
{​
"ResponseMetadata": {​
"RequestId": "202203211611080102121461940900****",​
"Action": "ModifyVpnGatewayAttributes",​
"Version": "2020-04-01",​
"Service": "vpn",​
"Region": "cn-beijing"​
},​
"Result": {​
"RequestId": "202203211611080102121461940900****",​
"OrderId":"BO702327073660581****"​
}​
}​
​
错误码​
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。​
​
状态码​
错误码​
错误信息​
说明​
400​
InvalidName.Malformed​
The specified name is malformed.Ensure the maximum length of name is 128.​
指定的名称格式不合法。名称长度不能超过128个字符。​
400​
InvalidName.Malformed​
The specified name is malformed.​
指定的名称格式不合法。请修复名称格式后重试。​
400​
InvalidDescription.Malformed​
The specified description is malformed.Ensure the maximum length of description is 255.​
指定的描述格式不合法。描述长度不能超过255个字符。​
400​
InvalidDescription.Malformed​
The specified description is malformed.​
指定的描述格式不合法。请修复描述格式后重试。​
400​
InvalidVpnGateway.InvalidStatus​
The specified VPN gateway is not in the correct status for the request.​
指定的VPN网关所处的状态无法响应该请求。​
400​
InvalidVpnGatewayBandwidth.Malformed​
The specified VPN gateway bandwidth is malformed.​
指定的VPN网关带宽不支持。​
400​
InsufficientResource.VpnGateway​
The specified region does not have enough resources for VPN gateway.​
VPN网关可用资源不足。​
400​
OrderError​
Failed to create an order in one step.​
创建订单并支付失败。​
400​
PreOrderError​
Failed to create pre order.​
创建配置单失败。​
400​
UnsupportedOperation​
The request on the specified instance is denied due to the account balance and available vouchers are less than 100 yuan in total.​
因账户余额及可用代金券共不足100元,对于该实例的操作请求被拒绝。​
400​
UnsupportedOperation​
The request on the specified instance is denied due to the account in arrears status.​
因账户处于欠费状态,对于该实例的操作请求被拒绝。​
400​
InvalidIpsecEnabled.InUse​
The specified VPN gateway has dependent resource of VPN connection.​
VPN网关上存在IPSec连接,无法关闭IPSec功能。​
400​
InvalidSslEnabled.InUse​
The specified VPN gateway has dependent resource of SSL server.​
VPN网关上存在SSL服务端,无法关闭SSL功能。​
400​
InvalidSslMaxConnections.Malformed​
The specified SSL max connection of VPN Gateway is malformed.​
指定的VPN网关SSL最大连接数不合法。​
400​
InvalidVpnEnabled.Malformed​
IpsecEnabled and SslEnabled can not be set to false at the same time.​
IPSec功能与SSL功能不能同时关闭。​
400​
InvalidVpnGateway.FirmwareNotSupported​
The specified features aren't supported by the VPN gateway, please upgrade your VPN gateway.​
VPN网关不支持所选择的功能,请升级您的VPN网关。​
400​
InvalidVpnGateway.SslNotEnabled​
SSL of the specified VPN gateway is not enabled.​
当前VPN网关未开启SSL功能。​
400​
InvalidSslMaxConnections.ClientIpPoolNotEnough​
The specified SslMaxConnections is larger than the support ip numbers of ssl server.​
SSL最大连接数大于当前SSL服务端支持的IP数量。​
400​
InvalidVpnGateway.InvalidASN​
The VPN Gateway ASN is invalid and it should be in the range of 64512-65534 or 4200000000-4294967294.​
指定的ASN不合法。ASN应该在64512-65534、4200000000-4294967294范围内。​
400​
InvalidVpnGatewayAsn.ASNAlreadyConfigured​
The specified VPN gateway already has an ASN, which cannot be modified.​
指定的VPN网关实例已配置ASN。​
400​
InvalidVpnGateway.BGPSupport​
The dual-tunnel VPN gateway does not support BGP.​
双隧道类型的VPN网关不支持BGP功能。​
400​
InvalidVpnGateway.SslNotSupport​
The dual-tunnel VPN gateway does not support Ssl.​
双隧道类型的VPN网关不支持SSL功能。​
403​
Forbidden​
The specified service is temporarily unavailable. Please try again later.​
指定的服务暂时不可用,请稍后重试。​
403​
Forbidden.VpnGatewayBlocked​
The specified VPN gateway is blocked.​
当前VPN网关封禁中,禁止操作。​
404​
InvalidVpnGateway.NotFound​
The specified VPN gateway does not exist.​
指定的VPN网关不存在。​
404​
InvalidVpnGateway.GetInstanceDetail​
Get instance detail failed.​
获取实例信息失败。​
412​
InvalidVpnGateway.Expired​
The specified VPN gateway has expired.​
指定的VPN网关已过期。​
​
最近更新时间:2026.05.22 11:16:09
这个页面对您有帮助吗?
有用
有用
无用
无用