tccli 3.0.1215.1__py2.py3-none-any.whl → 3.0.1217.1__py2.py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (282) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/argparser.py +1 -1
  3. tccli/command.py +2 -2
  4. tccli/configure.py +46 -1
  5. tccli/credentials.py +25 -0
  6. tccli/main.py +6 -2
  7. tccli/plugins/sso/__init__.py +61 -0
  8. tccli/plugins/sso/configs.py +4 -0
  9. tccli/plugins/sso/configure.py +45 -0
  10. tccli/plugins/sso/login.py +144 -0
  11. tccli/plugins/sso/logout.py +21 -0
  12. tccli/plugins/sso/terminal.py +161 -0
  13. tccli/plugins/sso/texts.py +40 -0
  14. tccli/services/__init__.py +6 -3
  15. tccli/services/acp/v20220105/api.json +7 -7
  16. tccli/services/acp/v20220105/examples.json +2 -2
  17. tccli/services/aiart/v20221229/api.json +29 -29
  18. tccli/services/aiart/v20221229/examples.json +8 -8
  19. tccli/services/apigateway/v20180808/api.json +18 -17
  20. tccli/services/apigateway/v20180808/examples.json +12 -12
  21. tccli/services/apm/v20210622/api.json +118 -4
  22. tccli/services/asr/v20190614/api.json +21 -20
  23. tccli/services/asr/v20190614/examples.json +13 -13
  24. tccli/services/autoscaling/v20180419/api.json +371 -309
  25. tccli/services/autoscaling/v20180419/examples.json +17 -17
  26. tccli/services/batch/v20170312/api.json +7 -7
  27. tccli/services/bda/v20200324/api.json +39 -31
  28. tccli/services/bda/v20200324/examples.json +9 -9
  29. tccli/services/bh/__init__.py +4 -0
  30. tccli/services/bh/bh_client.py +3428 -0
  31. tccli/services/bh/v20230418/api.json +8180 -0
  32. tccli/services/bh/v20230418/examples.json +519 -0
  33. tccli/services/bi/v20220105/api.json +80 -4
  34. tccli/services/bi/v20220105/examples.json +1 -1
  35. tccli/services/billing/billing_client.py +53 -0
  36. tccli/services/billing/v20180709/api.json +330 -24
  37. tccli/services/billing/v20180709/examples.json +8 -0
  38. tccli/services/bsca/v20210811/api.json +223 -18
  39. tccli/services/bsca/v20210811/examples.json +4 -4
  40. tccli/services/btoe/v20210514/api.json +4 -4
  41. tccli/services/btoe/v20210514/examples.json +2 -2
  42. tccli/services/ca/v20230228/api.json +60 -0
  43. tccli/services/cam/v20190116/api.json +11 -11
  44. tccli/services/cat/v20180409/api.json +9 -0
  45. tccli/services/cbs/v20170312/api.json +200 -188
  46. tccli/services/cbs/v20170312/examples.json +4 -4
  47. tccli/services/ccc/ccc_client.py +53 -0
  48. tccli/services/ccc/v20200210/api.json +541 -325
  49. tccli/services/ccc/v20200210/examples.json +26 -18
  50. tccli/services/cdb/cdb_client.py +13 -13
  51. tccli/services/cdb/v20170320/api.json +308 -274
  52. tccli/services/cdb/v20170320/examples.json +38 -38
  53. tccli/services/cdc/v20201214/api.json +283 -270
  54. tccli/services/cdc/v20201214/examples.json +26 -26
  55. tccli/services/cdn/v20180606/api.json +5 -3
  56. tccli/services/cds/v20180420/api.json +82 -76
  57. tccli/services/cds/v20180420/examples.json +1 -1
  58. tccli/services/cdwch/v20200915/api.json +1 -1
  59. tccli/services/cdwdoris/v20211228/api.json +54 -4
  60. tccli/services/cdz/v20221123/api.json +41 -5
  61. tccli/services/cfg/v20210820/api.json +31 -0
  62. tccli/services/cfs/v20190719/api.json +89 -1
  63. tccli/services/cfs/v20190719/examples.json +1 -1
  64. tccli/services/cfw/cfw_client.py +0 -53
  65. tccli/services/cfw/v20190904/api.json +1895 -2011
  66. tccli/services/cfw/v20190904/examples.json +175 -171
  67. tccli/services/ciam/v20220331/api.json +316 -315
  68. tccli/services/ciam/v20220331/examples.json +49 -49
  69. tccli/services/ckafka/v20190819/api.json +104 -75
  70. tccli/services/clb/v20180317/api.json +48 -26
  71. tccli/services/clb/v20180317/examples.json +1 -1
  72. tccli/services/cloudapp/v20220530/api.json +5 -1
  73. tccli/services/cloudaudit/cloudaudit_client.py +30 -30
  74. tccli/services/cloudaudit/v20190319/api.json +254 -211
  75. tccli/services/cloudaudit/v20190319/examples.json +19 -19
  76. tccli/services/cloudstudio/v20230508/api.json +38 -37
  77. tccli/services/cloudstudio/v20230508/examples.json +4 -4
  78. tccli/services/cls/cls_client.py +216 -4
  79. tccli/services/cls/v20201016/api.json +935 -147
  80. tccli/services/cls/v20201016/examples.json +43 -5
  81. tccli/services/csip/v20221121/api.json +2566 -2386
  82. tccli/services/csip/v20221121/examples.json +108 -108
  83. tccli/services/cvm/v20170312/api.json +191 -112
  84. tccli/services/cvm/v20170312/examples.json +2 -2
  85. tccli/services/cwp/cwp_client.py +4 -110
  86. tccli/services/cwp/v20180228/api.json +6498 -6252
  87. tccli/services/cwp/v20180228/examples.json +372 -412
  88. tccli/services/cynosdb/v20190107/api.json +170 -110
  89. tccli/services/cynosdb/v20190107/examples.json +91 -91
  90. tccli/services/dasb/v20191018/api.json +859 -637
  91. tccli/services/dasb/v20191018/examples.json +101 -101
  92. tccli/services/dcdb/dcdb_client.py +114 -61
  93. tccli/services/dcdb/v20180411/api.json +141 -7
  94. tccli/services/dcdb/v20180411/examples.json +32 -0
  95. tccli/services/dlc/v20210125/api.json +21 -11
  96. tccli/services/dnspod/dnspod_client.py +417 -46
  97. tccli/services/dnspod/v20210323/api.json +751 -30
  98. tccli/services/dnspod/v20210323/examples.json +62 -0
  99. tccli/services/domain/v20180808/api.json +3 -3
  100. tccli/services/domain/v20180808/examples.json +3 -3
  101. tccli/services/dts/v20211206/api.json +4 -4
  102. tccli/services/eb/v20210416/api.json +15 -15
  103. tccli/services/eb/v20210416/examples.json +1 -1
  104. tccli/services/ecm/v20190719/api.json +2 -2
  105. tccli/services/emr/v20190103/api.json +339 -114
  106. tccli/services/emr/v20190103/examples.json +64 -82
  107. tccli/services/es/es_client.py +249 -37
  108. tccli/services/es/v20180416/api.json +550 -0
  109. tccli/services/es/v20180416/examples.json +33 -1
  110. tccli/services/ess/ess_client.py +53 -0
  111. tccli/services/ess/v20201111/api.json +192 -38
  112. tccli/services/ess/v20201111/examples.json +35 -9
  113. tccli/services/essbasic/essbasic_client.py +106 -0
  114. tccli/services/essbasic/v20210526/api.json +287 -60
  115. tccli/services/essbasic/v20210526/examples.json +58 -18
  116. tccli/services/facefusion/v20181201/api.json +47 -45
  117. tccli/services/facefusion/v20181201/examples.json +2 -2
  118. tccli/services/facefusion/v20220927/api.json +54 -48
  119. tccli/services/facefusion/v20220927/examples.json +5 -5
  120. tccli/services/faceid/v20180301/api.json +497 -496
  121. tccli/services/faceid/v20180301/examples.json +219 -101
  122. tccli/services/fmu/v20191213/api.json +59 -67
  123. tccli/services/fmu/v20191213/examples.json +22 -22
  124. tccli/services/ft/v20200304/api.json +53 -57
  125. tccli/services/ft/v20200304/examples.json +14 -14
  126. tccli/services/gaap/v20180529/api.json +44 -26
  127. tccli/services/gaap/v20180529/examples.json +24 -30
  128. tccli/services/gme/v20180711/api.json +21 -11
  129. tccli/services/gme/v20180711/examples.json +1 -1
  130. tccli/services/hai/v20230812/api.json +116 -9
  131. tccli/services/hai/v20230812/examples.json +4 -4
  132. tccli/services/hunyuan/hunyuan_client.py +436 -12
  133. tccli/services/hunyuan/v20230901/api.json +1482 -118
  134. tccli/services/hunyuan/v20230901/examples.json +82 -18
  135. tccli/services/iai/v20180301/api.json +23 -19
  136. tccli/services/iai/v20180301/examples.json +2 -2
  137. tccli/services/iai/v20200303/api.json +530 -511
  138. tccli/services/iai/v20200303/examples.json +116 -86
  139. tccli/services/ig/__init__.py +4 -0
  140. tccli/services/ig/ig_client.py +195 -0
  141. tccli/services/ig/v20210518/api.json +83 -0
  142. tccli/services/ig/v20210518/examples.json +13 -0
  143. tccli/services/ioa/ioa_client.py +53 -0
  144. tccli/services/ioa/v20220601/api.json +662 -413
  145. tccli/services/ioa/v20220601/examples.json +24 -10
  146. tccli/services/iotexplorer/v20190423/api.json +73 -13
  147. tccli/services/iotexplorer/v20190423/examples.json +3 -3
  148. tccli/services/iotvideo/iotvideo_client.py +106 -0
  149. tccli/services/iotvideo/v20191126/api.json +256 -24
  150. tccli/services/iotvideo/v20191126/examples.json +19 -3
  151. tccli/services/iotvideo/v20201215/api.json +1 -1
  152. tccli/services/iotvideo/v20201215/examples.json +1 -1
  153. tccli/services/iotvideo/v20211125/api.json +1 -1
  154. tccli/services/iotvideo/v20211125/examples.json +2 -2
  155. tccli/services/iss/iss_client.py +69 -122
  156. tccli/services/iss/v20230517/api.json +10 -54
  157. tccli/services/iss/v20230517/examples.json +0 -14
  158. tccli/services/kms/v20190118/api.json +301 -268
  159. tccli/services/kms/v20190118/examples.json +45 -51
  160. tccli/services/lcic/lcic_client.py +159 -0
  161. tccli/services/lcic/v20220817/api.json +273 -1
  162. tccli/services/lcic/v20220817/examples.json +24 -0
  163. tccli/services/lighthouse/v20200324/api.json +56 -0
  164. tccli/services/live/live_client.py +159 -0
  165. tccli/services/live/v20180801/api.json +279 -9
  166. tccli/services/live/v20180801/examples.json +24 -0
  167. tccli/services/lke/v20231130/api.json +17 -17
  168. tccli/services/lke/v20231130/examples.json +19 -25
  169. tccli/services/mariadb/v20170312/api.json +7 -7
  170. tccli/services/market/v20191010/api.json +3 -3
  171. tccli/services/market/v20191010/examples.json +2 -2
  172. tccli/services/mmps/v20200710/api.json +47 -47
  173. tccli/services/mmps/v20200710/examples.json +3 -3
  174. tccli/services/mongodb/v20190725/api.json +10 -12
  175. tccli/services/monitor/v20180724/api.json +46 -19
  176. tccli/services/mps/v20190612/api.json +282 -5
  177. tccli/services/mps/v20190612/examples.json +25 -1
  178. tccli/services/mqtt/v20240516/api.json +2 -2
  179. tccli/services/mrs/v20200910/api.json +72 -34
  180. tccli/services/mrs/v20200910/examples.json +2 -2
  181. tccli/services/ms/v20180408/api.json +535 -506
  182. tccli/services/ms/v20180408/examples.json +25 -25
  183. tccli/services/oceanus/v20190422/api.json +130 -0
  184. tccli/services/ocr/ocr_client.py +232 -20
  185. tccli/services/ocr/v20181119/api.json +2263 -758
  186. tccli/services/ocr/v20181119/examples.json +200 -180
  187. tccli/services/omics/v20221128/api.json +614 -553
  188. tccli/services/omics/v20221128/examples.json +9 -9
  189. tccli/services/organization/organization_client.py +352 -34
  190. tccli/services/organization/v20210331/api.json +464 -4
  191. tccli/services/organization/v20210331/examples.json +49 -1
  192. tccli/services/partners/v20180321/api.json +244 -234
  193. tccli/services/partners/v20180321/examples.json +19 -19
  194. tccli/services/privatedns/privatedns_client.py +428 -4
  195. tccli/services/privatedns/v20201028/api.json +815 -11
  196. tccli/services/privatedns/v20201028/examples.json +64 -0
  197. tccli/services/pts/v20210728/api.json +18 -0
  198. tccli/services/pts/v20210728/examples.json +1 -1
  199. tccli/services/rce/rce_client.py +53 -0
  200. tccli/services/rce/v20201103/api.json +146 -0
  201. tccli/services/rce/v20201103/examples.json +8 -0
  202. tccli/services/redis/v20180412/api.json +42 -42
  203. tccli/services/redis/v20180412/examples.json +19 -19
  204. tccli/services/region/v20220627/api.json +1 -1
  205. tccli/services/rum/v20210622/api.json +9 -0
  206. tccli/services/scf/scf_client.py +269 -4
  207. tccli/services/scf/v20180416/api.json +569 -15
  208. tccli/services/scf/v20180416/examples.json +47 -1
  209. tccli/services/smop/v20201203/api.json +46 -42
  210. tccli/services/smop/v20201203/examples.json +2 -2
  211. tccli/services/soe/v20180724/api.json +10 -10
  212. tccli/services/sqlserver/v20180328/api.json +21 -8
  213. tccli/services/sqlserver/v20180328/examples.json +5 -5
  214. tccli/services/ssl/v20191205/api.json +98 -5
  215. tccli/services/ssm/v20190923/api.json +292 -231
  216. tccli/services/ssm/v20190923/examples.json +42 -42
  217. tccli/services/tat/v20201028/api.json +124 -122
  218. tccli/services/tat/v20201028/examples.json +24 -30
  219. tccli/services/tchd/v20230306/api.json +5 -5
  220. tccli/services/tchd/v20230306/examples.json +3 -3
  221. tccli/services/tcr/v20190924/api.json +1 -1
  222. tccli/services/tcr/v20190924/examples.json +1 -1
  223. tccli/services/tcss/v20201101/api.json +1984 -1437
  224. tccli/services/tcss/v20201101/examples.json +350 -368
  225. tccli/services/tdmq/v20200217/api.json +603 -464
  226. tccli/services/tdmq/v20200217/examples.json +105 -105
  227. tccli/services/tds/v20220801/api.json +4 -4
  228. tccli/services/tem/v20210701/api.json +429 -372
  229. tccli/services/tem/v20210701/examples.json +85 -85
  230. tccli/services/teo/teo_client.py +277 -12
  231. tccli/services/teo/v20220901/api.json +1029 -124
  232. tccli/services/teo/v20220901/examples.json +84 -8
  233. tccli/services/thpc/v20230321/api.json +5 -5
  234. tccli/services/tke/tke_client.py +270 -58
  235. tccli/services/tke/v20180525/api.json +79 -27
  236. tccli/services/tke/v20180525/examples.json +9 -1
  237. tccli/services/tke/v20220501/api.json +176 -0
  238. tccli/services/tke/v20220501/examples.json +24 -0
  239. tccli/services/tms/tms_client.py +4 -57
  240. tccli/services/tms/v20201229/api.json +0 -354
  241. tccli/services/tms/v20201229/examples.json +0 -8
  242. tccli/services/tmt/v20180321/api.json +38 -8
  243. tccli/services/trp/v20210515/api.json +86 -74
  244. tccli/services/trp/v20210515/examples.json +65 -65
  245. tccli/services/trro/v20220325/api.json +72 -71
  246. tccli/services/trro/v20220325/examples.json +8 -8
  247. tccli/services/trtc/trtc_client.py +8 -61
  248. tccli/services/trtc/v20190722/api.json +293 -52
  249. tccli/services/trtc/v20190722/examples.json +3 -11
  250. tccli/services/tse/tse_client.py +110 -4
  251. tccli/services/tse/v20201207/api.json +122 -7
  252. tccli/services/tse/v20201207/examples.json +25 -9
  253. tccli/services/vclm/v20240523/api.json +225 -82
  254. tccli/services/vclm/v20240523/examples.json +13 -19
  255. tccli/services/vod/v20180717/api.json +431 -4
  256. tccli/services/vod/v20180717/examples.json +25 -5
  257. tccli/services/vod/v20240718/api.json +11 -11
  258. tccli/services/vod/v20240718/examples.json +4 -4
  259. tccli/services/vod/vod_client.py +53 -0
  260. tccli/services/vpc/v20170312/api.json +1195 -892
  261. tccli/services/vpc/v20170312/examples.json +84 -68
  262. tccli/services/vpc/vpc_client.py +168 -62
  263. tccli/services/waf/v20180125/api.json +2611 -2187
  264. tccli/services/waf/v20180125/examples.json +224 -284
  265. tccli/services/waf/waf_client.py +225 -119
  266. tccli/services/wav/v20210129/api.json +48 -48
  267. tccli/services/wav/v20210129/examples.json +4 -4
  268. tccli/services/wedata/v20210820/api.json +1595 -25
  269. tccli/services/wedata/v20210820/examples.json +44 -4
  270. tccli/services/wedata/wedata_client.py +265 -0
  271. tccli/services/weilingwith/v20230427/api.json +6 -6
  272. tccli/services/weilingwith/v20230427/examples.json +3 -3
  273. tccli/sso.py +229 -0
  274. {tccli-3.0.1215.1.dist-info → tccli-3.0.1217.1.dist-info}/METADATA +6 -2
  275. {tccli-3.0.1215.1.dist-info → tccli-3.0.1217.1.dist-info}/RECORD +278 -265
  276. tccli/services/cr/__init__.py +0 -4
  277. tccli/services/cr/cr_client.py +0 -1626
  278. tccli/services/cr/v20180321/api.json +0 -2829
  279. tccli/services/cr/v20180321/examples.json +0 -235
  280. {tccli-3.0.1215.1.dist-info → tccli-3.0.1217.1.dist-info}/WHEEL +0 -0
  281. {tccli-3.0.1215.1.dist-info → tccli-3.0.1217.1.dist-info}/entry_points.txt +0 -0
  282. {tccli-3.0.1215.1.dist-info → tccli-3.0.1217.1.dist-info}/license_files/LICENSE +0 -0
