ModifyVpnConnectionAttribute_专有网络_API文档

插件下载了解更多
VS Code 插件
安装插件之前,确保已安装 VS Code安装插件之前,确保已安装 VS Code
Alibaba Cloud Developer Toolkit is a collection of extensions that can help access Alibaba Cloud services in Visual Studio Code.
JetBrains 插件
安装插件之前,确保已安装 JetBrains IDE安装插件之前,确保已安装 JetBrains IDE
The Alibaba Cloud Developer Toolkit for JetBrains makes it easier to access Alibaba Cloud services.

接口说明

  • 如果要修改双隧道模式的 IPsec-VPN 连接,调用ModifyVpnConnectionAttribute接口时除支持配置必填参数外,还支持配置以下请求参数:

    ClientTokenNameLocalSubnetRemoteSubnetEffectImmediatelyAutoConfigRouteTunnelOptionsSpecification 数组、EnableTunnelsBgp

  • 如果要修改单隧道模式的 IPsec-VPN 连接,调用ModifyVpnConnectionAttribute接口时除支持配置必填参数外,还支持配置以下请求参数:

    ClientTokenNameLocalSubnetRemoteSubnetEffectImmediatelyIkeConfigIpsecConfigHealthCheckConfigAutoConfigRouteEnableDpdEnableNatTraversalBgpConfigRemoteCaCertificate

  • ModifyVpnConnectionAttribute 接口属于异步接口,即系统返回一个请求 ID,但该 IPsec 连接的配置信息未修改成功,系统后台的修改任务仍在进行。您可以调用 DescribeVpnGateway 查询 VPN 网关实例状态,来确定 IPsec 连接的配置信息的修改状态:

    • 当 VPN 网关实例处于 updating 状态时,表示 IPsec 连接的配置信息正在修改中。
    • 当 VPN 网关实例处于 active 状态时,表示 IPsec 连接的配置信息修改成功。
  • ModifyVpnConnectionAttribute 接口不支持在同一 VPN 网关下并发修改 IPsec 连接的配置信息。

流控信息

当前云产品API请求速率暂未透出。

授权信息

如下是此API对应的授权信息,用于RAM权限策略语句的Action元素中,为RAM用户或RAM角色授予调用此API的权限。请通过 RAM 访问控制设置,使用方法可参考访问控制帮助文档

具体说明如下:展开详情

