tccli 3.0.1237.1__py2.py3-none-any.whl → 3.0.1239.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 (146) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/__init__.py +3 -0
  3. tccli/services/aca/__init__.py +4 -0
  4. tccli/services/aca/aca_client.py +578 -0
  5. tccli/services/aca/v20210323/api.json +3715 -0
  6. tccli/services/aca/v20210323/examples.json +69 -0
  7. tccli/services/aiart/v20221229/api.json +18 -9
  8. tccli/services/aiart/v20221229/examples.json +2 -2
  9. tccli/services/apm/v20210622/api.json +10 -7
  10. tccli/services/batch/v20170312/api.json +641 -566
  11. tccli/services/batch/v20170312/examples.json +7 -7
  12. tccli/services/bi/v20220105/api.json +9 -0
  13. tccli/services/bpaas/v20181217/examples.json +1 -1
  14. tccli/services/cam/v20190116/api.json +32 -30
  15. tccli/services/cam/v20190116/examples.json +4 -4
  16. tccli/services/ccc/v20200210/api.json +31 -1
  17. tccli/services/ccc/v20200210/examples.json +1 -1
  18. tccli/services/cdb/v20170320/api.json +944 -856
  19. tccli/services/cdb/v20170320/examples.json +47 -47
  20. tccli/services/cdwch/v20200915/api.json +6 -6
  21. tccli/services/cdwdoris/v20211228/api.json +32 -12
  22. tccli/services/cdwdoris/v20211228/examples.json +1 -1
  23. tccli/services/cfg/v20210820/api.json +8 -13
  24. tccli/services/cfg/v20210820/examples.json +1 -1
  25. tccli/services/cfs/v20190719/api.json +84 -84
  26. tccli/services/cfs/v20190719/examples.json +6 -6
  27. tccli/services/chdfs/v20201112/api.json +113 -95
  28. tccli/services/chdfs/v20201112/examples.json +16 -16
  29. tccli/services/clb/v20180317/api.json +186 -164
  30. tccli/services/cloudapp/v20220530/api.json +1 -1
  31. tccli/services/cloudapp/v20220530/examples.json +3 -3
  32. tccli/services/cloudaudit/v20190319/api.json +21 -17
  33. tccli/services/cloudaudit/v20190319/examples.json +3 -3
  34. tccli/services/cls/v20201016/api.json +21 -21
  35. tccli/services/cls/v20201016/examples.json +1 -1
  36. tccli/services/config/v20220802/api.json +2 -0
  37. tccli/services/config/v20220802/examples.json +2 -2
  38. tccli/services/cynosdb/v20190107/api.json +370 -365
  39. tccli/services/cynosdb/v20190107/examples.json +39 -39
  40. tccli/services/dbbrain/v20191016/api.json +206 -188
  41. tccli/services/dbbrain/v20191016/examples.json +10 -10
  42. tccli/services/dbbrain/v20210527/api.json +274 -267
  43. tccli/services/dbbrain/v20210527/examples.json +25 -25
  44. tccli/services/dc/v20180410/api.json +101 -41
  45. tccli/services/dc/v20180410/examples.json +5 -5
  46. tccli/services/dcdb/v20180411/api.json +390 -387
  47. tccli/services/dcdb/v20180411/examples.json +14 -14
  48. tccli/services/dlc/v20210125/api.json +162 -7
  49. tccli/services/dlc/v20210125/examples.json +1 -1
  50. tccli/services/domain/v20180808/api.json +37 -37
  51. tccli/services/domain/v20180808/examples.json +16 -10
  52. tccli/services/dsgc/v20190723/api.json +1796 -1623
  53. tccli/services/dsgc/v20190723/examples.json +217 -211
  54. tccli/services/dts/v20180330/api.json +152 -115
  55. tccli/services/dts/v20180330/examples.json +4 -4
  56. tccli/services/dts/v20211206/api.json +83 -72
  57. tccli/services/dts/v20211206/examples.json +5 -5
  58. tccli/services/eb/v20210416/api.json +2 -2
  59. tccli/services/eb/v20210416/examples.json +2 -2
  60. tccli/services/ecm/v20190719/api.json +273 -230
  61. tccli/services/ecm/v20190719/examples.json +21 -21
  62. tccli/services/emr/v20190103/api.json +80 -20
  63. tccli/services/ess/ess_client.py +61 -8
  64. tccli/services/ess/v20201111/api.json +287 -39
  65. tccli/services/ess/v20201111/examples.json +11 -3
  66. tccli/services/essbasic/essbasic_client.py +167 -8
  67. tccli/services/essbasic/v20210526/api.json +545 -54
  68. tccli/services/essbasic/v20210526/examples.json +46 -16
  69. tccli/services/facefusion/v20220927/api.json +14 -3
  70. tccli/services/fmu/v20191213/api.json +8 -8
  71. tccli/services/gaap/v20180529/api.json +222 -231
  72. tccli/services/hai/v20230812/api.json +1 -1
  73. tccli/services/hunyuan/v20230901/api.json +21 -2
  74. tccli/services/iss/v20230517/api.json +11 -11
  75. tccli/services/iss/v20230517/examples.json +31 -31
  76. tccli/services/keewidb/v20220308/api.json +92 -82
  77. tccli/services/keewidb/v20220308/examples.json +5 -5
  78. tccli/services/lcic/v20220817/api.json +1 -1
  79. tccli/services/lighthouse/v20200324/api.json +22 -22
  80. tccli/services/lighthouse/v20200324/examples.json +5 -5
  81. tccli/services/live/v20180801/api.json +87 -69
  82. tccli/services/live/v20180801/examples.json +37 -37
  83. tccli/services/lke/v20231130/examples.json +1 -1
  84. tccli/services/mariadb/v20170312/api.json +285 -263
  85. tccli/services/mariadb/v20170312/examples.json +12 -12
  86. tccli/services/mongodb/v20180408/api.json +104 -104
  87. tccli/services/mongodb/v20190725/api.json +116 -103
  88. tccli/services/monitor/monitor_client.py +106 -0
  89. tccli/services/monitor/v20180724/api.json +222 -0
  90. tccli/services/monitor/v20180724/examples.json +16 -0
  91. tccli/services/mps/mps_client.py +228 -16
  92. tccli/services/mps/v20190612/api.json +385 -23
  93. tccli/services/mps/v20190612/examples.json +32 -0
  94. tccli/services/msp/v20180319/api.json +2 -2
  95. tccli/services/ocr/v20181119/api.json +13 -3
  96. tccli/services/ocr/v20181119/examples.json +1 -1
  97. tccli/services/omics/v20221128/api.json +14 -2
  98. tccli/services/organization/v20210331/api.json +45 -18
  99. tccli/services/privatedns/v20201028/api.json +90 -81
  100. tccli/services/privatedns/v20201028/examples.json +18 -18
  101. tccli/services/redis/redis_client.py +106 -0
  102. tccli/services/redis/v20180412/api.json +179 -17
  103. tccli/services/redis/v20180412/examples.json +16 -0
  104. tccli/services/region/v20220627/api.json +5 -3
  105. tccli/services/region/v20220627/examples.json +1 -1
  106. tccli/services/sqlserver/v20180328/api.json +611 -450
  107. tccli/services/sqlserver/v20180328/examples.json +16 -16
  108. tccli/services/ssl/v20191205/api.json +6 -4
  109. tccli/services/tag/v20180813/api.json +4 -5
  110. tccli/services/tbaas/v20180416/api.json +47 -49
  111. tccli/services/tbaas/v20180416/examples.json +4 -4
  112. tccli/services/tcb/v20180608/api.json +36 -16
  113. tccli/services/tdmq/tdmq_client.py +106 -0
  114. tccli/services/tdmq/v20200217/api.json +125 -1
  115. tccli/services/tdmq/v20200217/examples.json +17 -1
  116. tccli/services/teo/teo_client.py +485 -8
  117. tccli/services/teo/v20220901/api.json +837 -39
  118. tccli/services/teo/v20220901/examples.json +108 -0
  119. tccli/services/thpc/v20211109/api.json +32 -34
  120. tccli/services/thpc/v20220401/api.json +31 -33
  121. tccli/services/thpc/v20230321/api.json +55 -57
  122. tccli/services/thpc/v20230321/examples.json +1 -1
  123. tccli/services/tiia/v20190529/api.json +307 -293
  124. tccli/services/tiia/v20190529/examples.json +41 -41
  125. tccli/services/tione/v20211111/api.json +4 -4
  126. tccli/services/tione/v20211111/examples.json +2 -2
  127. tccli/services/tke/v20180525/api.json +1 -1
  128. tccli/services/trocket/trocket_client.py +224 -12
  129. tccli/services/trocket/v20230308/api.json +787 -147
  130. tccli/services/trocket/v20230308/examples.json +38 -0
  131. tccli/services/tse/v20201207/api.json +188 -120
  132. tccli/services/tse/v20201207/examples.json +30 -30
  133. tccli/services/tsf/v20180326/api.json +864 -781
  134. tccli/services/tsf/v20180326/examples.json +114 -126
  135. tccli/services/vclm/v20240523/api.json +1 -1
  136. tccli/services/vdb/v20230616/api.json +80 -80
  137. tccli/services/vdb/v20230616/examples.json +1 -1
  138. tccli/services/vod/v20180717/api.json +21 -3
  139. tccli/services/vod/v20180717/examples.json +2 -2
  140. tccli/services/vpc/v20170312/api.json +45 -44
  141. tccli/services/vpc/v20170312/examples.json +9 -9
  142. {tccli-3.0.1237.1.dist-info → tccli-3.0.1239.1.dist-info}/METADATA +2 -2
  143. {tccli-3.0.1237.1.dist-info → tccli-3.0.1239.1.dist-info}/RECORD +146 -142
  144. {tccli-3.0.1237.1.dist-info → tccli-3.0.1239.1.dist-info}/WHEEL +0 -0
  145. {tccli-3.0.1237.1.dist-info → tccli-3.0.1239.1.dist-info}/entry_points.txt +0 -0
  146. {tccli-3.0.1237.1.dist-info → tccli-3.0.1239.1.dist-info}/license_files/LICENSE +0 -0
