tccli 3.0.1216.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 (252) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/argparser.py +1 -1
  3. tccli/command.py +2 -2
  4. tccli/credentials.py +25 -0
  5. tccli/main.py +6 -2
  6. tccli/plugins/sso/__init__.py +61 -0
  7. tccli/plugins/sso/configs.py +4 -0
  8. tccli/plugins/sso/configure.py +45 -0
  9. tccli/plugins/sso/login.py +144 -0
  10. tccli/plugins/sso/logout.py +21 -0
  11. tccli/plugins/sso/terminal.py +161 -0
  12. tccli/plugins/sso/texts.py +40 -0
  13. tccli/services/__init__.py +6 -0
  14. tccli/services/acp/v20220105/api.json +7 -7
  15. tccli/services/acp/v20220105/examples.json +2 -2
  16. tccli/services/aiart/v20221229/api.json +29 -29
  17. tccli/services/aiart/v20221229/examples.json +8 -8
  18. tccli/services/apigateway/v20180808/api.json +18 -17
  19. tccli/services/apigateway/v20180808/examples.json +12 -12
  20. tccli/services/apm/v20210622/api.json +98 -4
  21. tccli/services/asr/v20190614/api.json +18 -17
  22. tccli/services/asr/v20190614/examples.json +13 -13
  23. tccli/services/autoscaling/v20180419/api.json +371 -309
  24. tccli/services/autoscaling/v20180419/examples.json +17 -17
  25. tccli/services/batch/v20170312/api.json +7 -7
  26. tccli/services/bda/v20200324/api.json +39 -31
  27. tccli/services/bda/v20200324/examples.json +9 -9
  28. tccli/services/bh/__init__.py +4 -0
  29. tccli/services/bh/bh_client.py +3428 -0
  30. tccli/services/bh/v20230418/api.json +8180 -0
  31. tccli/services/bh/v20230418/examples.json +519 -0
  32. tccli/services/bi/v20220105/api.json +48 -0
  33. tccli/services/billing/v20180709/api.json +26 -24
  34. tccli/services/bsca/v20210811/api.json +1 -1
  35. tccli/services/btoe/v20210514/api.json +4 -4
  36. tccli/services/btoe/v20210514/examples.json +2 -2
  37. tccli/services/ca/v20230228/api.json +60 -0
  38. tccli/services/cam/v20190116/api.json +11 -11
  39. tccli/services/cat/v20180409/api.json +9 -0
  40. tccli/services/cbs/v20170312/api.json +200 -188
  41. tccli/services/cbs/v20170312/examples.json +4 -4
  42. tccli/services/ccc/v20200210/api.json +390 -323
  43. tccli/services/ccc/v20200210/examples.json +15 -15
  44. tccli/services/cdb/cdb_client.py +13 -13
  45. tccli/services/cdb/v20170320/api.json +295 -270
  46. tccli/services/cdb/v20170320/examples.json +38 -38
  47. tccli/services/cdc/v20201214/api.json +283 -270
  48. tccli/services/cdc/v20201214/examples.json +26 -26
  49. tccli/services/cds/v20180420/api.json +82 -76
  50. tccli/services/cds/v20180420/examples.json +1 -1
  51. tccli/services/cdwch/v20200915/api.json +1 -1
  52. tccli/services/cdwdoris/v20211228/api.json +42 -2
  53. tccli/services/cdz/v20221123/api.json +41 -5
  54. tccli/services/cfg/v20210820/api.json +31 -0
  55. tccli/services/cfs/v20190719/api.json +89 -1
  56. tccli/services/cfs/v20190719/examples.json +1 -1
  57. tccli/services/cfw/cfw_client.py +0 -53
  58. tccli/services/cfw/v20190904/api.json +1849 -1999
  59. tccli/services/cfw/v20190904/examples.json +157 -159
  60. tccli/services/ckafka/v20190819/api.json +104 -75
  61. tccli/services/clb/v20180317/api.json +48 -26
  62. tccli/services/clb/v20180317/examples.json +1 -1
  63. tccli/services/cloudapp/v20220530/api.json +5 -1
  64. tccli/services/cloudaudit/v20190319/api.json +58 -44
  65. tccli/services/cloudaudit/v20190319/examples.json +6 -6
  66. tccli/services/cloudstudio/v20230508/api.json +38 -37
  67. tccli/services/cloudstudio/v20230508/examples.json +4 -4
  68. tccli/services/cls/cls_client.py +216 -4
  69. tccli/services/cls/v20201016/api.json +536 -47
  70. tccli/services/cls/v20201016/examples.json +34 -2
  71. tccli/services/csip/v20221121/api.json +2562 -2382
  72. tccli/services/csip/v20221121/examples.json +108 -108
  73. tccli/services/cvm/v20170312/api.json +149 -112
  74. tccli/services/cvm/v20170312/examples.json +2 -2
  75. tccli/services/cwp/cwp_client.py +4 -110
  76. tccli/services/cwp/v20180228/api.json +6338 -6146
  77. tccli/services/cwp/v20180228/examples.json +342 -370
  78. tccli/services/cynosdb/v20190107/api.json +93 -81
  79. tccli/services/cynosdb/v20190107/examples.json +70 -70
  80. tccli/services/dasb/v20191018/api.json +796 -651
  81. tccli/services/dasb/v20191018/examples.json +101 -101
  82. tccli/services/dcdb/dcdb_client.py +114 -61
  83. tccli/services/dcdb/v20180411/api.json +141 -7
  84. tccli/services/dcdb/v20180411/examples.json +32 -0
  85. tccli/services/dlc/v20210125/api.json +21 -11
  86. tccli/services/dnspod/dnspod_client.py +417 -46
  87. tccli/services/dnspod/v20210323/api.json +751 -30
  88. tccli/services/dnspod/v20210323/examples.json +62 -0
  89. tccli/services/dts/v20211206/api.json +4 -4
  90. tccli/services/ecm/v20190719/api.json +2 -2
  91. tccli/services/emr/v20190103/api.json +339 -114
  92. tccli/services/emr/v20190103/examples.json +64 -82
  93. tccli/services/es/v20180416/api.json +29 -0
  94. tccli/services/es/v20180416/examples.json +1 -1
  95. tccli/services/ess/v20201111/api.json +49 -31
  96. tccli/services/ess/v20201111/examples.json +20 -8
  97. tccli/services/essbasic/v20210526/api.json +54 -49
  98. tccli/services/essbasic/v20210526/examples.json +36 -18
  99. tccli/services/facefusion/v20181201/api.json +47 -45
  100. tccli/services/facefusion/v20181201/examples.json +2 -2
  101. tccli/services/facefusion/v20220927/api.json +54 -48
  102. tccli/services/facefusion/v20220927/examples.json +5 -5
  103. tccli/services/faceid/v20180301/api.json +497 -496
  104. tccli/services/faceid/v20180301/examples.json +219 -101
  105. tccli/services/fmu/v20191213/api.json +59 -67
  106. tccli/services/fmu/v20191213/examples.json +22 -22
  107. tccli/services/ft/v20200304/api.json +53 -57
  108. tccli/services/ft/v20200304/examples.json +14 -14
  109. tccli/services/gme/v20180711/api.json +21 -11
  110. tccli/services/gme/v20180711/examples.json +1 -1
  111. tccli/services/hai/v20230812/api.json +116 -9
  112. tccli/services/hai/v20230812/examples.json +4 -4
  113. tccli/services/hunyuan/hunyuan_client.py +436 -12
  114. tccli/services/hunyuan/v20230901/api.json +1482 -118
  115. tccli/services/hunyuan/v20230901/examples.json +82 -18
  116. tccli/services/iai/v20180301/api.json +23 -19
  117. tccli/services/iai/v20180301/examples.json +2 -2
  118. tccli/services/iai/v20200303/api.json +530 -511
  119. tccli/services/iai/v20200303/examples.json +116 -86
  120. tccli/services/ig/__init__.py +4 -0
  121. tccli/services/ig/ig_client.py +195 -0
  122. tccli/services/ig/v20210518/api.json +83 -0
  123. tccli/services/ig/v20210518/examples.json +13 -0
  124. tccli/services/ioa/ioa_client.py +53 -0
  125. tccli/services/ioa/v20220601/api.json +662 -413
  126. tccli/services/ioa/v20220601/examples.json +24 -10
  127. tccli/services/iotexplorer/v20190423/api.json +33 -13
  128. tccli/services/iotexplorer/v20190423/examples.json +3 -3
  129. tccli/services/iotvideo/iotvideo_client.py +106 -0
  130. tccli/services/iotvideo/v20191126/api.json +256 -24
  131. tccli/services/iotvideo/v20191126/examples.json +19 -3
  132. tccli/services/iotvideo/v20201215/api.json +1 -1
  133. tccli/services/iotvideo/v20201215/examples.json +1 -1
  134. tccli/services/iotvideo/v20211125/api.json +1 -1
  135. tccli/services/iotvideo/v20211125/examples.json +2 -2
  136. tccli/services/iss/iss_client.py +69 -122
  137. tccli/services/iss/v20230517/api.json +10 -54
  138. tccli/services/iss/v20230517/examples.json +0 -14
  139. tccli/services/kms/v20190118/api.json +301 -268
  140. tccli/services/kms/v20190118/examples.json +45 -51
  141. tccli/services/lcic/lcic_client.py +159 -0
  142. tccli/services/lcic/v20220817/api.json +273 -1
  143. tccli/services/lcic/v20220817/examples.json +24 -0
  144. tccli/services/lighthouse/v20200324/api.json +56 -0
  145. tccli/services/live/live_client.py +159 -0
  146. tccli/services/live/v20180801/api.json +244 -0
  147. tccli/services/live/v20180801/examples.json +24 -0
  148. tccli/services/lke/v20231130/api.json +17 -17
  149. tccli/services/lke/v20231130/examples.json +19 -25
  150. tccli/services/mariadb/v20170312/api.json +7 -7
  151. tccli/services/market/v20191010/api.json +3 -3
  152. tccli/services/market/v20191010/examples.json +2 -2
  153. tccli/services/mmps/v20200710/api.json +47 -47
  154. tccli/services/mmps/v20200710/examples.json +3 -3
  155. tccli/services/mongodb/v20190725/api.json +4 -4
  156. tccli/services/monitor/v20180724/api.json +46 -19
  157. tccli/services/mps/v20190612/api.json +282 -5
  158. tccli/services/mps/v20190612/examples.json +25 -1
  159. tccli/services/mqtt/v20240516/api.json +2 -2
  160. tccli/services/mrs/v20200910/api.json +72 -34
  161. tccli/services/mrs/v20200910/examples.json +2 -2
  162. tccli/services/ms/v20180408/api.json +535 -506
  163. tccli/services/ms/v20180408/examples.json +25 -25
  164. tccli/services/oceanus/v20190422/api.json +130 -0
  165. tccli/services/ocr/ocr_client.py +232 -20
  166. tccli/services/ocr/v20181119/api.json +2265 -760
  167. tccli/services/ocr/v20181119/examples.json +200 -180
  168. tccli/services/omics/v20221128/api.json +614 -553
  169. tccli/services/omics/v20221128/examples.json +9 -9
  170. tccli/services/organization/v20210331/api.json +13 -4
  171. tccli/services/organization/v20210331/examples.json +2 -2
  172. tccli/services/partners/v20180321/api.json +244 -234
  173. tccli/services/partners/v20180321/examples.json +19 -19
  174. tccli/services/privatedns/privatedns_client.py +428 -4
  175. tccli/services/privatedns/v20201028/api.json +815 -11
  176. tccli/services/privatedns/v20201028/examples.json +64 -0
  177. tccli/services/pts/v20210728/api.json +18 -0
  178. tccli/services/pts/v20210728/examples.json +1 -1
  179. tccli/services/rce/rce_client.py +53 -0
  180. tccli/services/rce/v20201103/api.json +146 -0
  181. tccli/services/rce/v20201103/examples.json +8 -0
  182. tccli/services/redis/v20180412/api.json +42 -42
  183. tccli/services/redis/v20180412/examples.json +19 -19
  184. tccli/services/rum/v20210622/api.json +9 -0
  185. tccli/services/scf/v20180416/api.json +15 -15
  186. tccli/services/scf/v20180416/examples.json +1 -1
  187. tccli/services/smop/v20201203/api.json +46 -42
  188. tccli/services/smop/v20201203/examples.json +2 -2
  189. tccli/services/soe/v20180724/api.json +10 -10
  190. tccli/services/sqlserver/v20180328/api.json +21 -8
  191. tccli/services/sqlserver/v20180328/examples.json +5 -5
  192. tccli/services/ssl/v20191205/api.json +97 -4
  193. tccli/services/ssm/v20190923/api.json +292 -231
  194. tccli/services/ssm/v20190923/examples.json +42 -42
  195. tccli/services/tat/v20201028/api.json +97 -97
  196. tccli/services/tat/v20201028/examples.json +20 -26
  197. tccli/services/tchd/v20230306/api.json +5 -5
  198. tccli/services/tchd/v20230306/examples.json +3 -3
  199. tccli/services/tcr/v20190924/api.json +1 -1
  200. tccli/services/tcr/v20190924/examples.json +1 -1
  201. tccli/services/tcss/v20201101/api.json +1973 -1426
  202. tccli/services/tcss/v20201101/examples.json +346 -364
  203. tccli/services/tdmq/v20200217/api.json +539 -401
  204. tccli/services/tdmq/v20200217/examples.json +104 -104
  205. tccli/services/tds/v20220801/api.json +4 -4
  206. tccli/services/tem/v20210701/api.json +287 -271
  207. tccli/services/tem/v20210701/examples.json +59 -59
  208. tccli/services/teo/v20220901/api.json +37 -9
  209. tccli/services/teo/v20220901/examples.json +13 -7
  210. tccli/services/thpc/v20230321/api.json +5 -5
  211. tccli/services/tke/tke_client.py +217 -58
  212. tccli/services/tke/v20180525/api.json +36 -27
  213. tccli/services/tke/v20180525/examples.json +1 -1
  214. tccli/services/tke/v20220501/api.json +176 -0
  215. tccli/services/tke/v20220501/examples.json +24 -0
  216. tccli/services/tmt/v20180321/api.json +38 -8
  217. tccli/services/trp/v20210515/api.json +86 -74
  218. tccli/services/trp/v20210515/examples.json +65 -65
  219. tccli/services/trro/v20220325/api.json +72 -71
  220. tccli/services/trro/v20220325/examples.json +8 -8
  221. tccli/services/trtc/trtc_client.py +8 -61
  222. tccli/services/trtc/v20190722/api.json +72 -30
  223. tccli/services/trtc/v20190722/examples.json +3 -11
  224. tccli/services/tse/tse_client.py +110 -4
  225. tccli/services/tse/v20201207/api.json +122 -7
  226. tccli/services/tse/v20201207/examples.json +25 -9
  227. tccli/services/vclm/v20240523/api.json +225 -82
  228. tccli/services/vclm/v20240523/examples.json +13 -19
  229. tccli/services/vod/v20180717/api.json +431 -4
  230. tccli/services/vod/v20180717/examples.json +25 -5
  231. tccli/services/vod/v20240718/api.json +11 -11
  232. tccli/services/vod/v20240718/examples.json +4 -4
  233. tccli/services/vod/vod_client.py +53 -0
  234. tccli/services/vpc/v20170312/api.json +1090 -862
  235. tccli/services/vpc/v20170312/examples.json +74 -66
  236. tccli/services/vpc/vpc_client.py +61 -8
  237. tccli/services/waf/v20180125/api.json +2540 -2177
  238. tccli/services/waf/v20180125/examples.json +216 -284
  239. tccli/services/waf/waf_client.py +172 -119
  240. tccli/services/wav/v20210129/api.json +48 -48
  241. tccli/services/wav/v20210129/examples.json +4 -4
  242. tccli/services/wedata/v20210820/api.json +909 -25
  243. tccli/services/wedata/v20210820/examples.json +28 -4
  244. tccli/services/wedata/wedata_client.py +159 -0
  245. tccli/services/weilingwith/v20230427/api.json +6 -6
  246. tccli/services/weilingwith/v20230427/examples.json +3 -3
  247. tccli/sso.py +229 -0
  248. {tccli-3.0.1216.1.dist-info → tccli-3.0.1217.1.dist-info}/METADATA +2 -2
  249. {tccli-3.0.1216.1.dist-info → tccli-3.0.1217.1.dist-info}/RECORD +252 -235
  250. {tccli-3.0.1216.1.dist-info → tccli-3.0.1217.1.dist-info}/WHEEL +0 -0
  251. {tccli-3.0.1216.1.dist-info → tccli-3.0.1217.1.dist-info}/entry_points.txt +0 -0
  252. {tccli-3.0.1216.1.dist-info → tccli-3.0.1217.1.dist-info}/license_files/LICENSE +0 -0
