Query created IPsec connections.

Request parameters

Name Type Required Description
Action String Yes

The action to perform. Valid value:


RegionId String Yes

The region of the IPsec connection.

You can obtain the region ID by calling the DescribeRegions API.

VpnGatewayId String No

The ID of the VPN gateway.

CustomerGatewayId String No The ID of the customer gateway.
PageNumber Integer No

The number of pages to return. The default value is 1.

PageSize Integer No

The number of rows per page. The maximum value is 50 and the default value is 10.

Response parameters

Name Type Description
RequestId String The ID of the request.
TotalCount String The number of queried entries.
PageNumber Integer The current page number.
PageSize String The number of entries on the current page.
VpnConnections List A list of IPsec connections.
Table 1. VpnConnection
Name Type Description
VpnConnectionId String The ID of the IPsec connection.
CustomerGatewayId String The ID of the customer gateway.
VpnGatewayId String The ID of the VPN gateway.
Name String The name of the IPsec connection.
LocalSubnet String The CIDR block of the VPC.
RemoteSubnet String The CIDR block of the local data center.
CreateTime Long The time when the IPsec connection was created.
IkeConfig JSON string Configurations of phase-one negotiation.
IpsecConfig JSON string Configurations of phase-two negotiation.
Status String

The status of IPsec connection.

  • ike_sa_not_established: The phase-one negotiation fails.

  • ike_sa_established: The phase-one negotiation succeeds.

  • ipsec_sa_not_established: The phase-two negotiation fails.

  • ipsec_sa_established: The phase-two negotiation succeeds.


Request example

Response example
  • XML format

    <? xml version="1.0" encoding="UTF-8" ? >
                <Name>vpn connection test</Name>
  • JSON format

      "PageNumber": 1,
      "VpnConnections": {
        "VpnConnection": [
            "Name": "vpn connection test",
            "CustomerGatewayId": "cgw-bp1pvpl9r9adju6l5nxck",
            "RemoteSubnet": "",
            "IpsecConfig": {
              "IpsecLifetime": 86400,
              "IpsecAuthAlg": "sha1",
              "IpsecPfs": "group2",
              "IpsecEncAlg": "aes"
            "EffectImmediately": true,
            "VpnGatewayId": "vpn-bp1q8bgx4xnkm2ogj0fiu",
            "CreateTime": 1492753817000,
            "VpnConnectionId": "vco-bp10lz7aejumd2vxoqgev",
            "status": "ipsec_sa_established",
            "LocalSubnet": ",",
            "IkeConfig": {
              "IkeEncAlg": "aes",
              "RemoteId": "",
              "IkePfs": "group2",
              "IkeAuthAlg": "sha1",
              "Psk": "pgw6dy7d1i8in7x5",
              "IkeMode": "main",
              "IkeLifetime": 86400,
              "IkeVersion": "ikev1",
              "LocalId": ""
      "TotalCount": 1,
      "PageSize": 10,
      "RequestId": "54A4B3D0-DF4D-4C54-B8DC-5DC8DD49C939"