@@ -69,6 +69,58 @@ def doDescribeMQTTMessageList(args, parsed_globals):
69
69
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
70
70
 
71
71
 
72
+ def doDescribeMessageTrace(args, parsed_globals):
73
+ g_param = parse_global_arg(parsed_globals)
74
+
75
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
76
+ cred = credential.CVMRoleCredential()
77
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
78
+ cred = credential.STSAssumeRoleCredential(
79
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
80
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
81
+ )
82
+ 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):
83
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
84
+ else:
85
+ cred = credential.Credential(
86
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
87
+ )
88
+ http_profile = HttpProfile(
89
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
90
+ reqMethod="POST",
91
+ endpoint=g_param[OptionsDefine.Endpoint],
92
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
93
+ )
94
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
95
+ if g_param[OptionsDefine.Language]:
96
+ profile.language = g_param[OptionsDefine.Language]
97
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
98
+ client = mod.TrocketClient(cred, g_param[OptionsDefine.Region], profile)
99
+ client._sdkVersion += ("_CLI_" + __version__)
100
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
101
+ model = models.DescribeMessageTraceRequest()
102
+ model.from_json_string(json.dumps(args))
103
+ start_time = time.time()
104
+ while True:
105
+ rsp = client.DescribeMessageTrace(model)
106
+ result = rsp.to_json_string()
107
+ try:
108
+ json_obj = json.loads(result)
109
+ except TypeError as e:
110
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
111
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
112
+ break
113
+ cur_time = time.time()
114
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
115
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
116
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
117
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
118
+ else:
119
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
120
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
121
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
122
+
123
+
72
124
  def doModifyTopic(args, parsed_globals):