@@ -329,6 +329,58 @@ def doCreatePrivateZoneRecord(args, parsed_globals):
329
329
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
330
330
 
331
331
 
332
+ def doDescribeEndPointList(args, parsed_globals):
333
+ g_param = parse_global_arg(parsed_globals)
334
+
335
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
336
+ cred = credential.CVMRoleCredential()
337
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
338
+ cred = credential.STSAssumeRoleCredential(
339
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
340
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
341
+ )
342
+ 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):
343
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
344
+ else:
345
+ cred = credential.Credential(
346
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
347
+ )
348
+ http_profile = HttpProfile(
349
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
350
+ reqMethod="POST",
351
+ endpoint=g_param[OptionsDefine.Endpoint],
352
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
353
+ )
354
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
355
+ if g_param[OptionsDefine.Language]:
356
+ profile.language = g_param[OptionsDefine.Language]
357
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
358
+ client = mod.PrivatednsClient(cred, g_param[OptionsDefine.Region], profile)
359
+ client._sdkVersion += ("_CLI_" + __version__)
360
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
361
+ model = models.DescribeEndPointListRequest()
362
+ model.from_json_string(json.dumps(args))
363
+ start_time = time.time()
364
+ while True:
365
+ rsp = client.DescribeEndPointList(model)
366
+ result = rsp.to_json_string()
367
+ try:
368
+ json_obj = json.loads(result)
369
+ except TypeError as e:
370
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
371
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
372
+ break
373
+ cur_time = time.time()
374
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
375
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
376
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
377
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
378
+ else:
379
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
380
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
381
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
382
+
383
+
332
384
  def doCreatePrivateZone(args, parsed_globals):
