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
@@ -2515,7 +2515,7 @@ def doModifyClusterVirtualNodePool(args, parsed_globals):
2515
2515
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2516
2516
 
2517
2517
 
2518
- def doDescribeClusterNodePools(args, parsed_globals):
2518
+ def doDescribeAvailableClusterVersion(args, parsed_globals):
2519
2519
  g_param = parse_global_arg(parsed_globals)
2520
2520
 
2521
2521
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2544,11 +2544,11 @@ def doDescribeClusterNodePools(args, parsed_globals):
2544
2544
  client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
2545
2545
  client._sdkVersion += ("_CLI_" + __version__)
2546
2546
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2547
- model = models.DescribeClusterNodePoolsRequest()
2547
+ model = models.DescribeAvailableClusterVersionRequest()
2548
2548
  model.from_json_string(json.dumps(args))
2549
2549
  start_time = time.time()
2550
2550
  while True:
2551
- rsp = client.DescribeClusterNodePools(model)
2551
+ rsp = client.DescribeAvailableClusterVersion(model)
2552
2552
  result = rsp.to_json_string()
2553
2553
  try:
2554
2554
  json_obj = json.loads(result)
@@ -2775,7 +2775,7 @@ def doCreateEdgeLogConfig(args, parsed_globals):
2775
2775
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2776
2776
 
2777
2777
 
2778
- def doDescribeAvailableClusterVersion(args, parsed_globals):
2778
+ def doDeleteImageCaches(args, parsed_globals):
2779
2779
  g_param = parse_global_arg(parsed_globals)
2780
2780
 
2781
2781
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2804,11 +2804,11 @@ def doDescribeAvailableClusterVersion(args, parsed_globals):
2804
2804
  client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
2805
2805
  client._sdkVersion += ("_CLI_" + __version__)
2806
2806
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2807
- model = models.DescribeAvailableClusterVersionRequest()
2807
+ model = models.DeleteImageCachesRequest()
2808
2808
  model.from_json_string(json.dumps(args))
2809
2809
  start_time = time.time()
2810
2810
  while True:
2811
- rsp = client.DescribeAvailableClusterVersion(model)
2811
+ rsp = client.DeleteImageCaches(model)
2812
2812
  result = rsp.to_json_string()
2813
2813
  try:
2814
2814
  json_obj = json.loads(result)
@@ -2827,7 +2827,7 @@ def doDescribeAvailableClusterVersion(args, parsed_globals):
2827
2827
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2828
2828
 
2829
2829
 
2830
- def doDeleteImageCaches(args, parsed_globals):
2830
+ def doDeleteClusterRouteTable(args, parsed_globals):
2831
2831
  g_param = parse_global_arg(parsed_globals)
2832
2832
 
2833
2833
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2856,11 +2856,11 @@ def doDeleteImageCaches(args, parsed_globals):
2856
2856
  client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
2857
2857
  client._sdkVersion += ("_CLI_" + __version__)
2858
2858
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2859
- model = models.DeleteImageCachesRequest()
2859
+ model = models.DeleteClusterRouteTableRequest()
2860
2860
  model.from_json_string(json.dumps(args))
2861
2861
  start_time = time.time()
2862
2862
  while True:
2863
- rsp = client.DeleteImageCaches(model)
2863
+ rsp = client.DeleteClusterRouteTable(model)
2864
2864
  result = rsp.to_json_string()
2865
2865
  try:
2866
2866
  json_obj = json.loads(result)
@@ -2879,7 +2879,7 @@ def doDeleteImageCaches(args, parsed_globals):
2879
2879
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2880
2880
 
2881
2881
 
2882
- def doDeleteClusterRouteTable(args, parsed_globals):
2882
+ def doModifyPrometheusAlertPolicy(args, parsed_globals):
2883
2883
  g_param = parse_global_arg(parsed_globals)
2884
2884
 
2885
2885
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2908,11 +2908,11 @@ def doDeleteClusterRouteTable(args, parsed_globals):
2908
2908
  client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
2909
2909
  client._sdkVersion += ("_CLI_" + __version__)
2910
2910
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2911
- model = models.DeleteClusterRouteTableRequest()
2911
+ model = models.ModifyPrometheusAlertPolicyRequest()
2912
2912
  model.from_json_string(json.dumps(args))
