All Products
Search
Document Center

:UpdateEnhancedVpnGateway

Last Updated:May 13, 2026

Call UpdateEnhancedVpnGateway to modify the name, description, or automatic route propagation of an enhanced VPN gateway.

Operation description

  • UpdateEnhancedVpnGateway is an asynchronous API. A call returns information about the Enhanced VPN Gateway, but the configuration is updated in the background. You can call DescribeVpnGateway to check the status of the update:
    • If the Enhanced VPN Gateway's status is updating, the configuration update is in progress.

    • If the Enhanced VPN Gateway's status is active, the configuration update is complete.

  • UpdateEnhancedVpnGateway does not support concurrent updates on 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 ID of the region where the enhanced VPN gateway is located. You can call the DescribeRegions operation to obtain the region ID.

cn-hangzhou

ClientToken

string

No

The client token that is used to ensure the idempotence of the request.

You can generate a token from your client to make sure that the token is unique among different requests. The client token can contain only ASCII characters.

Note

If you do not specify a ClientToken, the system automatically uses the RequestId of the API request as the ClientToken. Each API request has a different RequestId.

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 in length, and can contain letters, digits, underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.

myvpn

Description

string

No

The new description of the enhanced VPN gateway.

The description must be 1 to 100 characters in length.

test

AutoPropagate

boolean

No

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

  • true
    The enhanced VPN gateway automatically learns system routes from the system route table of the VPC and propagates routes from the on-premises data center to the system route table of the VPC.

  • false
    Automatic route propagation is disabled. Before you disable this feature, make sure that BGP dynamic routing is disabled for all IPsec-VPN connections of the enhanced VPN gateway.

true

Response elements

Element

Type

Description

Example

object

The response data.

VpnType

string

The type of the Enhanced VPN Gateway.

  • Normal (default): standard type.

Normal

Status

string

The status of the Enhanced VPN Gateway.

  • init: The gateway is being initialized.

  • provisioning: The gateway is being provisioned.

  • active: The gateway is active.

  • updating: The gateway is being updated.

  • deleting: The gateway is being deleted.

active

VpcId

string

The ID of the VPC to which the Enhanced VPN Gateway belongs.

vpc-bp1ub1yt9cvakoel****

CreateTime

integer

The timestamp when the Enhanced VPN Gateway was created. Unit: milliseconds.
This value is a Unix timestamp that represents the number of milliseconds that have elapsed 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 indicates the features supported by 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: Enabled.

  • false: 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 of the Enhanced VPN Gateway.

Tag

array<object>

A list of tags.

object

The details of the 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): a public gateway.

public

DisasterRecoveryVSwitchId

string

The ID of the second vSwitch with which the Enhanced VPN Gateway is associated.

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 details of resource groups.

rg-acfmzs372yg****

EniInstanceIds

object

The ENIs created for the Enhanced VPN Gateway.

EniInstanceId

array

The list of ENI IDs.

string

The ENI ID.

eni-uf6cwkwt0f6zuul5****

GatewayType

string

The type of the Enhanced VPN Gateway. Only Enhanced.SiteToSite is returned, which indicates an enhanced site-to-site VPN gateway that supports only the IPsec-VPN feature.

  • Enhanced.SiteToSite, an enhanced site-to-cloud VPN that supports only the IPsec 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.