333
385
  g_param = parse_global_arg(parsed_globals)
334
386
 
@@ -537,7 +589,7 @@ def doAddSpecifyPrivateZoneVpc(args, parsed_globals):
537
589
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
538
590
 
539
591
 
540
- def doDescribePrivateZoneRecordList(args, parsed_globals):
592
+ def doModifyForwardRule(args, parsed_globals):
541
593
  g_param = parse_global_arg(parsed_globals)
542
594
 
543
595
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -566,11 +618,11 @@ def doDescribePrivateZoneRecordList(args, parsed_globals):
566
618
  client = mod.PrivatednsClient(cred, g_param[OptionsDefine.Region], profile)
567
619
  client._sdkVersion += ("_CLI_" + __version__)
568
620
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
569
- model = models.DescribePrivateZoneRecordListRequest()
621
+ model = models.ModifyForwardRuleRequest()
570
622
  model.from_json_string(json.dumps(args))
571
623
  start_time = time.time()
572
624
  while True:
573
- rsp = client.DescribePrivateZoneRecordList(model)
625
+ rsp = client.ModifyForwardRule(model)
574
626
  result = rsp.to_json_string()
575
627
  try:
576
628
  json_obj = json.loads(result)
@@ -797,6 +849,58 @@ def doDeletePrivateDNSAccount(args, parsed_globals):
797
849
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
798
850
 