73
125
  g_param = parse_global_arg(parsed_globals)
74
126
 
@@ -173,6 +225,58 @@ def doModifyMQTTTopic(args, parsed_globals):
173
225
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
174
226
 
175
227
 
228
+ def doResendDeadLetterMessage(args, parsed_globals):
229
+ g_param = parse_global_arg(parsed_globals)
230
+
231
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
232
+ cred = credential.CVMRoleCredential()
233
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
234
+ cred = credential.STSAssumeRoleCredential(
235
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
236
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
237
+ )
238
+ 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):
239
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
240
+ else:
241
+ cred = credential.Credential(
242
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
243
+ )
244
+ http_profile = HttpProfile(
245
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
246
+ reqMethod="POST",
247
+ endpoint=g_param[OptionsDefine.Endpoint],
248
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
249
+ )
250
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
251
+ if g_param[OptionsDefine.Language]:
252
+ profile.language = g_param[OptionsDefine.Language]
253
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
254
+ client = mod.TrocketClient(cred, g_param[OptionsDefine.Region], profile)
255
+ client._sdkVersion += ("_CLI_" + __version__)
256
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
257
+ model = models.ResendDeadLetterMessageRequest()
258
+ model.from_json_string(json.dumps(args))
259
+ start_time = time.time()
260
+ while True:
261
+ rsp = client.ResendDeadLetterMessage(model)
262
+ result = rsp.to_json_string()
263
+ try:
264
+ json_obj = json.loads(result)
265
+ except TypeError as e:
266
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
267
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
268
+ break
269
+ cur_time = time.time()
270
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
271
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
272
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
273
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
274
+ else:
275
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
276
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
277
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
278
+
279
+
176
280
  def doDeleteMQTTUser(args, parsed_globals):
