ucloud-sdk-python3 0.11.81__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (280) hide show
  1. ucloud/__init__.py +0 -0
  2. ucloud/client.py +469 -0
  3. ucloud/core/__init__.py +0 -0
  4. ucloud/core/auth/__init__.py +3 -0
  5. ucloud/core/auth/_cfg.py +72 -0
  6. ucloud/core/client/__init__.py +8 -0
  7. ucloud/core/client/_cfg.py +96 -0
  8. ucloud/core/client/_client.py +176 -0
  9. ucloud/core/exc/__init__.py +9 -0
  10. ucloud/core/exc/_exc.py +94 -0
  11. ucloud/core/transport/__init__.py +4 -0
  12. ucloud/core/transport/_requests.py +135 -0
  13. ucloud/core/transport/http.py +120 -0
  14. ucloud/core/transport/utils.py +40 -0
  15. ucloud/core/typesystem/__init__.py +0 -0
  16. ucloud/core/typesystem/abstract.py +60 -0
  17. ucloud/core/typesystem/encoder.py +33 -0
  18. ucloud/core/typesystem/fields.py +149 -0
  19. ucloud/core/typesystem/schema.py +97 -0
  20. ucloud/core/utils/__init__.py +0 -0
  21. ucloud/core/utils/compat.py +15 -0
  22. ucloud/core/utils/deco.py +31 -0
  23. ucloud/core/utils/log.py +29 -0
  24. ucloud/core/utils/middleware.py +63 -0
  25. ucloud/helpers/__init__.py +0 -0
  26. ucloud/helpers/utils.py +90 -0
  27. ucloud/helpers/wait.py +108 -0
  28. ucloud/services/__init__.py +0 -0
  29. ucloud/services/cube/__init__.py +0 -0
  30. ucloud/services/cube/client.py +618 -0
  31. ucloud/services/cube/schemas/__init__.py +0 -0
  32. ucloud/services/cube/schemas/apis.py +548 -0
  33. ucloud/services/cube/schemas/models.py +58 -0
  34. ucloud/services/iam/__init__.py +0 -0
  35. ucloud/services/iam/client.py +1078 -0
  36. ucloud/services/iam/schemas/__init__.py +0 -0
  37. ucloud/services/iam/schemas/apis.py +973 -0
  38. ucloud/services/iam/schemas/models.py +127 -0
  39. ucloud/services/ipsecvpn/__init__.py +0 -0
  40. ucloud/services/ipsecvpn/client.py +522 -0
  41. ucloud/services/ipsecvpn/schemas/__init__.py +0 -0
  42. ucloud/services/ipsecvpn/schemas/apis.py +455 -0
  43. ucloud/services/ipsecvpn/schemas/models.py +134 -0
  44. ucloud/services/ipv6gw/__init__.py +0 -0
  45. ucloud/services/ipv6gw/client.py +44 -0
  46. ucloud/services/ipv6gw/schemas/__init__.py +0 -0
  47. ucloud/services/ipv6gw/schemas/apis.py +34 -0
  48. ucloud/services/ipv6gw/schemas/models.py +3 -0
  49. ucloud/services/isms/__init__.py +0 -0
  50. ucloud/services/isms/client.py +330 -0
  51. ucloud/services/isms/schemas/__init__.py +0 -0
  52. ucloud/services/isms/schemas/apis.py +272 -0
  53. ucloud/services/isms/schemas/models.py +50 -0
  54. ucloud/services/pathx/__init__.py +0 -0
  55. ucloud/services/pathx/client.py +1656 -0
  56. ucloud/services/pathx/schemas/__init__.py +0 -0
  57. ucloud/services/pathx/schemas/apis.py +1289 -0
  58. ucloud/services/pathx/schemas/models.py +420 -0
  59. ucloud/services/stepflow/__init__.py +0 -0
  60. ucloud/services/stepflow/client.py +98 -0
  61. ucloud/services/stepflow/schemas/__init__.py +0 -0
  62. ucloud/services/stepflow/schemas/apis.py +67 -0
  63. ucloud/services/stepflow/schemas/models.py +37 -0
  64. ucloud/services/sts/__init__.py +0 -0
  65. ucloud/services/sts/client.py +46 -0
  66. ucloud/services/sts/schemas/__init__.py +0 -0
  67. ucloud/services/sts/schemas/apis.py +35 -0
  68. ucloud/services/sts/schemas/models.py +16 -0
  69. ucloud/services/tidb/__init__.py +0 -0
  70. ucloud/services/tidb/client.py +120 -0
  71. ucloud/services/tidb/schemas/__init__.py +0 -0
  72. ucloud/services/tidb/schemas/apis.py +103 -0
  73. ucloud/services/tidb/schemas/models.py +11 -0
  74. ucloud/services/uaaa/__init__.py +0 -0
  75. ucloud/services/uaaa/client.py +311 -0
  76. ucloud/services/uaaa/schemas/__init__.py +0 -0
  77. ucloud/services/uaaa/schemas/apis.py +252 -0
  78. ucloud/services/uaaa/schemas/models.py +47 -0
  79. ucloud/services/uaccount/__init__.py +0 -0
  80. ucloud/services/uaccount/client.py +547 -0
  81. ucloud/services/uaccount/schemas/__init__.py +0 -0
  82. ucloud/services/uaccount/schemas/apis.py +442 -0
  83. ucloud/services/uaccount/schemas/models.py +128 -0
  84. ucloud/services/uads/__init__.py +0 -0
  85. ucloud/services/uads/client.py +1148 -0
  86. ucloud/services/uads/schemas/__init__.py +0 -0
  87. ucloud/services/uads/schemas/apis.py +983 -0
  88. ucloud/services/uads/schemas/models.py +199 -0
  89. ucloud/services/ubill/__init__.py +0 -0
  90. ucloud/services/ubill/client.py +248 -0
  91. ucloud/services/ubill/schemas/__init__.py +0 -0
  92. ucloud/services/ubill/schemas/apis.py +183 -0
  93. ucloud/services/ubill/schemas/models.py +107 -0
  94. ucloud/services/ucdn/__init__.py +0 -0
  95. ucloud/services/ucdn/client.py +1964 -0
  96. ucloud/services/ucdn/schemas/__init__.py +0 -0
  97. ucloud/services/ucdn/schemas/apis.py +1395 -0
  98. ucloud/services/ucdn/schemas/models.py +576 -0
  99. ucloud/services/ucloudstack/__init__.py +0 -0
  100. ucloud/services/ucloudstack/client.py +3352 -0
  101. ucloud/services/ucloudstack/schemas/__init__.py +0 -0
  102. ucloud/services/ucloudstack/schemas/apis.py +2887 -0
  103. ucloud/services/ucloudstack/schemas/models.py +560 -0
  104. ucloud/services/ucompshare/__init__.py +0 -0
  105. ucloud/services/ucompshare/client.py +820 -0
  106. ucloud/services/ucompshare/schemas/__init__.py +0 -0
  107. ucloud/services/ucompshare/schemas/apis.py +623 -0
  108. ucloud/services/ucompshare/schemas/models.py +241 -0
  109. ucloud/services/udb/__init__.py +0 -0
  110. ucloud/services/udb/client.py +2463 -0
  111. ucloud/services/udb/schemas/__init__.py +0 -0
  112. ucloud/services/udb/schemas/apis.py +2053 -0
  113. ucloud/services/udb/schemas/models.py +319 -0
  114. ucloud/services/udbproxy/__init__.py +0 -0
  115. ucloud/services/udbproxy/client.py +67 -0
  116. ucloud/services/udbproxy/schemas/__init__.py +0 -0
  117. ucloud/services/udbproxy/schemas/apis.py +38 -0
  118. ucloud/services/udbproxy/schemas/models.py +31 -0
  119. ucloud/services/uddb/__init__.py +0 -0
  120. ucloud/services/uddb/client.py +456 -0
  121. ucloud/services/uddb/schemas/__init__.py +0 -0
  122. ucloud/services/uddb/schemas/apis.py +520 -0
  123. ucloud/services/uddb/schemas/models.py +96 -0
  124. ucloud/services/udi/__init__.py +0 -0
  125. ucloud/services/udi/client.py +250 -0
  126. ucloud/services/udi/schemas/__init__.py +0 -0
  127. ucloud/services/udi/schemas/apis.py +205 -0
  128. ucloud/services/udi/schemas/models.py +58 -0
  129. ucloud/services/udisk/__init__.py +0 -0
  130. ucloud/services/udisk/client.py +832 -0
  131. ucloud/services/udisk/schemas/__init__.py +0 -0
  132. ucloud/services/udisk/schemas/apis.py +741 -0
  133. ucloud/services/udisk/schemas/models.py +100 -0
  134. ucloud/services/udns/__init__.py +0 -0
  135. ucloud/services/udns/client.py +380 -0
  136. ucloud/services/udns/schemas/__init__.py +0 -0
  137. ucloud/services/udns/schemas/apis.py +293 -0
  138. ucloud/services/udns/schemas/models.py +58 -0
  139. ucloud/services/udpn/__init__.py +0 -0
  140. ucloud/services/udpn/client.py +240 -0
  141. ucloud/services/udpn/schemas/__init__.py +0 -0
  142. ucloud/services/udpn/schemas/apis.py +203 -0
  143. ucloud/services/udpn/schemas/models.py +29 -0
  144. ucloud/services/udts/__init__.py +0 -0
  145. ucloud/services/udts/client.py +410 -0
  146. ucloud/services/udts/schemas/__init__.py +0 -0
  147. ucloud/services/udts/schemas/apis.py +403 -0
  148. ucloud/services/udts/schemas/models.py +93 -0
  149. ucloud/services/uec/__init__.py +0 -0
  150. ucloud/services/uec/client.py +1510 -0
  151. ucloud/services/uec/schemas/__init__.py +0 -0
  152. ucloud/services/uec/schemas/apis.py +1195 -0
  153. ucloud/services/uec/schemas/models.py +316 -0
  154. ucloud/services/ufile/__init__.py +0 -0
  155. ucloud/services/ufile/client.py +698 -0
  156. ucloud/services/ufile/schemas/__init__.py +0 -0
  157. ucloud/services/ufile/schemas/apis.py +542 -0
  158. ucloud/services/ufile/schemas/models.py +139 -0
  159. ucloud/services/ufs/__init__.py +0 -0
  160. ucloud/services/ufs/client.py +328 -0
  161. ucloud/services/ufs/schemas/__init__.py +0 -0
  162. ucloud/services/ufs/schemas/apis.py +265 -0
  163. ucloud/services/ufs/schemas/models.py +52 -0
  164. ucloud/services/ugn/__init__.py +0 -0
  165. ucloud/services/ugn/client.py +857 -0
  166. ucloud/services/ugn/schemas/__init__.py +0 -0
  167. ucloud/services/ugn/schemas/apis.py +678 -0
  168. ucloud/services/ugn/schemas/models.py +191 -0
  169. ucloud/services/uhost/__init__.py +0 -0
  170. ucloud/services/uhost/client.py +1647 -0
  171. ucloud/services/uhost/schemas/__init__.py +0 -0
  172. ucloud/services/uhost/schemas/apis.py +1483 -0
  173. ucloud/services/uhost/schemas/models.py +427 -0
  174. ucloud/services/uhub/__init__.py +0 -0
  175. ucloud/services/uhub/client.py +229 -0
  176. ucloud/services/uhub/schemas/__init__.py +0 -0
  177. ucloud/services/uhub/schemas/apis.py +194 -0
  178. ucloud/services/uhub/schemas/models.py +39 -0
  179. ucloud/services/uk8s/__init__.py +0 -0
  180. ucloud/services/uk8s/client.py +729 -0
  181. ucloud/services/uk8s/schemas/__init__.py +0 -0
  182. ucloud/services/uk8s/schemas/apis.py +639 -0
  183. ucloud/services/uk8s/schemas/models.py +179 -0
  184. ucloud/services/ulb/__init__.py +0 -0
  185. ucloud/services/ulb/client.py +2285 -0
  186. ucloud/services/ulb/schemas/__init__.py +0 -0
  187. ucloud/services/ulb/schemas/apis.py +1678 -0
  188. ucloud/services/ulb/schemas/models.py +591 -0
  189. ucloud/services/ulighthost/__init__.py +0 -0
  190. ucloud/services/ulighthost/client.py +576 -0
  191. ucloud/services/ulighthost/schemas/__init__.py +0 -0
  192. ucloud/services/ulighthost/schemas/apis.py +445 -0
  193. ucloud/services/ulighthost/schemas/models.py +133 -0
  194. ucloud/services/umem/__init__.py +0 -0
  195. ucloud/services/umem/client.py +1829 -0
  196. ucloud/services/umem/schemas/__init__.py +0 -0
  197. ucloud/services/umem/schemas/apis.py +1477 -0
  198. ucloud/services/umem/schemas/models.py +327 -0
  199. ucloud/services/umongodb/__init__.py +0 -0
  200. ucloud/services/umongodb/client.py +752 -0
  201. ucloud/services/umongodb/schemas/__init__.py +0 -0
  202. ucloud/services/umongodb/schemas/apis.py +567 -0
  203. ucloud/services/umongodb/schemas/models.py +220 -0
  204. ucloud/services/unet/__init__.py +0 -0
  205. ucloud/services/unet/client.py +1278 -0
  206. ucloud/services/unet/schemas/__init__.py +0 -0
  207. ucloud/services/unet/schemas/apis.py +1006 -0
  208. ucloud/services/unet/schemas/models.py +275 -0
  209. ucloud/services/unvs/__init__.py +0 -0
  210. ucloud/services/unvs/client.py +87 -0
  211. ucloud/services/unvs/schemas/__init__.py +0 -0
  212. ucloud/services/unvs/schemas/apis.py +66 -0
  213. ucloud/services/unvs/schemas/models.py +19 -0
  214. ucloud/services/upfs/__init__.py +0 -0
  215. ucloud/services/upfs/client.py +252 -0
  216. ucloud/services/upfs/schemas/__init__.py +0 -0
  217. ucloud/services/upfs/schemas/apis.py +204 -0
  218. ucloud/services/upfs/schemas/models.py +36 -0
  219. ucloud/services/upgsql/__init__.py +0 -0
  220. ucloud/services/upgsql/client.py +1007 -0
  221. ucloud/services/upgsql/schemas/__init__.py +0 -0
  222. ucloud/services/upgsql/schemas/apis.py +827 -0
  223. ucloud/services/upgsql/schemas/models.py +158 -0
  224. ucloud/services/uphone/__init__.py +0 -0
  225. ucloud/services/uphone/client.py +2122 -0
  226. ucloud/services/uphone/schemas/__init__.py +0 -0
  227. ucloud/services/uphone/schemas/apis.py +1799 -0
  228. ucloud/services/uphone/schemas/models.py +357 -0
  229. ucloud/services/uphost/__init__.py +0 -0
  230. ucloud/services/uphost/client.py +847 -0
  231. ucloud/services/uphost/schemas/__init__.py +0 -0
  232. ucloud/services/uphost/schemas/apis.py +689 -0
  233. ucloud/services/uphost/schemas/models.py +175 -0
  234. ucloud/services/urocketmq/__init__.py +0 -0
  235. ucloud/services/urocketmq/client.py +117 -0
  236. ucloud/services/urocketmq/schemas/__init__.py +0 -0
  237. ucloud/services/urocketmq/schemas/apis.py +92 -0
  238. ucloud/services/urocketmq/schemas/models.py +14 -0
  239. ucloud/services/uslk/__init__.py +0 -0
  240. ucloud/services/uslk/client.py +249 -0
  241. ucloud/services/uslk/schemas/__init__.py +0 -0
  242. ucloud/services/uslk/schemas/apis.py +191 -0
  243. ucloud/services/uslk/schemas/models.py +74 -0
  244. ucloud/services/usms/__init__.py +0 -0
  245. ucloud/services/usms/client.py +759 -0
  246. ucloud/services/usms/schemas/__init__.py +0 -0
  247. ucloud/services/usms/schemas/apis.py +653 -0
  248. ucloud/services/usms/schemas/models.py +215 -0
  249. ucloud/services/utsdb/__init__.py +0 -0
  250. ucloud/services/utsdb/client.py +604 -0
  251. ucloud/services/utsdb/schemas/__init__.py +0 -0
  252. ucloud/services/utsdb/schemas/apis.py +515 -0
  253. ucloud/services/utsdb/schemas/models.py +61 -0
  254. ucloud/services/uvms/__init__.py +0 -0
  255. ucloud/services/uvms/client.py +119 -0
  256. ucloud/services/uvms/schemas/__init__.py +0 -0
  257. ucloud/services/uvms/schemas/apis.py +88 -0
  258. ucloud/services/uvms/schemas/models.py +40 -0
  259. ucloud/services/vpc/__init__.py +0 -0
  260. ucloud/services/vpc/client.py +3233 -0
  261. ucloud/services/vpc/schemas/__init__.py +0 -0
  262. ucloud/services/vpc/schemas/apis.py +2529 -0
  263. ucloud/services/vpc/schemas/models.py +651 -0
  264. ucloud/testing/__init__.py +0 -0
  265. ucloud/testing/driver/__init__.py +5 -0
  266. ucloud/testing/driver/_scenario.py +93 -0
  267. ucloud/testing/driver/_specification.py +57 -0
  268. ucloud/testing/driver/_step.py +166 -0
  269. ucloud/testing/env.py +28 -0
  270. ucloud/testing/exc.py +18 -0
  271. ucloud/testing/funcs.py +68 -0
  272. ucloud/testing/mock.py +28 -0
  273. ucloud/testing/op.py +177 -0
  274. ucloud/testing/utest.py +195 -0
  275. ucloud/version.py +1 -0
  276. ucloud_sdk_python3-0.11.81.dist-info/LICENSE +202 -0
  277. ucloud_sdk_python3-0.11.81.dist-info/METADATA +71 -0
  278. ucloud_sdk_python3-0.11.81.dist-info/RECORD +280 -0
  279. ucloud_sdk_python3-0.11.81.dist-info/WHEEL +5 -0
  280. ucloud_sdk_python3-0.11.81.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1964 @@