2913
2913
  start_time = time.time()
2914
2914
  while True:
2915
- rsp = client.DeleteClusterRouteTable(model)
2915
+ rsp = client.ModifyPrometheusAlertPolicy(model)
2916
2916
  result = rsp.to_json_string()
2917
2917
  try:
2918
2918
  json_obj = json.loads(result)
@@ -2931,7 +2931,7 @@ def doDeleteClusterRouteTable(args, parsed_globals):
2931
2931
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2932
2932
 
2933
2933
 
2934
- def doModifyPrometheusAlertPolicy(args, parsed_globals):
2934
+ def doUpdateAddon(args, parsed_globals):
2935
2935
  g_param = parse_global_arg(parsed_globals)
2936
2936
 
2937
2937
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2960,11 +2960,11 @@ def doModifyPrometheusAlertPolicy(args, parsed_globals):
2960
2960
  client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
2961
2961
  client._sdkVersion += ("_CLI_" + __version__)
2962
2962
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2963
- model = models.ModifyPrometheusAlertPolicyRequest()
2963
+ model = models.UpdateAddonRequest()
2964
2964
  model.from_json_string(json.dumps(args))
2965
2965
  start_time = time.time()
2966
2966
  while True:
2967
- rsp = client.ModifyPrometheusAlertPolicy(model)
2967
+ rsp = client.UpdateAddon(model)
2968
2968
  result = rsp.to_json_string()
2969
2969
  try:
2970
2970
  json_obj = json.loads(result)
@@ -2983,7 +2983,7 @@ def doModifyPrometheusAlertPolicy(args, parsed_globals):
2983
2983
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2984
2984
 
2985
2985
 
2986
- def doUpdateAddon(args, parsed_globals):
2986
+ def doDescribeClusterAuthenticationOptions(args, parsed_globals):
2987
2987
  g_param = parse_global_arg(parsed_globals)
2988
2988
 
2989
2989
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3012,11 +3012,11 @@ def doUpdateAddon(args, parsed_globals):
3012
3012
  client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
3013
3013
  client._sdkVersion += ("_CLI_" + __version__)
3014
3014
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
3015
- model = models.UpdateAddonRequest()
3015
+ model = models.DescribeClusterAuthenticationOptionsRequest()
3016
3016
  model.from_json_string(json.dumps(args))
3017
3017
  start_time = time.time()
3018
3018
  while True:
3019
- rsp = client.UpdateAddon(model)
3019
+ rsp = client.DescribeClusterAuthenticationOptions(model)
3020
3020
  result = rsp.to_json_string()
3021
3021
  try:
3022
3022
  json_obj = json.loads(result)
@@ -3035,7 +3035,7 @@ def doUpdateAddon(args, parsed_globals):
3035
3035
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3036
3036
 
3037
3037
 
3038
- def doDescribeClusterAuthenticationOptions(args, parsed_globals):
3038
+ def doDescribeLogConfigs(args, parsed_globals):
3039
3039
  g_param = parse_global_arg(parsed_globals)
3040
3040
 
3041
3041
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3064,11 +3064,11 @@ def doDescribeClusterAuthenticationOptions(args, parsed_globals):
3064
3064
  client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
3065
3065
  client._sdkVersion += ("_CLI_" + __version__)
3066
3066
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
3067
- model = models.DescribeClusterAuthenticationOptionsRequest()
3067
+ model = models.DescribeLogConfigsRequest()
3068
3068
  model.from_json_string(json.dumps(args))
3069
3069
  start_time = time.time()
3070
3070
  while True:
3071
- rsp = client.DescribeClusterAuthenticationOptions(model)
3071
+ rsp = client.DescribeLogConfigs(model)
3072
3072
  result = rsp.to_json_string()
3073
3073
  try:
3074
3074
  json_obj = json.loads(result)
@@ -3087,7 +3087,7 @@ def doDescribeClusterAuthenticationOptions(args, parsed_globals):
3087
3087
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3088
3088
 
3089
3089
 
3090
- def doDescribeLogConfigs(args, parsed_globals):
3090
+ def doInstallAddon(args, parsed_globals):
3091
3091
  g_param = parse_global_arg(parsed_globals)
