All Products
Search
Document Center

Express Connect:UpdateEnhancedVpnGateway

Last Updated:Apr 27, 2026

UpdateEnhancedVpnGateway updates the name, description, or route auto-propagation of an enhanced VPN gateway.

Operation description

  • The UpdateEnhancedVpnGateway API is asynchronous. After you call this API, it returns a response, but the configuration update runs in the background. You can call DescribeVpnGateway to query the state of the Enhanced VPN Gateway:
    • updating: The configuration is being updated.

    • active: The configuration update is complete.

  • You cannot call the UpdateEnhancedVpnGateway API concurrently for the same Enhanced VPN Gateway.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request syntax

POST  HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The region ID of the enhanced VPN gateway. You can obtain the region ID by calling the DescribeRegions operation.

cn-hangzhou

ClientToken

string

No

A client token used to ensure the idempotence of the request.

The client must generate a value that is unique across requests. The client token can contain only ASCII characters.

Note

If you do not specify this parameter, the system automatically uses the request's RequestId as the client token. The RequestId is unique for each request.

123e4567-e89b-12d3-a456-4266****

VpnGatewayId

string

Yes

The ID of the enhanced VPN gateway.

vpn-bp1q8bgx4xnkm2ogj****

Name

string

No

The new name of the enhanced VPN gateway.

The name must be 2 to 100 characters long. It must start with a letter and cannot start with http:// or https://. The name can contain letters, digits, periods (.), underscores (_), and hyphens (-). Other special characters are not supported.

myvpn

Description

string

No

The new description of the enhanced VPN gateway.

The description must be 1 to 100 characters long.

test

AutoPropagate

boolean

No

Specifies whether to enable route auto-propagation for the enhanced VPN gateway. Valid values:

  • true: Enables route auto-propagation.
    After this feature is enabled, the enhanced VPN gateway automatically learns routes from the VPC's system route table and propagates routes from your on-premises data center to it.

  • false: Disables route auto-propagation.
    Before you disable route auto-propagation, ensure that BGP dynamic routing is disabled for all IPsec connections that are associated with the enhanced VPN gateway.

true

Response elements

Element

Type

Description

Example

object

The returned data.

VpnType

string

The type of the enhanced VPN gateway.

  • Normal (default): The standard type.

Normal

Status

string

The status of the enhanced VPN gateway.

  • init: Initializing.

  • provisioning: Provisioning.

  • active: Active.

  • updating: Updating.

  • deleting: Deleting.

active

VpcId

string

The ID of the VPC that contains the enhanced VPN gateway.

vpc-bp1ub1yt9cvakoel****

CreateTime

integer

The creation time of the enhanced VPN gateway. Unit: milliseconds.
This value is a Unix timestamp that specifies the number of milliseconds since 00:00:00 UTC on January 1, 1970.

1492753580000

AutoPropagate

boolean

Indicates whether BGP routes are automatically propagated to the VPC. Valid values:

  • true: Automatic propagation is enabled.

  • false: Automatic propagation is disabled.

true

VpnGatewayId

string

The ID of the enhanced VPN gateway.

vpn-bp1q8bgx4xnkm2ogj****

Tag

string

A JSON string that specifies the features of the enhanced VPN gateway.

{"VpnEnableBgp": true}

VSwitchId

string

The ID of the vSwitch associated with the enhanced VPN gateway.

vsw-bp1y9ovl1cu9ou4tv****

RequestId

string

The request ID.

54B48E3D-DF70-471B-AA93-08E683A1B457

EnableBgp

boolean

Indicates whether BGP is enabled for the enhanced VPN gateway. Valid values:

  • true: BGP is enabled.

  • false: BGP is disabled.

true

Name

string

The name of the enhanced VPN gateway.

test

Description

string

The description of the enhanced VPN gateway.

test

Tags

object

The tags that are added to the enhanced VPN gateway.

Tag

array<object>

The list of tags.

object

A tag.

Key

string

The tag key.

key1

Value

string

The tag value.

val1

NetworkType

string

The network type of the enhanced VPN gateway. Valid values:

  • public (default): The gateway connects to the internet.

public

DisasterRecoveryVSwitchId