799
851
 
852
+ def doDeleteForwardRule(args, parsed_globals):
853
+ g_param = parse_global_arg(parsed_globals)
854
+
855
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
856
+ cred = credential.CVMRoleCredential()
857
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
858
+ cred = credential.STSAssumeRoleCredential(
859
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
860
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
861
+ )
862
+ 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):
863
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
864
+ else:
865
+ cred = credential.Credential(
866
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
867
+ )
868
+ http_profile = HttpProfile(
869
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
870
+ reqMethod="POST",
871
+ endpoint=g_param[OptionsDefine.Endpoint],
872
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
873
+ )
874
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
875
+ if g_param[OptionsDefine.Language]:
876
+ profile.language = g_param[OptionsDefine.Language]
877
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
878
+ client = mod.PrivatednsClient(cred, g_param[OptionsDefine.Region], profile)
879
+ client._sdkVersion += ("_CLI_" + __version__)
880
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
881
+ model = models.DeleteForwardRuleRequest()
882
+ model.from_json_string(json.dumps(args))
883
+ start_time = time.time()
884
+ while True:
885
+ rsp = client.DeleteForwardRule(model)
886
+ result = rsp.to_json_string()
887
+ try:
888
+ json_obj = json.loads(result)
889
+ except TypeError as e:
890
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
891
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
892
+ break
893
+ cur_time = time.time()
894
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
895
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
896
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
897
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
898
+ else:
899
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
900
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
901
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
902
+
903
+
800
904
  def doSubscribePrivateZoneService(args, parsed_globals):