3092
3092
 
3093
3093
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3116,11 +3116,11 @@ def doDescribeLogConfigs(args, parsed_globals):
3116
3116
  client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
3117
3117
  client._sdkVersion += ("_CLI_" + __version__)
3118
3118
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
3119
- model = models.DescribeLogConfigsRequest()
3119
+ model = models.InstallAddonRequest()
3120
3120
  model.from_json_string(json.dumps(args))
3121
3121
  start_time = time.time()
3122
3122
  while True:
3123
- rsp = client.DescribeLogConfigs(model)
3123
+ rsp = client.InstallAddon(model)
3124
3124
  result = rsp.to_json_string()
3125
3125
  try:
3126
3126
  json_obj = json.loads(result)
@@ -3139,7 +3139,7 @@ def doDescribeLogConfigs(args, parsed_globals):
3139
3139
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3140
3140
 
3141
3141
 
3142
- def doInstallAddon(args, parsed_globals):
3142
+ def doForwardApplicationRequestV3(args, parsed_globals):
3143
3143
  g_param = parse_global_arg(parsed_globals)
3144
3144
 
3145
3145
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3168,11 +3168,11 @@ def doInstallAddon(args, parsed_globals):
3168
3168
  client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
3169
3169
  client._sdkVersion += ("_CLI_" + __version__)
3170
3170
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
3171
- model = models.InstallAddonRequest()
3171
+ model = models.ForwardApplicationRequestV3Request()
3172
3172
  model.from_json_string(json.dumps(args))
3173
3173
  start_time = time.time()
3174
3174
  while True:
3175
- rsp = client.InstallAddon(model)
3175
+ rsp = client.ForwardApplicationRequestV3(model)
3176
3176
  result = rsp.to_json_string()
3177
3177
  try:
3178
3178
  json_obj = json.loads(result)
@@ -3191,7 +3191,7 @@ def doInstallAddon(args, parsed_globals):
3191
3191
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3192
3192
 
3193
3193
 
3194
- def doForwardApplicationRequestV3(args, parsed_globals):
3194
+ def doStartMachines(args, parsed_globals):
3195
3195
  g_param = parse_global_arg(parsed_globals)
3196
3196
 
3197
3197
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3220,11 +3220,11 @@ def doForwardApplicationRequestV3(args, parsed_globals):
3220
3220
  client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
3221
3221
  client._sdkVersion += ("_CLI_" + __version__)
3222
3222
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
3223
- model = models.ForwardApplicationRequestV3Request()
3223
+ model = models.StartMachinesRequest()
3224
3224
  model.from_json_string(json.dumps(args))
3225
3225
  start_time = time.time()
3226
3226
  while True:
3227
- rsp = client.ForwardApplicationRequestV3(model)
3227
+ rsp = client.StartMachines(model)
3228
3228
  result = rsp.to_json_string()
3229
3229
  try:
3230
3230
  json_obj = json.loads(result)
@@ -3243,7 +3243,7 @@ def doForwardApplicationRequestV3(args, parsed_globals):
3243
3243
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3244
3244
 
3245
3245
 
3246
- def doDescribeClusterNodePoolDetail(args, parsed_globals):
3246
+ def doDeletePrometheusTemp(args, parsed_globals):
3247
3247
  g_param = parse_global_arg(parsed_globals)
3248
3248
 
3249
3249
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3272,11 +3272,11 @@ def doDescribeClusterNodePoolDetail(args, parsed_globals):
3272
3272
  client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
3273
3273
  client._sdkVersion += ("_CLI_" + __version__)
3274
3274
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
3275
- model = models.DescribeClusterNodePoolDetailRequest()
3275
+ model = models.DeletePrometheusTempRequest()
3276
3276
  model.from_json_string(json.dumps(args))
3277
3277
  start_time = time.time()
3278
3278
  while True:
3279
- rsp = client.DescribeClusterNodePoolDetail(model)
3279
+ rsp = client.DeletePrometheusTemp(model)
3280
3280
  result = rsp.to_json_string()
3281
3281
  try:
3282
3282
  json_obj = json.loads(result)
@@ -3295,7 +3295,7 @@ def doDescribeClusterNodePoolDetail(args, parsed_globals):
3295
3295
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3296
3296
 
