查詢已建立的IPsec串連。

請求參數

名稱 類型 是否必須 描述
Action String

要執行的操作。 取值:

DescribeVpnConnections

RegionId String

IPsec串連所在的地域。

您可以通過調用 DescribeRegions介面獲取地域ID。

VpnGatewayId String

VPN網關的ID。

CustomerGatewayId String 使用者網關的ID。
PageNumber Integer

列表的頁碼,預設值為1

PageSize Integer

分頁查詢時每頁的行數,最大值為50,預設值為10

返回參數

名稱 類型 描述
RequestId String 請求ID。
TotalCount String 列表條條目數。
PageNumber Integer 當前頁碼。
PageSize String 每頁包含多少條目。
VpnConnections List IPsec串連列表的詳細資料。
表 1. VpnConnection
名稱 類型 描述
VpnConnectionId String IPsec串連的ID。
CustomerGatewayId String 使用者網關的ID。
VpnGatewayId String VPN網關的ID。
Name String IPsec串連的名稱。
LocalSubnet String VPC側的網段。
RemoteSubnet String 本地IDC側的網段。
CreateTime Long IPsec串連的建立時間。
IkeConfig JSON string 第一階段協商的配置。
IpsecConfig JSON string 第二階段協商的配置。
Status String

IPsec串連的狀態。

  • ike_sa_not_established:表示第一階段協商失敗。

  • ike_sa_established:表示第一階段協商成功。

  • ipsec_sa_not_established:表示第二階段協商失敗。

  • ipsec_sa_established:第二階段協商成功。

樣本

請求樣本

https://vpc.aliyuncs.com/?Action=DescribeVpnConnections
&RegionID=cn-hangzhou
&公共請求參數
返回樣本
  • XML格式

    <?xml version="1.0" encoding="UTF-8" ?>
    <DescribeVpnConnectionsResponse>
        <PageNumber>1</PageNumber>
        <VpnConnections>
            <VpnConnection>
                <Name>vpn串連測試</Name>
                <CustomerGatewayId>cgw-bp1pvpl9r9adju6l5nxck</CustomerGatewayId>
                <RemoteSubnet>2.2.2.0/24</RemoteSubnet>
                <IpsecConfig>
                    <IpsecLifetime>86400</IpsecLifetime>
                    <IpsecAuthAlg>sha1</IpsecAuthAlg>
                    <IpsecPfs>group2</IpsecPfs>
                    <IpsecEncAlg>aes</IpsecEncAlg>
                </IpsecConfig>
                <EffectImmediately>true</EffectImmediately>
                <VpnGatewayId>vpn-bp1q8bgx4xnkm2ogj0fiu</VpnGatewayId>
                <CreateTime>1492753817000</CreateTime>
                <VpnConnectionId>vco-bp10lz7aejumd2vxoqgev</VpnConnectionId>
                <status>ipsec_sa_established
                    <status>
                        <LocalSubnet>1.1.1.0/24,1.1.2.0/24</LocalSubnet>
                        <IkeConfig>
                            <IkeEncAlg>aes</IkeEncAlg>
                            <RemoteId>139.196.32.167</RemoteId>
                            <IkePfs>group2</IkePfs>
                            <IkeAuthAlg>sha1</IkeAuthAlg>
                            <Psk>pgw6dy7d1i8in7x5</Psk>
                            <IkeMode>main</IkeMode>
                            <IkeLifetime>86400</IkeLifetime>
                            <IkeVersion>ikev1</IkeVersion>
                            <LocalId>116.62.69.64</LocalId>
                        </IkeConfig>
                    </VpnConnection>
            </VpnConnections>
            <TotalCount>1</TotalCount>
            <PageSize>10</PageSize>
        <RequestId>3F96DAF2-8A69-4E84-824A-E16E22308703</RequestId>
    </DescribeVpnConnectionsResponse>
  • JSON格式

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