edit-icon download-icon

DescribeVpnConnection

Last Updated: Apr 13, 2018

Description

Query the detailed information of an IPsec connection.

Request parameters

Name Type Required Description
Action String Yes

The action to perform.

Valid value: DescribeVpnConnection

RegionId String Yes

The region of the IPsec connection.

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

VpnConnectionId String Yes The ID of the IPsec connection.

Response parameters

Name Type Description
RequestId String The ID of the request.
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 creation time of the IPsec connection.
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.

Error codes

See VPC API Error Center.

Examples

Request example

  1. https://vpc.aliyuncs.com/?Action=DescribeVpnConnection
  2. &RegionID=cn-beijing
  3. &VpnConnectionId=vco-bp10lz7aejumd2vxoqgev
  4. &<CommonParameters>

Response example

XML format

  1. <DescribeVpnConnectionResponse>
  2. <PageNumber>1</PageNumber>
  3. <VpnConnections>
  4. <VpnConnection>
  5. <Name>c2</Name>
  6. <CustomerGatewayId>cgw-bp1wl8dtz3auwlavwhgcw</CustomerGatewayId>
  7. <Status>ike_sa_not_established</Status>
  8. <RemoteSubnet>192.168.0.0/16</RemoteSubnet>
  9. <IpsecConfig>
  10. <IpsecLifetime>86400</IpsecLifetime>
  11. <IpsecAuthAlg>md5</IpsecAuthAlg>
  12. <IpsecPfs>group2</IpsecPfs>
  13. <IpsecEncAlg>aes</IpsecEncAlg>
  14. </IpsecConfig>
  15. <EffectImmediately>false</EffectImmediately>
  16. <VpnGatewayId>vpn-bp1yfrjxn4d5t63tbqq70</VpnGatewayId>
  17. <CreateTime>1519391420000</CreateTime>
  18. <VpnConnectionId>vco-bp1w3m1p23iftycvseuc2</VpnConnectionId>
  19. <LocalSubnet>172.16.0.0/12</LocalSubnet>
  20. <IkeConfig>
  21. <IkeEncAlg>aes</IkeEncAlg>
  22. <RemoteId>47.97.176.95</RemoteId>
  23. <IkePfs>group2</IkePfs>
  24. <IkeAuthAlg>sha1</IkeAuthAlg>
  25. <Psk>1234567</Psk>
  26. <IkeMode>aggressive</IkeMode>
  27. <IkeLifetime>86400</IkeLifetime>
  28. <IkeVersion>ikev1</IkeVersion>
  29. <LocalId>116.62.119.2</LocalId>
  30. </IkeConfig>
  31. </VpnConnection>
  32. </VpnConnections>
  33. <TotalCount>1</TotalCount>
  34. <PageSize>10</PageSize>
  35. <RequestId>7D598A10-26EF-44F2-9F47-E417842F3CEA</RequestId>
  36. </DescribeVpnConnectionResponse>

JSON format

  1. {
  2. "PageNumber": 1,
  3. "VpnConnections": {
  4. "VpnConnection": [
  5. {
  6. "Name": "c2",
  7. "CustomerGatewayId": "cgw-bp1wl8dtz3auwlavwhgcw",
  8. "Status": "ike_sa_not_established",
  9. "RemoteSubnet": "192.168.0.0/16",
  10. "IpsecConfig": {
  11. "IpsecLifetime": 86400,
  12. "IpsecAuthAlg": "md5",
  13. "IpsecPfs": "group2",
  14. "IpsecEncAlg": "aes"
  15. },
  16. "EffectImmediately": false,
  17. "VpnGatewayId": "vpn-bp1yfrjxn4d5t63tbqq70",
  18. "CreateTime": 1519391420000,
  19. "VpnConnectionId": "vco-bp1w3m1p23iftycvseuc2",
  20. "LocalSubnet": "172.16.0.0/12",
  21. "IkeConfig": {
  22. "IkeEncAlg": "aes",
  23. "RemoteId": "47.97.176.95",
  24. "IkePfs": "group2",
  25. "IkeAuthAlg": "sha1",
  26. "Psk": "1234567",
  27. "IkeMode": "aggressive",
  28. "IkeLifetime": 86400,
  29. "IkeVersion": "ikev1",
  30. "LocalId": "116.62.119.2"
  31. }
  32. }
  33. ]
  34. },
  35. "TotalCount": 1,
  36. "PageSize": 10,
  37. "RequestId": "7D598A10-26EF-44F2-9F47-E417842F3CEA"
  38. }
Thank you! We've received your feedback.