3297
3297
 
3298
- def doDeletePrometheusTemp(args, parsed_globals):
3298
+ def doDeletePrometheusTemplateSync(args, parsed_globals):
3299
3299
  g_param = parse_global_arg(parsed_globals)
3300
3300
 
3301
3301
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3324,11 +3324,11 @@ def doDeletePrometheusTemp(args, parsed_globals):
3324
3324
  client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
3325
3325
  client._sdkVersion += ("_CLI_" + __version__)
3326
3326
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
3327
- model = models.DeletePrometheusTempRequest()
3327
+ model = models.DeletePrometheusTemplateSyncRequest()
3328
3328
  model.from_json_string(json.dumps(args))
3329
3329
  start_time = time.time()
3330
3330
  while True:
3331
- rsp = client.DeletePrometheusTemp(model)
3331
+ rsp = client.DeletePrometheusTemplateSync(model)
3332
3332
  result = rsp.to_json_string()
3333
3333
  try:
3334
3334
  json_obj = json.loads(result)
@@ -3347,7 +3347,7 @@ def doDeletePrometheusTemp(args, parsed_globals):
3347
3347
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3348
3348
 
3349
3349
 
3350
- def doDeletePrometheusTemplateSync(args, parsed_globals):
3350
+ def doCreateTKEEdgeCluster(args, parsed_globals):
3351
3351
  g_param = parse_global_arg(parsed_globals)
3352
3352
 
3353
3353
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3376,11 +3376,11 @@ def doDeletePrometheusTemplateSync(args, parsed_globals):
3376
3376
  client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
3377
3377
  client._sdkVersion += ("_CLI_" + __version__)
3378
3378
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
3379
- model = models.DeletePrometheusTemplateSyncRequest()
3379
+ model = models.CreateTKEEdgeClusterRequest()
3380
3380
  model.from_json_string(json.dumps(args))
3381
3381
  start_time = time.time()
3382
3382
  while True:
3383
- rsp = client.DeletePrometheusTemplateSync(model)
3383
+ rsp = client.CreateTKEEdgeCluster(model)
3384
3384
  result = rsp.to_json_string()
3385
3385
  try:
3386
3386
  json_obj = json.loads(result)
@@ -4335,6 +4335,110 @@ def doCreateReservedInstances(args, parsed_globals):
4335
4335
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4336
4336
 
4337
4337
 
4338
+ def doRebootMachines(args, parsed_globals):
4339
+ g_param = parse_global_arg(parsed_globals)
4340
+
4341
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
4342
+ cred = credential.CVMRoleCredential()
4343
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
4344
+ cred = credential.STSAssumeRoleCredential(
4345
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
4346
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
4347
+ )
4348
+ 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):
4349
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
4350
+ else:
4351
+ cred = credential.Credential(
4352
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
4353
+ )
4354
+ http_profile = HttpProfile(
4355
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
4356
+ reqMethod="POST",
4357
+ endpoint=g_param[OptionsDefine.Endpoint],
4358
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
4359
+ )
4360
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
4361
+ if g_param[OptionsDefine.Language]:
4362
+ profile.language = g_param[OptionsDefine.Language]
4363
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
4364
+ client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
4365
+ client._sdkVersion += ("_CLI_" + __version__)
4366
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
4367
+ model = models.RebootMachinesRequest()
4368
+ model.from_json_string(json.dumps(args))
4369
+ start_time = time.time()
4370
+ while True:
4371
+ rsp = client.RebootMachines(model)
4372
+ result = rsp.to_json_string()
4373
+ try:
4374
+ json_obj = json.loads(result)
4375
+ except TypeError as e:
4376
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
4377
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
4378
+ break
4379
+ cur_time = time.time()
4380
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
4381
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
4382
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
4383
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
4384
+ else:
4385
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
4386
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
4387
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4388
+
4389
+
4390
+ def doForwardTKEEdgeApplicationRequestV3(args, parsed_globals):
4391
+ g_param = parse_global_arg(parsed_globals)
4392
+
4393
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
4394
+ cred = credential.CVMRoleCredential()
4395
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
4396
+ cred = credential.STSAssumeRoleCredential(
4397
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
4398
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
4399
+ )
4400
+ 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):
4401
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
4402
+ else:
4403
+ cred = credential.Credential(
4404
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
4405
+ )
4406
+ http_profile = HttpProfile(
4407
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
4408
+ reqMethod="POST",
4409
+ endpoint=g_param[OptionsDefine.Endpoint],
4410
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
4411
+ )
4412
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
4413
+ if g_param[OptionsDefine.Language]:
4414
+ profile.language = g_param[OptionsDefine.Language]
4415
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
4416
+ client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
4417
+ client._sdkVersion += ("_CLI_" + __version__)
4418
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
4419
+ model = models.ForwardTKEEdgeApplicationRequestV3Request()
4420
+ model.from_json_string(json.dumps(args))
4421
+ start_time = time.time()
4422
+ while True:
4423
+ rsp = client.ForwardTKEEdgeApplicationRequestV3(model)
4424
+ result = rsp.to_json_string()
4425
+ try:
4426
+ json_obj = json.loads(result)
4427
+ except TypeError as e:
4428
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
4429
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
4430
+ break
4431
+ cur_time = time.time()
4432
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
4433
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
4434
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
4435
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
4436
+ else:
4437
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
4438
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
4439
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4440
+
4441
+
4338
4442
  def doDescribeBatchModifyTagsStatus(args, parsed_globals):