string

The ID of the secondary vSwitch.

vsw-p0w95ql6tmr2ludkt****

ResourceGroupId

string

The ID of the resource group to which the enhanced VPN gateway belongs.
You can call the ListResourceGroups operation to query the IDs of resource groups.

rg-acfmzs372yg****

EniInstanceIds

object

The elastic network interfaces (ENIs) of the enhanced VPN gateway.

EniInstanceId

array

The list of ENI IDs.

string

The ID of the ENI.

eni-uf6cwkwt0f6zuul5****

GatewayType

string

The type of the enhanced VPN gateway. Only the following value is returned:

  • Enhanced.SiteToSite: an enhanced site-to-site VPN gateway that supports only the IPsec-VPN feature.

Enhanced.SiteToSite

Examples

Success response

JSON format

{
  "VpnType": "Normal",
  "Status": "active",
  "VpcId": "vpc-bp1ub1yt9cvakoel****",
  "CreateTime": 1492753580000,
  "AutoPropagate": true,
  "VpnGatewayId": "vpn-bp1q8bgx4xnkm2ogj****",
  "Tag": "{\"VpnEnableBgp\": true}",
  "VSwitchId": "vsw-bp1y9ovl1cu9ou4tv****",
  "RequestId": "54B48E3D-DF70-471B-AA93-08E683A1B457",
  "EnableBgp": true,
  "Name": "test",
  "Description": "test",
  "Tags": {
    "Tag": [
      {
        "Key": "key1",
        "Value": "val1"
      }
    ]
  },
  "NetworkType": "public",
  "DisasterRecoveryVSwitchId": "vsw-p0w95ql6tmr2ludkt****",
  "ResourceGroupId": "rg-acfmzs372yg****",
  "EniInstanceIds": {
    "EniInstanceId": [
      "eni-uf6cwkwt0f6zuul5****"
    ]
  },
  "GatewayType": "Enhanced.SiteToSite"
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidName The name is not valid
400 InvalidDescription The description is not valid
400 OperationUnsupported.EnableBgp Current version of the VPN does not support enable BGP. The current version of the VPN gateway does not support BGP.
400 OperationFailed.VpnConnectionExist Auto propagate cannot be closed when VPN connections with BGP enabled exist. Auto propagation cannot be closed when VPN connections with BGP enabled exist.
400 InvalidVpnGatewayInstanceId.NotFound The specified vpn gateway instance id does not exist. The specified VPN gateway does not exist. Check whether the specified VPN gateway is valid.
400 VpnGateway.Configuring The specified service is configuring.
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. When the VPC to which the VPN gateway belongs is attached to a FULL-mode CEN, the VPN gateway cannot enable BGP.
400 OperationFailed.VpcRoutePropagationDisable The VPC system routing table does not enable the acceptance of propagated routes. The VPC system route table is not enabled to accept the propagation route.
400 OperationFailed.VpcRoutePublishEnabledInTR A VPC supports at most one dynamic route learning source. In the forwarding router, disable route synchronization for the VPC. A VPC supports at most one dynamic route learning source. In the forwarding router, disable route synchronization for the VPC.
400 OperationFailed.VpcRoutePublishEnabledInECR VPC supports only one dynamic route learning source at most. Please remove the VPC from ECR. A VPC supports at most one dynamic route learning source. Remove the VPC from ECR
400 OperationFailed.BondingVpnNotSupportBGP The architecture does not support BGP capabilities (single tunnel bonding architecture VPN gateway). the architecture does not support the bgp capability (single-tunnel bonding vpn gateway)
400 OperationFailed.StaleBGPRoutes BGP routes are still there and automatic route propagation cannot be disabled. Automatic route propagation cannot be disabled because a BGP route is left.
403 Forbidden.SubUser User not authorized to operate on the specified resource as your account is created by another user. The error message returned because you are unauthorized to perform this operation on the specified resource. Acquire the required permissions and try again.
403 Forbidden User not authorized to operate on the specified resource. You do not have the permissions to manage the specified resource. Apply for the permissions and try again.
404 InvalidVpnGatewayInstanceId.NotFound The specified vpn gateway instance id does not exist.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.