Updated on 2026-10-22 GMT+08:00

Querying the VPN Access Policy List

Function

This API is used to query the list of VPN access policies on a VPN server with a specified ID.

Calling Method

For details, see Calling APIs.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.

  • If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, the following identity policy-based permissions are required.

Action

Access Level

Resource Type (*: required)

Condition Key

Alias

Dependencies

vpn:p2cVpnGateway:listAccessPolicies

list

p2cVpnGateway

g:ResourceTag/<tag-key>

-

-

URI

GET /v5/{project_id}/p2c-vpn-gateways/vpn-servers/{vpn_server_id}/access-policies

Table 1 Parameter description

Parameter

Type

Mandatory

Description

project_id

String

Yes

Specifies a project ID. You can obtain the project ID by referring to Obtaining the Project ID.

vpn_server_id

String

Yes

Specifies the ID of a VPN server.

Table 2 Parameters in a query request

Parameter

Type

Mandatory

Description

limit

Integer

No

Specifies the number of records returned on each page during pagination query.

marker

String

No

  • Specifies the start flag for querying the current page. If this parameter is left blank, the first page is queried. The marker for querying the next page is the next_marker in the page_info object returned on the current page.
  • This parameter must be used together with limit.

Request

  • Request parameters

    None

  • Example request
    GET https://{Endpoint}/v5/{project_id}/p2c-vpn-gateways/vpn-servers/{vpn_server_id}/access-policies

Response

  • Response parameters

    Returned status code 200: successful query

    Table 3 Parameters in the response body

    Parameter

    Type

    Description

    access_policies

    Array of VpnAccessPolicy objects

    Specifies the access policy list object.

    total_count

    Integer

    Specifies the total number of access policies.

    page_info

    PageInfo object

    Specifies pagination query information.

    request_id

    String

    Specifies a request ID.

    Table 4 VpnAccessPolicy

    Parameter

    Type

    Description

    id

    String

    • Specifies the ID of an access policy.
    • The value is a UUID containing 36 characters.

    name

    String

    Specifies the name of an access policy.

    type

    String

    • Specifies the access policy type.
    • Value range:
      • Default
      • Custom

    user_group_id

    String

    • Specifies the ID of the associated user group.
    • The value is a UUID containing 36 characters.

    user_group_name

    String

    Specifies the name of the associated user group.

    description

    String

    Specifies access policy description.

    dest_ip_cidrs

    Array of String

    • Specifies the list of destination CIDR blocks.
    • The value is in the format of dotted decimal notation/mask, for example, 192.168.1.0/24.

    created_at

    String

    • Specifies the creation time.
    • The UTC time format is yyyy-MM-ddTHH:mm:ss.SSSZ.

    updated_at

    String

    • Specifies the update time.
    • The UTC time format is yyyy-MM-ddTHH:mm:ss.SSSZ.
    Table 5 PageInfo

    Parameter

    Type

    Description

    next_marker

    String

    Specifies the marker of the next page. The value is the time when the last resource in the last query response was created.

    current_count

    Integer

    Specifies the number of resources in the list.

  • Example response
    {
        "access_policies": [
            {
                "id": "4f746482-a575-4e1f-9e80-5f6f69ff8588",
                "name": "policy-001",
                "type": "Custom",
                "user_group_id": "7625fd92-2e20-4e4d-8c56-66f110fbfaa8",
                "user_group_name": "user-group1",
                "description": "AccessPolicy1",
                "dest_ip_cidrs": [
                    "172.16.0.0/24",
                    "172.16.1.0/24"
                ],
                "created_at": "2024-06-17T13:32:19.57Z",
                "updated_at": "2024-06-17T13:32:19.57Z"
            }
        ],
        "total_count": 1,
        "page_info": {
            "current_count": 1
        },
        "request_id": "02b5b35cab4c2963d1d89560f50017b9"
    }

Status Codes

For details, see Status Codes.