4339
4443
  g_param = parse_global_arg(parsed_globals)
4340
4444
 
@@ -5271,7 +5375,7 @@ def doUpdateEKSContainerInstance(args, parsed_globals):
5271
5375
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
5272
5376
 
5273
5377
 
5274
- def doCreateTKEEdgeCluster(args, parsed_globals):
5378
+ def doStopMachines(args, parsed_globals):
5275
5379
  g_param = parse_global_arg(parsed_globals)
5276
5380
 
5277
5381
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -5300,11 +5404,11 @@ def doCreateTKEEdgeCluster(args, parsed_globals):
5300
5404
  client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
5301
5405
  client._sdkVersion += ("_CLI_" + __version__)
5302
5406
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
5303
- model = models.CreateTKEEdgeClusterRequest()
5407
+ model = models.StopMachinesRequest()
5304
5408
  model.from_json_string(json.dumps(args))
5305
5409
  start_time = time.time()
5306
5410
  while True:
5307
- rsp = client.CreateTKEEdgeCluster(model)
5411
+ rsp = client.StopMachines(model)
5308
5412
  result = rsp.to_json_string()
5309
5413
  try:
5310
5414
  json_obj = json.loads(result)
@@ -6155,6 +6259,58 @@ def doCreateNodePool(args, parsed_globals):
6155
6259
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
6156
6260
 
6157
6261
 
6262
+ def doModifyClusterImage(args, parsed_globals):
6263
+ g_param = parse_global_arg(parsed_globals)
6264
+
6265
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
6266
+ cred = credential.CVMRoleCredential()
6267
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
6268
+ cred = credential.STSAssumeRoleCredential(
6269
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
6270
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
6271
+ )
6272
+ 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):
6273
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
6274
+ else:
6275
+ cred = credential.Credential(
6276
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
6277
+ )
6278
+ http_profile = HttpProfile(
6279
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
6280
+ reqMethod="POST",
6281
+ endpoint=g_param[OptionsDefine.Endpoint],
6282
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
6283
+ )
6284
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
6285
+ if g_param[OptionsDefine.Language]:
6286
+ profile.language = g_param[OptionsDefine.Language]
6287
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
6288
+ client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
6289
+ client._sdkVersion += ("_CLI_" + __version__)
6290
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
6291
+ model = models.ModifyClusterImageRequest()
6292
+ model.from_json_string(json.dumps(args))
6293
+ start_time = time.time()
6294
+ while True:
6295
+ rsp = client.ModifyClusterImage(model)
6296
+ result = rsp.to_json_string()
6297
+ try:
6298
+ json_obj = json.loads(result)
6299
+ except TypeError as e:
6300
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
6301
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
6302
+ break
6303
+ cur_time = time.time()
6304
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
6305
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
6306
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
6307
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
6308
+ else:
6309
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
6310
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
6311
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
6312
+
6313
+
6158
6314
  def doModifyClusterAsGroupAttribute(args, parsed_globals):