@@ -745,6 +745,110 @@ def doCreateTopic(args, parsed_globals):
745
745
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
746
746
 
747
747
 
748
+ def doDescribeCloudProductLogTasks(args, parsed_globals):
749
+ g_param = parse_global_arg(parsed_globals)
750
+
751
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
752
+ cred = credential.CVMRoleCredential()
753
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
754
+ cred = credential.STSAssumeRoleCredential(
755
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
756
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
757
+ )
758
+ elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
759
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
760
+ else:
761
+ cred = credential.Credential(
762
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
763
+ )
764
+ http_profile = HttpProfile(
765
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
766
+ reqMethod="POST",
767
+ endpoint=g_param[OptionsDefine.Endpoint],
768
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
769
+ )
770
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
771
+ if g_param[OptionsDefine.Language]:
772
+ profile.language = g_param[OptionsDefine.Language]
773
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
774
+ client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
775
+ client._sdkVersion += ("_CLI_" + __version__)
776
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
777
+ model = models.DescribeCloudProductLogTasksRequest()
778
+ model.from_json_string(json.dumps(args))
779
+ start_time = time.time()
780
+ while True:
781
+ rsp = client.DescribeCloudProductLogTasks(model)
782
+ result = rsp.to_json_string()
783
+ try:
784
+ json_obj = json.loads(result)
785
+ except TypeError as e:
786
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
787
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
788
+ break
789
+ cur_time = time.time()
790
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
791
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
792
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
793
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
794
+ else:
795
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
796
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
797
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
798
+
799
+
800
+ def doDeleteCloudProductLogTask(args, parsed_globals):
801
+ g_param = parse_global_arg(parsed_globals)
802
+
803
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
804
+ cred = credential.CVMRoleCredential()
805
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
806
+ cred = credential.STSAssumeRoleCredential(
807
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
808
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
809
+ )
810
+ elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
811
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
812
+ else:
813
+ cred = credential.Credential(
814
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
815
+ )
816
+ http_profile = HttpProfile(
817
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
818
+ reqMethod="POST",
819
+ endpoint=g_param[OptionsDefine.Endpoint],
820
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
821
+ )
822
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
823
+ if g_param[OptionsDefine.Language]:
824
+ profile.language = g_param[OptionsDefine.Language]
825
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
826
+ client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
827
+ client._sdkVersion += ("_CLI_" + __version__)
828
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
829
+ model = models.DeleteCloudProductLogTaskRequest()
830
+ model.from_json_string(json.dumps(args))
831
+ start_time = time.time()
832
+ while True:
833
+ rsp = client.DeleteCloudProductLogTask(model)
834
+ result = rsp.to_json_string()
835
+ try:
836
+ json_obj = json.loads(result)
837
+ except TypeError as e:
838
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
839
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
840
+ break
841
+ cur_time = time.time()
842
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
843
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
844
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
845
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
846
+ else:
847
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
848
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
849
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
850
+
851
+
748
852
  def doDeleteAlarmNotice(args, parsed_globals):