801
905
  g_param = parse_global_arg(parsed_globals)
802
906
 
@@ -1057,6 +1161,58 @@ def doDescribeAccountVpcList(args, parsed_globals):
1057
1161
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1058
1162
 
1059
1163
 
1164
+ def doCreateEndPointAndEndPointService(args, parsed_globals):
1165
+ g_param = parse_global_arg(parsed_globals)
1166
+
1167
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1168
+ cred = credential.CVMRoleCredential()
1169
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1170
+ cred = credential.STSAssumeRoleCredential(
1171
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1172
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1173
+ )
1174
+ 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):
1175
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1176
+ else:
1177
+ cred = credential.Credential(
1178
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1179
+ )
1180
+ http_profile = HttpProfile(
1181
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1182
+ reqMethod="POST",
1183
+ endpoint=g_param[OptionsDefine.Endpoint],
1184
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1185
+ )
1186
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1187
+ if g_param[OptionsDefine.Language]:
1188
+ profile.language = g_param[OptionsDefine.Language]
1189
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1190
+ client = mod.PrivatednsClient(cred, g_param[OptionsDefine.Region], profile)
1191
+ client._sdkVersion += ("_CLI_" + __version__)
1192
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1193
+ model = models.CreateEndPointAndEndPointServiceRequest()
1194
+ model.from_json_string(json.dumps(args))
1195
+ start_time = time.time()
1196
+ while True:
1197
+ rsp = client.CreateEndPointAndEndPointService(model)
1198
+ result = rsp.to_json_string()
1199
+ try:
1200
+ json_obj = json.loads(result)
1201
+ except TypeError as e:
1202
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1203
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1204
+ break
1205
+ cur_time = time.time()
1206
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1207
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1208
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1209
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1210
+ else:
1211
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1212
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1213
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1214
+
1215
+
1060
1216
  def doModifyRecordsStatus(args, parsed_globals):
