@@ -13,6 +13,36 @@ def __init__(
1313 ):
1414 super (UCDNClient , self ).__init__ (config , transport , middleware , logger )
1515
16+ def add_certificate (
17+ self , req : typing .Optional [dict ] = None , ** kwargs
18+ ) -> dict :
19+ """AddCertificate - 添加证书
20+
21+ **Request**
22+
23+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
24+ - **CertName** (str) - (Required) 证书名称
25+ - **PrivateKey** (str) - (Required) 用户私钥
26+ - **UserCert** (str) - (Required) 用户证书
27+ - **CaCert** (str) - Ca证书,默认为空
28+
29+ **Response**
30+
31+
32+ """
33+ # build request
34+ d = {
35+ "ProjectId" : self .config .project_id ,
36+ }
37+ req and d .update (req )
38+ d = apis .AddCertificateRequestSchema ().dumps (d )
39+
40+ # build options
41+ kwargs ["max_retries" ] = 0 # ignore retry when api is not idempotent
42+
43+ resp = self .invoke ("AddCertificate" , d , ** kwargs )
44+ return apis .AddCertificateResponseSchema ().loads (resp )
45+
1646 def batch_describe_new_ucdn_domain (
1747 self , req : typing .Optional [dict ] = None , ** kwargs
1848 ) -> dict :
@@ -117,6 +147,30 @@ def batch_refresh_new_ucdn_domain_cache(
117147 resp = self .invoke ("BatchRefreshNewUcdnDomainCache" , d , ** kwargs )
118148 return apis .BatchRefreshNewUcdnDomainCacheResponseSchema ().loads (resp )
119149
150+ def delete_certificate (
151+ self , req : typing .Optional [dict ] = None , ** kwargs
152+ ) -> dict :
153+ """DeleteCertificate - 删除证书
154+
155+ **Request**
156+
157+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
158+ - **CertName** (str) - (Required) 证书名称
159+
160+ **Response**
161+
162+
163+ """
164+ # build request
165+ d = {
166+ "ProjectId" : self .config .project_id ,
167+ }
168+ req and d .update (req )
169+ d = apis .DeleteCertificateRequestSchema ().dumps (d )
170+
171+ resp = self .invoke ("DeleteCertificate" , d , ** kwargs )
172+ return apis .DeleteCertificateResponseSchema ().loads (resp )
173+
120174 def describe_new_ucdn_prefetch_cache_task (
121175 self , req : typing .Optional [dict ] = None , ** kwargs
122176 ) -> dict :
@@ -213,6 +267,47 @@ def describe_new_ucdn_refresh_cache_task(
213267 resp = self .invoke ("DescribeNewUcdnRefreshCacheTask" , d , ** kwargs )
214268 return apis .DescribeNewUcdnRefreshCacheTaskResponseSchema ().loads (resp )
215269
270+ def get_certificate_v2 (
271+ self , req : typing .Optional [dict ] = None , ** kwargs
272+ ) -> dict :
273+ """GetCertificateV2 - 获取证书列表(新)
274+
275+ **Request**
276+
277+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
278+ - **Limit** (int) - 长度,默认为全部,非负整数
279+ - **Offset** (int) - 偏移,默认为0,非负整数
280+
281+ **Response**
282+
283+ - **CertList** (list) - 见 **CertList** 模型定义
284+ - **TotalCount** (int) - 证书数量
285+
286+ **Response Model**
287+
288+ **CertList**
289+ - **BeginTime** (int) - 证书开始时间
290+ - **CaCert** (str) - ca证内容
291+ - **CertName** (str) - 证书名
292+ - **CommonName** (str) - 通用名
293+ - **DnsName** (str) - dns名称
294+ - **DomainCount** (int) - 已配置域名个数
295+ - **Domains** (list) - 已配置的域名列表
296+ - **EndTime** (int) - 证书获取时间
297+ - **UserCert** (str) - 证书内容
298+
299+
300+ """
301+ # build request
302+ d = {
303+ "ProjectId" : self .config .project_id ,
304+ }
305+ req and d .update (req )
306+ d = apis .GetCertificateV2RequestSchema ().dumps (d )
307+
308+ resp = self .invoke ("GetCertificateV2" , d , ** kwargs )
309+ return apis .GetCertificateV2ResponseSchema ().loads (resp )
310+
216311 def get_new_ucdn_domain_bandwidth (
217312 self , req : typing .Optional [dict ] = None , ** kwargs
218313 ) -> dict :
0 commit comments