All Products
Search
Document Center

VPN Gateway:DescribeVpnConnection

Last Updated:Jun 12, 2026

Memanggil antarmuka DescribeVpnConnection untuk mengkueri informasi koneksi IPsec yang ditentukan.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tidak ada otorisasi untuk operasi ini. Jika Anda mengalami masalah saat menjalankan operasi ini, hubungi dukungan teknis.

Parameter permintaan

Parameter

Type

Required

Description

Example

RegionId

string

Yes

ID region tempat koneksi IPsec berada.

Anda dapat memperoleh ID region dengan memanggil antarmuka DescribeRegions.

cn-hangzhou

VpnConnectionId

string

Yes

ID koneksi IPsec.

vco-bp1bbi27hojx80nck****

Elemen respons

Element

Type

Description

Example

object

Hasil pengembalian.

Status

string

Status koneksi IPsec.

  • ike_sa_not_established: Negosiasi tahap pertama gagal.

  • ike_sa_established: Negosiasi tahap pertama berhasil.

  • ipsec_sa_not_established: Negosiasi tahap kedua gagal.

  • ipsec_sa_established: Negosiasi tahap kedua berhasil.

ike_sa_not_established

RemoteCaCertificate

string

Sertifikat CA peer.

-----BEGIN CERTIFICATE----- MIIB7zCCAZW****

EnableNatTraversal

boolean

Apakah fitur NAT traversal telah diaktifkan untuk koneksi IPsec.

  • true: Aktifkan fitur NAT traversal.

  • false: Jangan aktifkan fitur NAT traversal.

Setelah fitur NAT traversal diaktifkan, proses negosiasi IKE akan menghapus proses verifikasi nomor port UDP, sekaligus mengimplementasikan fungsi penemuan perangkat NAT gateway dalam tunnel VPN.

true

CreateTime

integer

Stempel waktu pembuatan koneksi IPsec. Satuan: milidetik.

Format stempel waktu menggunakan stempel waktu Unix, yang menunjukkan total durasi dari Greenwich Mean Time 01 Januari 1970 pukul 00:00:00 hingga saat koneksi IPsec dibuat.

1492753817000

EffectImmediately

boolean

Apakah konfigurasi koneksi IPsec segera berlaku.

  • true: Ya, koneksi ulang dipicu setelah perubahan konfigurasi selesai.

  • false: Tidak, koneksi ulang dipicu saat ada lalu lintas.

true

VpnGatewayId

string

ID instance gateway VPN.

vpn-bp1q8bgx4xnkm2ogj****

LocalSubnet

string

Segmen jaringan sisi Alibaba Cloud dari koneksi IPsec.

Dalam kasus beberapa segmen jaringan, segmen jaringan dipisahkan dengan koma (,).

10.0.0.0/8

RequestId

string

ID permintaan.

F2310D45-BCF6-4E2E-9082-B4503844BA4C

VpnConnectionId

string

ID koneksi IPsec.

vco-bp1bbi27hojx80nck****

RemoteSubnet

string

Segmen jaringan sisi pusat data lokal.

Dalam kasus beberapa segmen jaringan, segmen jaringan dipisahkan dengan koma (,).

192.168.0.0/16

CustomerGatewayId

string

ID gateway pelanggan yang terkait dengan koneksi IPsec.

cgw-bp1mvj4g9kogwwcxk****

Name

string

Nama koneksi IPsec.

ipsec1

EnableDpd

boolean

Apakah fitur DPD (Dead Peer Detection) telah diaktifkan untuk koneksi IPsec.

  • false: Tidak diaktifkan.

  • true: Diaktifkan.

Setelah fitur DPD diaktifkan, inisiator IPsec akan mengirim paket DPD untuk mendeteksi apakah perangkat peer masih aktif. Jika tidak menerima respons yang benar dalam waktu yang ditentukan, peer dianggap terputus, IPsec akan menghapus ISAKMP SA dan IPsec SA yang sesuai, dan tunnel keamanan juga akan dihapus.