749
853
  g_param = parse_global_arg(parsed_globals)
750
854
 
@@ -1577,6 +1681,58 @@ def doCreateNoticeContent(args, parsed_globals):
1577
1681
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1578
1682
 
1579
1683
 
1684
+ def doModifyCloudProductLogTask(args, parsed_globals):
1685
+ g_param = parse_global_arg(parsed_globals)
1686
+
1687
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1688
+ cred = credential.CVMRoleCredential()
1689
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1690
+ cred = credential.STSAssumeRoleCredential(
1691
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1692
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1693
+ )
1694
+ elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
1695
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1696
+ else:
1697
+ cred = credential.Credential(
1698
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1699
+ )
1700
+ http_profile = HttpProfile(
1701
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1702
+ reqMethod="POST",
1703
+ endpoint=g_param[OptionsDefine.Endpoint],
1704
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1705
+ )
1706
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1707
+ if g_param[OptionsDefine.Language]:
1708
+ profile.language = g_param[OptionsDefine.Language]
1709
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1710
+ client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
1711
+ client._sdkVersion += ("_CLI_" + __version__)
1712
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1713
+ model = models.ModifyCloudProductLogTaskRequest()
1714
+ model.from_json_string(json.dumps(args))
1715
+ start_time = time.time()
1716
+ while True:
1717
+ rsp = client.ModifyCloudProductLogTask(model)
1718
+ result = rsp.to_json_string()
1719
+ try:
1720
+ json_obj = json.loads(result)
1721
+ except TypeError as e:
1722
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1723
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1724
+ break
1725
+ cur_time = time.time()
1726
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1727
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1728
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1729
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1730
+ else:
1731
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1732
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1733
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1734
+
1735
+
1580
1736
  def doDeleteConsumer(args, parsed_globals):
