All Products
Search
Document Center

VPN Gateway:ListIpsecServers

Last Updated:Aug 07, 2026

Queries the IPsec servers that have been created.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

vpc:ListIpsecServers

list

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The region ID of the IPsec server.

You can call the DescribeRegions operation to query the region ID.

cn-hangzhou

IpsecServerName

string

No

The name of the IPsec server.

The name must be 1 to 100 characters in length.

test

VpnGatewayId

string

No

The ID of the VPN gateway.

vpn-bp1q8bgx4xnkm2ogj****

NextToken

string

No

The pagination token. Valid values:

  • You do not need to specify this parameter for the first request or if no subsequent query exists.

  • If a subsequent query exists, set the value to the NextToken value returned by the previous API call.

caeba0bbb2be03f84eb48b699f0a****

MaxResults

integer

No

The number of entries per page. Valid values: 1 to 20. Default value: 10.

10

IpsecServerId

array

No

The ID of the IPsec server.

iss-bp1bo3xuvcxo7ixll****

string

No

The ID of the IPsec server. Valid values of N: 1 to 20.

iss-bp1bo3xuvcxo7ixll****

ResourceGroupId

string

No

The ID of the resource group to which the IPsec server belongs.

The IPsec server belongs to the same resource group as the associated VPN gateway instance. You can call the DescribeVpnGateway operation to query the resource group ID of the VPN gateway instance.

rg-acfmzs372yg****

Response elements

Element

Type

Description

Example

object

NextToken

string

The pagination token. Valid values:

  • If NextToken is empty, no subsequent query exists.

  • If NextToken is returned, the value indicates the token for the next query.

caeba0bbb2be03f84eb48b699f0a****

RequestId

string

The request ID.

54B48E3D-DF70-471B-AA93-08E683A1B457

TotalCount

integer

The total number of entries returned.

10

MaxResults

integer

The number of entries per page.

1

IpsecServers

array<object>

The list of IPsec servers.

array<object>

CreationTime

string

The time when the IPsec server was created.

T is the delimiter. Z indicates UTC.

2018-12-03T10:11:55Z

OnlineClientCount

integer

The number of clients that are connected to the IPsec server.

1

InternetIp

string

The public IP address of the VPN gateway.

47.22.XX.XX

IpsecServerName

string

The name of the IPsec server.

test

IDaaSInstanceId

string

The instance ID of IDaaS.

idaas-cn-hangzhou-****

EffectImmediately

boolean

Indicates whether the current IPsec tunnel is deleted and negotiations are reinitiated.

  • true: Negotiations are reinitiated after the configuration is complete.

  • false: Negotiations are reinitiated when traffic is detected.

false

VpnGatewayId

string

The ID of the VPN gateway.

vpn-bp1q8bgx4xnkm2ogj****

LocalSubnet

string

The local CIDR block, which is the VPC-side CIDR block that needs to communicate with the client CIDR block.

192.168.0.0/16,172.17.0.0/16

Psk

string

The pre-shared key.

pgw6dy7d****

RegionId

string

The region ID of the IPsec server.

cn-hangzhou

PskEnabled

boolean

Indicates whether pre-shared key authentication is enabled. The value is true, which indicates that pre-shared key authentication is enabled.

true

IpsecServerId

string

The ID of the IPsec server.

iss-bp1bo3xuvcxo7ixll****

MultiFactorAuthEnabled

boolean

Indicates whether two-factor authentication is enabled.

  • true: Two-factor authentication is enabled.

  • false: Two-factor authentication is disabled.

true

MaxConnections

integer

The maximum number of SSL-VPN connections supported by the VPN gateway.

Note

SSL-VPN and the IPsec server share the SSL-VPN connections. For example, if the maximum number of SSL-VPN connections is 5 and three SSL clients are connected to SSL-VPN, only two more clients can connect to the IPsec server.

5

ClientIpPool

string

The client CIDR block, which is the CIDR block from which IP addresses are assigned to the virtual network interface controllers of clients.

10.0.0.0/24

IkeConfig

object

The configurations of Phase 1 negotiations.

RemoteId

string

The identifier of the peer. FQDN and IP address formats are supported. The default value is empty.

139.67.XX.XX

IkeLifetime

integer

The IKE lifetime. Unit: seconds.

86400

IkeEncAlg

string

The IKE encryption algorithm.

aes

LocalId

string

The identifier of the IPsec server. FQDN and IP address formats are supported. The default value is the public IP address of the selected VPN gateway.

116.64.XX.XX

IkeMode

string

The IKE negotiation mode. Valid values:

main: main mode. Negotiations are highly secure.

main

IkeVersion

string

The IKE version.

ikev2

IkePfs

string

The Diffie-Hellman key exchange algorithm.

group2

IkeAuthAlg

string

The IKE authentication algorithm.

sha1

IpsecConfig

object

The configurations of Phase 2 negotiations.

IpsecAuthAlg

string

The IPsec authentication algorithm.

sha1

IpsecLifetime

integer

The IPsec lifetime. Unit: seconds.

86400

IpsecEncAlg

string

The IPsec encryption algorithm.

aes

IpsecPfs

string

The Diffie-Hellman key exchange algorithm.

group2

ResourceGroupId

string

The ID of the resource group to which the IPsec server belongs.

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

rg-acfmzs372yg****

Examples

Success response

JSON format

{
  "NextToken": "caeba0bbb2be03f84eb48b699f0a****",
  "RequestId": "54B48E3D-DF70-471B-AA93-08E683A1B457",
  "TotalCount": 10,
  "MaxResults": 1,
  "IpsecServers": [
    {
      "CreationTime": "2018-12-03T10:11:55Z",
      "OnlineClientCount": 1,
      "InternetIp": "47.22.XX.XX",
      "IpsecServerName": "test",
      "IDaaSInstanceId": "idaas-cn-hangzhou-****",
      "EffectImmediately": false,
      "VpnGatewayId": "vpn-bp1q8bgx4xnkm2ogj****",
      "LocalSubnet": "192.168.0.0/16,172.17.0.0/16",
      "Psk": "pgw6dy7d****",
      "RegionId": "cn-hangzhou",
      "PskEnabled": true,
      "IpsecServerId": "iss-bp1bo3xuvcxo7ixll****",
      "MultiFactorAuthEnabled": true,
      "MaxConnections": 5,
      "ClientIpPool": "10.0.0.0/24",
      "IkeConfig": {
        "RemoteId": "139.67.XX.XX",
        "IkeLifetime": 86400,
        "IkeEncAlg": "aes",
        "LocalId": "116.64.XX.XX",
        "IkeMode": "main",
        "IkeVersion": "ikev2",
        "IkePfs": "group2",
        "IkeAuthAlg": "sha1"
      },
      "IpsecConfig": {
        "IpsecAuthAlg": "sha1",
        "IpsecLifetime": 86400,
        "IpsecEncAlg": "aes",
        "IpsecPfs": "group2"
      },
      "ResourceGroupId": "rg-acfmzs372yg****"
    }
  ]
}

Error codes

HTTP status code

Error code

Error message

Description

400 IllegalParam.NextToken The specified NextToken is invalid. The specified NextToken is invalid.
403 Forbidden User not authorized to operate on the specified resource. You do not have the permissions to manage the specified resource. Apply for the permissions and try again.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.