6159
6315
  g_param = parse_global_arg(parsed_globals)
6160
6316
 
@@ -7923,7 +8079,7 @@ def doDeleteClusterInstances(args, parsed_globals):
7923
8079
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
7924
8080
 
7925
8081
 
7926
- def doModifyPrometheusTemp(args, parsed_globals):
8082
+ def doDescribeClusterNodePools(args, parsed_globals):
7927
8083
  g_param = parse_global_arg(parsed_globals)
7928
8084
 
7929
8085
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -7952,11 +8108,11 @@ def doModifyPrometheusTemp(args, parsed_globals):
7952
8108
  client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
7953
8109
  client._sdkVersion += ("_CLI_" + __version__)
7954
8110
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
7955
- model = models.ModifyPrometheusTempRequest()
8111
+ model = models.DescribeClusterNodePoolsRequest()
7956
8112
  model.from_json_string(json.dumps(args))
7957
8113
  start_time = time.time()
7958
8114
  while True:
7959
- rsp = client.ModifyPrometheusTemp(model)
8115
+ rsp = client.DescribeClusterNodePools(model)
7960
8116
  result = rsp.to_json_string()
7961
8117
  try:
7962
8118
  json_obj = json.loads(result)
@@ -8131,7 +8287,7 @@ def doDescribeClusterSecurity(args, parsed_globals):
8131
8287
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
8132
8288
 
8133
8289
 
8134
- def doRenewReservedInstances(args, parsed_globals):
8290
+ def doDescribeClusterNodePoolDetail(args, parsed_globals):
8135
8291
  g_param = parse_global_arg(parsed_globals)
8136
8292
 
8137
8293
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -8160,11 +8316,11 @@ def doRenewReservedInstances(args, parsed_globals):
8160
8316
  client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
8161
8317
  client._sdkVersion += ("_CLI_" + __version__)
8162
8318
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
8163
- model = models.RenewReservedInstancesRequest()
8319
+ model = models.DescribeClusterNodePoolDetailRequest()
8164
8320
  model.from_json_string(json.dumps(args))
8165
8321
  start_time = time.time()
8166
8322
  while True:
8167
- rsp = client.RenewReservedInstances(model)
8323
+ rsp = client.DescribeClusterNodePoolDetail(model)
8168
8324
  result = rsp.to_json_string()
8169
8325
  try:
8170
8326
  json_obj = json.loads(result)
@@ -9379,6 +9535,58 @@ def doCheckInstancesUpgradeAble(args, parsed_globals):
9379
9535
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
9380
9536
 
9381
9537
 
9538
+ def doModifyPrometheusTemp(args, parsed_globals):
9539
+ g_param = parse_global_arg(parsed_globals)
9540
+
9541
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
9542
+ cred = credential.CVMRoleCredential()
9543
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
9544
+ cred = credential.STSAssumeRoleCredential(
9545
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
9546
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
9547
+ )
9548
+ 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):
9549
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
9550
+ else:
9551
+ cred = credential.Credential(
9552
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
9553
+ )
9554
+ http_profile = HttpProfile(
9555
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
9556
+ reqMethod="POST",
9557
+ endpoint=g_param[OptionsDefine.Endpoint],
9558
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
9559
+ )
9560
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
9561
+ if g_param[OptionsDefine.Language]:
9562
+ profile.language = g_param[OptionsDefine.Language]
9563
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
9564
+ client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
9565
+ client._sdkVersion += ("_CLI_" + __version__)
9566
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
9567
+ model = models.ModifyPrometheusTempRequest()
9568
+ model.from_json_string(json.dumps(args))
9569
+ start_time = time.time()
9570
+ while True:
9571
+ rsp = client.ModifyPrometheusTemp(model)
9572
+ result = rsp.to_json_string()
9573
+ try:
9574
+ json_obj = json.loads(result)
9575
+ except TypeError as e:
9576
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
9577
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
9578
+ break
9579
+ cur_time = time.time()
9580
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
9581
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
9582
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
9583
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
9584
+ else:
9585
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
9586
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
9587
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
9588
+
9589
+
9382
9590
  def doCreatePrometheusDashboard(args, parsed_globals):