1581
1737
  g_param = parse_global_arg(parsed_globals)
1582
1738
 
@@ -2461,7 +2617,7 @@ def doModifyAlarmShield(args, parsed_globals):
2461
2617
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2462
2618
 
2463
2619
 
2464
- def doSearchDashboardSubscribe(args, parsed_globals):
2620
+ def doCreateCloudProductLogTask(args, parsed_globals):
2465
2621
  g_param = parse_global_arg(parsed_globals)
2466
2622
 
2467
2623
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2490,11 +2646,11 @@ def doSearchDashboardSubscribe(args, parsed_globals):
2490
2646
  client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
2491
2647
  client._sdkVersion += ("_CLI_" + __version__)
2492
2648
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2493
- model = models.SearchDashboardSubscribeRequest()
2649
+ model = models.CreateCloudProductLogTaskRequest()
2494
2650
  model.from_json_string(json.dumps(args))
2495
2651
  start_time = time.time()
2496
2652
  while True:
2497
- rsp = client.SearchDashboardSubscribe(model)
2653
+ rsp = client.CreateCloudProductLogTask(model)
2498
2654
  result = rsp.to_json_string()
2499
2655
  try:
2500
2656
  json_obj = json.loads(result)
@@ -4437,6 +4593,58 @@ def doDescribeConfigExtras(args, parsed_globals):
4437
4593
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4438
4594
 
