功能介绍
更新租户国密型VPN网关所使用的证书,包括证书名称、签名证书、签名私钥、加密证书、加密私钥和CA证书链。
URI
PUT /v5/{project_id}/vpn-gateways/{vgw_id}/certificate/{certificate_id}
名称 |
类型 |
描述 |
---|---|---|
project_id |
String |
项目ID |
vgw_id |
String |
VPN网关实例ID |
certificate_id |
String |
VPN网关证书ID |
请求消息
- 请求参数
名称 |
类型 |
描述 |
---|---|---|
certificate |
VPN网关证书对象 |
名称 |
类型 |
是否必选 |
描述 |
---|---|---|---|
name |
String |
否 |
|
certificate |
String |
否 |
|
private_key |
String |
否 |
|
certificate_chain |
String |
否 |
|
enc_certificate |
String |
否 |
|
enc_private_key |
String |
否 |
|
- 请求样例
POST https://{Endpoint}/v5/{project_id}/vpn-gateways/{vgw_id}/certificate/{certificate_id} { "certificate": { "name": "cert-dce7", "certificate": "-----BEGIN CERTIFICATE-----******-----END CERTIFICATE-----", "private_key": "-----BEGIN EC PRIVATE KEY-----*******-----END EC PRIVATE KEY-----", "enc_certificate": "-----BEGIN CERTIFICATE-----********-----END CERTIFICATE-----", "enc_private_key": "-----BEGIN EC PRIVATE KEY-----********-----END EC PRIVATE KEY-----", "certificate_chain": "-----BEGIN CERTIFICATE-----******-----END CERTIFICATE-----" } }
响应参数
- 响应参数
返回状态码为200: successful operation
名称 |
类型 |
描述 |
---|---|---|
certificate |
VPN网关证书对象 |
|
request_id |
String |
请求id |
名称 |
类型 |
描述 |
---|---|---|
id |
String |
|
name |
String |
|
vgw_id |
String |
|
issuer |
String |
|
signature_algorithm |
String |
|
certificate_serial_number |
String |
|
certificate_subject |
String |
|
certificate_expire_time |
String |
|
certificate_chain_serial_number |
String |
|
certificate_chain_subject |
String |
|
certificate_chain_expire_time |
String |
|
enc_certificate_serial_number |
String |
|
enc_certificate_subject |
String |
|
enc_certificate_expire_time |
String |
|
created_at |
String |
|
- 响应样例
{ "certificate": { "id": "73f072d8-****-****-****-2a755d95636f", "name": "cert-dce7", "vgw_id": "c7f1d3e3-0476-4a71-95a7-3ce8cbb969de", "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": "2024-02-20T15:41:39+08:00", "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": "2039-07-11T20:31:33+08:00", "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": "2024-02-20T15:43:26+08:00", "created_at": "2023-03-30T10:47:16.657+08:00" } }
状态码
请参见状态码