true

IkeConfig

object

Konfigurasi negosiasi tahap pertama.

RemoteId

string

Identifikasi sisi pusat data lokal dari koneksi IPsec.

139.34.XX.XX

IkeLifetime

integer

Waktu hidup tahap IKE. Satuan: detik.

86400

IkeEncAlg

string

Algoritma enkripsi tahap IKE.

aes

LocalId

string

Identifikasi sisi Alibaba Cloud dari koneksi IPsec.

116.28.XX.XX

IkeMode

string

Mode negosiasi IKE.

  • main: Mode utama, proses negosiasi memiliki keamanan tinggi.

  • aggressive: Mode agresif, negosiasi cepat dan tingkat keberhasilan negosiasi tinggi.

main

IkeVersion

string

Versi protokol IKE.

  • ikev1

  • ikev2

Dibandingkan dengan versi IKEv1, versi IKEv2 menyederhanakan proses negosiasi SA dan memberikan dukungan yang lebih baik untuk skenario multi-segmen jaringan.

ikev1

IkePfs

string

Grup DH tahap IKE.

group2

Psk

string

Kunci pra-bagi (pre-shared key).

pgw6dy****

IkeAuthAlg

string

Algoritma autentikasi tahap IKE.

sha1

IpsecConfig

object

Konfigurasi negosiasi tahap kedua.

IpsecAuthAlg

string

Algoritma autentikasi tahap IPsec.

sha1

IpsecLifetime

integer

Waktu hidup tahap IPsec. Satuan: detik.

86400

IpsecEncAlg

string

Algoritma enkripsi tahap IPsec.

aes

IpsecPfs

string

Grup DH tahap IPsec.

group2

VcoHealthCheck

object

Informasi pemeriksaan kesehatan koneksi IPsec.

Status

string

Status pemeriksaan kesehatan.

  • failed: Tidak normal.

  • success: Normal.

failed

Dip

string

Alamat IP tujuan.

10.0.0.1

Interval

integer

Interval waktu retry pemeriksaan kesehatan, satuan: detik.

3

Retry

integer

Jumlah retry pengiriman paket pemeriksaan kesehatan.

3

Sip

string

Alamat IP sumber.

192.168.1.1

Enable

string

Apakah pemeriksaan kesehatan telah diaktifkan untuk koneksi IPsec.

  • false: Tidak diaktifkan.

  • true: Diaktifkan.

true

Policy

string

Apakah mencabut rute yang telah diumumkan saat pemeriksaan kesehatan gagal.

  • revoke_route: Cabut rute.

  • reserve_route: Jangan cabut rute.

revoke_route

VpnBgpConfig

object

Informasi konfigurasi protokol routing BGP koneksi IPsec.

Status

string

Status negosiasi protokol routing BGP.

  • success: Normal.

  • failed: Tidak normal.

success

PeerBgpIp

string

Alamat BGP peer.

169.254.11.1

TunnelCidr

string

Segmen jaringan BGP koneksi IPsec. Segmen jaringan ini adalah segmen jaringan dengan panjang subnet mask 30 dalam 169.254.0.0/16.

169.254.11.0/30

EnableBgp

string

Status pengaktifan protokol routing BGP.

  • true: Diaktifkan.

  • false: Tidak diaktifkan.

true

LocalBgpIp

string

Alamat BGP sisi Alibaba Cloud.

169.254.11.2

PeerAsn

integer

Nomor sistem otonom peer.

65530

LocalAsn

integer

Nomor sistem otonom sisi Alibaba Cloud.

65531

AuthKey

string

Kunci autentikasi protokol routing BGP.

AuthKey****

AttachType

string

Jenis sumber daya yang terikat dengan koneksi IPsec.

  • CEN: Menunjukkan bahwa koneksi IPsec telah terikat dengan instance transit router di bawah instance Cloud Enterprise Network.

  • NO_ASSOCIATED: Menunjukkan bahwa koneksi IPsec tidak terikat dengan sumber daya apa pun.

  • VPNGW: Menunjukkan bahwa koneksi IPsec terikat dengan instance gateway VPN.