4439
4595
 
4596
+ def doSearchDashboardSubscribe(args, parsed_globals):
4597
+ g_param = parse_global_arg(parsed_globals)
4598
+
4599
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
4600
+ cred = credential.CVMRoleCredential()
4601
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
4602
+ cred = credential.STSAssumeRoleCredential(
4603
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
4604
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
4605
+ )
4606
+ elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
4607
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
4608
+ else:
4609
+ cred = credential.Credential(
4610
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
4611
+ )
4612
+ http_profile = HttpProfile(
4613
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
4614
+ reqMethod="POST",
4615
+ endpoint=g_param[OptionsDefine.Endpoint],
4616
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
4617
+ )
4618
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
4619
+ if g_param[OptionsDefine.Language]:
4620
+ profile.language = g_param[OptionsDefine.Language]
4621
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
4622
+ client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
4623
+ client._sdkVersion += ("_CLI_" + __version__)
4624
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
4625
+ model = models.SearchDashboardSubscribeRequest()
4626
+ model.from_json_string(json.dumps(args))
4627
+ start_time = time.time()
4628
+ while True:
4629
+ rsp = client.SearchDashboardSubscribe(model)
4630
+ result = rsp.to_json_string()
4631
+ try:
4632
+ json_obj = json.loads(result)
4633
+ except TypeError as e:
4634
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
4635
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
4636
+ break
4637
+ cur_time = time.time()
4638
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
4639
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
4640
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
4641
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
4642
+ else:
4643
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
4644
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
4645
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4646
+
4647
+
4440
4648
  def doCheckRechargeKafkaServer(args, parsed_globals):
