Help Center/ Virtual Private Network/ API Reference/ API/ P2C VPN APIs/ Server/ Modifying the Connection Log Configuration of a P2C VPN Gateway
Updated on 2026-10-22 GMT+08:00

Modifying the Connection Log Configuration of a P2C VPN Gateway

Function

This API is used to modify the connection log configuration of a P2C VPN gateway 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:updateConnectionsLogConfig

write

p2cVpnGateway

g:ResourceTag/<tag-key>

-

  • lts:logGroup:listLogGroup
  • lts:logStream:listLogStream

URI

PUT /v5/{project_id}/p2c-vpn-gateways/{p2c_vgw_id}/log-config

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.

p2c_vgw_id

String

Yes

Specifies the ID of a P2C VPN gateway instance.

Request

  • Request parameters
    Table 2 Request parameters

    Parameter

    Type

    Mandatory

    Description

    log_config

    UpdateVpnLogConfigRequestBodyContent

    object

    Yes

    Specifies the log_config object.

    Table 3 UpdateVpnLogConfigRequestBodyContent

    Parameter

    Type

    Mandatory

    Description

    log_group_id

    String

    Yes

    • Specifies a log group ID, which is obtained from the Log Tank Service (LTS).

    log_stream_id

    String

    Yes

    • Specifies a log stream ID, which is obtained from LTS.
  • Example request
    PUT https://{Endpoint}/v5/{project_id}/p2c-vpn-gateways/{p2c_vgw_id}/log-config
    
    {
      "log_config": {
        "log_group_id": "05c4052d-8d14-488f-aa00-19fea5a25fdd",
        "log_stream_id": "d9d85143-e1e1-427a-9994-d8b8fd9ebe3f"
      }
    }

Response

  • Response parameters

    Returned status code 200: successful operation

    Table 4 Parameters in the response body

    Parameter

    Type

    Description

    log_config

    ConnectionsLogConfig object

    Specifies the log_config object.

    request_id

    String

    Specifies a request ID.

    Table 5 ConnectionsLogConfig

    Parameter

    Type

    Description

    log_group_id

    String

    • Specifies a log group ID, which is obtained from LTS.

    log_stream_id

    String

    • Specifies a log stream ID, which is obtained from LTS.
  • Example response
    {
        "log_config": {
            "log_group_id": "05c4052d-8d14-488f-aa00-19fea5a25fdd",
            "log_stream_id": "d9d85143-e1e1-427a-9994-d8b8fd9ebe3f"
        },
        "request_id": "b19ba5a0be8f7b7f664b14596f8f35db"
    }

Status Codes

For details, see Status Codes.