Updated on 2024-12-03 GMT+08:00

Modifying a VPN User Group

Function

This API is used to modify a VPN user group with a specified ID.

Calling Method

For details, see Calling APIs.

URI

PUT /v5/{project_id}/p2c-vpn-gateways/vpn-servers/{vpn_server_id}/groups/{group_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.

group_id

String

Yes

Specifies the ID of a user group.

Request

  • Request parameters
    Table 2 Request parameters

    Parameter

    Type

    Mandatory

    Description

    user_group

    UpdateVpnUserGroupRequestBodyContent object

    Yes

    Specifies the to-be-modified VPN user group object.

    Table 3 UpdateVpnUserGroupRequestBodyContent

    Parameter

    Type

    Mandatory

    Description

    name

    String

    No

    • Specifies a user group name.
    • The value is a string of 1 to 64 characters, which can contain uppercase letters, lowercase letters, digits, and the following special characters: `~!@#$%^&*()-_=+\|[{}];:'",<.>/?
    • A user group name must be unique.

    description

    String

    No

    • Specifies user group description.
    • The value is a string of 0 to 64 characters, which can contain uppercase letters, lowercase letters, digits, and the following special characters: `~!@#$%^&*()-_=+\|[{}];:'",<.>/?
    • Example request
      PUT https://{Endpoint}/v5/{project_id}/p2c-vpn-gateways/vpn-servers/{vpn_server_id}/groups/{group_id}
      
      {
        "user_group": {
          "name": "user-group1-update",
          "description": "UserGroup1-update"
        }
      }

Response

  • Response parameters

    Returned status code 200: successful operation

    Table 4 Parameters in the response body

    Parameter

    Type

    Description

    user_group

    VpnUserGroup object

    Specifies the VPN user group object.

    request_id

    String

    Specifies a request ID.

    Table 5 VpnUserGroup

    Parameter

    Type

    Description

    id

    String

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

    name

    String

    Specifies the name of a user group.

    description

    String

    Specifies user group description.

    type

    String

    • Specifies the type of a user group.
    • Value range:

      Default: default user group

      Custom: custom user group

    user_number

    Integer

    Specifies the number of users.

    created_at

    String

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

    updated_at

    String

    • Specifies the update time.
    • The UTC time format is yyyy-MM-ddTHH:mm:ssZ.
    • Example response
      {
          "user_group": {
              "id": "7625fd92-2e20-4e4d-8c56-66f110fbfaa8",
              "name": "user-group1-update",
              "description": "UserGroup1-update",
              "type": "Custom",
              "user_number": 0,
              "created_at": "2024-06-17T09:48:27.548Z",
              "updated_at": "2024-06-17T09:59:03.318Z"
          },
          "request_id": "6735d32bb3e35e9154caba1dbc6c2dc6"
      }

Status Codes

For details, see Status Codes.