1
+ """ Code is generated by ucloud-model, DO NOT EDIT IT. """
2
+
3
+ import typing
4
+
5
+
6
+ from ucloud.core.client import Client
7
+ from ucloud.services.ucdn.schemas import apis
8
+
9
+
10
+ class UCDNClient(Client):
11
+ def __init__(
12
+ self, config: dict, transport=None, middleware=None, logger=None
13
+ ):
14
+ super(UCDNClient, self).__init__(config, transport, middleware, logger)
15
+
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
+
46
+ def batch_describe_new_ucdn_domain(
47
+ self, req: typing.Optional[dict] = None, **kwargs
48
+ ) -> dict:
49
+ """BatchDescribeNewUcdnDomain - 批量获取加速域名配置
50
+
51
+ **Request**
52
+
53
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
54
+ - **ChannelType** (str) - 渠道ucdn、ufile、uvideo
55
+ - **DomainId** (list) - 域名id,创建域名时生成的资源id,默认获取账号下的所有域名信息,n为自然数
56
+ - **Limit** (int) - 返回数据长度,如果制定了Offset,则默认20,否则默认全部,非负整数
57
+ - **Offset** (int) - 数据偏移量,默认0,非负整数
58
+
59
+ **Response**
60
+
61
+ - **Arrearage** (list) - 标识欠费的数组,数组含有下列元素值, 1=国内流量有欠费 2=国外流量有欠费 3=国内带宽有欠费 4=国外带宽有欠费
62
+ - **ChargeType** (int) - 当前计费方式,10-流量付费 20-带宽日峰值 30-月95计费,31-月日均峰值, 32-月第四峰值 33-日均峰值之和 34- 日95再取平均 40-未选择计费方式
63
+ - **DomainSet** (list) - 见 **DomainInfo** 模型定义
64
+ - **LastChargeType** (int) - 表示最后一次切换的计费方式,10=流量付费 20=带宽日峰值 30=按月后付费 40=未选择计费方式
65
+ - **MaxDomainNum** (int) - 最大域名数量,默认20
66
+ - **TotalCount** (int) - 满足条件的域名个数
67
+ - **Vip** (str) - vip标示,yes-是 no-否
68
+
69
+ **Response Model**
70
+
71
+ **DomainInfo**
72
+ - **AccessConf** (dict) - 见 **AccessConf** 模型定义
73
+ - **AreaCode** (str) - 查询带宽区域 cn代表国内 abroad代表海外 不填默认为全部区域
74
+ - **CacheConf** (list) - 见 **CacheConf** 模型定义
75
+ - **CacheHost** (str) - 缓存Host,不同的域名可以配置为同一个CacheHost来实现缓存共享,默认为加速域名
76
+ - **CdnProtocol** (str) - 加速类型http,http|https
77
+ - **CdnType** (str) - 加速域名的业务类型,web代表网站,stream代表视频,download代表下载。
78
+ - **CertName** (str) - 证书名称
79
+ - **Cname** (str) - cdn域名。创建加速域名生成的cdn域名,用于设置CNAME记录
80
+ - **CreateTime** (int) - 域名创建的时间。格式:时间戳
81
+ - **Domain** (str) - 域名,用户创建加速的域名
82
+ - **DomainId** (str) - 域名id,创建域名时生成的id
83
+ - **HttpsStatusAbroad** (str) - 国外https状态 enableing-开启中 fail-开启失败 enable-启用 disable-未启用
84
+ - **HttpsStatusCn** (str) - 国内https状态 enableing-开启中 fail-开启失败 enable-启用 disable-未启用
85
+ - **NullRefer** (bool) - ReferType为白名单时,NullRefer为false代表不允许NULL refer访问,为true代表允许Null refer访问
86
+ - **OriginHost** (str) - 回源Http请求头部Host,默认是加速域名
87
+ - **OriginIp** (list) - 源站ip即cdn服务器回源访问的ip地址。支持多个源站ip,多个源站ip,可表述为如:[1.1.1.1,2.2.2.2]
88
+ - **OriginPort** (int) - 回源端口
89
+ - **OriginProtocol** (str) - 源站协议http,http|https 默认http
90
+ - **ReferList** (list) - Refer列表,支持正则表达式
91
+ - **ReferStatus** (bool) - refer配置开关,true打开,false关闭
92
+ - **ReferType** (int) - 0白名单,1黑名单
93
+ - **Status** (str) - 创建的加速域名的当前的状态。check代表审核中,checkSuccess代表审核通过,checkFail代表审核失败,enable代表加速中,disable代表停止加速,delete代表删除加速 enableing代表正在开启加速,disableing代表正在停止加速中,deleteing代表删除中
94
+ - **Tag** (str) - 业务组,默认为Default
95
+ - **TestUrl** (str) - 测试url,用于域名创建加速时的测试
96
+ - **ValidTime** (int) - 开始分配Cname时间。格式:时间戳
97
+
98
+
99
+ **AccessConf**
100
+ - **IpBlacklist** (str) - 多个ip用逗号隔开
101
+
102
+
103
+ **CacheConf**
104
+ - **CacheBehavior** (bool) - 是否缓存,true为缓存,flase为不缓存。为flase的情况下,CacheTTL和CacheUnit强制不生效
105
+ - **CacheTTL** (int) - 缓存时间
106
+ - **CacheUnit** (str) - 缓存时间的单位。sec(秒),min(分钟),hour(小时),day(天)。上限1年。
107
+ - **Description** (str) - 缓存规则描述
108
+ - **FollowOriginRule** (bool) - 是否优先遵循源站头部缓存策略,false为不优先遵循源站,true为优先遵循源站缓存头部。默认为0
109
+ - **HttpCodePattern** (str) - 状态码模式,非200,206状态码,多个状态码用竖线(|)分隔,该属性仅仅在状态码缓存配置列表中返回
110
+ - **PathPattern** (str) - 路径模式,支持正则
111
+
112
+
113
+ """
114
+ # build request
115
+ d = {
116
+ "ProjectId": self.config.project_id,
117
+ }
118
+ req and d.update(req)
119
+ d = apis.BatchDescribeNewUcdnDomainRequestSchema().dumps(d)
120
+
121
+ resp = self.invoke("BatchDescribeNewUcdnDomain", d, **kwargs)
122
+ return apis.BatchDescribeNewUcdnDomainResponseSchema().loads(resp)
123
+
124
+ def batch_refresh_new_ucdn_domain_cache(
125
+ self, req: typing.Optional[dict] = None, **kwargs
126
+ ) -> dict:
127
+ """BatchRefreshNewUcdnDomainCache - 批量刷新缓存
128
+
129
+ **Request**
130
+
131
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
132
+ - **Type** (str) - (Required) 刷新类型,file代表文件刷新,dir 代表路径刷新
133
+ - **UrlList** (str) - (Required) 待刷新URL列表,以JSON格式描述。刷新多个URL列表时,一次最多提交1000个。每个域名必须以”http://域名/”开始。目录要以”/”结尾, 如刷新目录a下所有文件,格式为:http://abc.ucloud.cn/a/;如刷新文件目录a下面所有img.png文件, 格式为http://abc.ucloud.cn/a/img.png。请正确提交需要刷新的域名
134
+
135
+ **Response**
136
+
137
+ - **TaskId** (str) - 本次提交url对应的任务id
138
+
139
+ """
140
+ # build request
141
+ d = {
142
+ "ProjectId": self.config.project_id,
143
+ }
144
+ req and d.update(req)
145
+ d = apis.BatchRefreshNewUcdnDomainCacheRequestSchema().dumps(d)
146
+
147
+ resp = self.invoke("BatchRefreshNewUcdnDomainCache", d, **kwargs)
148
+ return apis.BatchRefreshNewUcdnDomainCacheResponseSchema().loads(resp)
149
+
150
+ def control_ucdn_domain_cache_access(
151
+ self, req: typing.Optional[dict] = None, **kwargs
152
+ ) -> dict:
153
+ """ControlUcdnDomainCacheAccess -
154
+
155
+ **Request**
156
+
157
+ - **ProjectId** (str) - (Config)
158
+ - **Type** (str) - (Required)
159
+ - **UrlList** (list) -
160
+
161
+ **Response**
162
+
163
+
164
+ """
165
+ # build request
166
+ d = {
167
+ "ProjectId": self.config.project_id,
168
+ }
169
+ req and d.update(req)
170
+ d = apis.ControlUcdnDomainCacheAccessRequestSchema().dumps(d)
171
+
172
+ # build options
173
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
174
+
175
+ resp = self.invoke("ControlUcdnDomainCacheAccess", d, **kwargs)
176
+ return apis.ControlUcdnDomainCacheAccessResponseSchema().loads(resp)
177
+
178
+ def delete_certificate(
179
+ self, req: typing.Optional[dict] = None, **kwargs
180
+ ) -> dict:
181
+ """DeleteCertificate - 删除证书
182
+
183
+ **Request**
184
+
185
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
186
+ - **CertName** (str) - (Required) 证书名称
187
+
188
+ **Response**
189
+
190
+
191
+ """
192
+ # build request
193
+ d = {
194
+ "ProjectId": self.config.project_id,
195
+ }
196
+ req and d.update(req)
197
+ d = apis.DeleteCertificateRequestSchema().dumps(d)
198
+
199
+ resp = self.invoke("DeleteCertificate", d, **kwargs)
200
+ return apis.DeleteCertificateResponseSchema().loads(resp)
201
+
202
+ def describe_new_ucdn_prefetch_cache_task(
203
+ self, req: typing.Optional[dict] = None, **kwargs
204
+ ) -> dict:
205
+ """DescribeNewUcdnPrefetchCacheTask - 获取预取任务状态
206
+
207
+ **Request**
208
+
209
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
210
+ - **BeginTime** (int) - 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值
211
+ - **EndTime** (int) - 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。
212
+ - **IsDcdn** (bool) - 是否全站加速 默认false
213
+ - **Limit** (int) - 返回数据长度,默认全部,自然数
214
+ - **Offset** (int) - 数据偏移量,默认为0,自然数
215
+ - **Status** (str) - 需要获取的内容预热的状态,枚举值:success:成功;wait:等待处理;process:正在处理;failure:失败; unknow:未知,默认选择所有状态
216
+ - **TaskId** (list) - 提交任务时返回的任务ID
217
+
218
+ **Response**
219
+
220
+ - **TaskList** (list) - 见 **TaskInfo** 模型定义
221
+ - **TotalCount** (int) - 预热任务的总数
222
+
223
+ **Response Model**
224
+
225
+ **TaskInfo**
226
+ - **CreateTime** (int) - 刷新任务创建的时间。格式为Unix Timestamp
227
+ - **Status** (str) - 刷新任务的当前状态,枚举值:success:成功;wait:排队中;process:处理中;failure:失败; unknow:未知
228
+ - **TaskId** (str) - 提交任务时返回的任务ID
229
+ - **UrlLists** (list) - 见 **UrlProgressInfo** 模型定义
230
+
231
+
232
+ **UrlProgressInfo**
233
+ - **CreateTime** (int) - 刷新任务创建的时间。格式为Unix Timestamp
234
+ - **FinishTime** (int) - 任务完成时间。格式为Unix Timestamp
235
+ - **Progress** (int) - 刷新进度,单位%
236
+ - **Status** (str) - 刷新任务的当前状态,枚举值:success:成功;wait:排队中;process:处理中;failure:失败; unknow:未知
237
+ - **Url** (str) - 刷新的单条url
238
+
239
+
240
+ """
241
+ # build request
242
+ d = {
243
+ "ProjectId": self.config.project_id,
244
+ }
245
+ req and d.update(req)
246
+ d = apis.DescribeNewUcdnPrefetchCacheTaskRequestSchema().dumps(d)
247
+
248
+ resp = self.invoke("DescribeNewUcdnPrefetchCacheTask", d, **kwargs)
249
+ return apis.DescribeNewUcdnPrefetchCacheTaskResponseSchema().loads(resp)
250
+
251
+ def describe_new_ucdn_refresh_cache_task(
252
+ self, req: typing.Optional[dict] = None, **kwargs
253
+ ) -> dict:
254
+ """DescribeNewUcdnRefreshCacheTask - 获取域名刷新任务状态
255
+
256
+ **Request**
257
+
258
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
259
+ - **BeginTime** (int) - 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值
260
+ - **EndTime** (int) - 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。
261
+ - **IsDcdn** (bool) - 是否全站加速 默认false
262
+ - **Limit** (int) - 返回数据长度,默认全部,自然数
263
+ - **Offset** (int) - 数据偏移量,默认为0,自然数
264
+ - **Status** (str) - 需要获取的内容刷新的状态,枚举值:success:成功;wait:等待处理;process:正在处理;failure:失败; unknow:未知,默认选择所有状态
265
+ - **TaskId** (list) - 提交任务时返回的任务ID
266
+
267
+ **Response**
268
+
269
+ - **TaskList** (list) - 见 **TaskInfo** 模型定义
270
+ - **TotalCount** (int) - 刷新任务的总数
271
+
272
+ **Response Model**
273
+
274
+ **TaskInfo**
275
+ - **CreateTime** (int) - 刷新任务创建的时间。格式为Unix Timestamp
276
+ - **Status** (str) - 刷新任务的当前状态,枚举值:success:成功;wait:排队中;process:处理中;failure:失败; unknow:未知
277
+ - **TaskId** (str) - 提交任务时返回的任务ID
278
+ - **UrlLists** (list) - 见 **UrlProgressInfo** 模型定义
279
+
280
+
281
+ **UrlProgressInfo**
282
+ - **CreateTime** (int) - 刷新任务创建的时间。格式为Unix Timestamp
283
+ - **FinishTime** (int) - 任务完成时间。格式为Unix Timestamp
284
+ - **Progress** (int) - 刷新进度,单位%
285
+ - **Status** (str) - 刷新任务的当前状态,枚举值:success:成功;wait:排队中;process:处理中;failure:失败; unknow:未知
286
+ - **Url** (str) - 刷新的单条url
287
+
288
+
289
+ """
290
+ # build request
291
+ d = {
292
+ "ProjectId": self.config.project_id,
293
+ }
294
+ req and d.update(req)
295
+ d = apis.DescribeNewUcdnRefreshCacheTaskRequestSchema().dumps(d)
296
+
297
+ resp = self.invoke("DescribeNewUcdnRefreshCacheTask", d, **kwargs)
298
+ return apis.DescribeNewUcdnRefreshCacheTaskResponseSchema().loads(resp)
299
+
300
+ def get_auth_config(
301
+ self, req: typing.Optional[dict] = None, **kwargs
302
+ ) -> dict:
303
+ """GetAuthConfig - 接口获取鉴权信息(非标使用)
304
+
305
+ **Request**
306
+
307
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
308
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
309
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
310
+ - **Domain** (str) - 希望获取的域名,不传则获取所有
311
+
312
+ **Response**
313
+
314
+ - **AuthConfigs** (list) - 见 **KwaiDomainAuthConfig** 模型定义
315
+
316
+ **Response Model**
317
+
318
+ **KwaiDomainAuthConfig**
319
+ - **Config** (list) - 见 **KwaiAuthConfig** 模型定义
320
+ - **Domain** (str) - 域名
321
+
322
+
323
+ **KwaiAuthConfig**
324
+ - **Keys** (list) - 见 **KwaiAuthKv** 模型定义
325
+ - **Type** (str) - 类型 pkey / ksc / typeA
326
+
327
+
328
+ **KwaiAuthKv**
329
+ - **Iv** (str) - iv信息
330
+ - **Key** (str) - key信息
331
+
332
+
333
+ """
334
+ # build request
335
+ d = {
336
+ "ProjectId": self.config.project_id,
337
+ "Region": self.config.region,
338
+ }
339
+ req and d.update(req)
340
+ d = apis.GetAuthConfigRequestSchema().dumps(d)
341
+
342
+ resp = self.invoke("GetAuthConfig", d, **kwargs)
343
+ return apis.GetAuthConfigResponseSchema().loads(resp)
344
+
345
+ def get_certificate_v2(
346
+ self, req: typing.Optional[dict] = None, **kwargs
347
+ ) -> dict:
348
+ """GetCertificateV2 - 获取证书列表(新)
349
+
350
+ **Request**
351
+
352
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
353
+ - **CdnDomain** (str) - 根据加速域名筛选对应的证书
354
+ - **Limit** (int) - 长度,默认为全部,非负整数
355
+ - **Offset** (int) - 偏移,默认为0,非负整数
356
+
357
+ **Response**
358
+
359
+ - **CertList** (list) - 见 **CertList** 模型定义
360
+ - **TotalCount** (int) - 证书数量
361
+
362
+ **Response Model**
363
+
364
+ **CertList**
365
+ - **BeginTime** (int) - 证书开始时间
366
+ - **CaCert** (str) - ca证内容
367
+ - **CertName** (str) - 证书名
368
+ - **CommonName** (str) - 通用名
369
+ - **DnsName** (str) - dns名称
370
+ - **DomainCount** (int) - 已配置域名个数
371
+ - **Domains** (list) - 已配置的域名列表
372
+ - **EndTime** (int) - 证书获取时间
373
+ - **UserCert** (str) - 证书内容
374
+
375
+
376
+ """
377
+ # build request
378
+ d = {
379
+ "ProjectId": self.config.project_id,
380
+ }
381
+ req and d.update(req)
382
+ d = apis.GetCertificateV2RequestSchema().dumps(d)
383
+
384
+ resp = self.invoke("GetCertificateV2", d, **kwargs)
385
+ return apis.GetCertificateV2ResponseSchema().loads(resp)
386
+
387
+ def get_new_ucdn_domain_bandwidth(
388
+ self, req: typing.Optional[dict] = None, **kwargs
389
+ ) -> dict:
390
+ """GetNewUcdnDomainBandwidth - 获取域名带宽数据
391
+
392
+ **Request**
393
+
394
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
395
+ - **Type** (int) - (Required) 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度)
396
+ - **Areacode** (str) - 查询带宽区域 cn代表国内 abroad代表海外 不填默认为全部区域
397
+ - **BeginTime** (int) - 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。
398
+ - **DomainId** (list) - 域名id,创建域名时生成的id。默认全部域名
399
+ - **EndTime** (int) - 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。
400
+
401
+ **Response**
402
+
403
+ - **BandwidthList** (list) - 见 **BandwidthInfo** 模型定义
404
+ - **Traffic** (float) - 从起始时间到结束时间内的所使用的CDN总流量,单位GB
405
+
406
+ **Response Model**
407
+
408
+ **BandwidthInfo**
409
+ - **CdnBandwidth** (float) - 返回值返回指定时间区间内CDN的带宽峰值,单位Mbps(如果请求参数Type为0,则Value是五分钟粒度的带宽值,如果Type为1,则Value是1小时的带宽峰值,如果Type为2,则Value是一天内的带宽峰值)
410
+ - **Time** (int) - 带宽获取的时间点。格式:时间戳
411
+
412
+
413
+ """
414
+ # build request
415
+ d = {
416
+ "ProjectId": self.config.project_id,
417
+ }
418
+ req and d.update(req)
419
+ d = apis.GetNewUcdnDomainBandwidthRequestSchema().dumps(d)
420
+
421
+ resp = self.invoke("GetNewUcdnDomainBandwidth", d, **kwargs)
422
+ return apis.GetNewUcdnDomainBandwidthResponseSchema().loads(resp)
423
+
424
+ def get_new_ucdn_domain_hit_rate(
425
+ self, req: typing.Optional[dict] = None, **kwargs
426
+ ) -> dict:
427
+ """GetNewUcdnDomainHitRate - 获取域名命中率
428
+
429
+ **Request**
430
+
431
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
432
+ - **Areacode** (str) - 查询带宽区域 cn代表国内 abroad代表海外,只支持国内
433
+ - **BeginTime** (int) - 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。
434
+ - **DomainId** (list) - 域名id,创建域名时生成的id。默认全部域名
435
+ - **EndTime** (int) - 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。
436
+ - **Type** (int) - 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度)默认5分钟
437
+
438
+ **Response**
439
+
440
+ - **HitRateList** (list) - 见 **HitRateInfo** 模型定义
441
+
442
+ **Response Model**
443
+
444
+ **HitRateInfo**
445
+ - **FlowHitRate** (float) - 总流量命中率,单位%
446
+ - **RequestHitRate** (float) - 请求数命中率,单位%
447
+ - **Time** (int) - 带宽获取的时间点。格式:时间戳
448
+
449
+
450
+ """
451
+ # build request
452
+ d = {
453
+ "ProjectId": self.config.project_id,
454
+ }
455
+ req and d.update(req)
456
+ d = apis.GetNewUcdnDomainHitRateRequestSchema().dumps(d)
457
+
458
+ resp = self.invoke("GetNewUcdnDomainHitRate", d, **kwargs)
459
+ return apis.GetNewUcdnDomainHitRateResponseSchema().loads(resp)
460
+
461
+ def get_new_ucdn_domain_http_code(
462
+ self, req: typing.Optional[dict] = None, **kwargs
463
+ ) -> dict:
464
+ """GetNewUcdnDomainHttpCode - 获取域名状态码监控
465
+
466
+ **Request**
467
+
468
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
469
+ - **Type** (int) - (Required) 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度)
470
+ - **Areacode** (str) - 查询带宽区域 cn代表国内 abroad代表海外,只支持国内
471
+ - **BeginTime** (int) - 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。
472
+ - **DomainId** (list) - 域名id,创建域名时生成的id。默认全部域名
473
+ - **EndTime** (int) - 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。
474
+
475
+ **Response**
476
+
477
+ - **HttpCodeDetail** (list) - 见 **HttpCodeInfo** 模型定义
478
+
479
+ **Response Model**
480
+
481
+ **HttpCodeInfo**
482
+ - **HttpFiveXX** (int) - 5xx数量
483
+ - **HttpFourXX** (int) - 4xx数量
484
+ - **HttpOneXX** (int) - 1xx数量
485
+ - **HttpThreeXX** (int) - 3xx数量
486
+ - **HttpTwoXX** (int) - 2xx数量
487
+ - **Time** (int) - 带宽获取的时间点。格式:时间戳
488
+
489
+
490
+ """
491
+ # build request
492
+ d = {
493
+ "ProjectId": self.config.project_id,
494
+ }
495
+ req and d.update(req)
496
+ d = apis.GetNewUcdnDomainHttpCodeRequestSchema().dumps(d)
497
+
498
+ resp = self.invoke("GetNewUcdnDomainHttpCode", d, **kwargs)
499
+ return apis.GetNewUcdnDomainHttpCodeResponseSchema().loads(resp)
500
+
501
+ def get_new_ucdn_domain_http_code_v2(
502
+ self, req: typing.Optional[dict] = None, **kwargs
503
+ ) -> dict:
504
+ """GetNewUcdnDomainHttpCodeV2 - 获取域名详细状态码监控
505
+
506
+ **Request**
507
+
508
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
509
+ - **BeginTime** (int) - (Required) 查询的起始时间,格式为Unix Timestamp。
510
+ - **EndTime** (int) - (Required) 查询的结束时间,格式为Unix Timestamp。
511
+ - **Type** (int) - (Required) 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天粒度,3表示按照一分钟粒度)
512
+ - **Areacode** (str) - 查询带宽区域 cn代表国内 abroad代表海外,只支持国内
513
+ - **DomainId** (list) - 域名id,创建域名时生成的id。默认全部域名
514
+
515
+ **Response**
516
+
517
+ - **HttpCodeV2Detail** (list) - 见 **HttpCodeV2Detail** 模型定义
518
+
519
+ **Response Model**
520
+
521
+ **HttpCodeV2Detail**
522
+ - **Http100** (int) - http100数量
523
+ - **Http101** (int) - http101数量
524
+ - **Http102** (int) - http102数量
525
+ - **Http200** (int) - http200数量
526
+ - **Http201** (int) - http201数量
527
+ - **Http202** (int) - http202数量
528
+ - **Http203** (int) - http203数量
529
+ - **Http204** (int) - http204数量
530
+ - **Http205** (int) - http205数量
531
+ - **Http206** (int) - http206数量
532
+ - **Http207** (int) - http207数量
533
+ - **Http300** (int) - http300数量
534
+ - **Http301** (int) - http301数量
535
+ - **Http302** (int) - http302数量
536
+ - **Http303** (int) - http303数量
537
+ - **Http304** (int) - http304数量
538
+ - **Http305** (int) - http305数量
539
+ - **Http306** (int) - http306数量
540
+ - **Http307** (int) - http307数量
541
+ - **Http400** (int) - http400数量
542
+ - **Http401** (int) - http401数量
543
+ - **Http402** (int) - http402数量
544
+ - **Http403** (int) - http403数量
545
+ - **Http404** (int) - http404数量
546
+ - **Http405** (int) - http405数量
547
+ - **Http406** (int) - http406数量
548
+ - **Http407** (int) - http407数量
549
+ - **Http408** (int) - http408数量
550
+ - **Http409** (int) - http409数量
551
+ - **Http410** (int) - http410数量
552
+ - **Http411** (int) - http411数量
553
+ - **Http412** (int) - http412数量
554
+ - **Http413** (int) - http413数量
555
+ - **Http414** (int) - http414数量
556
+ - **Http415** (int) - http415数量
557
+ - **Http416** (int) - http416数量
558
+ - **Http417** (int) - http417数量
559
+ - **Http418** (int) - http418数量
560
+ - **Http421** (int) - http421数量
561
+ - **Http422** (int) - http422数量
562
+ - **Http423** (int) - http423数量
563
+ - **Http424** (int) - http424数量
564
+ - **Http425** (int) - http425数量
565
+ - **Http426** (int) - http426数量
566
+ - **Http449** (int) - http449数量
567
+ - **Http451** (int) - http451数量
568
+ - **Http500** (int) - http500数量
569
+ - **Http501** (int) - http501数量
570
+ - **Http502** (int) - http502数量
571
+ - **Http503** (int) - http503数量
572
+ - **Http504** (int) - http504数量
573
+ - **Http505** (int) - http505数量
574
+ - **Http506** (int) - http506数量
575
+ - **Http507** (int) - http507数量
576
+ - **Http509** (int) - http509数量
577
+ - **Http510** (int) - http510数量
578
+ - **Time** (int) - 时间
579
+ - **Total** (int) - 当前分组的总状态码数
580
+
581
+
582
+ """
583
+ # build request
584
+ d = {
585
+ "ProjectId": self.config.project_id,
586
+ }
587
+ req and d.update(req)
588
+ d = apis.GetNewUcdnDomainHttpCodeV2RequestSchema().dumps(d)
589
+
590
+ resp = self.invoke("GetNewUcdnDomainHttpCodeV2", d, **kwargs)
591
+ return apis.GetNewUcdnDomainHttpCodeV2ResponseSchema().loads(resp)
592
+
593
+ def get_new_ucdn_domain_request_num(
594
+ self, req: typing.Optional[dict] = None, **kwargs
595
+ ) -> dict:
596
+ """GetNewUcdnDomainRequestNum - 获取域名请求数
597
+
598
+ **Request**
599
+
600
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
601
+ - **Type** (int) - (Required) 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度)
602
+ - **Areacode** (str) - 查询区域 cn代表国内 abroad代表海外,只支持国内
603
+ - **BeginTime** (int) - 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。
604
+ - **DomainId** (list) - 域名id,创建域名时生成的id。默认全部域名
605
+ - **EndTime** (int) - 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。
606
+
607
+ **Response**
608
+
609
+ - **RequestList** (list) - 见 **RequestInfo** 模型定义
610
+
611
+ **Response Model**
612
+
613
+ **RequestInfo**
614
+ - **CdnRequest** (float) - 返回值返回指定时间区间内的cdn收到的请求次数之和
615
+ - **OriginRequest** (float) - 返回值返回指定时间区间内的cdn回源的请求次数之和
616
+ - **Time** (int) - 带宽获取的时间点。格式:时间戳
617
+
618
+
619
+ """
620
+ # build request
621
+ d = {
622
+ "ProjectId": self.config.project_id,
623
+ }
624
+ req and d.update(req)
625
+ d = apis.GetNewUcdnDomainRequestNumRequestSchema().dumps(d)
626
+
627
+ resp = self.invoke("GetNewUcdnDomainRequestNum", d, **kwargs)
628
+ return apis.GetNewUcdnDomainRequestNumResponseSchema().loads(resp)
629
+
630
+ def get_new_ucdn_log_client_ip_statistics(
631
+ self, req: typing.Optional[dict] = None, **kwargs
632
+ ) -> dict:
633
+ """GetNewUcdnLogClientIpStatistics - 获取日志客户端ip统计
634
+
635
+ **Request**
636
+
637
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
638
+ - **DomainId** (str) - (Required) 域名id,创建域名时生成的id
639
+ - **BeginTime** (int) - 查询的日期,单位:Unix时间戳。只支持按天查询
640
+ - **Limit** (str) - 返回结果数量限制,返回最多100条
641
+ - **OrderBy** (int) - 0表示按照下载次数降序排列,1表示按流量降序排列,默认为0
642
+ - **Type** (int) - 1表示按照1小时粒度,2表示按照一天的粒度 默认是天
643
+
644
+ **Response**
645
+
646
+ - **Action** (str) - 操作名称
647
+ - **ClientIpStatisticsList** (list) - 见 **ClientIpStatisticsList** 模型定义
648
+ - **RetCode** (int) - 返回码
649
+
650
+ **Response Model**
651
+
652
+ **ClientIpStatisticsList**
653
+ - **Flow** (int) - 流量单位字节
654
+ - **FlowPercent** (float) - 流量占比
655
+ - **IP** (str) - 客户端IP
656
+ - **RequestPercent** (float) - 请求数占比
657
+ - **Requst** (int) - 请求数
658
+
659
+
660
+ """
661
+ # build request
662
+ d = {
663
+ "ProjectId": self.config.project_id,
664
+ }
665
+ req and d.update(req)
666
+ d = apis.GetNewUcdnLogClientIpStatisticsRequestSchema().dumps(d)
667
+
668
+ resp = self.invoke("GetNewUcdnLogClientIpStatistics", d, **kwargs)
669
+ return apis.GetNewUcdnLogClientIpStatisticsResponseSchema().loads(resp)
670
+
671
+ def get_new_ucdn_log_referer_statistics(
672
+ self, req: typing.Optional[dict] = None, **kwargs
673
+ ) -> dict:
674
+ """GetNewUcdnLogRefererStatistics - 获取热点referer统计
675
+
676
+ **Request**
677
+
678
+ - **Areacode** (str) - 查询带宽区域 cn代表国内 abroad代表海外 ;目前只支持国内
679
+ - **BeginTime** (int) - 查询带宽的起始时间,格式:时间戳
680
+ - **DomainId** (str) - 域名id,创建域名时生成的id
681
+ - **EndTime** (int) - 查询统计日志的结束时间,格式:时间戳。最大时间间隔30天
682
+ - **Limit** (int) - 返回的结果数量限制,默认1000
683
+ - **OrderBy** (int) - 0表示按流量降序排列,1表示按照下载次数降序排列,默认为0
684
+
685
+ **Response**
686
+
687
+ - **RefererStatistics** (list) - 见 **RefererStatistics** 模型定义
688
+
689
+ **Response Model**
690
+
691
+ **RefererStatistics**
692
+ - **Date** (str) - 日期
693
+ - **RefererList** (list) - 见 **RefererList** 模型定义
694
+
695
+
696
+ **RefererList**
697
+ - **Percent** (float) - 次数占比,单位%
698
+ - **Referer** (str) - 客户端请求的referer
699
+ - **RequestTimes** (int) - 次数
700
+
701
+
702
+ """
703
+ # build request
704
+ d = {}
705
+ req and d.update(req)
706
+ d = apis.GetNewUcdnLogRefererStatisticsRequestSchema().dumps(d)
707
+
708
+ resp = self.invoke("GetNewUcdnLogRefererStatistics", d, **kwargs)
709
+ return apis.GetNewUcdnLogRefererStatisticsResponseSchema().loads(resp)
710
+
711
+ def get_new_ucdn_log_url_statistics(
712
+ self, req: typing.Optional[dict] = None, **kwargs
713
+ ) -> dict:
714
+ """GetNewUcdnLogUrlStatistics - 获取日志url统计
715
+
716
+ **Request**
717
+
718
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
719
+ - **DomainId** (str) - (Required) 域名Id
720
+ - **Areacode** (str) - 查询带宽区域 cn代表国内 abroad代表海外 只支持国内
721
+ - **BeginTime** (int) - 查询带宽的起始时间,格式:时间戳
722
+ - **EndTime** (int) - 查询统计日志的结束时间,格式:时间戳,只能支持查询1天。可不填
723
+ - **Limit** (int) - 返回的结果数量限制,默认1000
724
+ - **OrderBy** (int) - 0表示按流量降序排列,1表示按照下载次数降序排列,默认为0
725
+
726
+ **Response**
727
+
728
+ - **UrlStatisticsList** (list) - 见 **UrlStatistics** 模型定义
729
+
730
+ **Response Model**
731
+
732
+ **UrlStatistics**
733
+ - **Date** (str) - 日期
734
+ - **UrlList** (list) - 见 **DownloadStatisticInfo** 模型定义
735
+
736
+
737
+ **DownloadStatisticInfo**
738
+ - **DownloadTimes** (int) - 下载次数
739
+ - **Percent** (float) - 流量占比,单位%
740
+ - **Traffic** (float) - 流量(单位为G)
741
+ - **Url** (str) - 下载链接的url
742
+
743
+
744
+ """
745
+ # build request
746
+ d = {
747
+ "ProjectId": self.config.project_id,
748
+ }
749
+ req and d.update(req)
750
+ d = apis.GetNewUcdnLogUrlStatisticsRequestSchema().dumps(d)
751
+
752
+ resp = self.invoke("GetNewUcdnLogUrlStatistics", d, **kwargs)
753
+ return apis.GetNewUcdnLogUrlStatisticsResponseSchema().loads(resp)
754
+
755
+ def get_ucdn_domain_95bandwidth_v2(
756
+ self, req: typing.Optional[dict] = None, **kwargs
757
+ ) -> dict:
758
+ """GetUcdnDomain95BandwidthV2 - 获取域名九五峰值带宽数据
759
+
760
+ **Request**
761
+
762
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
763
+ - **BeginTime** (int) - (Required) 查询的起始日期,格式为Unix Timestamp
764
+ - **EndTime** (int) - (Required) 查询的结束日期,格式为Unix Timestamp
765
+ - **Areacode** (str) - 查询带宽区域 cn代表国内 abroad代表海外 不填默认为全部区域
766
+ - **DomainId** (list) - 域名id,创建域名时生成的id。默认全部域名
767
+ - **IsDcdn** (bool) - 是否是动态加速 默认是false
768
+
769
+ **Response**
770
+
771
+ - **CdnBandwidth** (float) - 查询期间的CDN的95带宽值,单位Mbps
772
+ - **Time** (int) - 查询时间期间的95带宽时间点 Unix时间戳
773
+
774
+ """
775
+ # build request
776
+ d = {
777
+ "ProjectId": self.config.project_id,
778
+ }
779
+ req and d.update(req)
780
+ d = apis.GetUcdnDomain95BandwidthV2RequestSchema().dumps(d)
781
+
782
+ resp = self.invoke("GetUcdnDomain95BandwidthV2", d, **kwargs)
783
+ return apis.GetUcdnDomain95BandwidthV2ResponseSchema().loads(resp)
784
+
785
+ def get_ucdn_domain_bandwidth_by_ip_protocol(
786
+ self, req: typing.Optional[dict] = None, **kwargs
787
+ ) -> dict:
788
+ """GetUcdnDomainBandwidthByIpProtocol - 获取域名带宽数据按ip协议(新)
789
+
790
+ **Request**
791
+
792
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
793
+ - **IpProtocol** (str) - (Required) 协议,ipv4、ipv6
794
+ - **Type** (int) - (Required) 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度,3表示按照1分钟粒度)
795
+ - **Areacode** (str) - 查询带宽区域 cn代表国内 abroad代表海外 不填默认为全部区域
796
+ - **BeginTime** (int) - 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。
797
+ - **DomainId** (list) - 域名id,创建域名时生成的id。默认全部域名
798
+ - **EndTime** (int) - 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。
799
+
800
+ **Response**
801
+
802
+ - **BandwidthTrafficList** (list) - 见 **BandwidthTrafficInfo** 模型定义
803
+
804
+ **Response Model**
805
+
806
+ **BandwidthTrafficInfo**
807
+ - **CdnBandwidth** (float) - 返回值返回指定时间区间内CDN的带宽峰值,单位Mbps(如果请求参数Type为0,则Value是五分钟粒度的带宽值,如果Type为1,则Value是1小时的带宽峰值,如果Type为2,则Value是一天内的带宽峰值)
808
+ - **Time** (int) - 带宽获取的时间点。格式:时间戳
809
+ - **Traffic** (float) - 对应时间粒度的流量,单位字节
810
+
811
+
812
+ """
813
+ # build request
814
+ d = {
815
+ "ProjectId": self.config.project_id,
816
+ }
817
+ req and d.update(req)
818
+ d = apis.GetUcdnDomainBandwidthByIpProtocolRequestSchema().dumps(d)
819
+
820
+ resp = self.invoke("GetUcdnDomainBandwidthByIpProtocol", d, **kwargs)
821
+ return apis.GetUcdnDomainBandwidthByIpProtocolResponseSchema().loads(
822
+ resp
823
+ )
824
+
825
+ def get_ucdn_domain_bandwidth_v2(
826
+ self, req: typing.Optional[dict] = None, **kwargs
827
+ ) -> dict:
828
+ """GetUcdnDomainBandwidthV2 - 获取域名带宽数据(新)
829
+
830
+ **Request**
831
+
832
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
833
+ - **Areacode** (str) - 查询带宽区域 cn代表国内 abroad代表海外 不填默认为全部区域
834
+ - **BeginTime** (int) - 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。
835
+ - **DomainId** (list) - 域名id,创建域名时生成的id。默认全部域名;例(DomainId.0=ucdn-xxxxxx;DomainId.1=ucdn-xxxxxx)
836
+ - **EndTime** (int) - 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。
837
+ - **IsDcdn** (bool) - 是否全站加速,默认false
838
+ - **Primeval** (int) - 原始带宽,不为0则获取原始带宽,默认为0
839
+ - **Protocol** (str) - 协议,http、https、websocket、quic 不传则查所有协议的带宽,可以查多个协议,用逗号分隔
840
+ - **Type** (int) - 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度,3表示按照1分钟粒度)
841
+
842
+ **Response**
843
+
844
+ - **BandwidthTrafficList** (list) - 见 **BandwidthTrafficInfo** 模型定义
845
+
846
+ **Response Model**
847
+
848
+ **BandwidthTrafficInfo**
849
+ - **CdnBandwidth** (float) - 返回值返回指定时间区间内CDN的带宽峰值,单位Mbps(如果请求参数Type为0,则Value是五分钟粒度的带宽值,如果Type为1,则Value是1小时的带宽峰值,如果Type为2,则Value是一天内的带宽峰值)
850
+ - **Time** (int) - 带宽获取的时间点。格式:时间戳
851
+ - **Traffic** (float) - 对应时间粒度的流量,单位字节
852
+
853
+
854
+ """
855
+ # build request
856
+ d = {
857
+ "ProjectId": self.config.project_id,
858
+ }
859
+ req and d.update(req)
860
+ d = apis.GetUcdnDomainBandwidthV2RequestSchema().dumps(d)
861
+
862
+ resp = self.invoke("GetUcdnDomainBandwidthV2", d, **kwargs)
863
+ return apis.GetUcdnDomainBandwidthV2ResponseSchema().loads(resp)
864
+
865
+ def get_ucdn_domain_config(
866
+ self, req: typing.Optional[dict] = None, **kwargs
867
+ ) -> dict:
868
+ """GetUcdnDomainConfig - 批量获取加速域名配置
869
+
870
+ **Request**
871
+
872
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
873
+ - **ChannelType** (str) - 产品类型ucdn,可不填,默认为ucdn
874
+ - **Domain** (list) - 域名
875
+ - **DomainId** (list) - 域名id,创建域名时生成的id。默认获取账号下的所有域名信息,n为自然数,从DomainId.0开始。
876
+ - **IsDcdn** (bool) - 是否是动态加速 默认是false
877
+ - **Limit** (int) - 返回数据长度, 默认全部,非负整数
878
+ - **Offset** (int) - 数据偏移量,默认0,非负整数
879
+
880
+ **Response**
881
+
882
+ - **DomainList** (list) - 见 **DomainConfigInfo** 模型定义
883
+
884
+ **Response Model**
885
+
886
+ **DomainConfigInfo**
887
+ - **AccessControlConf** (dict) - 见 **AccessControlConf** 模型定义
888
+ - **AdvancedConf** (dict) - 见 **AdvancedConf** 模型定义
889
+ - **AreaCode** (str) - 查询带宽区域 cn代表国内 abroad代表海外 all表示全部区域
890
+ - **CacheConf** (dict) - 见 **CacheAllConfig** 模型定义
891
+ - **CdnType** (str) - 加速域名的业务类型,web代表网站,stream代表视频 ,download 代表下载
892
+ - **CertNameAbroad** (str) - 国外证书名称
893
+ - **CertNameCn** (str) - 国内证书名称
894
+ - **Cname** (str) - cdn域名。创建加速域名生成的cdn域名,用于设置CNAME记录
895
+ - **CreateTime** (int) - 域名创建的时间。格式:时间戳
896
+ - **Domain** (str) - 域名
897
+ - **DomainId** (str) - 域名Id
898
+ - **HttpsStatusAbroad** (str) - 国外https状态 enableing-开启中 fail-开启失败 enable-启用 disable-未启用
899
+ - **HttpsStatusCn** (str) - 国内https状态 enableing-开启中 fail-开启失败 enable-启用 disable-未启用
900
+ - **OriginConf** (dict) - 见 **OriginConf** 模型定义
901
+ - **Status** (str) - 创建的加速域名的当前的状态。check代表审核中;checkSuccess代表审核通过;checkFail代表审核失败;enable代表加速中;disable代表停止加速;delete代表删除加速;enableing代表正在开启加速;disableing代表正在停止加速中;deleteing代表删除中;deploying代表部署中
902
+ - **Tag** (str) - 业务组:Default
903
+ - **TestUrl** (str) - 测试url。用于域名创建加速时的测试
904
+
905
+
906
+ **AccessControlConf**
907
+ - **IpBlackList** (list) - ip黑名单,多个ip,可表示为:IpBlackList.0=1.1.1.1,IpBlackList.1=2.2.2.2
908
+ - **ReferConf** (dict) - 见 **ReferConf** 模型定义
909
+
910
+
911
+ **ReferConf**
912
+ - **NullRefer** (int) - ReferType为白名单时(删除),NullRefer为0代表不允许NULL refer访问,为1代表允许Null refer访问
913
+ - **ReferList** (list) - Refer防盗链规则列表,支持正则表达式
914
+ - **ReferType** (int) - Refer防盗链配置 0白名单,1黑名单
915
+
916
+
917
+ **AdvancedConf**
918
+ - **Http2Https** (bool) - http转https回源 true是,false否
919
+ - **HttpClientHeader** (list) - 客户端响应http头列表
920
+ - **HttpOriginHeader** (list) - 源站http头列表
921
+ - **QuicEnable** (bool) - 是否开启quic
922
+ - **WebSocketEnable** (bool) - 是否开启websocket
923
+
924
+
925
+ **CacheAllConfig**
926
+ - **CacheHost** (str) - 缓存Host,不同的域名可以配置为同一个CacheHost来实现缓存共享,默认为加速域名
927
+ - **CacheKeyList** (list) - 见 **CacheKeyInfo** 模型定义
928
+ - **CacheList** (list) - 见 **CacheConf** 模型定义
929
+ - **HttpCodeCacheList** (list) - 见 **CacheConf** 模型定义
930
+
931
+
932
+ **CacheKeyInfo**
933
+ - **Ignore** (bool) - 是否忽略
934
+ - **PathPattern** (str) - 路径模式,支持正则
935
+ - **QueryString** (str) - 自定义变量,以$符号开头,多个变量用加号(+)连接,$querystring表示所有变量
936
+
937
+
938
+ **CacheConf**
939
+ - **CacheBehavior** (bool) - 是否缓存,true为缓存,flase为不缓存。为flase的情况下,CacheTTL和CacheUnit强制不生效
940
+ - **CacheTTL** (int) - 缓存时间
941
+ - **CacheUnit** (str) - 缓存时间的单位。sec(秒),min(分钟),hour(小时),day(天)。上限1年。
942
+ - **Description** (str) - 缓存规则描述
943
+ - **FollowOriginRule** (bool) - 是否优先遵循源站头部缓存策略,false为不优先遵循源站,true为优先遵循源站缓存头部。默认为0
944
+ - **HttpCodePattern** (str) - 状态码模式,非200,206状态码,多个状态码用竖线(|)分隔,该属性仅仅在状态码缓存配置列表中返回
945
+ - **PathPattern** (str) - 路径模式,支持正则
946
+
947
+
948
+ **OriginConf**
949
+ - **BackupOriginEnable** (bool) - 1如果为false表示BackupOriginIp为空,表示没有备份源站,忽略BackupOriginIp,BackupOriginHost字段2如果为true表示BackupOriginIp.n必须至少有一个备份源站地址
950
+ - **BackupOriginHost** (str) - 备份回源Http请求头部Host,默认是加速域名
951
+ - **BackupOriginIpList** (list) - 备份源站ip即cdn服务器回源访问的ip地址。多个源站ip,可以这样表述,如:["1.1.1.1","2.2.2.2"]
952
+ - **OriginErrorCode** (str) - 主源响应的回源错误码(如:404|500),默认空字符串
953
+ - **OriginErrorNum** (int) - 回主源的回源失败数,默认1
954
+ - **OriginFollow301** (int) - 跟随301跳转 0=不跟随 1=跟随
955
+ - **OriginHost** (str) - 回源Http请求头部Host,默认是加速域名
956
+ - **OriginIpList** (list) - 源站ip即cdn服务器回源访问的ip地址。多个源站ip,可以这样表述,如:["1.1.1.1","2.2.2.2"]
957
+ - **OriginPort** (int) - 回源端口
958
+ - **OriginProtocol** (str) - 源站协议http,http|https 默认http
959
+
960
+
961
+ """
962
+ # build request
963
+ d = {
964
+ "ProjectId": self.config.project_id,
965
+ }
966
+ req and d.update(req)
967
+ d = apis.GetUcdnDomainConfigRequestSchema().dumps(d)
968
+
969
+ resp = self.invoke("GetUcdnDomainConfig", d, **kwargs)
970
+ return apis.GetUcdnDomainConfigResponseSchema().loads(resp)
971
+
972
+ def get_ucdn_domain_hit_rate(
973
+ self, req: typing.Optional[dict] = None, **kwargs
974
+ ) -> dict:
975
+ """GetUcdnDomainHitRate - 获取域名命中率
976
+
977
+ **Request**
978
+
979
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
980
+ - **Type** (int) - (Required) 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度,3表示按照一分钟的粒度)默认5分钟
981
+ - **Areacode** (str) - 查询带宽区域 cn代表国内 abroad代表海外,只支持国内
982
+ - **BeginTime** (int) - 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。
983
+ - **DomainId** (list) - 域名id,创建域名时生成的id。默认全部域名
984
+ - **EndTime** (int) - 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。
985
+ - **HitType** (int) - 默认是0
986
+ - **IsDcdn** (bool) - 是否全站加速,默认false
987
+
988
+ **Response**
989
+
990
+ - **HitRateList** (list) - 见 **HitRateInfoV2** 模型定义
991
+
992
+ **Response Model**
993
+
994
+ **HitRateInfoV2**
995
+ - **FlowHitRate** (float) - 总流量命中率,单位%
996
+ - **RequestHitRate** (float) - 请求数命中率,单位%
997
+ - **Time** (int) - 带宽获取的时间点。格式:时间戳
998
+
999
+
1000
+ """
1001
+ # build request
1002
+ d = {
1003
+ "ProjectId": self.config.project_id,
1004
+ }
1005
+ req and d.update(req)
1006
+ d = apis.GetUcdnDomainHitRateRequestSchema().dumps(d)
1007
+
1008
+ resp = self.invoke("GetUcdnDomainHitRate", d, **kwargs)
1009
+ return apis.GetUcdnDomainHitRateResponseSchema().loads(resp)
1010
+
1011
+ def get_ucdn_domain_http_code_v2(
1012
+ self, req: typing.Optional[dict] = None, **kwargs
1013
+ ) -> dict:
1014
+ """GetUcdnDomainHttpCodeV2 - 获取域名状态码信息
1015
+
1016
+ **Request**
1017
+
1018
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
1019
+ - **Type** (int) - (Required) 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度,3表示1分钟粒度)
1020
+ - **Areacode** (str) - 查询带宽区域 cn代表国内 abroad代表海外,只支持国内
1021
+ - **BeginTime** (int) - 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。
1022
+ - **DomainId** (list) - 域名id,创建域名时生成的id。默认全部域名
1023
+ - **EndTime** (int) - 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。
1024
+ - **IsDcdn** (bool) - 是否全站加速 默认false
1025
+ - **Layer** (str) - edge 表示边缘
1026
+
1027
+ **Response**
1028
+
1029
+ - **HttpCodeDetail** (list) - 见 **HttpCodeInfoV2** 模型定义
1030
+
1031
+ **Response Model**
1032
+
1033
+ **HttpCodeInfoV2**
1034
+ - **Http1XX** (dict) - 见 **HttpCodeV2Detail** 模型定义
1035
+ - **Http2XX** (dict) - 见 **HttpCodeV2Detail** 模型定义
1036
+ - **Http3XX** (dict) - 见 **HttpCodeV2Detail** 模型定义
1037
+ - **Http4XX** (dict) - 见 **HttpCodeV2Detail** 模型定义
1038
+ - **Http5XX** (dict) - 见 **HttpCodeV2Detail** 模型定义
1039
+ - **Http6XX** (dict) - 见 **HttpCodeV2Detail** 模型定义
1040
+ - **Time** (int) - 带宽获取的时间点。格式:时间戳
1041
+
1042
+
1043
+ **HttpCodeV2Detail**
1044
+ - **Http100** (int) - http100数量
1045
+ - **Http101** (int) - http101数量
1046
+ - **Http102** (int) - http102数量
1047
+ - **Http200** (int) - http200数量
1048
+ - **Http201** (int) - http201数量
1049
+ - **Http202** (int) - http202数量
1050
+ - **Http203** (int) - http203数量
1051
+ - **Http204** (int) - http204数量
1052
+ - **Http205** (int) - http205数量
1053
+ - **Http206** (int) - http206数量
1054
+ - **Http207** (int) - http207数量
1055
+ - **Http300** (int) - http300数量
1056
+ - **Http301** (int) - http301数量
1057
+ - **Http302** (int) - http302数量
1058
+ - **Http303** (int) - http303数量
1059
+ - **Http304** (int) - http304数量
1060
+ - **Http305** (int) - http305数量
1061
+ - **Http306** (int) - http306数量
1062
+ - **Http307** (int) - http307数量
1063
+ - **Http400** (int) - http400数量
1064
+ - **Http401** (int) - http401数量
1065
+ - **Http402** (int) - http402数量
1066
+ - **Http403** (int) - http403数量
1067
+ - **Http404** (int) - http404数量
1068
+ - **Http405** (int) - http405数量
1069
+ - **Http406** (int) - http406数量
1070
+ - **Http407** (int) - http407数量
1071
+ - **Http408** (int) - http408数量
1072
+ - **Http409** (int) - http409数量
1073
+ - **Http410** (int) - http410数量
1074
+ - **Http411** (int) - http411数量
1075
+ - **Http412** (int) - http412数量
1076
+ - **Http413** (int) - http413数量
1077
+ - **Http414** (int) - http414数量
1078
+ - **Http415** (int) - http415数量
1079
+ - **Http416** (int) - http416数量
1080
+ - **Http417** (int) - http417数量
1081
+ - **Http418** (int) - http418数量
1082
+ - **Http421** (int) - http421数量
1083
+ - **Http422** (int) - http422数量
1084
+ - **Http423** (int) - http423数量
1085
+ - **Http424** (int) - http424数量
1086
+ - **Http425** (int) - http425数量
1087
+ - **Http426** (int) - http426数量
1088
+ - **Http449** (int) - http449数量
1089
+ - **Http451** (int) - http451数量
1090
+ - **Http500** (int) - http500数量
1091
+ - **Http501** (int) - http501数量
1092
+ - **Http502** (int) - http502数量
1093
+ - **Http503** (int) - http503数量
1094
+ - **Http504** (int) - http504数量
1095
+ - **Http505** (int) - http505数量
1096
+ - **Http506** (int) - http506数量
1097
+ - **Http507** (int) - http507数量
1098
+ - **Http509** (int) - http509数量
1099
+ - **Http510** (int) - http510数量
1100
+ - **Time** (int) - 时间
1101
+ - **Total** (int) - 当前分组的总状态码数
1102
+
1103
+
1104
+ """
1105
+ # build request
1106
+ d = {
1107
+ "ProjectId": self.config.project_id,
1108
+ }
1109
+ req and d.update(req)
1110
+ d = apis.GetUcdnDomainHttpCodeV2RequestSchema().dumps(d)
1111
+
1112
+ resp = self.invoke("GetUcdnDomainHttpCodeV2", d, **kwargs)
1113
+ return apis.GetUcdnDomainHttpCodeV2ResponseSchema().loads(resp)
1114
+
1115
+ def get_ucdn_domain_info_list(
1116
+ self, req: typing.Optional[dict] = None, **kwargs
1117
+ ) -> dict:
1118
+ """GetUcdnDomainInfoList - 获取域名基本信息
1119
+
1120
+ **Request**
1121
+
1122
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
1123
+ - **PageIndex** (int) - 返回第几页,序号从1开始,不填默认是第1页,填0表示不用分页直接返回所有数据
1124
+ - **PageSize** (int) - 分页的大小,不填默认每页20个
1125
+ - **QueryByProject** (bool) - 是否按项目查询,true 或 false 默认为false
1126
+
1127
+ **Response**
1128
+
1129
+ - **DomainInfoList** (list) - 见 **DomainBaseInfo** 模型定义
1130
+ - **TotalCount** (int) - 账户下域名总个数
1131
+
1132
+ **Response Model**
1133
+
1134
+ **DomainBaseInfo**
1135
+ - **Domain** (str) - 域名
1136
+ - **DomainId** (str) - 域名的资源id
1137
+
1138
+
1139
+ """
1140
+ # build request
1141
+ d = {
1142
+ "ProjectId": self.config.project_id,
1143
+ }
1144
+ req and d.update(req)
1145
+ d = apis.GetUcdnDomainInfoListRequestSchema().dumps(d)
1146
+
1147
+ resp = self.invoke("GetUcdnDomainInfoList", d, **kwargs)
1148
+ return apis.GetUcdnDomainInfoListResponseSchema().loads(resp)
1149
+
1150
+ def get_ucdn_domain_log(
1151
+ self, req: typing.Optional[dict] = None, **kwargs
1152
+ ) -> dict:
1153
+ """GetUcdnDomainLog -
1154
+
1155
+ **Request**
1156
+
1157
+ - **ProjectId** (str) - (Config)
1158
+ - **BeginTime** (int) -
1159
+ - **DomainId** (list) -
1160
+ - **EndTime** (int) -
1161
+ - **Type** (int) -
1162
+
1163
+ **Response**
1164
+
1165
+ - **LogSet** (list) - 见 **LogSetList** 模型定义
1166
+
1167
+ **Response Model**
1168
+
1169
+ **LogSetList**
1170
+ - **Domain** (str) -
1171
+ - **Logs** (list) - 见 **LogSetInfo** 模型定义
1172
+
1173
+
1174
+ **LogSetInfo**
1175
+ - **AbroadLog** (list) -
1176
+ - **CnLog** (list) -
1177
+ - **Time** (int) -
1178
+
1179
+
1180
+ """
1181
+ # build request
1182
+ d = {
1183
+ "ProjectId": self.config.project_id,
1184
+ }
1185
+ req and d.update(req)
1186
+ d = apis.GetUcdnDomainLogRequestSchema().dumps(d)
1187
+
1188
+ # build options
1189
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
1190
+
1191
+ resp = self.invoke("GetUcdnDomainLog", d, **kwargs)
1192
+ return apis.GetUcdnDomainLogResponseSchema().loads(resp)
1193
+
1194
+ def get_ucdn_domain_log_v2(
1195
+ self, req: typing.Optional[dict] = None, **kwargs
1196
+ ) -> dict:
1197
+ """GetUcdnDomainLogV2 - 获取域名5分钟日志
1198
+
1199
+ **Request**
1200
+
1201
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
1202
+ - **BeginTime** (int) - (Required) 查询的起始时间,格式为Unix Timestamp
1203
+ - **EndTime** (int) - (Required) 查询的结束时间,格式为Unix Timestamp
1204
+ - **DomainId** (list) - 域名id,创建域名时生成的id。默认全部域名
1205
+ - **IsDcdn** (bool) - 是否全站加速 默认false
1206
+
1207
+ **Response**
1208
+
1209
+ - **DomainLogSet** (list) - 见 **DomanLogList** 模型定义
1210
+
1211
+ **Response Model**
1212
+
1213
+ **DomanLogList**
1214
+ - **Domain** (str) - 域名
1215
+ - **LogList** (list) - 见 **LogInfo** 模型定义
1216
+
1217
+
1218
+ **LogInfo**
1219
+ - **LogTime** (int) - Unix时间戳
1220
+ - **LogUrl** (str) - 日志url地址,多个URL用分号隔开
1221
+
1222
+
1223
+ """
1224
+ # build request
1225
+ d = {
1226
+ "ProjectId": self.config.project_id,
1227
+ }
1228
+ req and d.update(req)
1229
+ d = apis.GetUcdnDomainLogV2RequestSchema().dumps(d)
1230
+
1231
+ resp = self.invoke("GetUcdnDomainLogV2", d, **kwargs)
1232
+ return apis.GetUcdnDomainLogV2ResponseSchema().loads(resp)
1233
+
1234
+ def get_ucdn_domain_origin_http_code(
1235
+ self, req: typing.Optional[dict] = None, **kwargs
1236
+ ) -> dict:
1237
+ """GetUcdnDomainOriginHttpCode -
1238
+
1239
+ **Request**
1240
+
1241
+ - **ProjectId** (str) - (Config)
1242
+ - **Type** (int) - (Required)
1243
+ - **Areacode** (str) -
1244
+ - **BeginTime** (int) -
1245
+ - **DomainId** (list) -
1246
+ - **EndTime** (int) -
1247
+
1248
+ **Response**
1249
+
1250
+ - **HttpCodeDetail** (list) - 见 **HttpCodeInfo** 模型定义
1251
+
1252
+ **Response Model**
1253
+
1254
+ **HttpCodeInfo**
1255
+ - **HttpFiveXX** (int) -
1256
+ - **HttpFourXX** (int) -
1257
+ - **HttpOneXX** (int) -
1258
+ - **HttpThreeXX** (int) -
1259
+ - **HttpTwoXX** (int) -
1260
+ - **Time** (int) -
1261
+
1262
+
1263
+ """
1264
+ # build request
1265
+ d = {
1266
+ "ProjectId": self.config.project_id,
1267
+ }
1268
+ req and d.update(req)
1269
+ d = apis.GetUcdnDomainOriginHttpCodeRequestSchema().dumps(d)
1270
+
1271
+ # build options
1272
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
1273
+
1274
+ resp = self.invoke("GetUcdnDomainOriginHttpCode", d, **kwargs)
1275
+ return apis.GetUcdnDomainOriginHttpCodeResponseSchema().loads(resp)
1276
+
1277
+ def get_ucdn_domain_origin_http_code_detail(
1278
+ self, req: typing.Optional[dict] = None, **kwargs
1279
+ ) -> dict:
1280
+ """GetUcdnDomainOriginHttpCodeDetail -
1281
+
1282
+ **Request**
1283
+
1284
+ - **ProjectId** (str) - (Config)
1285
+ - **BeginTime** (int) - (Required)
1286
+ - **EndTime** (int) - (Required)
1287
+ - **Type** (int) - (Required)
1288
+ - **Areacode** (str) -
1289
+ - **DomainId** (list) -
1290
+
1291
+ **Response**
1292
+
1293
+ - **HttpCodeV2Detail** (list) - 见 **HttpCodeV2Detail** 模型定义
1294
+
1295
+ **Response Model**
1296
+
1297
+ **HttpCodeV2Detail**
1298
+ - **Http100** (int) -
1299
+ - **Http101** (int) -
1300
+ - **Http102** (int) -
1301
+ - **Http200** (int) -
1302
+ - **Http201** (int) -
1303
+ - **Http202** (int) -
1304
+ - **Http203** (int) -
1305
+ - **Http204** (int) -
1306
+ - **Http205** (int) -
1307
+ - **Http206** (int) -
1308
+ - **Http207** (int) -
1309
+ - **Http300** (int) -
1310
+ - **Http301** (int) -
1311
+ - **Http302** (int) -
1312
+ - **Http303** (int) -
1313
+ - **Http304** (int) -
1314
+ - **Http305** (int) -
1315
+ - **Http306** (int) -
1316
+ - **Http307** (int) -
1317
+ - **Http400** (int) -
1318
+ - **Http401** (int) -
1319
+ - **Http402** (int) -
1320
+ - **Http403** (int) -
1321
+ - **Http404** (int) -
1322
+ - **Http405** (int) -
1323
+ - **Http406** (int) -
1324
+ - **Http407** (int) -
1325
+ - **Http408** (int) -
1326
+ - **Http409** (int) -
1327
+ - **Http410** (int) -
1328
+ - **Http411** (int) -
1329
+ - **Http412** (int) -
1330
+ - **Http413** (int) -
1331
+ - **Http414** (int) -
1332
+ - **Http415** (int) -
1333
+ - **Http416** (int) -
1334
+ - **Http417** (int) -
1335
+ - **Http418** (int) -
1336
+ - **Http421** (int) -
1337
+ - **Http422** (int) -
1338
+ - **Http423** (int) -
1339
+ - **Http424** (int) -
1340
+ - **Http425** (int) -
1341
+ - **Http426** (int) -
1342
+ - **Http449** (int) -
1343
+ - **Http451** (int) -
1344
+ - **Http500** (int) -
1345
+ - **Http501** (int) -
1346
+ - **Http502** (int) -
1347
+ - **Http503** (int) -
1348
+ - **Http504** (int) -
1349
+ - **Http505** (int) -
1350
+ - **Http506** (int) -
1351
+ - **Http507** (int) -
1352
+ - **Http509** (int) -
1353
+ - **Http510** (int) -
1354
+ - **Time** (int) -
1355
+ - **Total** (int) -
1356
+
1357
+
1358
+ """
1359
+ # build request
1360
+ d = {
1361
+ "ProjectId": self.config.project_id,
1362
+ }
1363
+ req and d.update(req)
1364
+ d = apis.GetUcdnDomainOriginHttpCodeDetailRequestSchema().dumps(d)
1365
+
1366
+ # build options
1367
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
1368
+
1369
+ resp = self.invoke("GetUcdnDomainOriginHttpCodeDetail", d, **kwargs)
1370
+ return apis.GetUcdnDomainOriginHttpCodeDetailResponseSchema().loads(
1371
+ resp
1372
+ )
1373
+
1374
+ def get_ucdn_domain_origin_request_num(
1375
+ self, req: typing.Optional[dict] = None, **kwargs
1376
+ ) -> dict:
1377
+ """GetUcdnDomainOriginRequestNum - 获取域名回源请求数
1378
+
1379
+ **Request**
1380
+
1381
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
1382
+ - **BeginTime** (int) - (Required) 查询的起始时间,格式为Unix Timestamp
1383
+ - **EndTime** (int) - (Required) 查询的结束时间,格式为Unix Timestamp
1384
+ - **Type** (int) - (Required) 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度, 3=按1分钟)
1385
+ - **Areacode** (str) - 查询区域 cn代表国内 abroad代表海外,只支持国内
1386
+ - **DomainId** (list) - 域名id,创建域名时生成的id。默认全部域名
1387
+ - **IsDcdn** (bool) - 是否全站加速 默认false
1388
+
1389
+ **Response**
1390
+
1391
+ - **RequestList** (list) - 见 **RequestInfoV2** 模型定义
1392
+
1393
+ **Response Model**
1394
+
1395
+ **RequestInfoV2**
1396
+ - **CdnRequest** (float) - 返回值返回指定时间区间内的cdn收到的请求次数之和
1397
+ - **Time** (int) - 带宽获取的时间点。格式:时间戳
1398
+
1399
+
1400
+ """
1401
+ # build request
1402
+ d = {
1403
+ "ProjectId": self.config.project_id,
1404
+ }
1405
+ req and d.update(req)
1406
+ d = apis.GetUcdnDomainOriginRequestNumRequestSchema().dumps(d)
1407
+
1408
+ resp = self.invoke("GetUcdnDomainOriginRequestNum", d, **kwargs)
1409
+ return apis.GetUcdnDomainOriginRequestNumResponseSchema().loads(resp)
1410
+
1411
+ def get_ucdn_domain_prefetch_enable(
1412
+ self, req: typing.Optional[dict] = None, **kwargs
1413
+ ) -> dict:
1414
+ """GetUcdnDomainPrefetchEnable -
1415
+
1416
+ **Request**
1417
+
1418
+ - **ProjectId** (str) - (Config)
1419
+ - **DomainId** (str) - (Required)
1420
+
1421
+ **Response**
1422
+
1423
+ - **Enable** (int) -
1424
+
1425
+ """
1426
+ # build request
1427
+ d = {
1428
+ "ProjectId": self.config.project_id,
1429
+ }
1430
+ req and d.update(req)
1431
+ d = apis.GetUcdnDomainPrefetchEnableRequestSchema().dumps(d)
1432
+
1433
+ # build options
1434
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
1435
+
1436
+ resp = self.invoke("GetUcdnDomainPrefetchEnable", d, **kwargs)
1437
+ return apis.GetUcdnDomainPrefetchEnableResponseSchema().loads(resp)
1438
+
1439
+ def get_ucdn_domain_prefetch_refresh_state(
1440
+ self, req: typing.Optional[dict] = None, **kwargs
1441
+ ) -> dict:
1442
+ """GetUcdnDomainPrefetchRefreshState - 获取域名预取刷新配额信息
1443
+
1444
+ **Request**
1445
+
1446
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
1447
+ - **DomainId** (str) - (Required) 域名ID,创建加速域名时生成。
1448
+
1449
+ **Response**
1450
+
1451
+ - **PrefetchQuota** (int) - 预热配额
1452
+ - **RefreshDirQuota** (int) - 目录刷新配额
1453
+ - **RefreshFileQuota** (int) - 文件刷新配额
1454
+ - **SubmitPrefetchCount** (int) - 已提交预热个数
1455
+ - **SubmitRefreshDir** (int) - 已提交的目录刷新个数
1456
+ - **SubmitRefreshFile** (int) - 已提交的文件刷新个数
1457
+
1458
+ """
1459
+ # build request
1460
+ d = {
1461
+ "ProjectId": self.config.project_id,
1462
+ }
1463
+ req and d.update(req)
1464
+ d = apis.GetUcdnDomainPrefetchRefreshStateRequestSchema().dumps(d)
1465
+
1466
+ resp = self.invoke("GetUcdnDomainPrefetchRefreshState", d, **kwargs)
1467
+ return apis.GetUcdnDomainPrefetchRefreshStateResponseSchema().loads(
1468
+ resp
1469
+ )
1470
+
1471
+ def get_ucdn_domain_request_num_v2(
1472
+ self, req: typing.Optional[dict] = None, **kwargs
1473
+ ) -> dict:
1474
+ """GetUcdnDomainRequestNumV2 - 获取域名请求数
1475
+
1476
+ **Request**
1477
+
1478
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
1479
+ - **BeginTime** (int) - (Required) 查询的起始时间,格式为Unix Timestamp
1480
+ - **EndTime** (int) - (Required) 查询的结束时间,格式为Unix Timestamp
1481
+ - **Type** (int) - (Required) 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度, 3=按1分钟)
1482
+ - **Areacode** (str) - 查询区域 cn代表国内 abroad代表海外,只支持国内
1483
+ - **DomainId** (list) - 域名id,创建域名时生成的id。默认全部域名
1484
+
1485
+ **Response**
1486
+
1487
+ - **RequestList** (list) - 见 **RequestInfo** 模型定义
1488
+
1489
+ **Response Model**
1490
+
1491
+ **RequestInfo**
1492
+ - **CdnRequest** (float) - 返回值返回指定时间区间内的cdn收到的请求次数之和
1493
+ - **OriginRequest** (float) - 返回值返回指定时间区间内的cdn回源的请求次数之和
1494
+ - **Time** (int) - 带宽获取的时间点。格式:时间戳
1495
+
1496
+
1497
+ """
1498
+ # build request
1499
+ d = {
1500
+ "ProjectId": self.config.project_id,
1501
+ }
1502
+ req and d.update(req)
1503
+ d = apis.GetUcdnDomainRequestNumV2RequestSchema().dumps(d)
1504
+
1505
+ resp = self.invoke("GetUcdnDomainRequestNumV2", d, **kwargs)
1506
+ return apis.GetUcdnDomainRequestNumV2ResponseSchema().loads(resp)
1507
+
1508
+ def get_ucdn_domain_request_num_v3(
1509
+ self, req: typing.Optional[dict] = None, **kwargs
1510
+ ) -> dict:
1511
+ """GetUcdnDomainRequestNumV3 - 获取域名请求数
1512
+
1513
+ **Request**
1514
+
1515
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
1516
+ - **BeginTime** (int) - (Required) 查询的起始时间,格式为Unix Timestamp
1517
+ - **EndTime** (int) - (Required) 查询的结束时间,格式为Unix Timestamp
1518
+ - **Type** (int) - (Required) 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度, 3=按1分钟)
1519
+ - **Areacode** (str) - 查询区域 cn代表国内 abroad代表海外,只支持国内
1520
+ - **DomainId** (list) - 域名id,创建域名时生成的id。默认全部域名
1521
+ - **IsDcdn** (bool) - 是否全站加速,默认false
1522
+ - **Protocol** (str) - 协议,IsDcdn=false时,可传http、https不传则查所有协议的带宽。如果IsDcdn=true,这里可传http_dynamic、http_static、https_dynamic、https_static、quic_dynamic、quic_static、websocket 并支持同时查询多个协议用逗号隔开
1523
+
1524
+ **Response**
1525
+
1526
+ - **RequestList** (list) - 见 **RequestInfoV2** 模型定义
1527
+
1528
+ **Response Model**
1529
+
1530
+ **RequestInfoV2**
1531
+ - **CdnRequest** (float) - 返回值返回指定时间区间内的cdn收到的请求次数之和
1532
+ - **Time** (int) - 带宽获取的时间点。格式:时间戳
1533
+
1534
+
1535
+ """
1536
+ # build request
1537
+ d = {
1538
+ "ProjectId": self.config.project_id,
1539
+ }
1540
+ req and d.update(req)
1541
+ d = apis.GetUcdnDomainRequestNumV3RequestSchema().dumps(d)
1542
+
1543
+ resp = self.invoke("GetUcdnDomainRequestNumV3", d, **kwargs)
1544
+ return apis.GetUcdnDomainRequestNumV3ResponseSchema().loads(resp)
1545
+
1546
+ def get_ucdn_domain_traffic(
1547
+ self, req: typing.Optional[dict] = None, **kwargs
1548
+ ) -> dict:
1549
+ """GetUcdnDomainTraffic - 获取加速域名流量使用信息
1550
+
1551
+ **Request**
1552
+
1553
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
1554
+ - **AccountType** (str) - 指定按项目查询,还是按整个账户查询 取值 top 表示按整个账户查询,取值org表示按项目查询
1555
+ - **Areacode** (str) - 查询流量区域 cn代表国内 abroad代表海外,默认全部区域
1556
+ - **BeginTime** (int) - 查询的起始日期,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值
1557
+ - **DomainId** (list) - 域名ID,创建加速域名时生成,n从自然数0开始。默认全部域名
1558
+ - **EndTime** (int) - 查询的结束日期,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天
1559
+
1560
+ **Response**
1561
+
1562
+ - **TrafficSet** (list) - 见 **UcdnDomainTrafficSet** 模型定义
1563
+
1564
+ **Response Model**
1565
+
1566
+ **UcdnDomainTrafficSet**
1567
+ - **Time** (int) - 流量获取的时间点,格式为Unix Timestamp
1568
+ - **Value** (float) - 查询每日流量总值,单位:GB
1569
+
1570
+
1571
+ """
1572
+ # build request
1573
+ d = {
1574
+ "ProjectId": self.config.project_id,
1575
+ }
1576
+ req and d.update(req)
1577
+ d = apis.GetUcdnDomainTrafficRequestSchema().dumps(d)
1578
+
1579
+ resp = self.invoke("GetUcdnDomainTraffic", d, **kwargs)
1580
+ return apis.GetUcdnDomainTrafficResponseSchema().loads(resp)
1581
+
1582
+ def get_ucdn_pass_bandwidth(
1583
+ self, req: typing.Optional[dict] = None, **kwargs
1584
+ ) -> dict:
1585
+ """GetUcdnPassBandwidth - 获取回源带宽数据(cdn回客户源站部分)
1586
+
1587
+ **Request**
1588
+
1589
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
1590
+ - **Type** (int) - (Required) 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度)
1591
+ - **Areacode** (str) - 查询带宽区域 cn代表国内 abroad代表海外,只支持国内
1592
+ - **BeginTime** (int) - 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。
1593
+ - **DomainId** (list) - 域名id,创建域名时生成的id。默认全部域名
1594
+ - **EndTime** (int) - 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。
1595
+
1596
+ **Response**
1597
+
1598
+ - **BandwidthDetail** (list) - 见 **BandwidthInfoDetail** 模型定义
1599
+
1600
+ **Response Model**
1601
+
1602
+ **BandwidthInfoDetail**
1603
+ - **Bandwidth** (float) - 返回值带宽值数据。
1604
+ - **Time** (int) - 宽获取的时间点。格式:时间戳
1605
+
1606
+
1607
+ """
1608
+ # build request
1609
+ d = {
1610
+ "ProjectId": self.config.project_id,
1611
+ }
1612
+ req and d.update(req)
1613
+ d = apis.GetUcdnPassBandwidthRequestSchema().dumps(d)
1614
+
1615
+ resp = self.invoke("GetUcdnPassBandwidth", d, **kwargs)
1616
+ return apis.GetUcdnPassBandwidthResponseSchema().loads(resp)
1617
+
1618
+ def get_ucdn_pass_bandwidth_v2(
1619
+ self, req: typing.Optional[dict] = None, **kwargs
1620
+ ) -> dict:
1621
+ """GetUcdnPassBandwidthV2 - 获取回源带宽数据(cdn回客户源站部分)
1622
+
1623
+ **Request**
1624
+
1625
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
1626
+ - **Type** (int) - (Required) 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度,3表示按照1分钟粒度)
1627
+ - **Areacode** (str) - 查询带宽区域 cn代表国内 abroad代表海外,只支持国内
1628
+ - **BeginTime** (int) - 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。
1629
+ - **DomainId** (list) - 域名id,创建域名时生成的id。默认全部域名
1630
+ - **EndTime** (int) - 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。
1631
+ - **IsDcdn** (bool) - 是否全站加速 默认false
1632
+
1633
+ **Response**
1634
+
1635
+ - **BandwidthList** (list) - 见 **BandwidthInfoDetail** 模型定义
1636
+
1637
+ **Response Model**
1638
+
1639
+ **BandwidthInfoDetail**
1640
+ - **Bandwidth** (float) - 返回值带宽值数据。
1641
+ - **Time** (int) - 宽获取的时间点。格式:时间戳
1642
+
1643
+
1644
+ """
1645
+ # build request
1646
+ d = {
1647
+ "ProjectId": self.config.project_id,
1648
+ }
1649
+ req and d.update(req)
1650
+ d = apis.GetUcdnPassBandwidthV2RequestSchema().dumps(d)
1651
+
1652
+ resp = self.invoke("GetUcdnPassBandwidthV2", d, **kwargs)
1653
+ return apis.GetUcdnPassBandwidthV2ResponseSchema().loads(resp)
1654
+
1655
+ def get_ucdn_pro_isp_bandwidth_v2(
1656
+ self, req: typing.Optional[dict] = None, **kwargs
1657
+ ) -> dict:
1658
+ """GetUcdnProIspBandwidthV2 - 按省份运营商获取域名带宽数据
1659
+
1660
+ **Request**
1661
+
1662
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
1663
+ - **BeginTime** (int) - (Required) 查询的起始日期,格式为Unix Timestamp
1664
+ - **EndTime** (int) - (Required) 查询的结束日期,格式为Unix Timestamp
1665
+ - **Type** (int) - (Required) 时间粒度0 (按5分钟粒度)1 (按小时粒度)2(按天粒度)3(按分钟粒度)
1666
+ - **DomainId** (list) - 域名id,创建域名时生成的id。默认全部域名
1667
+ - **Isp** (str) - 运营商代码(运营商拼音),一次只能查询一个运营商,不传递默认取所有运营商
1668
+ - **Province** (list) - 省份代码(省份拼音),可以传多个,不传则查询所有省份
1669
+
1670
+ **Response**
1671
+
1672
+ - **BandwidthSet** (list) - 见 **ProIspBandwidthSet** 模型定义
1673
+
1674
+ **Response Model**
1675
+
1676
+ **ProIspBandwidthSet**
1677
+ - **BandwidthTrafficList** (list) - 见 **ProIspBandwidthList** 模型定义
1678
+ - **Province** (str) - 省份代码
1679
+
1680
+
1681
+ **ProIspBandwidthList**
1682
+ - **CdnBandwidth** (float) - 返回值返回指定时间区间内CDN的带宽峰值,单位Mbps
1683
+ - **Time** (int) - 带宽获取的时间点。格式:时间戳
1684
+ - **Traffic** (float) - 对应时间粒度的流量,单位字节
1685
+
1686
+
1687
+ """
1688
+ # build request
1689
+ d = {
1690
+ "ProjectId": self.config.project_id,
1691
+ }
1692
+ req and d.update(req)
1693
+ d = apis.GetUcdnProIspBandwidthV2RequestSchema().dumps(d)
1694
+
1695
+ resp = self.invoke("GetUcdnProIspBandwidthV2", d, **kwargs)
1696
+ return apis.GetUcdnProIspBandwidthV2ResponseSchema().loads(resp)
1697
+
1698
+ def get_ucdn_pro_isp_request_num_v2(
1699
+ self, req: typing.Optional[dict] = None, **kwargs
1700
+ ) -> dict:
1701
+ """GetUcdnProIspRequestNumV2 - 按省份运营商获取域名请求数
1702
+
1703
+ **Request**
1704
+
1705
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
1706
+ - **BeginTime** (int) - (Required) 查询的起始日期,格式为Unix Timestamp 忽略时间部分
1707
+ - **EndTime** (int) - (Required) 查询的结束日期,格式为Unix Timestamp 忽略时间部分
1708
+ - **DomainId** (list) - 域名id,创建域名时生成的id。默认全部域名
1709
+ - **Isp** (str) - 运营商代码,一次只能查询一个运营商,不传递默认取所有运营商
1710
+ - **Province** (list) - 省份代码,可以传多个,不传则查询所有省份
1711
+ - **Type** (int) - 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天粒度,3表示按照一分钟粒度)
1712
+
1713
+ **Response**
1714
+
1715
+ - **RequestNumSet** (list) - 见 **ProIspRequestNumSetV2** 模型定义
1716
+
1717
+ **Response Model**
1718
+
1719
+ **ProIspRequestNumSetV2**
1720
+ - **Province** (str) - 省份代码
1721
+ - **RequestList** (list) - 见 **ProIspRequestListV2** 模型定义
1722
+
1723
+
1724
+ **ProIspRequestListV2**
1725
+ - **CdnRequest** (float) - 返回值返回指定时间区间内的请求数
1726
+ - **Time** (int) - 带宽获取的时间点。格式:时间戳
1727
+
1728
+
1729
+ """
1730
+ # build request
1731
+ d = {
1732
+ "ProjectId": self.config.project_id,
1733
+ }
1734
+ req and d.update(req)
1735
+ d = apis.GetUcdnProIspRequestNumV2RequestSchema().dumps(d)
1736
+
1737
+ resp = self.invoke("GetUcdnProIspRequestNumV2", d, **kwargs)
1738
+ return apis.GetUcdnProIspRequestNumV2ResponseSchema().loads(resp)
1739
+
1740
+ def get_ucdn_traffic(
1741
+ self, req: typing.Optional[dict] = None, **kwargs
1742
+ ) -> dict:
1743
+ """GetUcdnTraffic - 获取流量信息
1744
+
1745
+ **Request**
1746
+
1747
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
1748
+
1749
+ **Response**
1750
+
1751
+ - **TrafficSet** (list) - 见 **TrafficSet** 模型定义
1752
+
1753
+ **Response Model**
1754
+
1755
+ **TrafficSet**
1756
+ - **Areacode** (str) - 购买流量的区域, cn: 国内; abroad: 国外
1757
+ - **TrafficLeft** (float) - Areacode区域内总剩余流量, 单位GB
1758
+ - **TrafficTotal** (float) - Areacode区域内总购买流量, 单位GB
1759
+ - **TrafficUsed** (float) - Areacode区域内总使用流量, 单位GB
1760
+
1761
+
1762
+ """
1763
+ # build request
1764
+ d = {
1765
+ "ProjectId": self.config.project_id,
1766
+ }
1767
+ req and d.update(req)
1768
+ d = apis.GetUcdnTrafficRequestSchema().dumps(d)
1769
+
1770
+ resp = self.invoke("GetUcdnTraffic", d, **kwargs)
1771
+ return apis.GetUcdnTrafficResponseSchema().loads(resp)
1772
+
1773
+ def get_ucdn_traffic_v2(
1774
+ self, req: typing.Optional[dict] = None, **kwargs
1775
+ ) -> dict:
1776
+ """GetUcdnTrafficV2 - 获取流量信息
1777
+
1778
+ **Request**
1779
+
1780
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
1781
+ - **IsDcdn** (bool) - 是否dcdn域名
1782
+
1783
+ **Response**
1784
+
1785
+ - **TrafficSet** (list) - 见 **TrafficSet** 模型定义
1786
+
1787
+ **Response Model**
1788
+
1789
+ **TrafficSet**
1790
+ - **Areacode** (str) - 购买流量的区域, cn: 国内; abroad: 国外
1791
+ - **TrafficLeft** (float) - Areacode区域内总剩余流量, 单位GB
1792
+ - **TrafficTotal** (float) - Areacode区域内总购买流量, 单位GB
1793
+ - **TrafficUsed** (float) - Areacode区域内总使用流量, 单位GB
1794
+
1795
+
1796
+ """
1797
+ # build request
1798
+ d = {
1799
+ "ProjectId": self.config.project_id,
1800
+ }
1801
+ req and d.update(req)
1802
+ d = apis.GetUcdnTrafficV2RequestSchema().dumps(d)
1803
+
1804
+ resp = self.invoke("GetUcdnTrafficV2", d, **kwargs)
1805
+ return apis.GetUcdnTrafficV2ResponseSchema().loads(resp)
1806
+
1807
+ def prefetch_new_ucdn_domain_cache(
1808
+ self, req: typing.Optional[dict] = None, **kwargs
1809
+ ) -> dict:
1810
+ """PrefetchNewUcdnDomainCache - 提交预取任务
1811
+
1812
+ **Request**
1813
+
1814
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
1815
+ - **UrlList** (list) - (Required) 预热URL列表,n从自然数0开始。UrlList.n字段必须以”http://域名/”开始。如刷新文件目录a下面img.png文件, 格式为http://abc.ucloud.cn/a/img.png。请正确提交需要刷新的域名,一次性可提交1000条,最少每10S调用一次
1816
+
1817
+ **Response**
1818
+
1819
+ - **TaskId** (str) - 本次提交url对应的任务id
1820
+
1821
+ """
1822
+ # build request
1823
+ d = {
1824
+ "ProjectId": self.config.project_id,
1825
+ }
1826
+ req and d.update(req)
1827
+ d = apis.PrefetchNewUcdnDomainCacheRequestSchema().dumps(d)
1828
+
1829
+ resp = self.invoke("PrefetchNewUcdnDomainCache", d, **kwargs)
1830
+ return apis.PrefetchNewUcdnDomainCacheResponseSchema().loads(resp)
1831
+
1832
+ def query_ip_location(
1833
+ self, req: typing.Optional[dict] = None, **kwargs
1834
+ ) -> dict:
1835
+ """QueryIpLocation - 查询IP信息
1836
+
1837
+ **Request**
1838
+
1839
+ - **Ip** (list) - (Required) ip列表
1840
+
1841
+ **Response**
1842
+
1843
+ - **Data** (list) - 见 **IpLocationInfo** 模型定义
1844
+
1845
+ **Response Model**
1846
+
1847
+ **IpLocationInfo**
1848
+ - **Area** (str) - 地区
1849
+ - **City** (str) - 城市
1850
+ - **Exist** (bool) - ip是否存在
1851
+ - **Ip** (str) - 客户端请求的ip
1852
+ - **Isp** (str) - 运营商
1853
+
1854
+
1855
+ """
1856
+ # build request
1857
+ d = {}
1858
+ req and d.update(req)
1859
+ d = apis.QueryIpLocationRequestSchema().dumps(d)
1860
+
1861
+ resp = self.invoke("QueryIpLocation", d, **kwargs)
1862
+ return apis.QueryIpLocationResponseSchema().loads(resp)
1863
+
1864
+ def refresh_new_ucdn_domain_cache(
1865
+ self, req: typing.Optional[dict] = None, **kwargs
1866
+ ) -> dict:
1867
+ """RefreshNewUcdnDomainCache - 刷新缓存
1868
+
1869
+ **Request**
1870
+
1871
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
1872
+ - **Type** (str) - (Required) 刷新类型,file代表文件刷新,dir 代表路径刷新,m3u8带表m3u8刷新
1873
+ - **UrlList** (list) - (Required) 需要刷新的URL,n 从自然数0开始,刷新多个URL列表时,一次最多提交100个。必须以”http://域名/”开始。目录要以”/”结尾, 如刷新目录a下所有文件,格式为:http://abc.ucloud.cn/a/;如刷新文件目录a下面img.png文件, 格式为http://abc.ucloud.cn/a/img.png。请正确提交需要刷新的域名
1874
+
1875
+ **Response**
1876
+
1877
+ - **TaskId** (str) - 本次提交url对应的任务id
1878
+
1879
+ """
1880
+ # build request
1881
+ d = {
1882
+ "ProjectId": self.config.project_id,
1883
+ }
1884
+ req and d.update(req)
1885
+ d = apis.RefreshNewUcdnDomainCacheRequestSchema().dumps(d)
1886
+
1887
+ resp = self.invoke("RefreshNewUcdnDomainCache", d, **kwargs)
1888
+ return apis.RefreshNewUcdnDomainCacheResponseSchema().loads(resp)
1889
+
1890
+ def switch_ucdn_charge_type(
1891
+ self, req: typing.Optional[dict] = None, **kwargs
1892
+ ) -> dict:
1893
+ """SwitchUcdnChargeType - 切换账号计费方式
1894
+
1895
+ **Request**
1896
+
1897
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
1898
+ - **ChargeType** (str) - (Required) 计费方式。traffic代表按流量包计费,bandwidth按带宽付费
1899
+
1900
+ **Response**
1901
+
1902
+
1903
+ """
1904
+ # build request
1905
+ d = {
1906
+ "ProjectId": self.config.project_id,
1907
+ }
1908
+ req and d.update(req)
1909
+ d = apis.SwitchUcdnChargeTypeRequestSchema().dumps(d)
1910
+
1911
+ resp = self.invoke("SwitchUcdnChargeType", d, **kwargs)
1912
+ return apis.SwitchUcdnChargeTypeResponseSchema().loads(resp)
1913
+
1914
+ def update_ucdn_domain_https_config_v2(
1915
+ self, req: typing.Optional[dict] = None, **kwargs
1916
+ ) -> dict:
1917
+ """UpdateUcdnDomainHttpsConfigV2 - https加速配置,国内,国外一起配置(兼容全站加速域名)
1918
+
1919
+ **Request**
1920
+
1921
+ - **DomainId** (str) - (Required) 域名对应的资源Id
1922
+ - **CertId** (int) - 证书id(可能是ucdn的id,也可能是ussl的id)
1923
+ - **CertName** (str) - 证书名称,开启加速必传
1924
+ - **CertType** (str) - 证书类型 ucdn/ussl
1925
+ - **HttpsStatusAbroad** (str) - 开启或关闭加速 enable或disable 当加速区域含国外的时候,此参数为必传
1926
+ - **HttpsStatusCn** (str) - 开启或关闭加速 enable或disable 当加速区域含国内的时候,此参数为必传
1927
+
1928
+ **Response**
1929
+
1930
+
1931
+ """
1932
+ # build request
1933
+ d = {}
1934
+ req and d.update(req)
1935
+ d = apis.UpdateUcdnDomainHttpsConfigV2RequestSchema().dumps(d)
1936
+
1937
+ resp = self.invoke("UpdateUcdnDomainHttpsConfigV2", d, **kwargs)
1938
+ return apis.UpdateUcdnDomainHttpsConfigV2ResponseSchema().loads(resp)
1939
+
1940
+ def update_ucdn_domain_status(
1941
+ self, req: typing.Optional[dict] = None, **kwargs
1942
+ ) -> dict:
1943
+ """UpdateUcdnDomainStatus - 更新加速域名状态
1944
+
1945
+ **Request**
1946
+
1947
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
1948
+ - **DomainId** (str) - (Required) 域名ID,创建加速域名时生成。
1949
+ - **Status** (str) - (Required) 域名状态,enable代表加速中,disable代表停止加速,delete代表删除。
1950
+ - **IsDcdn** (bool) - 是否全站加速,默认false
1951
+
1952
+ **Response**
1953
+
1954
+
1955
+ """
1956
+ # build request
1957
+ d = {
1958
+ "ProjectId": self.config.project_id,
1959
+ }
1960
+ req and d.update(req)
1961
+ d = apis.UpdateUcdnDomainStatusRequestSchema().dumps(d)
1962
+
1963
+ resp = self.invoke("UpdateUcdnDomainStatus", d, **kwargs)
1964
+ return apis.UpdateUcdnDomainStatusResponseSchema().loads(resp)