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,759 @@
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.usms.schemas import apis
8
+
9
+
10
+ class USMSClient(Client):
11
+ def __init__(
12
+ self, config: dict, transport=None, middleware=None, logger=None
13
+ ):
14
+ super(USMSClient, self).__init__(config, transport, middleware, logger)
15
+
16
+ def add_backfill(self, req: typing.Optional[dict] = None, **kwargs) -> dict:
17
+ """AddBackfill - 用户通过接口发送消息,当消息在终端被消费,调用该接口,进行记录。
18
+
19
+ **Request**
20
+
21
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
22
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
23
+ - **SendNo** (str) - (Required) 发送Number,记录一次发送请求的唯一性
24
+ - **Target** (str) - (Required) 短信的接收目标,手机号需要添加国家码,比如(1)231xxxx
25
+ - **BackfillTime** (int) - 回填时间,秒级别时间戳
26
+ - **Content** (str) - 回填内容
27
+ - **SendTime** (int) - 发送请求的时间,秒级别时间戳
28
+ - **Zone** (str) - 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
29
+
30
+ **Response**
31
+
32
+ - **Message** (str) - 返回错误消息。当 RetCode 非 0 时提供详细的描述信息
33
+
34
+ """
35
+ # build request
36
+ d = {
37
+ "ProjectId": self.config.project_id,
38
+ "Region": self.config.region,
39
+ }
40
+ req and d.update(req)
41
+ d = apis.AddBackfillRequestSchema().dumps(d)
42
+
43
+ # build options
44
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
45
+
46
+ resp = self.invoke("AddBackfill", d, **kwargs)
47
+ return apis.AddBackfillResponseSchema().loads(resp)
48
+
49
+ def add_usms_signature_qualification(
50
+ self, req: typing.Optional[dict] = None, **kwargs
51
+ ) -> dict:
52
+ """AddUSMSSignatureQualification - 添加短信签名资质申请记录
53
+
54
+ **Request**
55
+
56
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
57
+ - **Attr** (int) - (Required) 资质属性,0-自用 1-他用
58
+ - **Name** (str) - (Required) 资质名称
59
+ - **Status** (int) - (Required) 状态:0-草稿,1-提交审核
60
+ - **CompanyCertificateFileId** (str) - 公司证件文件FileId
61
+ - **CompanyCreditCode** (str) - 公司统一社会信用代码
62
+ - **CompanyName** (str) - 公司名称,长度限制100
63
+ - **CompanyWorkScenePhotosFileId** (str) - 公司工作现场照片FileId
64
+ - **HandlerHandHeldImageFileId** (str) - 经办人手持身份证图片FileId
65
+ - **HandlerIDCardBackImageFileId** (str) - 经办人身份证国徽面图片FileId
66
+ - **HandlerIDCardFrontImageFileId** (str) - 经办人身份证人像面图片FileId
67
+ - **HandlerIDNumber** (str) - 经办人身份证号码
68
+ - **HandlerName** (str) - 经办人姓名
69
+ - **ManagerIDNumber** (str) - 法人身份证号码
70
+ - **ManagerName** (str) - 法人姓名
71
+
72
+ **Response**
73
+
74
+ - **Message** (str) - 返回状态码描述,如果操作成功,默认返回为空
75
+ - **QualificationId** (str) - 资质Id
76
+
77
+ """
78
+ # build request
79
+ d = {
80
+ "ProjectId": self.config.project_id,
81
+ }
82
+ req and d.update(req)
83
+ d = apis.AddUSMSSignatureQualificationRequestSchema().dumps(d)
84
+
85
+ # build options
86
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
87
+
88
+ resp = self.invoke("AddUSMSSignatureQualification", d, **kwargs)
89
+ return apis.AddUSMSSignatureQualificationResponseSchema().loads(resp)
90
+
91
+ def create_usms_signature(
92
+ self, req: typing.Optional[dict] = None, **kwargs
93
+ ) -> dict:
94
+ """CreateUSMSSignature - 调用接口CreateUSMSSignature申请短信签名
95
+
96
+ **Request**
97
+
98
+ - **ProjectId** (str) - (Config) 项目ID,不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
99
+ - **CertificateType** (int) - (Required) 签名的资质证明文件类型,需与签名类型保持一致,说明如下:0-三证合一/企业营业执照/组织机构代码证书/社会信用代码证书;1-应用商店后台开发者管理截图;2-备案服务商的备案成功截图(含域名,网站名称,备案号);3-公众号或小程序的管理界面截图;4-商标注册证书;5-组织机构代码证书、社会信用代码证书;
100
+ - **Description** (str) - (Required) 短信签名申请原因
101
+ - **SigContent** (str) - (Required) 签名内容
102
+ - **SigPurpose** (int) - (Required) 签名用途,0-自用,1-他用;
103
+ - **SigType** (int) - (Required) 签名类型,说明如下:0-公司或企业的全称或简称;1-App应用的全称或简称;2-工信部备案网站的全称或简称;3-公众号或小程序的全称或简称;4-商标名的全称或简称;5-政府/机关事业单位/其他单位的全称或简称;
104
+ - **File** (str) - 短信签名的资质证明文件,需先进行base64编码格式转换,此处填写转换后的字符串。文件大小不超过4 MB
105
+ - **International** (bool) - 国内/国际短信。true:国际短信,false:国内短信,若不传值则默认该值为false
106
+ - **ProxyFile** (str) - 短信签名授权委托文件,需先进行base64编码格式转换,此处填写转换后的字符串。文件大小不超过4 MB;当您是代理并使用第三方的签名时(也即SigPurpose为1-他用),该项为必填项;
107
+ - **QualificationId** (str) - 资质ID
108
+ - **SceneDesc** (str) - 短信签名对应的场景说明
109
+
110
+ **Response**
111
+
112
+ - **Message** (str) - 返回状态码描述,如果操作成功,默认返回为空
113
+ - **SigId** (str) - 短信签名ID(短信签名申请时的工单ID)
114
+
115
+ """
116
+ # build request
117
+ d = {
118
+ "ProjectId": self.config.project_id,
119
+ }
120
+ req and d.update(req)
121
+ d = apis.CreateUSMSSignatureRequestSchema().dumps(d)
122
+
123
+ # build options
124
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
125
+
126
+ resp = self.invoke("CreateUSMSSignature", d, **kwargs)
127
+ return apis.CreateUSMSSignatureResponseSchema().loads(resp)
128
+
129
+ def create_usms_template(
130
+ self, req: typing.Optional[dict] = None, **kwargs
131
+ ) -> dict:
132
+ """CreateUSMSTemplate - 调用接口CreateUSMSTemplate申请短信模板
133
+
134
+ **Request**
135
+
136
+ - **ProjectId** (str) - (Config) 项目ID,不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
137
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
138
+ - **Purpose** (int) - (Required) 短信模板用途类型:1-验证码类短信模板;2-系统通知类短信模板;3-会员推广类短信模板;
139
+ - **Template** (str) - (Required) 短信模板内容,说明如下:字数不超过500,每个中文、符号、英文、数组等都计为一个字;模板中的变量填写格式:{N},其中N为大于1的整数,有多个参数时,建议N从1开始顺次,例如:{1}、{2}等;短信模板禁止仅包括变量的情况;
140
+ - **TemplateName** (str) - (Required) 短信模板名称,不超过32个字符,每个中文、符号、英文、数字等都计为1个字。
141
+ - **Instruction** (str) - 模板变量属性说明
142
+ - **International** (bool) - 标记是否为国际短信。true:国际短信,false:国内短信,若不传值则默认该值为false
143
+ - **Remark** (str) - 短信模板申请原因说明,字数不超过128,每个中文、符号、英文、数字等都计为1个字。
144
+ - **UnsubscribeInfo** (str) - 当Purpose=3并且International=false时,也即国内会员推广类短信模板,该项必填。枚举值:【拒收请回复R】
145
+
146
+ **Response**
147
+
148
+ - **Message** (str) - 返回状态码描述,如果操作成功,默认返回为空
149
+ - **TemplateId** (str) - 短信模板ID(短信模板申请时的工单ID)
150
+
151
+ """
152
+ # build request
153
+ d = {
154
+ "ProjectId": self.config.project_id,
155
+ "Region": self.config.region,
156
+ }
157
+ req and d.update(req)
158
+ d = apis.CreateUSMSTemplateRequestSchema().dumps(d)
159
+
160
+ # build options
161
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
162
+
163
+ resp = self.invoke("CreateUSMSTemplate", d, **kwargs)
164
+ return apis.CreateUSMSTemplateResponseSchema().loads(resp)
165
+
166
+ def delete_usms_signature(
167
+ self, req: typing.Optional[dict] = None, **kwargs
168
+ ) -> dict:
169
+ """DeleteUSMSSignature - 调用接口DeleteUSMSSignature删除短信签名
170
+
171
+ **Request**
172
+
173
+ - **ProjectId** (str) - (Config) 项目ID,不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
174
+ - **SigIds** (list) - (Required) 签名ID(也即短信签名申请时的工单ID),支持以数组的方式,举例,以SigIds.0、SigIds.1...SigIds.N方式传入
175
+
176
+ **Response**
177
+
178
+ - **Message** (str) - 返回状态码描述,如果操作成功,默认返回为空
179
+
180
+ """
181
+ # build request
182
+ d = {
183
+ "ProjectId": self.config.project_id,
184
+ }
185
+ req and d.update(req)
186
+ d = apis.DeleteUSMSSignatureRequestSchema().dumps(d)
187
+
188
+ resp = self.invoke("DeleteUSMSSignature", d, **kwargs)
189
+ return apis.DeleteUSMSSignatureResponseSchema().loads(resp)
190
+
191
+ def delete_usms_signature_qualification(
192
+ self, req: typing.Optional[dict] = None, **kwargs
193
+ ) -> dict:
194
+ """DeleteUSMSSignatureQualification - 删除短信签名资质申请记录
195
+
196
+ **Request**
197
+
198
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
199
+ - **QualificationIds** (list) - (Required) 签名资质Id,支持以数组的方式,举例,以QualificationIds.0、QualificationIds.1...QualificationIds.N方式传入
200
+
201
+ **Response**
202
+
203
+ - **Message** (str) - 返回状态码描述,如果操作成功,默认返回为空
204
+
205
+ """
206
+ # build request
207
+ d = {
208
+ "ProjectId": self.config.project_id,
209
+ }
210
+ req and d.update(req)
211
+ d = apis.DeleteUSMSSignatureQualificationRequestSchema().dumps(d)
212
+
213
+ resp = self.invoke("DeleteUSMSSignatureQualification", d, **kwargs)
214
+ return apis.DeleteUSMSSignatureQualificationResponseSchema().loads(resp)
215
+
216
+ def delete_usms_template(
217
+ self, req: typing.Optional[dict] = None, **kwargs
218
+ ) -> dict:
219
+ """DeleteUSMSTemplate - 调用接口DeleteUSMSTemplate删除短信模板
220
+
221
+ **Request**
222
+
223
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
224
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
225
+ - **TemplateIds** (list) - (Required) 模板ID(也即短信模板申请时的工单ID),支持以数组的方式,举例,以TemplateIds.0、TemplateIds.1...TemplateIds.N方式传入
226
+
227
+ **Response**
228
+
229
+ - **Message** (str) - 返回状态码描述,如果操作成功,默认返回为空
230
+
231
+ """
232
+ # build request
233
+ d = {
234
+ "ProjectId": self.config.project_id,
235
+ "Region": self.config.region,
236
+ }
237
+ req and d.update(req)
238
+ d = apis.DeleteUSMSTemplateRequestSchema().dumps(d)
239
+
240
+ resp = self.invoke("DeleteUSMSTemplate", d, **kwargs)
241
+ return apis.DeleteUSMSTemplateResponseSchema().loads(resp)
242
+
243
+ def get_usms_send_receipt(
244
+ self, req: typing.Optional[dict] = None, **kwargs
245
+ ) -> dict:
246
+ """GetUSMSSendReceipt - 调用接口GetUSMSSendReceipt短信发送状态信息
247
+
248
+ **Request**
249
+
250
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
251
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
252
+ - **SessionNoSet** (list) - (Required) 发送短信时返回的SessionNo集合,SessionNoSet.0,SessionNoSet.1....格式,单次调用集合数需控制在100个以内
253
+ - **Zone** (str) - 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
254
+
255
+ **Response**
256
+
257
+ - **Data** (list) - 见 **ReceiptPerSession** 模型定义
258
+ - **Message** (str) - 错误描述
259
+
260
+ **Response Model**
261
+
262
+ **ReceiptPerSession**
263
+ - **ReceiptSet** (list) - 见 **ReceiptPerPhone** 模型定义
264
+ - **SessionNo** (str) - 发送短信时返回的SessionNo
265
+
266
+
267
+ **ReceiptPerPhone**
268
+ - **CostCount** (int) - 消耗短信条数
269
+ - **Phone** (str) - 手机号码
270
+ - **ReceiptCode** (str) - 状态报告编码
271
+ - **ReceiptDesc** (str) - 回执结果描述
272
+ - **ReceiptResult** (str) - 回执结果,枚举值:\\ > 发送成功: 代表成功 \\ > Success: 代表成功 \\ > 发送失败: 代表失败 \\ > Fail: 代表失败 \\ > 状态未知: 代表未知 \\ > Unknow: 代表未知
273
+ - **ReceiptTime** (int) - 回执返回时间
274
+ - **UserId** (str) - 自定义的业务标识ID,字符串
275
+
276
+
277
+ """
278
+ # build request
279
+ d = {
280
+ "ProjectId": self.config.project_id,
281
+ "Region": self.config.region,
282
+ }
283
+ req and d.update(req)
284
+ d = apis.GetUSMSSendReceiptRequestSchema().dumps(d)
285
+
286
+ resp = self.invoke("GetUSMSSendReceipt", d, **kwargs)
287
+ return apis.GetUSMSSendReceiptResponseSchema().loads(resp)
288
+
289
+ def get_usms_send_statistics(
290
+ self, req: typing.Optional[dict] = None, **kwargs
291
+ ) -> dict:
292
+ """GetUSMSSendStatistics - 获取发送统计数据
293
+
294
+ **Request**
295
+
296
+ - **ProjectId** (str) - (Config) 项目ID,不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
297
+ - **Domestic** (int) - (Required) 国内标记,0-国际短信 1-国内短信
298
+ - **EndDate** (str) - (Required) 结束日期,格式为YYYY-MM-DD
299
+ - **NumPerPage** (int) - (Required) 每页记录个数
300
+ - **OrderBy** (str) - (Required) 排序字段,如BrevityCode表示按照BrevityCode排列,配合OrderType使用。目前支持SendDate、BrevityCode
301
+ - **OrderType** (str) - (Required) 排序方式,asc-正序 desc-倒序
302
+ - **Page** (int) - (Required) 页编号,从0开始
303
+ - **StartDate** (str) - (Required) 开始日期,格式为YYYY-MM-DD
304
+ - **BrevityCode** (str) - 国际简码,如CN表示中国,当需要查询多个国家时,使用-分割,如CN-ID。
305
+ - **Purpose** (int) - 短信类型,1-验证码 2-通知类 3-营销类
306
+
307
+ **Response**
308
+
309
+ - **Data** (list) - 见 **StatisticsDataInfo** 模型定义
310
+ - **Message** (str) - 描述信息
311
+ - **StatisticsData** (dict) - 见 **StatisticsData** 模型定义
312
+ - **Total** (int) - 返回记录数
313
+
314
+ **Response Model**
315
+
316
+ **StatisticsDataInfo**
317
+ - **BrevityCode** (str) - 国际/地区标识码
318
+ - **CostCount** (int) - 发送总数(拆分条数)
319
+ - **Count** (int) - 发送总数(提交条数)
320
+ - **FailedCostCount** (int) - 发送失败数(拆分条数)
321
+ - **FailedCount** (int) - 发送失败数(提交条数)
322
+ - **SendDate** (str) - 发送时间
323
+ - **SubmitFailedCostCount** (int) - 提交失败数(拆分条数)
324
+ - **SubmitFailedCount** (int) - 提交失败数(提交条数)
325
+ - **SuccessCostCount** (int) - 发送成功数(拆分条数)
326
+ - **SuccessCount** (int) - 发送成功数(提交条数)
327
+ - **SuccessRate** (float) - 发送成功率
328
+ - **UnknownCostCount** (int) - 状态未知数(拆分条数)
329
+ - **UnknownCount** (int) - 状态未知数(提交条数)
330
+ - **UserId** (str) - UserId
331
+
332
+
333
+ **StatisticsData**
334
+ - **FailCostCount** (int) - 发送失败数(拆分条数)
335
+ - **FailCount** (int) - 发送失败数(提交条数)
336
+ - **SendCostCount** (int) - 发送总数(拆分条数)
337
+ - **SendCount** (int) - 发送总数(提交条数)
338
+ - **SubmitFailCostCount** (int) - 提交失败数(拆分条数)
339
+ - **SubmitFailCount** (int) - 提交失败数(提交条数)
340
+ - **SuccessCostCount** (int) - 发送成功数(拆分条数)
341
+ - **SuccessCount** (int) - 发送成功数(提交条数)
342
+ - **UnknownCostCount** (int) - 状态未知数(拆分条数)
343
+ - **UnknownCount** (int) - 状态未知数(提交条数)
344
+
345
+
346
+ """
347
+ # build request
348
+ d = {
349
+ "ProjectId": self.config.project_id,
350
+ }
351
+ req and d.update(req)
352
+ d = apis.GetUSMSSendStatisticsRequestSchema().dumps(d)
353
+
354
+ resp = self.invoke("GetUSMSSendStatistics", d, **kwargs)
355
+ return apis.GetUSMSSendStatisticsResponseSchema().loads(resp)
356
+
357
+ def get_usms_signature_qualification(
358
+ self, req: typing.Optional[dict] = None, **kwargs
359
+ ) -> dict:
360
+ """GetUSMSSignatureQualification - 获取短信签名资质申请记录列表
361
+
362
+ **Request**
363
+
364
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
365
+ - **NumPerPage** (int) - (Required) 每页个数
366
+ - **OrderBy** (str) - (Required) 排序字段,QualificationId/CreateTime
367
+ - **OrderType** (str) - (Required) 排序类型: desc、asc
368
+ - **Page** (int) - (Required) 页索引
369
+ - **InAccountIds** (list) - 项目ID列表
370
+ - **QualificationAttr** (int) - 签名资质属性: 0-自用,1-他用
371
+ - **Status** (int) - 签名资质状态: 0-草稿 1-审核中 2-审核通过 3-审核未通过 4-人工禁用
372
+
373
+ **Response**
374
+
375
+ - **Data** (list) - 见 **OutSignatureQualification** 模型定义
376
+ - **Message** (str) - 返回状态码描述,如果操作成功,默认返回为空
377
+ - **Total** (int) - 签名资质总个数
378
+
379
+ **Response Model**
380
+
381
+ **OutSignatureQualification**
382
+ - **AccountId** (int) - 项目Id
383
+ - **Attr** (int) - 资质属性: 0-自用 1-他用
384
+ - **CompanyName** (str) - 公司名称
385
+ - **CreateTime** (int) - 创建时间戳
386
+ - **ErrCode** (int) - 审核未通过错误码
387
+ - **ErrDesc** (str) - 审核未通过错误原因
388
+ - **HandlerName** (str) - 经办人姓名
389
+ - **ManagerName** (str) - 负责人姓名
390
+ - **ModifyTime** (int) - 修改时间戳
391
+ - **Name** (str) - 资质名称
392
+ - **QualificationId** (str) - 资质Id
393
+ - **ReviewEndTime** (int) - 审核完成时间戳
394
+ - **ReviewStartTime** (int) - 审核开始时间戳
395
+ - **Status** (int) - 状态:0-草稿 1-审核中 2-审核通过 3-审核未通过 4-人工禁用
396
+
397
+
398
+ """
399
+ # build request
400
+ d = {
401
+ "ProjectId": self.config.project_id,
402
+ }
403
+ req and d.update(req)
404
+ d = apis.GetUSMSSignatureQualificationRequestSchema().dumps(d)
405
+
406
+ resp = self.invoke("GetUSMSSignatureQualification", d, **kwargs)
407
+ return apis.GetUSMSSignatureQualificationResponseSchema().loads(resp)
408
+
409
+ def query_usms_signature(
410
+ self, req: typing.Optional[dict] = None, **kwargs
411
+ ) -> dict:
412
+ """QueryUSMSSignature - 调用接口QueryUSMSSignature查询短信签名申请状态
413
+
414
+ **Request**
415
+
416
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
417
+ - **SigContent** (str) - 签名内容;签名ID和签名至少需填写1项;
418
+ - **SigId** (str) - 已申请的短信签名ID(短信签名申请时的工单ID);签名ID和签名至少需填写1项;
419
+
420
+ **Response**
421
+
422
+ - **Data** (dict) - 见 **OutSignature** 模型定义
423
+ - **Message** (str) - 发生错误时,表示具体错误描述
424
+
425
+ **Response Model**
426
+
427
+ **OutSignature**
428
+ - **ErrDesc** (str) - 签名审核失败原因
429
+ - **SigContent** (str) - 签名内容
430
+ - **SigId** (str) - 签名ID
431
+ - **Status** (int) - 签名状态。0-待审核 1-审核中 2-审核通过 3-审核未通过 4-被禁用
432
+
433
+
434
+ """
435
+ # build request
436
+ d = {
437
+ "ProjectId": self.config.project_id,
438
+ }
439
+ req and d.update(req)
440
+ d = apis.QueryUSMSSignatureRequestSchema().dumps(d)
441
+
442
+ resp = self.invoke("QueryUSMSSignature", d, **kwargs)
443
+ return apis.QueryUSMSSignatureResponseSchema().loads(resp)
444
+
445
+ def query_usms_signature_qualification(
446
+ self, req: typing.Optional[dict] = None, **kwargs
447
+ ) -> dict:
448
+ """QueryUSMSSignatureQualification - 获取短信签名资质申请记录详情
449
+
450
+ **Request**
451
+
452
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
453
+ - **QualificationId** (str) - (Required) 签名资质Id
454
+
455
+ **Response**
456
+
457
+ - **Data** (dict) - 见 **OutSignatureQualificationDetail** 模型定义
458
+ - **Message** (str) - 返回状态码描述,如果操作成功,默认返回为空
459
+
460
+ **Response Model**
461
+
462
+ **OutSignatureQualificationDetail**
463
+ - **Attr** (int) - 资质属性:0-自用,1-他用
464
+ - **CompanyCertificateFile** (str) - 公司证件文件链接
465
+ - **CompanyCreditCode** (str) - 统一社会信用代码
466
+ - **CompanyName** (str) - 公司名称
467
+ - **CompanyWorkScenePhotos** (str) - 工作现场照片链接
468
+ - **CreateTime** (int) - 创建时间戳
469
+ - **ErrCode** (int) - 审核未通过错误码
470
+ - **ErrDesc** (str) - 审核未通过错误原因
471
+ - **HandlerHandHeldImage** (str) - 经办人手持身份证图片链接
472
+ - **HandlerIDCardBackImage** (str) - 经办人身份证国徽面图片链接
473
+ - **HandlerIDCardFrontImage** (str) - 经办人身份证人像面图片链接
474
+ - **HandlerIDNumber** (str) - 经办人证件号码
475
+ - **HandlerName** (str) - 经办人姓名
476
+ - **ManagerIDNumber** (str) - 负责人证件号码
477
+ - **ManagerName** (str) - 负责人姓名
478
+ - **ModifyTime** (int) - 修改时间戳
479
+ - **Name** (str) - 资质名称
480
+ - **PowerOfAttorney** (str) - 授权委托书文件链接
481
+ - **QualificationId** (str) - 资质Id
482
+ - **ReviewEndTime** (int) - 审核完成时间戳
483
+ - **ReviewStartTime** (int) - 审核开始时间戳
484
+ - **Status** (int) - 状态:0-草稿 1-审核中 2-审核通过 3-审核未通过 4-人工禁用
485
+
486
+
487
+ """
488
+ # build request
489
+ d = {
490
+ "ProjectId": self.config.project_id,
491
+ }
492
+ req and d.update(req)
493
+ d = apis.QueryUSMSSignatureQualificationRequestSchema().dumps(d)
494
+
495
+ resp = self.invoke("QueryUSMSSignatureQualification", d, **kwargs)
496
+ return apis.QueryUSMSSignatureQualificationResponseSchema().loads(resp)
497
+
498
+ def query_usms_template(
499
+ self, req: typing.Optional[dict] = None, **kwargs
500
+ ) -> dict:
501
+ """QueryUSMSTemplate - 调用接口QueryUSMSTemplate查询短信模板申请状态
502
+
503
+ **Request**
504
+
505
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
506
+ - **TemplateId** (str) - (Required) 模板ID
507
+
508
+ **Response**
509
+
510
+ - **Data** (dict) - 见 **OutTemplate** 模型定义
511
+ - **Message** (str) - 当RetCode不为0时,Message中显示具体错误描述
512
+
513
+ **Response Model**
514
+
515
+ **OutTemplate**
516
+ - **CreateTime** (int) - 创建时间
517
+ - **ErrDesc** (str) - 审核失败原因
518
+ - **Instruction** (str) - 模板变量属性说明
519
+ - **Purpose** (int) - 模板类型,选项:1-验证码类 2-通知类 3-会员推广类
520
+ - **Remark** (str) - 模板说明
521
+ - **Status** (int) - 短信模板状态;状态说明:0-待审核,1-审核中,2-审核通过,3-审核未通过,4-被禁用
522
+ - **Template** (str) - 短信模板内容
523
+ - **TemplateId** (str) - 短信模板ID
524
+ - **TemplateName** (str) - 短信模板名称
525
+ - **UnsubscribeInfo** (str) - 退订信息;一般填写方式“回T退订”,当purpose为3(也即会员推广类)时,为必填项
526
+
527
+
528
+ """
529
+ # build request
530
+ d = {
531
+ "ProjectId": self.config.project_id,
532
+ }
533
+ req and d.update(req)
534
+ d = apis.QueryUSMSTemplateRequestSchema().dumps(d)
535
+
536
+ resp = self.invoke("QueryUSMSTemplate", d, **kwargs)
537
+ return apis.QueryUSMSTemplateResponseSchema().loads(resp)
538
+
539
+ def send_batch_usms_message(
540
+ self, req: typing.Optional[dict] = None, **kwargs
541
+ ) -> dict:
542
+ """SendBatchUSMSMessage - 调用SendBatchUSMSMessage接口批量发送短信
543
+
544
+ **Request**
545
+
546
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
547
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
548
+ - **TaskContent** (str) - (Required) 批量发送内容,该参数是json数组的base64编码结果。发送内容json数组中,每个“模板+签名”组合作为一个子项,每个子项内支持多个号码,示例:发送内容json数组(base64编码前):[{"TemplateId": "UTA20212831C85C", "SigContent": "UCloud", "Target": [{"TemplateParams": ["123456"], "Phone": "18500000123", "ExtendCode": "123", "UserId": "456"} ] } ] 。json数组中各参数的定义:"TemplateId":模板ID,"SigContent"短信签名内容,"Target"具体到号码粒度的发送内容。"Target"中的具体字段有:"TemplateParams"实际发送的模板参数(若使用的是无参数模板,该参数不能传值),"Phone"手机号码, "ExtendCode"短信扩展码, "UserId"自定义业务标识ID。其中必传参数为"TemplateId", "SigContent", "Target"("Target"中必传参数为"Phone")。实际调用本接口时TaskContent传值(发送内容base64编码后)为:W3siVGVtcGxhdGVJZCI6ICJVVEEyMDIxMjgzMUM4NUMiLCAiU2lnQ29udGVudCI6ICJVQ2xvdWQiLCAiVGFyZ2V0IjogW3siVGVtcGxhdGVQYXJhbXMiOiBbIjEyMzQ1NiJdLCAiUGhvbmUiOiAiMTg1MDAwMDAxMjMiLCAiRXh0ZW5kQ29kZSI6ICIxMjMiLCAiVXNlcklkIjogIjQ1NiJ9IF0gfSBdIA==
549
+
550
+ **Response**
551
+
552
+ - **FailContent** (list) - 见 **BatchInfo** 模型定义
553
+ - **Message** (str) - 发生错误时表示错误描述
554
+ - **ReqUuid** (str) - 本次请求Uuid
555
+ - **SessionNo** (str) - 本次提交发送任务的唯一ID,可根据该值查询本次发送的短信列表。注:成功提交短信数大于0时,才返回该字段
556
+ - **SuccessCount** (int) - 成功提交短信(未拆分)条数
557
+
558
+ **Response Model**
559
+
560
+ **BatchInfo**
561
+ - **FailureDetails** (str) - 未能成功发送的详情。注:模板/签名检验失败时,该字段有效
562
+ - **SigContent** (str) - 签名
563
+ - **Target** (list) - 见 **FailPhoneDetail** 模型定义
564
+ - **TemplateId** (str) - 模板ID
565
+
566
+
567
+ **FailPhoneDetail**
568
+ - **ExtendCode** (str) - 扩展号码
569
+ - **FailureDetails** (str) - 发送失败原因。注:若模板/签名校验失败,该字段为空
570
+ - **Phone** (str) - 手机号
571
+ - **TemplateParams** (list) - 模板参数
572
+ - **UserId** (str) - 用户自定义ID
573
+
574
+
575
+ """
576
+ # build request
577
+ d = {
578
+ "ProjectId": self.config.project_id,
579
+ "Region": self.config.region,
580
+ }
581
+ req and d.update(req)
582
+ d = apis.SendBatchUSMSMessageRequestSchema().dumps(d)
583
+
584
+ # build options
585
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
586
+
587
+ resp = self.invoke("SendBatchUSMSMessage", d, **kwargs)
588
+ return apis.SendBatchUSMSMessageResponseSchema().loads(resp)
589
+
590
+ def send_usms_message(
591
+ self, req: typing.Optional[dict] = None, **kwargs
592
+ ) -> dict:
593
+ """SendUSMSMessage - 调用接口SendUSMSMessage发送短信
594
+
595
+ **Request**
596
+
597
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
598
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
599
+ - **PhoneNumbers** (list) - (Required) 电话号码数组,电话号码格式为(60)1xxxxxxxx,()中为国际长途区号(如中国为86或0086,两种格式都支持),后面为电话号码.若不传入国际区号,如1851623xxxx,则默认为国内手机号
600
+ - **TemplateId** (str) - (Required) 模板ID(也即短信模板申请时的工单ID),请到 `USMS控制台 <https://console.ucloud.cn/usms>`_ 的模板管理页面查看;使用的短信模板必须是已申请并通过审核;
601
+ - **ExtendCode** (str) - 短信扩展码,格式为阿拉伯数字串,默认不开通,如需开通请联系 UCloud技术支持
602
+ - **SigContent** (str) - 短信签名内容,请到 `USMS控制台 <https://console.ucloud.cn/usms>`_ 的签名管理页面查看;使用的短信签名必须是已申请并且通过审核;(注:国内短信为必选参数、国际短信为可选参数)
603
+ - **TemplateParams** (list) - 模板可变参数,以数组的方式填写,举例,TemplateParams.0,TemplateParams.1,... 若模板中无可变参数,则该项可不填写;若模板中有可变参数,则该项为必填项,参数个数需与变量个数保持一致,否则无法发送;
604
+ - **UserId** (str) - 自定义的业务标识ID,字符串( 长度不能超过32 位),不支持 单引号、表情包符号等特殊字符
605
+
606
+ **Response**
607
+
608
+ - **Message** (str) - 发生错误时表示错误描述
609
+ - **SessionNo** (str) - 本次提交发送的短信的唯一ID,可根据该值查询本次发送的短信列表
610
+ - **UserId** (str) - 本次提交的自定义业务标识ID,仅当发送时传入有效的UserId,才返回该字段。
611
+
612
+ """
613
+ # build request
614
+ d = {
615
+ "ProjectId": self.config.project_id,
616
+ "Region": self.config.region,
617
+ }
618
+ req and d.update(req)
619
+ d = apis.SendUSMSMessageRequestSchema().dumps(d)
620
+
621
+ # build options
622
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
623
+
624
+ resp = self.invoke("SendUSMSMessage", d, **kwargs)
625
+ return apis.SendUSMSMessageResponseSchema().loads(resp)
626
+
627
+ def update_usms_signature(
628
+ self, req: typing.Optional[dict] = None, **kwargs
629
+ ) -> dict:
630
+ """UpdateUSMSSignature - 调用接口UpdateUSMSSignature修改未通过审核的短信签名,并重新提交审核
631
+
632
+ **Request**
633
+
634
+ - **ProjectId** (str) - (Config) 项目ID,不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
635
+ - **SigContent** (str) - (Required) 新的短信签名内容;长度为2-12个字符, 可包含中文、数字和符号;无需填写【】或[],系统会自动添加
636
+ - **SigId** (str) - (Required) 签名ID(也即短信签名申请时的工单ID),支持以数组的方式,举例,以SigIds.0、SigIds.1...SigIds.N方式传入
637
+ - **SigPurpose** (int) - (Required) 签名用途,0-自用,1-他用;
638
+ - **SigType** (int) - (Required) 签名类型,说明如下:0-公司或企业的全称或简称;1-App应用的全称或简称;2-工信部备案网站的全称或简称;3-公众号或小程序的全称或简称;4-商标名的全称或简称;5-政府/机关事业单位/其他单位的全称或简称;
639
+ - **CertificateType** (int) - 签名的资质证明文件类型,需与签名类型保持一致,说明如下:0-三证合一/企业营业执照/组织机构代码证书/社会信用代码证书;1-应用商店后台开发者管理截图;2-备案服务商的备案成功截图(含域名,网站名称,备案号);3-公众号或小程序的管理界面截图;4-商标注册证书;5-组织机构代码证书、社会信用代码证书;
640
+ - **Document** (str) - 短信签名的资质证明文件URL,若未更改审核材料,则该处使用已上传审核材料的URL链接,否则使用File参数
641
+ - **File** (str) - 短信签名的资质证明文件内容,需先进行base64编码格式转换,此处填写转换后的字符串。文件大小不超过4 MB。内容格式如下: [file type];[code type],[base64] 如:image/jpeg;base64,5YaF5a65
642
+ - **ProxyDoc** (str) - 短信签名授权委托文件URL,若未更改授权委托文件,则该处填写已上传的授权委托文件的URL链接,否则使用ProxyFile参数
643
+ - **ProxyFile** (str) - 短信签名授权委托文件内容,需先进行base64编码格式转换,此处填写转换后的字符串。文件大小不超过4 MB;当您是代理并使用第三方的签名时(也即SigPurpose为1-他用),该项为必填项;格式和File类似。
644
+ - **SceneDesc** (str) - 短信签名对应的场景说明
645
+
646
+ **Response**
647
+
648
+ - **Message** (str) - 返回状态码描述,如果操作成功,默认返回为空
649
+
650
+ """
651
+ # build request
652
+ d = {
653
+ "ProjectId": self.config.project_id,
654
+ }
655
+ req and d.update(req)
656
+ d = apis.UpdateUSMSSignatureRequestSchema().dumps(d)
657
+
658
+ resp = self.invoke("UpdateUSMSSignature", d, **kwargs)
659
+ return apis.UpdateUSMSSignatureResponseSchema().loads(resp)
660
+
661
+ def update_usms_signature_qualification(
662
+ self, req: typing.Optional[dict] = None, **kwargs
663
+ ) -> dict:
664
+ """UpdateUSMSSignatureQualification - 修改短信签名资质申请记录
665
+
666
+ **Request**
667
+
668
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
669
+ - **QualificationId** (str) - (Required) 资质Id
670
+ - **Status** (int) - (Required) 状态:0-草稿,1-提交审核
671
+ - **Attr** (int) - 资质属性,0-自用 1-他用
672
+ - **CompanyCertificateFileId** (str) - 公司证件文件FileId
673
+ - **CompanyCreditCode** (str) - 公司统一社会信用代码
674
+ - **CompanyName** (str) - 公司名称,长度限制100
675
+ - **CompanyWorkScenePhotosFileId** (str) - 公司工作现场照片FileId
676
+ - **HandlerHandHeldImageFileId** (str) - 经办人手持身份证图片FileId
677
+ - **HandlerIDCardBackImageFileId** (str) - 经办人身份证国徽面图片FileId
678
+ - **HandlerIDCardFrontImageFileId** (str) - 经办人身份证人像面图片FileId
679
+ - **HandlerIDNumber** (str) - 经办人身份证号码
680
+ - **HandlerName** (str) - 经办人姓名
681
+ - **ManagerIDNumber** (str) - 法人身份证号码
682
+ - **ManagerName** (str) - 法人姓名
683
+ - **Name** (str) - 资质名称
684
+
685
+ **Response**
686
+
687
+ - **Message** (str) - 返回状态码描述,如果操作成功,默认返回为空
688
+ - **QualificationId** (str) - 资质Id
689
+
690
+ """
691
+ # build request
692
+ d = {
693
+ "ProjectId": self.config.project_id,
694
+ }
695
+ req and d.update(req)
696
+ d = apis.UpdateUSMSSignatureQualificationRequestSchema().dumps(d)
697
+
698
+ resp = self.invoke("UpdateUSMSSignatureQualification", d, **kwargs)
699
+ return apis.UpdateUSMSSignatureQualificationResponseSchema().loads(resp)
700
+
701
+ def update_usms_template(
702
+ self, req: typing.Optional[dict] = None, **kwargs
703
+ ) -> dict:
704
+ """UpdateUSMSTemplate - 调用接口UpdateUSMSTemplate修改未通过审核的短信模板,并重新提交审核
705
+
706
+ **Request**
707
+
708
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
709
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
710
+ - **Template** (str) - (Required) 新的模板内容。模板名称和模板内容必须提供一个,否则会报错。小于等于600个字
711
+ - **TemplateId** (str) - (Required) 短信模板ID
712
+ - **Instruction** (str) - 模板变量属性说明
713
+ - **Remark** (str) - 短信模板申请原因说明,字数不超过128,每个中文、符号、英文、数字等都计为1个字。
714
+ - **TemplateName** (str) - 新的模板名称。小于等于32个字,每个中文、英文、数组、符合都计为一个字
715
+
716
+ **Response**
717
+
718
+ - **Message** (str) - 发生错误时表示错误描述
719
+
720
+ """
721
+ # build request
722
+ d = {
723
+ "ProjectId": self.config.project_id,
724
+ "Region": self.config.region,
725
+ }
726
+ req and d.update(req)
727
+ d = apis.UpdateUSMSTemplateRequestSchema().dumps(d)
728
+
729
+ resp = self.invoke("UpdateUSMSTemplate", d, **kwargs)
730
+ return apis.UpdateUSMSTemplateResponseSchema().loads(resp)
731
+
732
+ def upload_usms_file(
733
+ self, req: typing.Optional[dict] = None, **kwargs
734
+ ) -> dict:
735
+ """UploadUSMSFile - 上传文件
736
+
737
+ **Request**
738
+
739
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
740
+ - **FileContent** (str) - (Required) 文件内容,base64编码
741
+ - **FileName** (str) - (Required) 文件名称,携带文件后缀
742
+ - **Source** (int) - (Required) 文件来源,0-签名资质
743
+ - **FileType** (str) - 文件类型,mime格式
744
+
745
+ **Response**
746
+
747
+ - **FileId** (str) - 文件FileId
748
+ - **Message** (str) - 返回状态码描述,如果操作成功,默认返回为空
749
+
750
+ """
751
+ # build request
752
+ d = {
753
+ "ProjectId": self.config.project_id,
754
+ }
755
+ req and d.update(req)
756
+ d = apis.UploadUSMSFileRequestSchema().dumps(d)
757
+
758
+ resp = self.invoke("UploadUSMSFile", d, **kwargs)
759
+ return apis.UploadUSMSFileResponseSchema().loads(resp)