1061
1217
  g_param = parse_global_arg(parsed_globals)
1062
1218
 
@@ -1161,6 +1317,110 @@ def doDeleteSpecifyPrivateZoneVpc(args, parsed_globals):
1161
1317
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1162
1318
 
1163
1319
 
1320
+ def doDescribeForwardRule(args, parsed_globals):
1321
+ g_param = parse_global_arg(parsed_globals)
1322
+
1323
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1324
+ cred = credential.CVMRoleCredential()
1325
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1326
+ cred = credential.STSAssumeRoleCredential(
1327
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1328
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1329
+ )
1330
+ 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):
1331
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1332
+ else:
1333
+ cred = credential.Credential(
1334
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1335
+ )
1336
+ http_profile = HttpProfile(
1337
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1338
+ reqMethod="POST",
1339
+ endpoint=g_param[OptionsDefine.Endpoint],
1340
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1341
+ )
1342
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1343
+ if g_param[OptionsDefine.Language]:
1344
+ profile.language = g_param[OptionsDefine.Language]
1345
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1346
+ client = mod.PrivatednsClient(cred, g_param[OptionsDefine.Region], profile)
1347
+ client._sdkVersion += ("_CLI_" + __version__)
1348
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1349
+ model = models.DescribeForwardRuleRequest()
1350
+ model.from_json_string(json.dumps(args))
1351
+ start_time = time.time()
1352
+ while True:
1353
+ rsp = client.DescribeForwardRule(model)
1354
+ result = rsp.to_json_string()
1355
+ try:
1356
+ json_obj = json.loads(result)
1357
+ except TypeError as e:
1358
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1359
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1360
+ break
1361
+ cur_time = time.time()
1362
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1363
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1364
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1365
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1366
+ else:
1367
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1368
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1369
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1370
+
1371
+
1372
+ def doCreateForwardRule(args, parsed_globals):
1373
+ g_param = parse_global_arg(parsed_globals)
1374
+
1375
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1376
+ cred = credential.CVMRoleCredential()
1377
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1378
+ cred = credential.STSAssumeRoleCredential(
1379
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1380
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1381
+ )
1382
+ 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):
1383
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1384
+ else:
1385
+ cred = credential.Credential(
1386
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1387
+ )
1388
+ http_profile = HttpProfile(
1389
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1390
+ reqMethod="POST",
1391
+ endpoint=g_param[OptionsDefine.Endpoint],
1392
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1393
+ )
1394
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1395
+ if g_param[OptionsDefine.Language]:
1396
+ profile.language = g_param[OptionsDefine.Language]
1397
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1398
+ client = mod.PrivatednsClient(cred, g_param[OptionsDefine.Region], profile)
1399
+ client._sdkVersion += ("_CLI_" + __version__)
1400
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1401
+ model = models.CreateForwardRuleRequest()
1402
+ model.from_json_string(json.dumps(args))
1403
+ start_time = time.time()
1404
+ while True:
1405
+ rsp = client.CreateForwardRule(model)
1406
+ result = rsp.to_json_string()
1407
+ try:
1408
+ json_obj = json.loads(result)
1409
+ except TypeError as e:
1410
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1411
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1412
+ break
1413
+ cur_time = time.time()
1414
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1415
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1416
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1417
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1418
+ else:
1419
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1420
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1421
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1422
+
1423
+
1164
1424
  def doDescribePrivateZoneService(args, parsed_globals):