177
281
  g_param = parse_global_arg(parsed_globals)
178
282
 
@@ -485,7 +589,7 @@ def doDescribeMQTTProductSKUList(args, parsed_globals):
485
589
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
486
590
 
487
591
 
488
- def doDescribeMQTTUserList(args, parsed_globals):
592
+ def doDescribeMessage(args, parsed_globals):
489
593
  g_param = parse_global_arg(parsed_globals)
490
594
 
491
595
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -514,11 +618,63 @@ def doDescribeMQTTUserList(args, parsed_globals):
514
618
  client = mod.TrocketClient(cred, g_param[OptionsDefine.Region], profile)
515
619
  client._sdkVersion += ("_CLI_" + __version__)
516
620
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
517
- model = models.DescribeMQTTUserListRequest()
621
+ model = models.DescribeMessageRequest()
518
622
  model.from_json_string(json.dumps(args))
519
623
  start_time = time.time()
520
624
  while True:
521
- rsp = client.DescribeMQTTUserList(model)
625
+ rsp = client.DescribeMessage(model)
626
+ result = rsp.to_json_string()
627
+ try:
628
+ json_obj = json.loads(result)
629
+ except TypeError as e:
630
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
631
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
632
+ break
633
+ cur_time = time.time()
634
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
635
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
636
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
637
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
638
+ else:
639
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
640
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
641
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
642
+
643
+
644
+ def doDeleteMQTTInstance(args, parsed_globals):
645
+ g_param = parse_global_arg(parsed_globals)
646
+
647
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
648
+ cred = credential.CVMRoleCredential()
649
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
650
+ cred = credential.STSAssumeRoleCredential(
651
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
652
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
653
+ )
654
+ 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):
655
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
656
+ else:
657
+ cred = credential.Credential(
658
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
659
+ )
660
+ http_profile = HttpProfile(
661
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
662
+ reqMethod="POST",
663
+ endpoint=g_param[OptionsDefine.Endpoint],
664
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
665
+ )
666
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
667
+ if g_param[OptionsDefine.Language]:
668
+ profile.language = g_param[OptionsDefine.Language]
669
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
670
+ client = mod.TrocketClient(cred, g_param[OptionsDefine.Region], profile)
671
+ client._sdkVersion += ("_CLI_" + __version__)
672
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
673
+ model = models.DeleteMQTTInstanceRequest()
674
+ model.from_json_string(json.dumps(args))
675
+ start_time = time.time()
676
+ while True:
677
+ rsp = client.DeleteMQTTInstance(model)
522
678
  result = rsp.to_json_string()
523
679
  try:
524
680
  json_obj = json.loads(result)
@@ -901,7 +1057,7 @@ def doDeleteRole(args, parsed_globals):
901
1057
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
902
1058
 
903
1059
 
904
- def doDeleteMQTTInstance(args, parsed_globals):
1060
+ def doDescribeMQTTUserList(args, parsed_globals):
905
1061
  g_param = parse_global_arg(parsed_globals)
906
1062
 
907
1063
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -930,11 +1086,11 @@ def doDeleteMQTTInstance(args, parsed_globals):
930
1086
  client = mod.TrocketClient(cred, g_param[OptionsDefine.Region], profile)
931
1087
  client._sdkVersion += ("_CLI_" + __version__)
932
1088
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
933
- model = models.DeleteMQTTInstanceRequest()
1089
+ model = models.DescribeMQTTUserListRequest()
934
1090
  model.from_json_string(json.dumps(args))
935
1091
  start_time = time.time()
936
1092
  while True:
937
- rsp = client.DeleteMQTTInstance(model)
1093
+ rsp = client.DescribeMQTTUserList(model)
938
1094
  result = rsp.to_json_string()
939
1095
  try:
940
1096
  json_obj = json.loads(result)
@@ -1369,6 +1525,58 @@ def doCreateTopic(args, parsed_globals):
1369
1525
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1370
1526
 
1371
1527
 
