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

Querying a VPN User

Function

This API is used to query information about a VPN user 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:p2cVpnUser:get

read

p2cVpnUser

-

-

-

p2cVpnGateway

g:ResourceTag/<tag-key>

URI

GET /v5/{project_id}/p2c-vpn-gateways/vpn-servers/{vpn_server_id}/users/{user_id}

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.

user_id

String

Yes

Specifies a user ID.

Request

  • Request parameters

    None

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

Response

  • Response parameters

    Returned status code 200: successful query

    Table 2 Parameters in the response body

    Parameter

    Type

    Description

    user

    VpnUser object

    Specifies the VPN user object.

    request_id

    String

    Specifies a request ID.

    Table 3 VpnUser

    Parameter

    Type

    Description

    id

    String

    • Specifies a user ID.
    • The value is a UUID containing 36 characters.

    name

    String

    Specifies a username.

    description

    String

    Specifies user description.

    user_group_id

    String

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

    user_group_name

    String

    Specifies the name of the user group to which the user belongs.

    static_ip

    String

    • Specifies the static IP address of a client.
    • The value is an IPv4 address in dotted decimal notation (for example, 192.168.0.5) or disable.

    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.
  • Example response
    {
        "user": {
            "id": "41ad472e-d3e4-482b-8f00-7b2c1bfc4b7d",
            "name": "user001",
            "description": "UserDescription1",
            "user_group_id": "yWYnJt0R-Q0a7-R4QW-tFXX-QfundEqrR27W",
            "user_group_name": "user-group1",
            "created_at": "2024-06-17T06:53:46.302Z",
            "updated_at": "2024-06-17T06:53:46.302Z"
        },
        "request_id": "926a0edb3bf432943e2399b700173add"
    }

Status Codes

For details, see Status Codes.