1165
1425
  g_param = parse_global_arg(parsed_globals)
1166
1426
 
@@ -1213,6 +1473,162 @@ def doDescribePrivateZoneService(args, parsed_globals):
1213
1473
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1214
1474
 
1215
1475
 
1476
+ def doDescribeEndPointRegion(args, parsed_globals):
1477
+ g_param = parse_global_arg(parsed_globals)
1478
+
1479
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1480
+ cred = credential.CVMRoleCredential()
1481
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1482
+ cred = credential.STSAssumeRoleCredential(
1483
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1484
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1485
+ )
1486
+ 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):
1487
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1488
+ else:
1489
+ cred = credential.Credential(
1490
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1491
+ )
1492
+ http_profile = HttpProfile(
1493
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1494
+ reqMethod="POST",
1495
+ endpoint=g_param[OptionsDefine.Endpoint],
1496
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1497
+ )
1498
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1499
+ if g_param[OptionsDefine.Language]:
1500
+ profile.language = g_param[OptionsDefine.Language]
1501
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1502
+ client = mod.PrivatednsClient(cred, g_param[OptionsDefine.Region], profile)
1503
+ client._sdkVersion += ("_CLI_" + __version__)
1504
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1505
+ model = models.DescribeEndPointRegionRequest()
1506
+ model.from_json_string(json.dumps(args))
1507
+ start_time = time.time()
1508
+ while True:
1509
+ rsp = client.DescribeEndPointRegion(model)
1510
+ result = rsp.to_json_string()
1511
+ try:
1512
+ json_obj = json.loads(result)
1513
+ except TypeError as e:
1514
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1515
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1516
+ break
1517
+ cur_time = time.time()
1518
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1519
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1520
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1521
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1522
+ else:
1523
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1524
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1525
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1526
+
1527
+
1528
+ def doDescribeForwardRuleList(args, parsed_globals):
1529
+ g_param = parse_global_arg(parsed_globals)
1530
+
1531
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1532
+ cred = credential.CVMRoleCredential()
1533
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1534
+ cred = credential.STSAssumeRoleCredential(
1535
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1536
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1537
+ )
1538
+ 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):
1539
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1540
+ else:
1541
+ cred = credential.Credential(
1542
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1543
+ )
1544
+ http_profile = HttpProfile(
1545
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1546
+ reqMethod="POST",
1547
+ endpoint=g_param[OptionsDefine.Endpoint],
1548
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1549
+ )
1550
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1551
+ if g_param[OptionsDefine.Language]:
1552
+ profile.language = g_param[OptionsDefine.Language]
1553
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1554
+ client = mod.PrivatednsClient(cred, g_param[OptionsDefine.Region], profile)
1555
+ client._sdkVersion += ("_CLI_" + __version__)
1556
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1557
+ model = models.DescribeForwardRuleListRequest()
1558
+ model.from_json_string(json.dumps(args))
1559
+ start_time = time.time()
1560
+ while True:
1561
+ rsp = client.DescribeForwardRuleList(model)
1562
+ result = rsp.to_json_string()
1563
+ try:
1564
+ json_obj = json.loads(result)
1565
+ except TypeError as e:
1566
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1567
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1568
+ break
1569
+ cur_time = time.time()
1570
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1571
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1572
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1573
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1574
+ else:
1575
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1576
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1577
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1578
+
1579
+
1580
+ def doDescribePrivateZoneRecordList(args, parsed_globals):
1581
+ g_param = parse_global_arg(parsed_globals)
1582
+
1583
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1584
+ cred = credential.CVMRoleCredential()
1585
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1586
+ cred = credential.STSAssumeRoleCredential(
1587
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1588
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1589
+ )
1590
+ 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):
1591
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1592
+ else:
1593
+ cred = credential.Credential(
1594
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1595
+ )
1596
+ http_profile = HttpProfile(
1597
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1598
+ reqMethod="POST",
1599
+ endpoint=g_param[OptionsDefine.Endpoint],
1600
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1601
+ )
1602
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1603
+ if g_param[OptionsDefine.Language]:
1604
+ profile.language = g_param[OptionsDefine.Language]
1605
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1606
+ client = mod.PrivatednsClient(cred, g_param[OptionsDefine.Region], profile)
1607
+ client._sdkVersion += ("_CLI_" + __version__)
1608
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1609
+ model = models.DescribePrivateZoneRecordListRequest()
1610
+ model.from_json_string(json.dumps(args))
1611
+ start_time = time.time()
1612
+ while True:
1613
+ rsp = client.DescribePrivateZoneRecordList(model)
1614
+ result = rsp.to_json_string()
1615
+ try:
1616
+ json_obj = json.loads(result)
1617
+ except TypeError as e:
1618
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1619
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1620
+ break
1621
+ cur_time = time.time()
1622
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1623
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1624
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1625
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1626
+ else:
1627
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1628
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1629
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1630
+
1631
+
1216
1632
  def doDeletePrivateZoneRecord(args, parsed_globals):