CEN

NetworkType

string

Jenis jaringan koneksi IPsec.

  • public: Jaringan publik, menunjukkan bahwa koneksi IPsec membuat saluran komunikasi terenkripsi melalui jaringan publik.

  • private: Jaringan pribadi, menunjukkan bahwa koneksi IPsec membuat saluran komunikasi terenkripsi melalui jaringan pribadi.

public

AttachInstanceId

string

ID instance Cloud Enterprise Network tempat instance transit router berada.

cen-lxxpbpalc776qz****

Spec

string

Spesifikasi bandwidth koneksi IPsec. Satuan: Mbps.

1000M

State

string

Status pengikatan koneksi IPsec dengan instance transit router.

  • active: Koneksi IPsec telah terikat dengan instance gateway VPN, status normal.

  • init: Koneksi IPsec tidak terikat dengan sumber daya apa pun, inisialisasi koneksi IPsec.

  • attaching: Koneksi IPsec sedang dalam proses pengikatan dengan instance transit router.

  • attached: Koneksi IPsec telah terikat dengan instance transit router.

  • detaching: Koneksi IPsec sedang dalam proses pelepasan ikatan dengan instance transit router.

  • financialLocked: Terkunci karena tunggakan pembayaran.

  • provisioning: Sumber daya sedang dipersiapkan.

  • updating: Sedang diperbarui.

  • upgrading: Sedang ditingkatkan.

  • deleted: Telah dihapus.

attached

ZoneNo

string

ID zona ketersediaan tempat koneksi IPsec di-deploy.

Anda dapat memanggil antarmuka DescribeZones untuk mengkueri korespondensi antara ID zona ketersediaan dan zona ketersediaan.

cn-hangzhou-h

InternetIp

string

Alamat IP gateway koneksi IPsec.

47.XX.XX.162

TransitRouterId

string

ID instance transit router yang terikat dengan koneksi IPsec.

tr-p0we2edef9qr44a85****

TransitRouterName

string

Nama instance transit router.

nametest

CrossAccountAuthorized

boolean

Apakah koneksi IPsec terikat dengan instance transit router lintas akun.

  • true: Ya.

  • false: Tidak.

false

Tags

object

Tag

array<object>

Daftar tag yang terikat dengan koneksi IPsec.

object

Informasi tag.

Key

string

The CA certificate of the tunnel peer.

This parameter is returned only if the VPN gateway is of the ShangMi (SM) type.

TagKey

Value

string

The tunnel role. Valid values:

  • master: The tunnel is an active tunnel.

  • slave: The tunnel is a standby tunnel.

TagValue

TunnelOptionsSpecification

object

TunnelOptions

array<object>

Informasi konfigurasi tunnel koneksi IPsec.

Parameter di bawah array TunnelOptionsSpecification hanya akan dikembalikan saat mengkueri koneksi IPsec dalam mode dual-tunnel.

array<object>

Informasi konfigurasi tunnel.

TunnelId

string

The state of the IPsec-VPN connection. Valid values:

  • ike_sa_not_established: Phase 1 negotiations failed.

  • ike_sa_established: Phase 1 negotiations succeeded.

  • ipsec_sa_not_established: Phase 2 negotiations failed.

  • ipsec_sa_established: Phase 2 negotiations succeeded.

tun-opsqc4d97wni27****

CustomerGatewayId

string

The BGP configurations.

cgw-p0wy363lucf1uyae8****

EnableDpd

string

The negotiation state of BGP. Valid values:

  • success

  • false

true

EnableNatTraversal

string

The ASN on the Alibaba Cloud side.

true

InternetIp

string

The BGP address on the Alibaba Cloud side.

47.21.XX.XX

RemoteCaCertificate

string

The ASN of the tunnel peer.