操作访问级别资源类型条件关键字关联操作
vpc:ModifyVpnConnectionAttribute
Update
VpnConnection
acs:vpc:{#regionId}:{#accountId}:vpnconnection/{#VpnConnectionId}

请求参数

字段名称字段详情
RegionIdstring

IPsec 连接所在的地域 ID。 展开详情

示例值: cn-shanghai参考取值来源:
    DescribeRegions
ClientTokenstring

客户端 Token,用于保证请求的幂等性。展开详情

示例值:02fb3da4-130e-11e9-8e44-0016e04115b
VpnConnectionIdstring

IPsec 连接的 ID。

示例值:vco-bp1bbi27hojx80nck****参考取值来源:
    CreateVpnConnection
    DiagnoseVpnConnections
    DescribeVpnConnections
    ModifyVpnAttachmentAttribute
Namestring

IPsec 连接的名称。 展开详情

示例值:nametest
LocalSubnetstring

需要和本地数据中心互连的 VPC 侧的网段,用于第二阶段协商。展开详情

示例值:10.1.1.0/24,10.1.2.0/24
RemoteSubnetstring

本地数据中心侧的网段,用于第二阶段协商。展开详情

示例值:10.2.1.0/24,10.2.2.0/24
EffectImmediatelyboolean

选择 IPsec 连接的配置是否立即生效。取值:展开详情

示例值:false
IkeConfigstring

修改单隧道模式的 IPsec-VPN 连接时支持配置该参数。展开详情

示例值:{"Psk":"pgw6dy7d1i8i****","IkeVersion":"ikev1","IkeMode":"main","IkeEncAlg":"aes","IkeAuthAlg":"sha1","IkePfs":"group2","IkeLifetime":86400,"LocalId":"116.64.XX.XX","RemoteId":"139.18.XX.XX"}
IpsecConfigstring

修改单隧道模式的 IPsec-VPN 连接时支持配置该参数。展开详情

示例值:{"IpsecEncAlg":"aes","IpsecAuthAlg":"sha1","IpsecPfs":"group2","IpsecLifetime":86400}参考取值来源:
    DownloadVpnConnectionConfig
    ListIpsecServers
HealthCheckConfigstring

修改单隧道模式的 IPsec-VPN 连接时支持配置该参数。展开详情

示例值:{"enable":"true","dip":"192.168.1.1","sip":"10.1.1.1","interval":"3","retry":"3"}
AutoConfigRouteboolean

是否自动发布路由。取值:展开详情

示例值:true
EnableDpdboolean

修改单隧道模式的 IPsec-VPN 连接时支持配置该参数。展开详情

示例值:true
EnableNatTraversalboolean

修改单隧道模式的 IPsec-VPN 连接时支持配置该参数。展开详情

示例值:true
BgpConfigstring

修改单隧道模式的 IPsec-VPN 连接时支持配置该参数。展开详情

示例值:{"EnableBgp":"true","LocalAsn":"65530","TunnelCidr":"169.254.11.0/30","LocalBgpIp":"169.254.11.1"}
RemoteCaCertificatestring

修改单隧道模式的 IPsec-VPN 连接时支持配置该参数。展开详情

示例值:-----BEGIN CERTIFICATE----- MIIB7zCCAZW**** -----END CERTIFICATE-----
TunnelOptionsSpecificationarray<object>

修改隧道的配置。展开详情

EnableTunnelsBgpboolean

修改双隧道模式的 IPsec-VPN 连接时支持配置该参数。展开详情

示例值:true

返回参数

字段名称字段详情
EnableNatTraversalboolean

IPsec 连接是否已开启 NAT 穿越功能。取值:展开详情

示例值:true
CreateTimeinteger<int64>

IPsec 连接的创建时间戳。单位:毫秒。展开详情

注意 请注意,该值为 Long 类型,在某些语言中可能存在精度丢失的风险,请小心使用。
示例值:1492753817000
EffectImmediatelyboolean

IPsec 连接的配置是否立即生效。展开详情

示例值:false
VpnGatewayIdstring

VPN 网关实例的 ID。

示例值:vpn-bp1q8bgx4xnkm2ogj****
LocalSubnetstring

VPC 侧的网段。

示例值:10.1.1.0/24,10.1.2.0/24
RequestIdstring

请求 ID。

示例值:7DB79D0C-5F27-4AB5-995B-79BE55102F90
VpnConnectionIdstring

IPsec 连接的 ID。

示例值:vco-bp1bbi27hojx80nck****
Descriptionstring

IPsec 连接的描述信息。

示例值:description
RemoteSubnetstring

本地数据中心侧的网段。

示例值:10.2.1.0/24,10.2.2.0/24
CustomerGatewayIdstring

IPsec 连接关联的用户网关 ID。展开详情

示例值:cgw-p0w2jemrcj5u61un8****
Namestring

IPsec 连接的名称。

示例值:nametest
EnableDpdboolean

IPsec 连接是否已开启 DPD(对等体存活检测)功能。展开详情

示例值:true
IkeConfigobject

第一阶段协商的配置。展开详情

IpsecConfigobject

第二阶段协商的配置。展开详情

VcoHealthCheckobject

健康检查配置。展开详情

VpnBgpConfigobject

BGP 配置信息。展开详情

TunnelOptionsSpecificationobject
EnableTunnelsBgpboolean

隧道 BGP 的开启状态。展开详情

示例值:true
ResourceGroupIdstring

IPsec 连接所属的资源组 ID。展开详情

示例值:rg-acfmzs372yg****

返回示例

错误码

全局错误码
HTTP 状态码错误码错误信息操作
400
VpnGateway.Configuring
The specified service is configuring.诊断
400
VpnGateway.FinancialLocked
The specified service is financial locked.诊断
400
InvalidName
The name is not valid诊断
400
VpnRouteEntry.AlreadyExists
The specified route entry is already exist.诊断
400
VpnRouteEntry.Conflict
The specified route entry has conflict.诊断
400
NotSupportVpnConnectionParameter.IpsecPfs
The specified vpn connection ipsec Ipsec Pfs is not support.诊断
400
NotSupportVpnConnectionParameter.IpsecAuthAlg
The specified vpn connection ipsec Auth Alg is not support.诊断
400
VpnRouteEntry.ConflictSSL
The specified route entry has conflict with SSL client.诊断
400
VpnRouteEntry.BackupRoute
Validate backup route entry failed.诊断
400
VpnRouteEntry.InvalidWeight
Invalid route entry weight value.诊断
400
QuotaExceeded.PBR
The policy-based routes has reached the upper limit.诊断
400
OperationUnsupported.SetDPD
Current version of the VPN does not support setting DPD.诊断
400
OperationUnsupported.SetNatTraversal
Current version of the VPN does not support setting NAT traversal.诊断
400
QuotaExceeded.PolicyBasedRoute
The maximum number of policy-based routes is exceeded. Existing routes: %s. Routes to be created: %s. Maximum routes: %s.诊断
400
MissingParameter.TunnelCidr
The parameter TunnelCidr is mandatory when BGP is enabled.诊断
400
OperationUnsupported.EnableBgp
Current version of the VPN does not support enable BGP.诊断
400
MissingParam.CustomerGatewayAsn
Asn of customer gateway is mandatory when BGP is enabled.诊断
400
IllegalParam.LocalAsn
The specified LocalAsn is invalid.诊断
400
IllegalParam.BgpConfig
The specified BgpConfig is invalid.诊断
400
IllegalParam.EnableBgp
VPN connection must enable BGP when VPN gateway has enabled BGP.诊断
400
IllegalParam.TunnelCidr
The specified TunnelCidr is invalid.诊断
400
InvalidLocalBgpIp.Malformed
The specified LocalBgpIp is malformed.诊断
400
IllegalParam.LocalBgpIp
The specified LocalBgpIp is invalid.诊断
400
IllegalParam.LocalSubnet
The specified "LocalSubnet" (%s) is invalid.诊断
400
IllegalParam.RemoteSubnet
The specified "RemoteSubnet" (%s) is invalid.诊断
400
OperationFailed.CenLevelNotSupport
When the VPC to which the VPN gateway belongs is attached to a FULL-mode CEN, the VPN gateway cannot enable BGP.诊断
400
InvalidTunnelCidr.Malformed
The specified TunnelCidr is malformed.诊断
400
CustomerGateway.ConflictRouteEntry
The specified customer gateway has conflict with route entry.诊断
400
VpnTask.CONFLICT
Vpn task has conflict.诊断
400
OperationFailed.RouteConflictWithIPsecServer
Operation failed because the route to create conflicts with the client IP pool of the IPsec server.诊断
400
IllegalParam.TunnelId
The specified TunnelId is invalid.诊断
400
IllegalParam.Role
The specified Role is invalid.诊断
400
VpnConnectionParamInvalid.SameVpnAndCgwDifferentIkeConfigs
IPSec connections associated with the same user gateway and VPN gateway should have the same pre-shared key and IKE configuration.诊断
400
VpnConnectionParamInvalid.SameVpnAndCgwTrafficSelectorOverlap
Traffic selectors of IPSec connections associated with the same user gateway and VPN gateway should not overlap.诊断
400
ModifyIkeV1WithMultiRoutes.Invalid
Failed to modify VPN connection parameters. Multi-network is configured while using IkeV1 protocol.诊断
403
Forbbiden.SubUser
User not authorized to operate on the specified resource as your account is created by another user.诊断
403
Forbidden
User not authorized to operate on the specified resource.诊断
404
InvalidVpnConnectionInstanceId.NotFound
The specified vpn connection instance id does not exist.诊断
500
OperationFailed.RouteConflictWithIPsecServer
Operation failed because the specified route conflicts with IPsec server.诊断

变更历史

变更时间变更内容概要操作
2024-10-24
变更请求参数TunnelOptionsSpecification
2024-01-04
变更错误码400
2023-10-23
变更错误码400
2023-10-19
变更错误码400
变更请求参数TunnelOptionsSpecification
变更返回参数
2023-08-01
变更返回参数
2023-06-30
新增请求参数TunnelOptionsSpecification
新增请求参数EnableTunnelsBgp
变更返回参数
2022-12-08
变更错误码400

相关示例

创建IPsec连接->查询已创建的IPsec连接->查询已创建的IPsec连接的详细信息->修改IPsec连接的配置信息->获取IPsec连接的配置信息->删除指定的IPsec连接
2022-07-28