All Products
Search
Document Center

VPN Gateway:DescribeVpnAttachments

Last Updated:Jun 19, 2026

Queries the configuration information of IPsec-VPN connections that are associated with transit router instances.

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

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

vpc:DescribeVpnAttachments

list

*VpnConnections

acs:vpc:{#regionId}:{#accountId}:vpnconnection/{#VpnConnectionId}

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The region ID of the IPsec-VPN connection.

You can call the DescribeRegions operation to query the region ID.

cn-hangzhou

PageNumber

integer

No

The page number of the list. Default value: 1.

1

PageSize

integer

No

The number of entries per page when paging is used. Default value: 10. Valid values: 1 to 50.

10

VpnConnectionId

string

No

The ID of the IPsec-VPN connection.

Note

If you do not specify the IPsec-VPN connection ID, the system queries information about all IPsec-VPN connections that are associated with transit router instances in the current region.

vco-p0w2jpkhi2eeop6q6****

AttachType

string

No

The type of resource to which the IPsec-VPN connection is attached. Default value: CEN.

The value can only be CEN, which indicates that the system queries IPsec-VPN connections that are associated with transit router instances.

CEN

Response elements

Element

Type

Description

Example

object

The response parameters.

RequestId

string

The request ID.

9F0725BB-186A-3564-91C3-AAE48042F853

PageSize

integer

The number of entries per page when paging is used.

10

PageNumber

integer

The page number of the list.

1

TotalCount

integer

The total number of entries.

1

VpnAttachments

array<object>

The list of IPsec-VPN connections that are associated with transit router instances.

array<object>

The information about an IPsec-VPN connection that is associated with a transit router instance.

InstanceId

string

The ID of the IPsec-VPN connection.

vco-p0w2jpkhi2eeop6q6****

Name

string

The name of the IPsec-VPN connection.

nametest1

Description

string

The description of the IPsec-VPN connection.

desctest

AttachType

string

The type of resource to which the IPsec-VPN connection is attached. The value is CEN, which indicates that the IPsec-VPN connection is associated with a transit router instance.

CEN

TransitRouterId

string

The ID of the transit routing instance to which the IPsec-VPN connection is attached.

tr-p0wkh4yryb1dnanqw****

TransitRouterName

string

The name of the transit router instance.

nametest2

CrossAccountAuthorized

boolean

Indicates whether the IPsec-VPN connection is associated with a transit router instance that belongs to a different Alibaba Cloud account.

  • true: yes.

  • false: no.

false

Tag

string

The system tags of the IPsec-VPN connection.

You can use system tags to check whether the IPsec-VPN connection supports BGP. You do not need to pay attention to other properties.

BGPSupport: indicates whether the IPsec-VPN connection supports BGP.

  • true: supported.

  • false: not supported.

{\"description\":\"转发1.7.22\",\"VisuallySsl\":\"true\",\"PbrPriority\":\"true\",\"BGPSupport\":\"true\",\"IDaaSNewVersion\":\"true\"}

Tags

array<object>

The list of tags that are attached to the IPsec-VPN connection.

object

The tag information.

Key

string

The tag key of the IPsec-VPN connection.

TagKey

Value

string

The tag value of the IPsec-VPN connection.

TagValue

TunnelBandwidth

string

The bandwidth specification of a single VPN tunnel. Valid values: Standard (default): standard. The default bandwidth is 1 Gbit/s. Large: large. The default bandwidth is 3 Gbit/s.

Standard

Examples

Success response

JSON format

{
  "RequestId": "9F0725BB-186A-3564-91C3-AAE48042F853",
  "PageSize": 10,
  "PageNumber": 1,
  "TotalCount": 1,
  "VpnAttachments": [
    {
      "InstanceId": "vco-p0w2jpkhi2eeop6q6****",
      "Name": "nametest1",
      "Description": "desctest",
      "AttachType": "CEN",
      "TransitRouterId": "tr-p0wkh4yryb1dnanqw****",
      "TransitRouterName": "nametest2",
      "CrossAccountAuthorized": false,
      "Tag": "{\\\"description\\\":\\\"转发1.7.22\\\",\\\"VisuallySsl\\\":\\\"true\\\",\\\"PbrPriority\\\":\\\"true\\\",\\\"BGPSupport\\\":\\\"true\\\",\\\"IDaaSNewVersion\\\":\\\"true\\\"}",
      "Tags": [
        {
          "Key": "TagKey",
          "Value": "TagValue"
        }
      ],
      "TunnelBandwidth": "Standard"
    }
  ]
}

Error codes

HTTP status code

Error code

Error message

Description

400 Forbidden.TagKey.Duplicated The specified tag key already exists. The tag resources are duplicate.
400 SizeLimitExceeded.TagNum The maximum number of tags is exceeded. The number of tags has reached the upper limit.
400 InvalidParameter.TagValue The specified parameter TagValue is invalid. The error message returned because the specified tag value is invalid.
400 InvalidParameter.TagKey The specified parameter TagKey is invalid. The error message returned because the specified tag key is invalid.
400 Duplicated.TagKey The specified parameter TagKey is duplicated. The error message returned because the specified tag key already exists.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.