-----BEGIN CERTIFICATE----- MIIB7zCCAZW**** -----END CERTIFICATE-----

Role

string

The BGP IP address of the tunnel peer.

master

TunnelIndex

integer

The BGP CIDR block of the tunnel.

1

State

string

The configuration of Phase 1 negotiations.

active

Status

string

The authentication algorithm in the IKE phase.

ipsec_sa_established

TunnelBgpConfig

object

The encryption algorithm in the IKE phase.

BgpStatus

string

The lifetime in the IKE phase. Unit: seconds.

success

LocalAsn

string

The IKE negotiation mode.

  • main: This mode offers higher security during negotiations.

  • aggressive: This mode is faster and has a higher success rate.

65530

LocalBgpIp

string

The Diffie-Hellman (DH) group in the IKE phase.

169.254.10.1

PeerAsn

string

The version of the IKE protocol.

65531

PeerBgpIp

string

The identifier of the tunnel on the Alibaba Cloud side.

169.254.10.2

TunnelCidr

string

The pre-shared key.

169.254.10.0/30

TunnelIkeConfig

object

The identifier of the tunnel peer.

IkeAuthAlg

string

The configurations of Phase 2 negotiations.

sha1

IkeEncAlg

string

The authentication algorithm in the IPsec phase.

aes

IkeLifetime

string

The encryption algorithm in the IPsec phase.

86400

IkeMode

string

The lifetime in the IPsec phase. Unit: seconds.

main

IkePfs

string

The DH group in the IPsec phase.

group2

IkeVersion

string

The zone where the tunnel is deployed.

You can call DescribeZones to query zone IDs.

ikev1

LocalId

string

Indicates whether BGP is enabled for the tunnel. Valid values:

  • true

  • false

47.21.XX.XX

Psk

string

The ID of the resource group to which the IPsec-VPN connection belongs.

You can call the ListResourceGroups operation to query the resource group information.

123456****

RemoteId

string

The identifier of the tunnel peer.

47.42.XX.XX

TunnelIpsecConfig

object

Theconfigurations of Phase 2 negotiations.

IpsecAuthAlg

string

The authentication algorithm in the IPsec phase.

sha1

IpsecEncAlg

string

The encryption algorithm in the IPsec phase.

aes

IpsecLifetime

string

The lifetime in the IPsec phase. Unit: seconds.

86400

IpsecPfs

string

The DH group in the IPsec phase.

group2

ZoneNo

string

The tunnel zone.

cn-hangzhou-i

EnableTunnelsBgp

boolean

Status pengaktifan BGP tunnel.

  • true: Diaktifkan.

  • false: Tidak diaktifkan.

true

ResourceGroupId

string

ID grup sumber daya tempat koneksi IPsec berada.

Anda dapat memanggil antarmuka ListResourceGroups untuk mengkueri informasi grup sumber daya.

rg-acfmzs372yg****

TunnelBandwidth

string

Digunakan untuk menjelaskan spesifikasi bandwidth tunnel VPN tunggal, nilai: Standard (nilai default): Tipe standar, bandwidth default 1Gbps Large (besar): Besar, bandwidth default 3Gbps

Standard

Contoh

Respons sukses

JSONformat