9383
9591
  g_param = parse_global_arg(parsed_globals)
9384
9592
 
@@ -11095,7 +11303,7 @@ def doModifyNodePool(args, parsed_globals):
11095
11303
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
11096
11304
 
11097
11305
 
11098
- def doForwardTKEEdgeApplicationRequestV3(args, parsed_globals):
11306
+ def doRenewReservedInstances(args, parsed_globals):
11099
11307
  g_param = parse_global_arg(parsed_globals)
11100
11308
 
11101
11309
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -11124,11 +11332,11 @@ def doForwardTKEEdgeApplicationRequestV3(args, parsed_globals):
11124
11332
  client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
11125
11333
  client._sdkVersion += ("_CLI_" + __version__)
11126
11334
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
11127
- model = models.ForwardTKEEdgeApplicationRequestV3Request()
11335
+ model = models.RenewReservedInstancesRequest()
11128
11336
  model.from_json_string(json.dumps(args))
11129
11337
  start_time = time.time()
11130
11338
  while True:
11131
- rsp = client.ForwardTKEEdgeApplicationRequestV3(model)
11339
+ rsp = client.RenewReservedInstances(model)
11132
11340
  result = rsp.to_json_string()
11133
11341
  try:
11134
11342
  json_obj = json.loads(result)