1217
1633
  g_param = parse_global_arg(parsed_globals)
1218
1634
 
@@ -1386,23 +1802,31 @@ ACTION_MAP = {
1386
1802
  "DescribeQuotaUsage": doDescribeQuotaUsage,
1387
1803
  "DescribeAuditLog": doDescribeAuditLog,
1388
1804
  "CreatePrivateZoneRecord": doCreatePrivateZoneRecord,
1805
+ "DescribeEndPointList": doDescribeEndPointList,
1389
1806
  "CreatePrivateZone": doCreatePrivateZone,
1390
1807
  "DescribePrivateZoneList": doDescribePrivateZoneList,
1391
1808
  "CreateEndPoint": doCreateEndPoint,
1392
1809
  "AddSpecifyPrivateZoneVpc": doAddSpecifyPrivateZoneVpc,
1393
- "DescribePrivateZoneRecordList": doDescribePrivateZoneRecordList,
1810
+ "ModifyForwardRule": doModifyForwardRule,
1394
1811
  "QueryAsyncBindVpcStatus": doQueryAsyncBindVpcStatus,
1395
1812
  "ModifyPrivateZone": doModifyPrivateZone,
1396
1813
  "ModifyPrivateZoneRecord": doModifyPrivateZoneRecord,
1397
1814
  "DeletePrivateDNSAccount": doDeletePrivateDNSAccount,
1815
+ "DeleteForwardRule": doDeleteForwardRule,
1398
1816
  "SubscribePrivateZoneService": doSubscribePrivateZoneService,
1399
1817
  "DescribeDashboard": doDescribeDashboard,
1400
1818
  "ModifyPrivateZoneVpc": doModifyPrivateZoneVpc,
1401
1819
  "DeletePrivateZone": doDeletePrivateZone,
1402
1820
  "DescribeAccountVpcList": doDescribeAccountVpcList,
1821
+ "CreateEndPointAndEndPointService": doCreateEndPointAndEndPointService,
1403
1822
  "ModifyRecordsStatus": doModifyRecordsStatus,
1404
1823
  "DeleteSpecifyPrivateZoneVpc": doDeleteSpecifyPrivateZoneVpc,
1824
+ "DescribeForwardRule": doDescribeForwardRule,
1825
+ "CreateForwardRule": doCreateForwardRule,
1405
1826
  "DescribePrivateZoneService": doDescribePrivateZoneService,
1827
+ "DescribeEndPointRegion": doDescribeEndPointRegion,
1828
+ "DescribeForwardRuleList": doDescribeForwardRuleList,
1829
+ "DescribePrivateZoneRecordList": doDescribePrivateZoneRecordList,
1406
1830
  "DeletePrivateZoneRecord": doDeletePrivateZoneRecord,
1407
1831
  "DescribeRequestData": doDescribeRequestData,
1408
1832
  "DescribePrivateDNSAccountList": doDescribePrivateDNSAccountList,