# Describe IPSec Tunnel - DescribeCETunnel

## Overview

Describe IPSec Tunnel






## Definition

### Public Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Action**     | string  | Corresponding API command name, the current API is `DescribeCETunnel`.                      | **Yes** |
| **PublicKey**  | string  | The user's public key can be obtained from [Console](https://console.nubexcloud.com/uaccount/api_manage)                                             | **Yes** |
| **Signature**  | string  | User signature generated based on public key and API command, see [Signature Algorithm](/docs/api/summary/signature.md)  | **Yes** |

### Request Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Region** | string | Region. See [Region and Zone List](/docs/api/summary/regionlist) |No|
| **Zone** | string | Zone. See [Region and Zone List](/docs/api/summary/regionlist) |No|
| **ProjectId** | string | Project ID. Leave it blank for the default project. Sub-accounts must fill in. Please refer to the [GetProjectList API](/docs/api/summary/get_project_list) |No|
| **VPNId** | string | CE gateway ID |No|
| **VPNTunnelId** | string | VPN tunnel ID |No|
| **Offset** | int | Offset |No|
| **Limit** | int | Limit |No|

### Response Field

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **RetCode** | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. |**Yes**|
| **Action** | string | Operation command name. |**Yes**|
| **Message** | string | Returns an error message, providing detailed description when `RetCode` is non-zero. |No|
| **TotalCount** | int | Total Count |**Yes**|
| **VPNTunnelInfos** | array[[*VPNTunnelInfo*](#vpntunnelinfo)] | The list of VPN tunnel info |**Yes**|

#### Data Model


#### VPNTunnelInfo

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Region** | string | Region |No|
| **VPNId** | string | CE gateway ID |No|
| **VPNTunnelId** | string | VPN tunnel ID |No|
| **Name** | string | Tunnel Name |No|
| **Remark** | string | Remark |No|
| **CreateTime** | int | Create Time |No|
| **IKEConf** | [*IKEConf*](#ikeconf) | IKE config |No|
| **IPSecConf** | [*IPSecConf*](#ipsecconf) | IPSec config |No|
| **CloseAction** | string | IPSec close action |No|
| **BGPConf** | [*BGPConf*](#bgpconf) | BGP config |No|
| **Mode** | string | Route  Mode |No|
| **DPDConf** | [*DPDConf*](#dpdconf) | DPD config |No|
| **StartAction** | string | Tunnel start action |No|

#### IKEConf

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **PreSharedKey** | string | PreSharedKey |No|
| **Version** | string | Version |No|
| **ExchangeMode** | string | Exchange Mode |No|
| **EncryptionAlgorithm** | string | Encryption Algorithm |No|
| **AuthenticationAlgorithm** | string | Authentication Algorithm |No|
| **DhGroup** | string | DhGroup |No|
| **LocalId** | string | Local ID |No|
| **RemoteId** | string | Remote ID |No|
| **SALifeTime** | string | SA Life Time |No|

#### IPSecConf

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **CENetwork** | array[string] | Customer CIDR |No|
| **Protocol** | string | Protocol |No|
| **EncryptionAlgorithm** | string | Encryption Algorithm |No|
| **AuthenticationAlgorithm** | string | Authentication Algorithm |No|
| **PFSDhGroup** | string | The Diffie-Hellman key exchange algorithm used in the second phase negotiation |No|
| **SALifeTime** | string | the SA lifetime determined by Phase 2 negotiations. |No|
| **SALifetimeBytes** | string | The lifespan of the SA negotiated in the second phase. Unit: bytes (KB). |No|

#### BGPConf

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **TunnelCidr** | string | BGP tunnel cidr |No|
| **LocalAsn** | int | Local ASN number |No|
| **PeerAsn** | int | Remote ASN number |No|
| **LocalIp** | string | Local BGP IP |No|
| **PeerIp** | string | Remote BGP IP |No|

#### DPDConf

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Enabled** | int | enable DPD |**Yes**|
| **Action** | string | DPD Action |**Yes**|
| **Delay** | int | dpd_delay |**Yes**|
| **Timeout** | int | dpd_timeout |**Yes**|

## Example

### Request Example
    
```
https://api.nubexcloud.com/?Action=DescribeCETunnel
&Region=cn-zj
&Zone=cn-zj-01
&ProjectId=cPhzWCSM
&VPNId=NwIBmeCO
&VPNTunnelId=TzGXsJZe
&Offset=8
&Limit=7
```

### Response Example
    
```json
{
  "Action": "DescribeCETunnelResponse",
  "Message": "pRdXCzZp",
  "RetCode": 0,
  "TotalCount": 9,
  "VPNTunnelInfos": [
    {
      "CloseAction": "HTVuuKpu",
      "CreateTime": 1,
      "IKEConf": {},
      "IPSecConf": {},
      "Name": "KWICNutf",
      "Remark": "MxIeSPzs",
      "VPNId": "ghjjFyaH",
      "VPNTunnelId": "KZUcuUKg"
    }
  ]
}
```