4441
4649
  g_param = parse_global_arg(parsed_globals)
4442
4650
 
@@ -5509,6 +5717,8 @@ ACTION_MAP = {
5509
5717
  "DeleteDataTransform": doDeleteDataTransform,
5510
5718
  "CreateLogset": doCreateLogset,
5511
5719
  "CreateTopic": doCreateTopic,
5720
+ "DescribeCloudProductLogTasks": doDescribeCloudProductLogTasks,
5721
+ "DeleteCloudProductLogTask": doDeleteCloudProductLogTask,
5512
5722
  "DeleteAlarmNotice": doDeleteAlarmNotice,
5513
5723
  "DescribeAlertRecordHistory": doDescribeAlertRecordHistory,
5514
5724
  "DeleteKafkaRecharge": doDeleteKafkaRecharge,
@@ -5525,6 +5735,7 @@ ACTION_MAP = {
5525
5735
  "CreateAlarmShield": doCreateAlarmShield,
5526
5736
  "CreateShipper": doCreateShipper,
5527
5737
  "CreateNoticeContent": doCreateNoticeContent,
5738
+ "ModifyCloudProductLogTask": doModifyCloudProductLogTask,
5528
5739
  "DeleteConsumer": doDeleteConsumer,
5529
5740
  "DeleteMachineGroup": doDeleteMachineGroup,
5530
5741
  "DescribeKafkaRecharges": doDescribeKafkaRecharges,
@@ -5542,7 +5753,7 @@ ACTION_MAP = {
5542
5753
  "ModifyCosRecharge": doModifyCosRecharge,
5543
5754
  "ModifyConfigExtra": doModifyConfigExtra,
5544
5755
  "ModifyAlarmShield": doModifyAlarmShield,
5545
- "SearchDashboardSubscribe": doSearchDashboardSubscribe,
5756
+ "CreateCloudProductLogTask": doCreateCloudProductLogTask,
5546
5757
  "CreateConfigExtra": doCreateConfigExtra,
5547
5758
  "DescribeAlarmShields": doDescribeAlarmShields,
5548
5759
  "ModifyScheduledSql": doModifyScheduledSql,
@@ -5580,6 +5791,7 @@ ACTION_MAP = {
5580
5791
  "DescribeScheduledSqlInfo": doDescribeScheduledSqlInfo,
5581
5792
  "DeleteConfig": doDeleteConfig,
5582
5793
  "DescribeConfigExtras": doDescribeConfigExtras,
5794
+ "SearchDashboardSubscribe": doSearchDashboardSubscribe,
5583
5795
  "CheckRechargeKafkaServer": doCheckRechargeKafkaServer,
5584
5796
  "ModifyAlarm": doModifyAlarm,
5585
5797
  "DescribeShippers": doDescribeShippers,