All Products
Search
Document Center

Virtual Private Cloud:DescribeVpnAttachments

Last Updated:Apr 02, 2024

Queries the IPsec-VPN connections associated with a transit router.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
vpc:DescribeVpnAttachmentsRead
  • VpnConnections
    acs:vpc:{#regionId}:{#accountId}:vpnconnection/{#VpnConnectionId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The ID of the region where the IPsec-VPN connection is established.

You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou
PageNumberintegerNo

The page number. Default value: 1.

1
PageSizeintegerNo

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

10
VpnConnectionIdstringNo

The ID of the IPsec-VPN connection.

Note If you do not specify an IPsec-VPN connection ID, all IPsec-VPN connections associated with a transit router in the region are queried.
vco-p0w2jpkhi2eeop6q6****
AttachTypestringNo

The type of resource that is associated with the IPsec-VPN connection. Default value: CEN.

Set the value to CEN, which specifies to query IPsec-VPN connections associated with the transit router.

CEN

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

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

The number of entries per page.

10
PageNumberinteger

The page number.

1
TotalCountinteger

The number of returned entries.

1
VpnAttachmentsobject []

The list of IPsec-VPN connections associated with the transit router.

InstanceIdstring

The ID of the IPsec-VPN connection.

vco-p0w2jpkhi2eeop6q6****
Namestring

The name of the IPsec-VPN connection.

nametest1
Descriptionstring

The description of the IPsec-VPN connection.

desctest
AttachTypestring

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

CEN
TransitRouterIdstring

The ID of the transit router with which the IPsec-VPN connection is associated.

tr-p0wkh4yryb1dnanqw****
TransitRouterNamestring

The name of the transit router.

nametest2
CrossAccountAuthorizedboolean

Indicates whether the IPsec-VPN connection is associated with a transit router that belongs to another Alibaba Cloud account. Valid values:

  • true
  • false
false

Examples

Sample success responses

JSONformat

{
  "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
    }
  ]
}

Error codes

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

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history