{
  "Status": "ike_sa_not_established",
  "RemoteCaCertificate": "-----BEGIN CERTIFICATE----- MIIB7zCCAZW****",
  "EnableNatTraversal": true,
  "CreateTime": 1492753817000,
  "EffectImmediately": true,
  "VpnGatewayId": "vpn-bp1q8bgx4xnkm2ogj****",
  "LocalSubnet": "10.0.0.0/8",
  "RequestId": "F2310D45-BCF6-4E2E-9082-B4503844BA4C",
  "VpnConnectionId": "vco-bp1bbi27hojx80nck****",
  "RemoteSubnet": "192.168.0.0/16",
  "CustomerGatewayId": "cgw-bp1mvj4g9kogwwcxk****",
  "Name": "ipsec1",
  "EnableDpd": true,
  "IkeConfig": {
    "RemoteId": "139.34.XX.XX",
    "IkeLifetime": 86400,
    "IkeEncAlg": "aes",
    "LocalId": "116.28.XX.XX",
    "IkeMode": "main",
    "IkeVersion": "ikev1",
    "IkePfs": "group2",
    "Psk": "pgw6dy****",
    "IkeAuthAlg": "sha1"
  },
  "IpsecConfig": {
    "IpsecAuthAlg": "sha1",
    "IpsecLifetime": 86400,
    "IpsecEncAlg": "aes",
    "IpsecPfs": "group2"
  },
  "VcoHealthCheck": {
    "Status": "failed",
    "Dip": "10.0.0.1",
    "Interval": 3,
    "Retry": 3,
    "Sip": "192.168.1.1",
    "Enable": "true",
    "Policy": "revoke_route"
  },
  "VpnBgpConfig": {
    "Status": "success",
    "PeerBgpIp": "169.254.11.1",
    "TunnelCidr": "169.254.11.0/30",
    "EnableBgp": "true",
    "LocalBgpIp": "169.254.11.2",
    "PeerAsn": 65530,
    "LocalAsn": 65531,
    "AuthKey": "AuthKey****"
  },
  "AttachType": "CEN",
  "NetworkType": "public",
  "AttachInstanceId": "cen-lxxpbpalc776qz****",
  "Spec": "1000M",
  "State": "attached",
  "ZoneNo": "cn-hangzhou-h",
  "InternetIp": "47.XX.XX.162",
  "TransitRouterId": "tr-p0we2edef9qr44a85****",
  "TransitRouterName": "nametest",
  "CrossAccountAuthorized": false,
  "Tags": {
    "Tag": [
      {
        "Key": "TagKey",
        "Value": "TagValue"
      }
    ]
  },
  "TunnelOptionsSpecification": {
    "TunnelOptions": [
      {
        "TunnelId": "tun-opsqc4d97wni27****",
        "CustomerGatewayId": "cgw-p0wy363lucf1uyae8****",
        "EnableDpd": "true",
        "EnableNatTraversal": "true",
        "InternetIp": "47.21.XX.XX",
        "RemoteCaCertificate": "-----BEGIN CERTIFICATE----- MIIB7zCCAZW**** -----END CERTIFICATE-----",
        "Role": "master",
        "TunnelIndex": 1,
        "State": "active",
        "Status": "ipsec_sa_established",
        "TunnelBgpConfig": {
          "BgpStatus": "success",
          "LocalAsn": "65530",
          "LocalBgpIp": "169.254.10.1",
          "PeerAsn": "65531",
          "PeerBgpIp": "169.254.10.2",
          "TunnelCidr": "169.254.10.0/30"
        },
        "TunnelIkeConfig": {
          "IkeAuthAlg": "sha1",
          "IkeEncAlg": "aes",
          "IkeLifetime": "86400",
          "IkeMode": "main",
          "IkePfs": "group2",
          "IkeVersion": "ikev1",
          "LocalId": "47.21.XX.XX",
          "Psk": "123456****",
          "RemoteId": "47.42.XX.XX"
        },
        "TunnelIpsecConfig": {
          "IpsecAuthAlg": "sha1",
          "IpsecEncAlg": "aes",
          "IpsecLifetime": "86400",
          "IpsecPfs": "group2"
        },
        "ZoneNo": "cn-hangzhou-i"
      }
    ]
  },
  "EnableTunnelsBgp": true,
  "ResourceGroupId": "rg-acfmzs372yg****",
  "TunnelBandwidth": "Standard"
}

Kode kesalahan

HTTP status code

Error code

Error message

Description

403 Forbbiden.SubUser User not authorized to operate on the specified resource as your account is created by another user.
403 Forbidden User not authorized to operate on the specified resource.
404 InvalidVpnConnectionInstanceId.NotFound The specified vpn connection instance id does not exist.

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.