Help Center/ Virtual Private Network/ API Reference/ API/ P2C VPN APIs/ Server/ Uploading a Client CA Certificate
Updated on 2026-10-22 GMT+08:00

Uploading a Client CA Certificate

Function

This API is used to upload a client CA certificate.

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:importClientCa

write

p2cVpnGateway

g:ResourceTag/<tag-key>

-

-

URI

POST /v5/{project_id}/p2c-vpn-gateways/vpn-servers/{vpn_server_id}/client-ca-certificates

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 the request header

Parameter

Type

Mandatory

Description

X-Client-Token

String

No

  • Specifies the ID of an idempotent request.
  • The value is a UUID containing 36 characters.

Request

  • Request parameters
    Table 3 Request parameters

    Parameter

    Type

    Mandatory

    Description

    client_ca_certificate

    client_ca_certificate object

    Yes

    Specifies client CA certificate information.

    Table 4 client_ca_certificate

    Parameter

    Type

    Mandatory

    Description

    name

    String

    No

    • Specifies a certificate name. If this parameter is left blank, the system automatically generates a certificate name.
    • The value is a string of 1 to 64 characters, which can contain digits, letters, underscores (_), and hyphens (-).

    content

    String

    Yes

    • Specifies the certificate content. It is recommended to use a certificate with a strong cryptographic algorithm, such as RSA-3072 or RSA-4096.
    • Format:

      -----BEGIN CERTIFICATE-----

      *************************************

      *************************************

      -----END CERTIFICATE-----

  • Example request
    POST https://{Endpoint}/v5/{project_id}/p2c-vpn-gateways/vpn-servers/{vpn_server_id}/client-ca-certificates
    
    {
      "client_ca_certificate": {
        "name": "client_ca_8sux3d",
        "content": "-----BEGIN CERTIFICATE-----********-----END CERTIFICATE-----"
      }
    }

Response

  • Response parameters

    Returned status code 201: successful operation

    Table 5 Parameters in the response body

    Parameter

    Type

    Description

    client_ca_certificate

    client_ca_certificate object

    Specifies the client CA certificate object.

    request_id

    String

    Specifies a request ID.

    Table 6 client_ca_certificate

    Parameter

    Type

    Description

    id

    String

    • Specifies the ID of a client CA certificate.
    • The value is a UUID containing 36 characters.
    • Example response
      {
          "client_ca_certificate": {
              "id": "4e3a364f-1213-4a37-917e-d494aeada34e"
          },
          "request_id": "4114fdd9ca33e22936ece75b97d7a363"
      }

Status Codes

For details, see Status Codes.