@@ -12404,12 +12612,11 @@ ACTION_MAP = {
12404
12612
  "EnableClusterAudit": doEnableClusterAudit,
12405
12613
  "CreateBackupStorageLocation": doCreateBackupStorageLocation,
12406
12614
  "ModifyClusterVirtualNodePool": doModifyClusterVirtualNodePool,
12407
- "DescribeClusterNodePools": doDescribeClusterNodePools,
12615
+ "DescribeAvailableClusterVersion": doDescribeAvailableClusterVersion,
12408
12616
  "CreateClusterNodePool": doCreateClusterNodePool,
12409
12617
  "DescribeClusterPendingReleases": doDescribeClusterPendingReleases,
12410
12618
  "DescribeTKEEdgeClusterStatus": doDescribeTKEEdgeClusterStatus,
12411
12619
  "CreateEdgeLogConfig": doCreateEdgeLogConfig,
12412
- "DescribeAvailableClusterVersion": doDescribeAvailableClusterVersion,
12413
12620
  "DeleteImageCaches": doDeleteImageCaches,
12414
12621
  "DeleteClusterRouteTable": doDeleteClusterRouteTable,
12415
12622
  "ModifyPrometheusAlertPolicy": doModifyPrometheusAlertPolicy,
@@ -12418,9 +12625,10 @@ ACTION_MAP = {
12418
12625
  "DescribeLogConfigs": doDescribeLogConfigs,
12419
12626
  "InstallAddon": doInstallAddon,
12420
12627
  "ForwardApplicationRequestV3": doForwardApplicationRequestV3,
12421
- "DescribeClusterNodePoolDetail": doDescribeClusterNodePoolDetail,
12628
+ "StartMachines": doStartMachines,
12422
12629
  "DeletePrometheusTemp": doDeletePrometheusTemp,
12423
12630
  "DeletePrometheusTemplateSync": doDeletePrometheusTemplateSync,
12631
+ "CreateTKEEdgeCluster": doCreateTKEEdgeCluster,
12424
12632
  "DescribeHealthCheckTemplate": doDescribeHealthCheckTemplate,
12425
12633
  "CreateClusterInstances": doCreateClusterInstances,
12426
12634
  "ModifyClusterAttribute": doModifyClusterAttribute,
@@ -12439,6 +12647,8 @@ ACTION_MAP = {
12439
12647
  "ModifyClusterTags": doModifyClusterTags,
12440
12648
  "DescribeClusterEndpointStatus": doDescribeClusterEndpointStatus,
12441
12649
  "CreateReservedInstances": doCreateReservedInstances,
12650
+ "RebootMachines": doRebootMachines,
12651
+ "ForwardTKEEdgeApplicationRequestV3": doForwardTKEEdgeApplicationRequestV3,
12442
12652
  "DescribeBatchModifyTagsStatus": doDescribeBatchModifyTagsStatus,
12443
12653
  "DeletePrometheusTemplate": doDeletePrometheusTemplate,
12444
12654
  "DescribeRegions": doDescribeRegions,
@@ -12457,7 +12667,7 @@ ACTION_MAP = {
12457
12667
  "DeleteClusterVirtualNodePool": doDeleteClusterVirtualNodePool,
12458
12668
  "DisableEncryptionProtection": doDisableEncryptionProtection,
12459
12669
  "UpdateEKSContainerInstance": doUpdateEKSContainerInstance,
12460
- "CreateTKEEdgeCluster": doCreateTKEEdgeCluster,
12670
+ "StopMachines": doStopMachines,
12461
12671
  "DescribePrometheusTemp": doDescribePrometheusTemp,
12462
12672
  "DeleteAddon": doDeleteAddon,
12463
12673
  "CreateEksLogConfig": doCreateEksLogConfig,
@@ -12474,6 +12684,7 @@ ACTION_MAP = {
12474
12684
  "DescribeVpcCniPodLimits": doDescribeVpcCniPodLimits,
12475
12685
  "DescribeImageCaches": doDescribeImageCaches,
12476
12686
  "CreateNodePool": doCreateNodePool,
12687
+ "ModifyClusterImage": doModifyClusterImage,
12477
12688
  "ModifyClusterAsGroupAttribute": doModifyClusterAsGroupAttribute,
12478
12689
  "CreatePrometheusTemp": doCreatePrometheusTemp,
12479
12690
  "CreateClusterRoute": doCreateClusterRoute,
@@ -12508,11 +12719,11 @@ ACTION_MAP = {
12508
12719
  "DeletePrometheusRecordRuleYaml": doDeletePrometheusRecordRuleYaml,
12509
12720
  "ModifyPrometheusConfig": doModifyPrometheusConfig,
12510
12721
  "DeleteClusterInstances": doDeleteClusterInstances,
12511
- "ModifyPrometheusTemp": doModifyPrometheusTemp,
12722
+ "DescribeClusterNodePools": doDescribeClusterNodePools,
12512
12723
  "ModifyPrometheusRecordRuleYaml": doModifyPrometheusRecordRuleYaml,
12513
12724
  "DescribeClusterLevelAttribute": doDescribeClusterLevelAttribute,
12514
12725
  "DescribeClusterSecurity": doDescribeClusterSecurity,
12515
- "RenewReservedInstances": doRenewReservedInstances,
12726
+ "DescribeClusterNodePoolDetail": doDescribeClusterNodePoolDetail,
12516
12727
  "CreatePrometheusTemplate": doCreatePrometheusTemplate,
12517
12728
  "DeleteClusterNodePool": doDeleteClusterNodePool,
12518
12729
  "ScaleInClusterMaster": doScaleInClusterMaster,
@@ -12536,6 +12747,7 @@ ACTION_MAP = {
12536
12747
  "ModifyNodePoolInstanceTypes": doModifyNodePoolInstanceTypes,
12537
12748
  "DescribeEKSClusters": doDescribeEKSClusters,
12538
12749
  "CheckInstancesUpgradeAble": doCheckInstancesUpgradeAble,
12750
+ "ModifyPrometheusTemp": doModifyPrometheusTemp,
12539
12751
  "CreatePrometheusDashboard": doCreatePrometheusDashboard,
12540
12752
  "DescribePrometheusOverviews": doDescribePrometheusOverviews,
12541
12753
  "DeleteNodePool": doDeleteNodePool,
@@ -12569,7 +12781,7 @@ ACTION_MAP = {
12569
12781
  "DescribeEnableVpcCniProgress": doDescribeEnableVpcCniProgress,
12570
12782
  "DescribePrometheusAlertRule": doDescribePrometheusAlertRule,
12571
12783
  "ModifyNodePool": doModifyNodePool,
12572
- "ForwardTKEEdgeApplicationRequestV3": doForwardTKEEdgeApplicationRequestV3,
12784
+ "RenewReservedInstances": doRenewReservedInstances,
12573
12785
  "SyncPrometheusTemplate": doSyncPrometheusTemplate,
12574
12786
  "DescribeClusterReleases": doDescribeClusterReleases,
12575
12787
  "UpgradeClusterRelease": doUpgradeClusterRelease,