1528
+ def doCreateInstance(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.TrocketClient(cred, g_param[OptionsDefine.Region], profile)
1555
+ client._sdkVersion += ("_CLI_" + __version__)
1556
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1557
+ model = models.CreateInstanceRequest()
1558
+ model.from_json_string(json.dumps(args))
1559
+ start_time = time.time()
1560
+ while True:
1561
+ rsp = client.CreateInstance(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
+
1372
1580
  def doDescribeMQTTTopicList(args, parsed_globals):
1373
1581
  g_param = parse_global_arg(parsed_globals)
1374
1582
 
@@ -1525,7 +1733,7 @@ def doCreateMQTTTopic(args, parsed_globals):
1525
1733
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1526
1734
 
1527
1735
 
1528
- def doCreateInstance(args, parsed_globals):
1736
+ def doDescribeMessageList(args, parsed_globals):
1529
1737
  g_param = parse_global_arg(parsed_globals)
1530
1738
 
1531
1739
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1554,11 +1762,11 @@ def doCreateInstance(args, parsed_globals):
1554
1762
  client = mod.TrocketClient(cred, g_param[OptionsDefine.Region], profile)
1555
1763
  client._sdkVersion += ("_CLI_" + __version__)
1556
1764
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1557
- model = models.CreateInstanceRequest()
1765
+ model = models.DescribeMessageListRequest()
1558
1766
  model.from_json_string(json.dumps(args))
1559
1767
  start_time = time.time()
1560
1768
  while True:
1561
- rsp = client.CreateInstance(model)
1769
+ rsp = client.DescribeMessageList(model)
1562
1770
  result = rsp.to_json_string()
1563
1771
  try:
1564
1772
  json_obj = json.loads(result)
@@ -2577,15 +2785,18 @@ MODELS_MAP = {
2577
2785
 
2578
2786
  ACTION_MAP = {
2579
2787
  "DescribeMQTTMessageList": doDescribeMQTTMessageList,
2788
+ "DescribeMessageTrace": doDescribeMessageTrace,
2580
2789
  "ModifyTopic": doModifyTopic,
2581
2790
  "ModifyMQTTTopic": doModifyMQTTTopic,
2791
+ "ResendDeadLetterMessage": doResendDeadLetterMessage,
2582
2792
  "DeleteMQTTUser": doDeleteMQTTUser,
2583
2793
  "CreateRole": doCreateRole,
2584
2794
  "ModifyMQTTUser": doModifyMQTTUser,
2585
2795
  "DeleteInstance": doDeleteInstance,
2586
2796
  "CreateConsumerGroup": doCreateConsumerGroup,
2587
2797
  "DescribeMQTTProductSKUList": doDescribeMQTTProductSKUList,
2588
- "DescribeMQTTUserList": doDescribeMQTTUserList,
2798
+ "DescribeMessage": doDescribeMessage,
2799
+ "DeleteMQTTInstance": doDeleteMQTTInstance,
2589
2800
  "DeleteMQTTInsPublicEndpoint": doDeleteMQTTInsPublicEndpoint,
2590
2801
  "DescribeRoleList": doDescribeRoleList,
2591
2802
  "DeleteConsumerGroup": doDeleteConsumerGroup,
@@ -2593,7 +2804,7 @@ ACTION_MAP = {
2593
2804
  "ModifyConsumerGroup": doModifyConsumerGroup,
2594
2805
  "DescribeMQTTInsVPCEndpoints": doDescribeMQTTInsVPCEndpoints,
2595
2806
  "DeleteRole": doDeleteRole,
2596
- "DeleteMQTTInstance": doDeleteMQTTInstance,
2807
+ "DescribeMQTTUserList": doDescribeMQTTUserList,
2597
2808
  "DescribeProductSKUs": doDescribeProductSKUs,
2598
2809
  "ImportSourceClusterConsumerGroups": doImportSourceClusterConsumerGroups,
2599
2810
  "ModifyMQTTInstance": doModifyMQTTInstance,
@@ -2602,10 +2813,11 @@ ACTION_MAP = {
2602
2813
  "ModifyMQTTInsPublicEndpoint": doModifyMQTTInsPublicEndpoint,
2603
2814
  "DescribeConsumerGroup": doDescribeConsumerGroup,
2604
2815
  "CreateTopic": doCreateTopic,
2816
+ "CreateInstance": doCreateInstance,
2605
2817
  "DescribeMQTTTopicList": doDescribeMQTTTopicList,
2606
2818
  "DescribeMQTTInstance": doDescribeMQTTInstance,
2607
2819
  "CreateMQTTTopic": doCreateMQTTTopic,
2608
- "CreateInstance": doCreateInstance,
2820
+ "DescribeMessageList": doDescribeMessageList,
2609
2821
  "DeleteMQTTTopic": doDeleteMQTTTopic,
2610
2822
  "DescribeInstance": doDescribeInstance,
2611
2823
  "DeleteTopic": doDeleteTopic,