Help Center/ Virtual Private Network/ API Reference/ API/ S2C VPN APIs/ S2C VPN Gateway/ Querying VPN Gateway Certificate Details
Updated on 2026-10-22 GMT+08:00

Querying VPN Gateway Certificate Details

Function

This API is used to query imported certificates of a VPN gateway with a specified gateway 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:vpnGateways:getCertificate

read

vpnGateways

-

-

URI

GET /v5/{project_id}/vpn-gateways/{vgw_id}/certificate

Table 1 Parameter description

Parameter

Type

Description

project_id

String

Specifies a project ID.

vgw_id

String

Specifies the ID of a VPN gateway instance.

Request

  • Request parameters

    None

  • Example request
    GET https://{Endpoint}/v5/{project_id}/vpn-gateways/{vgw_id}/certificate

Response

  • Response parameters

    Returned status code 200: successful query

    Table 2 Parameters in the response body

    Parameter

    Type

    Description

    certificate

    VpnGatewayCertificate object

    Specifies the certificate object.

    request_id

    String

    Specifies a request ID.

    Table 3 VpnGatewayCertificate

    Parameter

    Type

    Description

    id

    String

    • Specifies the certificate ID of a VPN gateway.
    • The value is a UUID containing 36 characters.

    name

    String

    • Specifies the certificate name of a VPN gateway.
    • The value is a string of 3 to 63 characters, which can contain digits, letters, underscores (_), hyphens (-), and periods (.).

    project_id

    String

    • Specifies the project ID of a tenant.
    • The value is a string of 1 to 64 characters.

    vgw_id

    String

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

    status

    String

    • Specifies the gateway certificate status.
    • Value range:
      • BOUND: The certificate has been bound.
      • FAULT: The certificate fails to be bound.
      • BINDING: The certificate is being bound.

    issuer

    String

    • Specifies the issuer of the SM signature certificate.
    • The value is a string of 1 to 256 characters.

    signature_algorithm

    String

    • Specifies the signature algorithm of the SM signature certificate.
    • The value is a string of 1 to 64 characters.

    certificate_serial_number

    String

    • Specifies the serial number of the SM signature certificate.
    • The value is a string of 1 to 64 characters.

    certificate_subject

    String

    • Specifies the subject of the signature certificate.
    • The value is a string of 1 to 256 characters.

    certificate_expire_time

    String

    • Specifies the time when the SM signature certificate expires.

    certificate_chain_serial_number

    String

    • Specifies the serial number of the CA certificate.
    • The value is a string of 1 to 64 characters.

    certificate_chain_subject

    String

    • Specifies the subject of the CA certificate.
    • The value is a string of 1 to 256 characters.

    certificate_chain_expire_time

    String

    • Specifies the time when the CA certificate expires.

    enc_certificate_serial_number

    String

    • Specifies the serial number of the SM encryption certificate.
    • The value is a string of 1 to 64 characters.

    enc_certificate_subject

    String

    • Specifies the subject of the encryption certificate.
    • The value is a string of 1 to 256 characters.

    enc_certificate_expire_time

    String

    • Specifies the time when the SM encryption certificate expires.

    created_at

    String

    • Specifies the creation time.

    updated_at

    String

    • Specifies the update time.
  • Example response
    {
        "certificate": 
            {
                "id": "18b81966-demo-a8df-va86-51db2ae6cfbd",
                "name": "cert-ces-test",
                "project_id": "06057689f680d5762f7fc008c77b8891",
                "vgw_id": "b1e94931-demo-a8df-va86-ec906c458ba7",
                "status": "BOUND",
                "issuer": "C=CN,ST=Beijing,L=HaiDian,O=GMCert.org,CN=GMCert GM Root CA - 01",
                "signature_algorithm": "SM3WITHSM2",
                "certificate_serial_number": "16548506527294397241",
                "certificate_subject": "C=CN,ST=beijing,L=beijing,O=huawei,OU=vpn,CN=hwcloud-vpn",
                "certificate_expire_time": "2023-03-21T07:41:39Z",
                "certificate_chain_serial_number": "12369133709000538078",
                "certificate_chain_subject": "C=CN,ST=Beijing,L=HaiDian,O=GMCert.org,CN=GMCert GM Root CA - 01",
                "certificate_chain_expire_time": "2023-03-21T01:31:33Z",
                "enc_certificate_serial_number": "16548506527294397242",
                "enc_certificate_subject": "C=CN,ST=beijing,L=beijing,O=huawei,OU=vpn,CN=hwcloud-vpn",
                "enc_certificate_expire_time": "2023-03-21T07:43:26Z",
                "created_at": "2023-03-14T07:48:13.705Z",
                "updated_at": "2023-03-14T07:48:13.887Z"
            }
    }

Status Codes

For details, see Status Codes.