tccli-intl-en 3.1.2.1__py2.py3-none-any.whl → 3.1.4.1__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tccli/__init__.py +1 -1
- tccli/services/__init__.py +3 -0
- tccli/services/autoscaling/v20180419/api.json +36 -14
- tccli/services/clb/clb_client.py +636 -300
- tccli/services/clb/v20180317/api.json +1245 -367
- tccli/services/clb/v20180317/examples.json +172 -112
- tccli/services/faceid/v20180301/api.json +9 -0
- tccli/services/mongodb/mongodb_client.py +448 -0
- tccli/services/mongodb/v20190725/api.json +928 -103
- tccli/services/mongodb/v20190725/examples.json +64 -0
- tccli/services/ocr/v20181119/api.json +1 -1
- tccli/services/tdmq/tdmq_client.py +2406 -278
- tccli/services/tdmq/v20200217/api.json +11607 -3958
- tccli/services/tdmq/v20200217/examples.json +562 -264
- tccli/services/teo/v20220901/api.json +68 -4
- tccli/services/teo/v20220901/examples.json +28 -22
- tccli/services/trocket/__init__.py +4 -0
- tccli/services/trocket/trocket_client.py +2450 -0
- tccli/services/trocket/v20230308/api.json +6062 -0
- tccli/services/trocket/v20230308/examples.json +339 -0
- {tccli_intl_en-3.1.2.1.dist-info → tccli_intl_en-3.1.4.1.dist-info}/METADATA +2 -2
- {tccli_intl_en-3.1.2.1.dist-info → tccli_intl_en-3.1.4.1.dist-info}/RECORD +26 -22
- {tccli_intl_en-3.1.2.1.dist-info → tccli_intl_en-3.1.4.1.dist-info}/LICENSE +0 -0
- {tccli_intl_en-3.1.2.1.dist-info → tccli_intl_en-3.1.4.1.dist-info}/WHEEL +0 -0
- {tccli_intl_en-3.1.2.1.dist-info → tccli_intl_en-3.1.4.1.dist-info}/entry_points.txt +0 -0
- {tccli_intl_en-3.1.2.1.dist-info → tccli_intl_en-3.1.4.1.dist-info}/top_level.txt +0 -0
|
@@ -182,7 +182,7 @@ def doDescribeRocketMQNamespaces(args, parsed_globals):
|
|
|
182
182
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
183
183
|
|
|
184
184
|
|
|
185
|
-
def
|
|
185
|
+
def doDescribeRabbitMQExchanges(args, parsed_globals):
|
|
186
186
|
g_param = parse_global_arg(parsed_globals)
|
|
187
187
|
|
|
188
188
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -214,11 +214,11 @@ def doCreateCmqTopic(args, parsed_globals):
|
|
|
214
214
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
215
215
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
216
216
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
217
|
-
model = models.
|
|
217
|
+
model = models.DescribeRabbitMQExchangesRequest()
|
|
218
218
|
model.from_json_string(json.dumps(args))
|
|
219
219
|
start_time = time.time()
|
|
220
220
|
while True:
|
|
221
|
-
rsp = client.
|
|
221
|
+
rsp = client.DescribeRabbitMQExchanges(model)
|
|
222
222
|
result = rsp.to_json_string()
|
|
223
223
|
try:
|
|
224
224
|
json_obj = json.loads(result)
|
|
@@ -237,7 +237,7 @@ def doCreateCmqTopic(args, parsed_globals):
|
|
|
237
237
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
238
238
|
|
|
239
239
|
|
|
240
|
-
def
|
|
240
|
+
def doDescribeRocketMQMsgTrace(args, parsed_globals):
|
|
241
241
|
g_param = parse_global_arg(parsed_globals)
|
|
242
242
|
|
|
243
243
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -269,11 +269,11 @@ def doDeleteCmqQueue(args, parsed_globals):
|
|
|
269
269
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
270
270
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
271
271
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
272
|
-
model = models.
|
|
272
|
+
model = models.DescribeRocketMQMsgTraceRequest()
|
|
273
273
|
model.from_json_string(json.dumps(args))
|
|
274
274
|
start_time = time.time()
|
|
275
275
|
while True:
|
|
276
|
-
rsp = client.
|
|
276
|
+
rsp = client.DescribeRocketMQMsgTrace(model)
|
|
277
277
|
result = rsp.to_json_string()
|
|
278
278
|
try:
|
|
279
279
|
json_obj = json.loads(result)
|
|
@@ -292,7 +292,7 @@ def doDeleteCmqQueue(args, parsed_globals):
|
|
|
292
292
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
293
293
|
|
|
294
294
|
|
|
295
|
-
def
|
|
295
|
+
def doCreateRocketMQRole(args, parsed_globals):
|
|
296
296
|
g_param = parse_global_arg(parsed_globals)
|
|
297
297
|
|
|
298
298
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -324,11 +324,11 @@ def doModifyRabbitMQVirtualHost(args, parsed_globals):
|
|
|
324
324
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
325
325
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
326
326
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
327
|
-
model = models.
|
|
327
|
+
model = models.CreateRocketMQRoleRequest()
|
|
328
328
|
model.from_json_string(json.dumps(args))
|
|
329
329
|
start_time = time.time()
|
|
330
330
|
while True:
|
|
331
|
-
rsp = client.
|
|
331
|
+
rsp = client.CreateRocketMQRole(model)
|
|
332
332
|
result = rsp.to_json_string()
|
|
333
333
|
try:
|
|
334
334
|
json_obj = json.loads(result)
|
|
@@ -347,7 +347,7 @@ def doModifyRabbitMQVirtualHost(args, parsed_globals):
|
|
|
347
347
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
348
348
|
|
|
349
349
|
|
|
350
|
-
def
|
|
350
|
+
def doCreateCmqTopic(args, parsed_globals):
|
|
351
351
|
g_param = parse_global_arg(parsed_globals)
|
|
352
352
|
|
|
353
353
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -379,11 +379,11 @@ def doDescribeCmqTopics(args, parsed_globals):
|
|
|
379
379
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
380
380
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
381
381
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
382
|
-
model = models.
|
|
382
|
+
model = models.CreateCmqTopicRequest()
|
|
383
383
|
model.from_json_string(json.dumps(args))
|
|
384
384
|
start_time = time.time()
|
|
385
385
|
while True:
|
|
386
|
-
rsp = client.
|
|
386
|
+
rsp = client.CreateCmqTopic(model)
|
|
387
387
|
result = rsp.to_json_string()
|
|
388
388
|
try:
|
|
389
389
|
json_obj = json.loads(result)
|
|
@@ -402,7 +402,7 @@ def doDescribeCmqTopics(args, parsed_globals):
|
|
|
402
402
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
403
403
|
|
|
404
404
|
|
|
405
|
-
def
|
|
405
|
+
def doDeleteCmqQueue(args, parsed_globals):
|
|
406
406
|
g_param = parse_global_arg(parsed_globals)
|
|
407
407
|
|
|
408
408
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -434,11 +434,11 @@ def doDeleteEnvironmentRoles(args, parsed_globals):
|
|
|
434
434
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
435
435
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
436
436
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
437
|
-
model = models.
|
|
437
|
+
model = models.DeleteCmqQueueRequest()
|
|
438
438
|
model.from_json_string(json.dumps(args))
|
|
439
439
|
start_time = time.time()
|
|
440
440
|
while True:
|
|
441
|
-
rsp = client.
|
|
441
|
+
rsp = client.DeleteCmqQueue(model)
|
|
442
442
|
result = rsp.to_json_string()
|
|
443
443
|
try:
|
|
444
444
|
json_obj = json.loads(result)
|
|
@@ -457,7 +457,7 @@ def doDeleteEnvironmentRoles(args, parsed_globals):
|
|
|
457
457
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
458
458
|
|
|
459
459
|
|
|
460
|
-
def
|
|
460
|
+
def doModifyRabbitMQVirtualHost(args, parsed_globals):
|
|
461
461
|
g_param = parse_global_arg(parsed_globals)
|
|
462
462
|
|
|
463
463
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -489,11 +489,11 @@ def doDeleteRocketMQGroup(args, parsed_globals):
|
|
|
489
489
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
490
490
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
491
491
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
492
|
-
model = models.
|
|
492
|
+
model = models.ModifyRabbitMQVirtualHostRequest()
|
|
493
493
|
model.from_json_string(json.dumps(args))
|
|
494
494
|
start_time = time.time()
|
|
495
495
|
while True:
|
|
496
|
-
rsp = client.
|
|
496
|
+
rsp = client.ModifyRabbitMQVirtualHost(model)
|
|
497
497
|
result = rsp.to_json_string()
|
|
498
498
|
try:
|
|
499
499
|
json_obj = json.loads(result)
|
|
@@ -512,7 +512,7 @@ def doDeleteRocketMQGroup(args, parsed_globals):
|
|
|
512
512
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
513
513
|
|
|
514
514
|
|
|
515
|
-
def
|
|
515
|
+
def doDescribeCmqTopics(args, parsed_globals):
|
|
516
516
|
g_param = parse_global_arg(parsed_globals)
|
|
517
517
|
|
|
518
518
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -544,11 +544,11 @@ def doCreateRabbitMQUser(args, parsed_globals):
|
|
|
544
544
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
545
545
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
546
546
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
547
|
-
model = models.
|
|
547
|
+
model = models.DescribeCmqTopicsRequest()
|
|
548
548
|
model.from_json_string(json.dumps(args))
|
|
549
549
|
start_time = time.time()
|
|
550
550
|
while True:
|
|
551
|
-
rsp = client.
|
|
551
|
+
rsp = client.DescribeCmqTopics(model)
|
|
552
552
|
result = rsp.to_json_string()
|
|
553
553
|
try:
|
|
554
554
|
json_obj = json.loads(result)
|
|
@@ -567,7 +567,7 @@ def doCreateRabbitMQUser(args, parsed_globals):
|
|
|
567
567
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
568
568
|
|
|
569
569
|
|
|
570
|
-
def
|
|
570
|
+
def doDeleteEnvironmentRoles(args, parsed_globals):
|
|
571
571
|
g_param = parse_global_arg(parsed_globals)
|
|
572
572
|
|
|
573
573
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -599,11 +599,11 @@ def doDescribeRabbitMQVipInstances(args, parsed_globals):
|
|
|
599
599
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
600
600
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
601
601
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
602
|
-
model = models.
|
|
602
|
+
model = models.DeleteEnvironmentRolesRequest()
|
|
603
603
|
model.from_json_string(json.dumps(args))
|
|
604
604
|
start_time = time.time()
|
|
605
605
|
while True:
|
|
606
|
-
rsp = client.
|
|
606
|
+
rsp = client.DeleteEnvironmentRoles(model)
|
|
607
607
|
result = rsp.to_json_string()
|
|
608
608
|
try:
|
|
609
609
|
json_obj = json.loads(result)
|
|
@@ -622,7 +622,7 @@ def doDescribeRabbitMQVipInstances(args, parsed_globals):
|
|
|
622
622
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
623
623
|
|
|
624
624
|
|
|
625
|
-
def
|
|
625
|
+
def doDeleteRocketMQGroup(args, parsed_globals):
|
|
626
626
|
g_param = parse_global_arg(parsed_globals)
|
|
627
627
|
|
|
628
628
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -654,11 +654,11 @@ def doRewindCmqQueue(args, parsed_globals):
|
|
|
654
654
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
655
655
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
656
656
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
657
|
-
model = models.
|
|
657
|
+
model = models.DeleteRocketMQGroupRequest()
|
|
658
658
|
model.from_json_string(json.dumps(args))
|
|
659
659
|
start_time = time.time()
|
|
660
660
|
while True:
|
|
661
|
-
rsp = client.
|
|
661
|
+
rsp = client.DeleteRocketMQGroup(model)
|
|
662
662
|
result = rsp.to_json_string()
|
|
663
663
|
try:
|
|
664
664
|
json_obj = json.loads(result)
|
|
@@ -677,7 +677,7 @@ def doRewindCmqQueue(args, parsed_globals):
|
|
|
677
677
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
678
678
|
|
|
679
679
|
|
|
680
|
-
def
|
|
680
|
+
def doDeleteProCluster(args, parsed_globals):
|
|
681
681
|
g_param = parse_global_arg(parsed_globals)
|
|
682
682
|
|
|
683
683
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -709,11 +709,11 @@ def doCreateTopic(args, parsed_globals):
|
|
|
709
709
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
710
710
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
711
711
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
712
|
-
model = models.
|
|
712
|
+
model = models.DeleteProClusterRequest()
|
|
713
713
|
model.from_json_string(json.dumps(args))
|
|
714
714
|
start_time = time.time()
|
|
715
715
|
while True:
|
|
716
|
-
rsp = client.
|
|
716
|
+
rsp = client.DeleteProCluster(model)
|
|
717
717
|
result = rsp.to_json_string()
|
|
718
718
|
try:
|
|
719
719
|
json_obj = json.loads(result)
|
|
@@ -732,7 +732,7 @@ def doCreateTopic(args, parsed_globals):
|
|
|
732
732
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
733
733
|
|
|
734
734
|
|
|
735
|
-
def
|
|
735
|
+
def doDeleteRocketMQRoles(args, parsed_globals):
|
|
736
736
|
g_param = parse_global_arg(parsed_globals)
|
|
737
737
|
|
|
738
738
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -764,11 +764,11 @@ def doDescribeCmqQueues(args, parsed_globals):
|
|
|
764
764
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
765
765
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
766
766
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
767
|
-
model = models.
|
|
767
|
+
model = models.DeleteRocketMQRolesRequest()
|
|
768
768
|
model.from_json_string(json.dumps(args))
|
|
769
769
|
start_time = time.time()
|
|
770
770
|
while True:
|
|
771
|
-
rsp = client.
|
|
771
|
+
rsp = client.DeleteRocketMQRoles(model)
|
|
772
772
|
result = rsp.to_json_string()
|
|
773
773
|
try:
|
|
774
774
|
json_obj = json.loads(result)
|
|
@@ -787,7 +787,7 @@ def doDescribeCmqQueues(args, parsed_globals):
|
|
|
787
787
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
788
788
|
|
|
789
789
|
|
|
790
|
-
def
|
|
790
|
+
def doDescribeTopics(args, parsed_globals):
|
|
791
791
|
g_param = parse_global_arg(parsed_globals)
|
|
792
792
|
|
|
793
793
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -819,11 +819,11 @@ def doDescribeEnvironments(args, parsed_globals):
|
|
|
819
819
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
820
820
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
821
821
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
822
|
-
model = models.
|
|
822
|
+
model = models.DescribeTopicsRequest()
|
|
823
823
|
model.from_json_string(json.dumps(args))
|
|
824
824
|
start_time = time.time()
|
|
825
825
|
while True:
|
|
826
|
-
rsp = client.
|
|
826
|
+
rsp = client.DescribeTopics(model)
|
|
827
827
|
result = rsp.to_json_string()
|
|
828
828
|
try:
|
|
829
829
|
json_obj = json.loads(result)
|
|
@@ -842,7 +842,7 @@ def doDescribeEnvironments(args, parsed_globals):
|
|
|
842
842
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
843
843
|
|
|
844
844
|
|
|
845
|
-
def
|
|
845
|
+
def doModifyRabbitMQPermission(args, parsed_globals):
|
|
846
846
|
g_param = parse_global_arg(parsed_globals)
|
|
847
847
|
|
|
848
848
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -874,11 +874,11 @@ def doDescribeClusterDetail(args, parsed_globals):
|
|
|
874
874
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
875
875
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
876
876
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
877
|
-
model = models.
|
|
877
|
+
model = models.ModifyRabbitMQPermissionRequest()
|
|
878
878
|
model.from_json_string(json.dumps(args))
|
|
879
879
|
start_time = time.time()
|
|
880
880
|
while True:
|
|
881
|
-
rsp = client.
|
|
881
|
+
rsp = client.ModifyRabbitMQPermission(model)
|
|
882
882
|
result = rsp.to_json_string()
|
|
883
883
|
try:
|
|
884
884
|
json_obj = json.loads(result)
|
|
@@ -897,7 +897,7 @@ def doDescribeClusterDetail(args, parsed_globals):
|
|
|
897
897
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
898
898
|
|
|
899
899
|
|
|
900
|
-
def
|
|
900
|
+
def doDescribeRabbitMQVipInstances(args, parsed_globals):
|
|
901
901
|
g_param = parse_global_arg(parsed_globals)
|
|
902
902
|
|
|
903
903
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -929,11 +929,11 @@ def doCreateRocketMQGroup(args, parsed_globals):
|
|
|
929
929
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
930
930
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
931
931
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
932
|
-
model = models.
|
|
932
|
+
model = models.DescribeRabbitMQVipInstancesRequest()
|
|
933
933
|
model.from_json_string(json.dumps(args))
|
|
934
934
|
start_time = time.time()
|
|
935
935
|
while True:
|
|
936
|
-
rsp = client.
|
|
936
|
+
rsp = client.DescribeRabbitMQVipInstances(model)
|
|
937
937
|
result = rsp.to_json_string()
|
|
938
938
|
try:
|
|
939
939
|
json_obj = json.loads(result)
|
|
@@ -952,7 +952,7 @@ def doCreateRocketMQGroup(args, parsed_globals):
|
|
|
952
952
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
953
953
|
|
|
954
954
|
|
|
955
|
-
def
|
|
955
|
+
def doRewindCmqQueue(args, parsed_globals):
|
|
956
956
|
g_param = parse_global_arg(parsed_globals)
|
|
957
957
|
|
|
958
958
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -984,11 +984,11 @@ def doAcknowledgeMessage(args, parsed_globals):
|
|
|
984
984
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
985
985
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
986
986
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
987
|
-
model = models.
|
|
987
|
+
model = models.RewindCmqQueueRequest()
|
|
988
988
|
model.from_json_string(json.dumps(args))
|
|
989
989
|
start_time = time.time()
|
|
990
990
|
while True:
|
|
991
|
-
rsp = client.
|
|
991
|
+
rsp = client.RewindCmqQueue(model)
|
|
992
992
|
result = rsp.to_json_string()
|
|
993
993
|
try:
|
|
994
994
|
json_obj = json.loads(result)
|
|
@@ -1007,7 +1007,7 @@ def doAcknowledgeMessage(args, parsed_globals):
|
|
|
1007
1007
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1008
1008
|
|
|
1009
1009
|
|
|
1010
|
-
def
|
|
1010
|
+
def doDescribeRocketMQTopicStats(args, parsed_globals):
|
|
1011
1011
|
g_param = parse_global_arg(parsed_globals)
|
|
1012
1012
|
|
|
1013
1013
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1039,11 +1039,11 @@ def doCreateEnvironment(args, parsed_globals):
|
|
|
1039
1039
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1040
1040
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1041
1041
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1042
|
-
model = models.
|
|
1042
|
+
model = models.DescribeRocketMQTopicStatsRequest()
|
|
1043
1043
|
model.from_json_string(json.dumps(args))
|
|
1044
1044
|
start_time = time.time()
|
|
1045
1045
|
while True:
|
|
1046
|
-
rsp = client.
|
|
1046
|
+
rsp = client.DescribeRocketMQTopicStats(model)
|
|
1047
1047
|
result = rsp.to_json_string()
|
|
1048
1048
|
try:
|
|
1049
1049
|
json_obj = json.loads(result)
|
|
@@ -1062,7 +1062,7 @@ def doCreateEnvironment(args, parsed_globals):
|
|
|
1062
1062
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1063
1063
|
|
|
1064
1064
|
|
|
1065
|
-
def
|
|
1065
|
+
def doCreateTopic(args, parsed_globals):
|
|
1066
1066
|
g_param = parse_global_arg(parsed_globals)
|
|
1067
1067
|
|
|
1068
1068
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1094,11 +1094,11 @@ def doDescribeTopics(args, parsed_globals):
|
|
|
1094
1094
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1095
1095
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1096
1096
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1097
|
-
model = models.
|
|
1097
|
+
model = models.CreateTopicRequest()
|
|
1098
1098
|
model.from_json_string(json.dumps(args))
|
|
1099
1099
|
start_time = time.time()
|
|
1100
1100
|
while True:
|
|
1101
|
-
rsp = client.
|
|
1101
|
+
rsp = client.CreateTopic(model)
|
|
1102
1102
|
result = rsp.to_json_string()
|
|
1103
1103
|
try:
|
|
1104
1104
|
json_obj = json.loads(result)
|
|
@@ -1117,7 +1117,7 @@ def doDescribeTopics(args, parsed_globals):
|
|
|
1117
1117
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1118
1118
|
|
|
1119
1119
|
|
|
1120
|
-
def
|
|
1120
|
+
def doDescribeCmqQueues(args, parsed_globals):
|
|
1121
1121
|
g_param = parse_global_arg(parsed_globals)
|
|
1122
1122
|
|
|
1123
1123
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1149,11 +1149,11 @@ def doSendMessages(args, parsed_globals):
|
|
|
1149
1149
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1150
1150
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1151
1151
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1152
|
-
model = models.
|
|
1152
|
+
model = models.DescribeCmqQueuesRequest()
|
|
1153
1153
|
model.from_json_string(json.dumps(args))
|
|
1154
1154
|
start_time = time.time()
|
|
1155
1155
|
while True:
|
|
1156
|
-
rsp = client.
|
|
1156
|
+
rsp = client.DescribeCmqQueues(model)
|
|
1157
1157
|
result = rsp.to_json_string()
|
|
1158
1158
|
try:
|
|
1159
1159
|
json_obj = json.loads(result)
|
|
@@ -1172,7 +1172,7 @@ def doSendMessages(args, parsed_globals):
|
|
|
1172
1172
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1173
1173
|
|
|
1174
1174
|
|
|
1175
|
-
def
|
|
1175
|
+
def doDescribeEnvironments(args, parsed_globals):
|
|
1176
1176
|
g_param = parse_global_arg(parsed_globals)
|
|
1177
1177
|
|
|
1178
1178
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1204,11 +1204,11 @@ def doModifyRocketMQTopic(args, parsed_globals):
|
|
|
1204
1204
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1205
1205
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1206
1206
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1207
|
-
model = models.
|
|
1207
|
+
model = models.DescribeEnvironmentsRequest()
|
|
1208
1208
|
model.from_json_string(json.dumps(args))
|
|
1209
1209
|
start_time = time.time()
|
|
1210
1210
|
while True:
|
|
1211
|
-
rsp = client.
|
|
1211
|
+
rsp = client.DescribeEnvironments(model)
|
|
1212
1212
|
result = rsp.to_json_string()
|
|
1213
1213
|
try:
|
|
1214
1214
|
json_obj = json.loads(result)
|
|
@@ -1227,7 +1227,7 @@ def doModifyRocketMQTopic(args, parsed_globals):
|
|
|
1227
1227
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1228
1228
|
|
|
1229
1229
|
|
|
1230
|
-
def
|
|
1230
|
+
def doDescribeClusterDetail(args, parsed_globals):
|
|
1231
1231
|
g_param = parse_global_arg(parsed_globals)
|
|
1232
1232
|
|
|
1233
1233
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1259,11 +1259,11 @@ def doDescribeEnvironmentAttributes(args, parsed_globals):
|
|
|
1259
1259
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1260
1260
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1261
1261
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1262
|
-
model = models.
|
|
1262
|
+
model = models.DescribeClusterDetailRequest()
|
|
1263
1263
|
model.from_json_string(json.dumps(args))
|
|
1264
1264
|
start_time = time.time()
|
|
1265
1265
|
while True:
|
|
1266
|
-
rsp = client.
|
|
1266
|
+
rsp = client.DescribeClusterDetail(model)
|
|
1267
1267
|
result = rsp.to_json_string()
|
|
1268
1268
|
try:
|
|
1269
1269
|
json_obj = json.loads(result)
|
|
@@ -1282,7 +1282,7 @@ def doDescribeEnvironmentAttributes(args, parsed_globals):
|
|
|
1282
1282
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1283
1283
|
|
|
1284
1284
|
|
|
1285
|
-
def
|
|
1285
|
+
def doCreateRocketMQGroup(args, parsed_globals):
|
|
1286
1286
|
g_param = parse_global_arg(parsed_globals)
|
|
1287
1287
|
|
|
1288
1288
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1314,11 +1314,11 @@ def doCreateCmqSubscribe(args, parsed_globals):
|
|
|
1314
1314
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1315
1315
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1316
1316
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1317
|
-
model = models.
|
|
1317
|
+
model = models.CreateRocketMQGroupRequest()
|
|
1318
1318
|
model.from_json_string(json.dumps(args))
|
|
1319
1319
|
start_time = time.time()
|
|
1320
1320
|
while True:
|
|
1321
|
-
rsp = client.
|
|
1321
|
+
rsp = client.CreateRocketMQGroup(model)
|
|
1322
1322
|
result = rsp.to_json_string()
|
|
1323
1323
|
try:
|
|
1324
1324
|
json_obj = json.loads(result)
|
|
@@ -1337,7 +1337,7 @@ def doCreateCmqSubscribe(args, parsed_globals):
|
|
|
1337
1337
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1338
1338
|
|
|
1339
1339
|
|
|
1340
|
-
def
|
|
1340
|
+
def doAcknowledgeMessage(args, parsed_globals):
|
|
1341
1341
|
g_param = parse_global_arg(parsed_globals)
|
|
1342
1342
|
|
|
1343
1343
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1369,11 +1369,11 @@ def doDescribePublisherSummary(args, parsed_globals):
|
|
|
1369
1369
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1370
1370
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1371
1371
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1372
|
-
model = models.
|
|
1372
|
+
model = models.AcknowledgeMessageRequest()
|
|
1373
1373
|
model.from_json_string(json.dumps(args))
|
|
1374
1374
|
start_time = time.time()
|
|
1375
1375
|
while True:
|
|
1376
|
-
rsp = client.
|
|
1376
|
+
rsp = client.AcknowledgeMessage(model)
|
|
1377
1377
|
result = rsp.to_json_string()
|
|
1378
1378
|
try:
|
|
1379
1379
|
json_obj = json.loads(result)
|
|
@@ -1392,7 +1392,7 @@ def doDescribePublisherSummary(args, parsed_globals):
|
|
|
1392
1392
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1393
1393
|
|
|
1394
1394
|
|
|
1395
|
-
def
|
|
1395
|
+
def doCreateEnvironment(args, parsed_globals):
|
|
1396
1396
|
g_param = parse_global_arg(parsed_globals)
|
|
1397
1397
|
|
|
1398
1398
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1424,11 +1424,11 @@ def doDeleteRocketMQNamespace(args, parsed_globals):
|
|
|
1424
1424
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1425
1425
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1426
1426
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1427
|
-
model = models.
|
|
1427
|
+
model = models.CreateEnvironmentRequest()
|
|
1428
1428
|
model.from_json_string(json.dumps(args))
|
|
1429
1429
|
start_time = time.time()
|
|
1430
1430
|
while True:
|
|
1431
|
-
rsp = client.
|
|
1431
|
+
rsp = client.CreateEnvironment(model)
|
|
1432
1432
|
result = rsp.to_json_string()
|
|
1433
1433
|
try:
|
|
1434
1434
|
json_obj = json.loads(result)
|
|
@@ -1447,7 +1447,7 @@ def doDeleteRocketMQNamespace(args, parsed_globals):
|
|
|
1447
1447
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1448
1448
|
|
|
1449
1449
|
|
|
1450
|
-
def
|
|
1450
|
+
def doDescribeClusters(args, parsed_globals):
|
|
1451
1451
|
g_param = parse_global_arg(parsed_globals)
|
|
1452
1452
|
|
|
1453
1453
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1479,11 +1479,11 @@ def doCreateRabbitMQVirtualHost(args, parsed_globals):
|
|
|
1479
1479
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1480
1480
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1481
1481
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1482
|
-
model = models.
|
|
1482
|
+
model = models.DescribeClustersRequest()
|
|
1483
1483
|
model.from_json_string(json.dumps(args))
|
|
1484
1484
|
start_time = time.time()
|
|
1485
1485
|
while True:
|
|
1486
|
-
rsp = client.
|
|
1486
|
+
rsp = client.DescribeClusters(model)
|
|
1487
1487
|
result = rsp.to_json_string()
|
|
1488
1488
|
try:
|
|
1489
1489
|
json_obj = json.loads(result)
|
|
@@ -1502,7 +1502,7 @@ def doCreateRabbitMQVirtualHost(args, parsed_globals):
|
|
|
1502
1502
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1503
1503
|
|
|
1504
1504
|
|
|
1505
|
-
def
|
|
1505
|
+
def doModifyPublicNetworkSecurityPolicy(args, parsed_globals):
|
|
1506
1506
|
g_param = parse_global_arg(parsed_globals)
|
|
1507
1507
|
|
|
1508
1508
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1534,11 +1534,11 @@ def doDeleteCluster(args, parsed_globals):
|
|
|
1534
1534
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1535
1535
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1536
1536
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1537
|
-
model = models.
|
|
1537
|
+
model = models.ModifyPublicNetworkSecurityPolicyRequest()
|
|
1538
1538
|
model.from_json_string(json.dumps(args))
|
|
1539
1539
|
start_time = time.time()
|
|
1540
1540
|
while True:
|
|
1541
|
-
rsp = client.
|
|
1541
|
+
rsp = client.ModifyPublicNetworkSecurityPolicy(model)
|
|
1542
1542
|
result = rsp.to_json_string()
|
|
1543
1543
|
try:
|
|
1544
1544
|
json_obj = json.loads(result)
|
|
@@ -1557,7 +1557,7 @@ def doDeleteCluster(args, parsed_globals):
|
|
|
1557
1557
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1558
1558
|
|
|
1559
1559
|
|
|
1560
|
-
def
|
|
1560
|
+
def doModifyRocketMQEnvironmentRole(args, parsed_globals):
|
|
1561
1561
|
g_param = parse_global_arg(parsed_globals)
|
|
1562
1562
|
|
|
1563
1563
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1589,11 +1589,11 @@ def doDeleteCmqTopic(args, parsed_globals):
|
|
|
1589
1589
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1590
1590
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1591
1591
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1592
|
-
model = models.
|
|
1592
|
+
model = models.ModifyRocketMQEnvironmentRoleRequest()
|
|
1593
1593
|
model.from_json_string(json.dumps(args))
|
|
1594
1594
|
start_time = time.time()
|
|
1595
1595
|
while True:
|
|
1596
|
-
rsp = client.
|
|
1596
|
+
rsp = client.ModifyRocketMQEnvironmentRole(model)
|
|
1597
1597
|
result = rsp.to_json_string()
|
|
1598
1598
|
try:
|
|
1599
1599
|
json_obj = json.loads(result)
|
|
@@ -1612,7 +1612,7 @@ def doDeleteCmqTopic(args, parsed_globals):
|
|
|
1612
1612
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1613
1613
|
|
|
1614
1614
|
|
|
1615
|
-
def
|
|
1615
|
+
def doModifyRocketMQTopic(args, parsed_globals):
|
|
1616
1616
|
g_param = parse_global_arg(parsed_globals)
|
|
1617
1617
|
|
|
1618
1618
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1644,11 +1644,11 @@ def doCreateCmqQueue(args, parsed_globals):
|
|
|
1644
1644
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1645
1645
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1646
1646
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1647
|
-
model = models.
|
|
1647
|
+
model = models.ModifyRocketMQTopicRequest()
|
|
1648
1648
|
model.from_json_string(json.dumps(args))
|
|
1649
1649
|
start_time = time.time()
|
|
1650
1650
|
while True:
|
|
1651
|
-
rsp = client.
|
|
1651
|
+
rsp = client.ModifyRocketMQTopic(model)
|
|
1652
1652
|
result = rsp.to_json_string()
|
|
1653
1653
|
try:
|
|
1654
1654
|
json_obj = json.loads(result)
|
|
@@ -1667,7 +1667,7 @@ def doCreateCmqQueue(args, parsed_globals):
|
|
|
1667
1667
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1668
1668
|
|
|
1669
1669
|
|
|
1670
|
-
def
|
|
1670
|
+
def doDescribeRocketMQTopicMsgs(args, parsed_globals):
|
|
1671
1671
|
g_param = parse_global_arg(parsed_globals)
|
|
1672
1672
|
|
|
1673
1673
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1699,11 +1699,11 @@ def doModifyRocketMQGroup(args, parsed_globals):
|
|
|
1699
1699
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1700
1700
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1701
1701
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1702
|
-
model = models.
|
|
1702
|
+
model = models.DescribeRocketMQTopicMsgsRequest()
|
|
1703
1703
|
model.from_json_string(json.dumps(args))
|
|
1704
1704
|
start_time = time.time()
|
|
1705
1705
|
while True:
|
|
1706
|
-
rsp = client.
|
|
1706
|
+
rsp = client.DescribeRocketMQTopicMsgs(model)
|
|
1707
1707
|
result = rsp.to_json_string()
|
|
1708
1708
|
try:
|
|
1709
1709
|
json_obj = json.loads(result)
|
|
@@ -1722,7 +1722,7 @@ def doModifyRocketMQGroup(args, parsed_globals):
|
|
|
1722
1722
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1723
1723
|
|
|
1724
1724
|
|
|
1725
|
-
def
|
|
1725
|
+
def doDescribeRocketMQProducers(args, parsed_globals):
|
|
1726
1726
|
g_param = parse_global_arg(parsed_globals)
|
|
1727
1727
|
|
|
1728
1728
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1754,11 +1754,11 @@ def doModifyCmqTopicAttribute(args, parsed_globals):
|
|
|
1754
1754
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1755
1755
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1756
1756
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1757
|
-
model = models.
|
|
1757
|
+
model = models.DescribeRocketMQProducersRequest()
|
|
1758
1758
|
model.from_json_string(json.dumps(args))
|
|
1759
1759
|
start_time = time.time()
|
|
1760
1760
|
while True:
|
|
1761
|
-
rsp = client.
|
|
1761
|
+
rsp = client.DescribeRocketMQProducers(model)
|
|
1762
1762
|
result = rsp.to_json_string()
|
|
1763
1763
|
try:
|
|
1764
1764
|
json_obj = json.loads(result)
|
|
@@ -1777,7 +1777,7 @@ def doModifyCmqTopicAttribute(args, parsed_globals):
|
|
|
1777
1777
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1778
1778
|
|
|
1779
1779
|
|
|
1780
|
-
def
|
|
1780
|
+
def doDescribeEnvironmentAttributes(args, parsed_globals):
|
|
1781
1781
|
g_param = parse_global_arg(parsed_globals)
|
|
1782
1782
|
|
|
1783
1783
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1809,11 +1809,11 @@ def doDescribeCmqSubscriptionDetail(args, parsed_globals):
|
|
|
1809
1809
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1810
1810
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1811
1811
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1812
|
-
model = models.
|
|
1812
|
+
model = models.DescribeEnvironmentAttributesRequest()
|
|
1813
1813
|
model.from_json_string(json.dumps(args))
|
|
1814
1814
|
start_time = time.time()
|
|
1815
1815
|
while True:
|
|
1816
|
-
rsp = client.
|
|
1816
|
+
rsp = client.DescribeEnvironmentAttributes(model)
|
|
1817
1817
|
result = rsp.to_json_string()
|
|
1818
1818
|
try:
|
|
1819
1819
|
json_obj = json.loads(result)
|
|
@@ -1832,7 +1832,7 @@ def doDescribeCmqSubscriptionDetail(args, parsed_globals):
|
|
|
1832
1832
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1833
1833
|
|
|
1834
1834
|
|
|
1835
|
-
def
|
|
1835
|
+
def doCreateCmqSubscribe(args, parsed_globals):
|
|
1836
1836
|
g_param = parse_global_arg(parsed_globals)
|
|
1837
1837
|
|
|
1838
1838
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1864,11 +1864,11 @@ def doDescribeRabbitMQVirtualHost(args, parsed_globals):
|
|
|
1864
1864
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1865
1865
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1866
1866
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1867
|
-
model = models.
|
|
1867
|
+
model = models.CreateCmqSubscribeRequest()
|
|
1868
1868
|
model.from_json_string(json.dumps(args))
|
|
1869
1869
|
start_time = time.time()
|
|
1870
1870
|
while True:
|
|
1871
|
-
rsp = client.
|
|
1871
|
+
rsp = client.CreateCmqSubscribe(model)
|
|
1872
1872
|
result = rsp.to_json_string()
|
|
1873
1873
|
try:
|
|
1874
1874
|
json_obj = json.loads(result)
|
|
@@ -1887,7 +1887,7 @@ def doDescribeRabbitMQVirtualHost(args, parsed_globals):
|
|
|
1887
1887
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1888
1888
|
|
|
1889
1889
|
|
|
1890
|
-
def
|
|
1890
|
+
def doDescribePublisherSummary(args, parsed_globals):
|
|
1891
1891
|
g_param = parse_global_arg(parsed_globals)
|
|
1892
1892
|
|
|
1893
1893
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1919,11 +1919,11 @@ def doDescribeCmqDeadLetterSourceQueues(args, parsed_globals):
|
|
|
1919
1919
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1920
1920
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1921
1921
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1922
|
-
model = models.
|
|
1922
|
+
model = models.DescribePublisherSummaryRequest()
|
|
1923
1923
|
model.from_json_string(json.dumps(args))
|
|
1924
1924
|
start_time = time.time()
|
|
1925
1925
|
while True:
|
|
1926
|
-
rsp = client.
|
|
1926
|
+
rsp = client.DescribePublisherSummary(model)
|
|
1927
1927
|
result = rsp.to_json_string()
|
|
1928
1928
|
try:
|
|
1929
1929
|
json_obj = json.loads(result)
|
|
@@ -1942,7 +1942,7 @@ def doDescribeCmqDeadLetterSourceQueues(args, parsed_globals):
|
|
|
1942
1942
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1943
1943
|
|
|
1944
1944
|
|
|
1945
|
-
def
|
|
1945
|
+
def doDeleteRocketMQNamespace(args, parsed_globals):
|
|
1946
1946
|
g_param = parse_global_arg(parsed_globals)
|
|
1947
1947
|
|
|
1948
1948
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1974,11 +1974,11 @@ def doDescribeClusters(args, parsed_globals):
|
|
|
1974
1974
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1975
1975
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1976
1976
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1977
|
-
model = models.
|
|
1977
|
+
model = models.DeleteRocketMQNamespaceRequest()
|
|
1978
1978
|
model.from_json_string(json.dumps(args))
|
|
1979
1979
|
start_time = time.time()
|
|
1980
1980
|
while True:
|
|
1981
|
-
rsp = client.
|
|
1981
|
+
rsp = client.DeleteRocketMQNamespace(model)
|
|
1982
1982
|
result = rsp.to_json_string()
|
|
1983
1983
|
try:
|
|
1984
1984
|
json_obj = json.loads(result)
|
|
@@ -1997,7 +1997,7 @@ def doDescribeClusters(args, parsed_globals):
|
|
|
1997
1997
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1998
1998
|
|
|
1999
1999
|
|
|
2000
|
-
def
|
|
2000
|
+
def doCreateRabbitMQVirtualHost(args, parsed_globals):
|
|
2001
2001
|
g_param = parse_global_arg(parsed_globals)
|
|
2002
2002
|
|
|
2003
2003
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -2029,11 +2029,11 @@ def doResetRocketMQConsumerOffSet(args, parsed_globals):
|
|
|
2029
2029
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2030
2030
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
2031
2031
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2032
|
-
model = models.
|
|
2032
|
+
model = models.CreateRabbitMQVirtualHostRequest()
|
|
2033
2033
|
model.from_json_string(json.dumps(args))
|
|
2034
2034
|
start_time = time.time()
|
|
2035
2035
|
while True:
|
|
2036
|
-
rsp = client.
|
|
2036
|
+
rsp = client.CreateRabbitMQVirtualHost(model)
|
|
2037
2037
|
result = rsp.to_json_string()
|
|
2038
2038
|
try:
|
|
2039
2039
|
json_obj = json.loads(result)
|
|
@@ -2052,7 +2052,7 @@ def doResetRocketMQConsumerOffSet(args, parsed_globals):
|
|
|
2052
2052
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2053
2053
|
|
|
2054
2054
|
|
|
2055
|
-
def
|
|
2055
|
+
def doDeleteCmqTopic(args, parsed_globals):
|
|
2056
2056
|
g_param = parse_global_arg(parsed_globals)
|
|
2057
2057
|
|
|
2058
2058
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -2084,11 +2084,11 @@ def doDescribeSubscriptions(args, parsed_globals):
|
|
|
2084
2084
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2085
2085
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
2086
2086
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2087
|
-
model = models.
|
|
2087
|
+
model = models.DeleteCmqTopicRequest()
|
|
2088
2088
|
model.from_json_string(json.dumps(args))
|
|
2089
2089
|
start_time = time.time()
|
|
2090
2090
|
while True:
|
|
2091
|
-
rsp = client.
|
|
2091
|
+
rsp = client.DeleteCmqTopic(model)
|
|
2092
2092
|
result = rsp.to_json_string()
|
|
2093
2093
|
try:
|
|
2094
2094
|
json_obj = json.loads(result)
|
|
@@ -2107,7 +2107,7 @@ def doDescribeSubscriptions(args, parsed_globals):
|
|
|
2107
2107
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2108
2108
|
|
|
2109
2109
|
|
|
2110
|
-
def
|
|
2110
|
+
def doModifyRocketMQInstance(args, parsed_globals):
|
|
2111
2111
|
g_param = parse_global_arg(parsed_globals)
|
|
2112
2112
|
|
|
2113
2113
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -2139,11 +2139,11 @@ def doDescribeCmqTopicDetail(args, parsed_globals):
|
|
|
2139
2139
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2140
2140
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
2141
2141
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2142
|
-
model = models.
|
|
2142
|
+
model = models.ModifyRocketMQInstanceRequest()
|
|
2143
2143
|
model.from_json_string(json.dumps(args))
|
|
2144
2144
|
start_time = time.time()
|
|
2145
2145
|
while True:
|
|
2146
|
-
rsp = client.
|
|
2146
|
+
rsp = client.ModifyRocketMQInstance(model)
|
|
2147
2147
|
result = rsp.to_json_string()
|
|
2148
2148
|
try:
|
|
2149
2149
|
json_obj = json.loads(result)
|
|
@@ -2162,7 +2162,7 @@ def doDescribeCmqTopicDetail(args, parsed_globals):
|
|
|
2162
2162
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2163
2163
|
|
|
2164
2164
|
|
|
2165
|
-
def
|
|
2165
|
+
def doCreateCmqQueue(args, parsed_globals):
|
|
2166
2166
|
g_param = parse_global_arg(parsed_globals)
|
|
2167
2167
|
|
|
2168
2168
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -2194,11 +2194,11 @@ def doDescribeRocketMQVipInstanceDetail(args, parsed_globals):
|
|
|
2194
2194
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2195
2195
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
2196
2196
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2197
|
-
model = models.
|
|
2197
|
+
model = models.CreateCmqQueueRequest()
|
|
2198
2198
|
model.from_json_string(json.dumps(args))
|
|
2199
2199
|
start_time = time.time()
|
|
2200
2200
|
while True:
|
|
2201
|
-
rsp = client.
|
|
2201
|
+
rsp = client.CreateCmqQueue(model)
|
|
2202
2202
|
result = rsp.to_json_string()
|
|
2203
2203
|
try:
|
|
2204
2204
|
json_obj = json.loads(result)
|
|
@@ -2217,7 +2217,7 @@ def doDescribeRocketMQVipInstanceDetail(args, parsed_globals):
|
|
|
2217
2217
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2218
2218
|
|
|
2219
2219
|
|
|
2220
|
-
def
|
|
2220
|
+
def doModifyRocketMQGroup(args, parsed_globals):
|
|
2221
2221
|
g_param = parse_global_arg(parsed_globals)
|
|
2222
2222
|
|
|
2223
2223
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -2249,11 +2249,11 @@ def doDescribeRabbitMQUser(args, parsed_globals):
|
|
|
2249
2249
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2250
2250
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
2251
2251
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2252
|
-
model = models.
|
|
2252
|
+
model = models.ModifyRocketMQGroupRequest()
|
|
2253
2253
|
model.from_json_string(json.dumps(args))
|
|
2254
2254
|
start_time = time.time()
|
|
2255
2255
|
while True:
|
|
2256
|
-
rsp = client.
|
|
2256
|
+
rsp = client.ModifyRocketMQGroup(model)
|
|
2257
2257
|
result = rsp.to_json_string()
|
|
2258
2258
|
try:
|
|
2259
2259
|
json_obj = json.loads(result)
|
|
@@ -2272,7 +2272,7 @@ def doDescribeRabbitMQUser(args, parsed_globals):
|
|
|
2272
2272
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2273
2273
|
|
|
2274
2274
|
|
|
2275
|
-
def
|
|
2275
|
+
def doDescribeRocketMQTopic(args, parsed_globals):
|
|
2276
2276
|
g_param = parse_global_arg(parsed_globals)
|
|
2277
2277
|
|
|
2278
2278
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -2304,11 +2304,11 @@ def doModifyRocketMQCluster(args, parsed_globals):
|
|
|
2304
2304
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2305
2305
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
2306
2306
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2307
|
-
model = models.
|
|
2307
|
+
model = models.DescribeRocketMQTopicRequest()
|
|
2308
2308
|
model.from_json_string(json.dumps(args))
|
|
2309
2309
|
start_time = time.time()
|
|
2310
2310
|
while True:
|
|
2311
|
-
rsp = client.
|
|
2311
|
+
rsp = client.DescribeRocketMQTopic(model)
|
|
2312
2312
|
result = rsp.to_json_string()
|
|
2313
2313
|
try:
|
|
2314
2314
|
json_obj = json.loads(result)
|
|
@@ -2327,7 +2327,7 @@ def doModifyRocketMQCluster(args, parsed_globals):
|
|
|
2327
2327
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2328
2328
|
|
|
2329
2329
|
|
|
2330
|
-
def
|
|
2330
|
+
def doDescribeCmqSubscriptionDetail(args, parsed_globals):
|
|
2331
2331
|
g_param = parse_global_arg(parsed_globals)
|
|
2332
2332
|
|
|
2333
2333
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -2359,11 +2359,11 @@ def doModifyCluster(args, parsed_globals):
|
|
|
2359
2359
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2360
2360
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
2361
2361
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2362
|
-
model = models.
|
|
2362
|
+
model = models.DescribeCmqSubscriptionDetailRequest()
|
|
2363
2363
|
model.from_json_string(json.dumps(args))
|
|
2364
2364
|
start_time = time.time()
|
|
2365
2365
|
while True:
|
|
2366
|
-
rsp = client.
|
|
2366
|
+
rsp = client.DescribeCmqSubscriptionDetail(model)
|
|
2367
2367
|
result = rsp.to_json_string()
|
|
2368
2368
|
try:
|
|
2369
2369
|
json_obj = json.loads(result)
|
|
@@ -2382,7 +2382,7 @@ def doModifyCluster(args, parsed_globals):
|
|
|
2382
2382
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2383
2383
|
|
|
2384
2384
|
|
|
2385
|
-
def
|
|
2385
|
+
def doDeleteCluster(args, parsed_globals):
|
|
2386
2386
|
g_param = parse_global_arg(parsed_globals)
|
|
2387
2387
|
|
|
2388
2388
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -2414,11 +2414,11 @@ def doDescribePulsarProInstanceDetail(args, parsed_globals):
|
|
|
2414
2414
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2415
2415
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
2416
2416
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2417
|
-
model = models.
|
|
2417
|
+
model = models.DeleteClusterRequest()
|
|
2418
2418
|
model.from_json_string(json.dumps(args))
|
|
2419
2419
|
start_time = time.time()
|
|
2420
2420
|
while True:
|
|
2421
|
-
rsp = client.
|
|
2421
|
+
rsp = client.DeleteCluster(model)
|
|
2422
2422
|
result = rsp.to_json_string()
|
|
2423
2423
|
try:
|
|
2424
2424
|
json_obj = json.loads(result)
|
|
@@ -2437,7 +2437,7 @@ def doDescribePulsarProInstanceDetail(args, parsed_globals):
|
|
|
2437
2437
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2438
2438
|
|
|
2439
2439
|
|
|
2440
|
-
def
|
|
2440
|
+
def doDescribeRabbitMQPermission(args, parsed_globals):
|
|
2441
2441
|
g_param = parse_global_arg(parsed_globals)
|
|
2442
2442
|
|
|
2443
2443
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -2469,11 +2469,11 @@ def doModifyCmqSubscriptionAttribute(args, parsed_globals):
|
|
|
2469
2469
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2470
2470
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
2471
2471
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2472
|
-
model = models.
|
|
2472
|
+
model = models.DescribeRabbitMQPermissionRequest()
|
|
2473
2473
|
model.from_json_string(json.dumps(args))
|
|
2474
2474
|
start_time = time.time()
|
|
2475
2475
|
while True:
|
|
2476
|
-
rsp = client.
|
|
2476
|
+
rsp = client.DescribeRabbitMQPermission(model)
|
|
2477
2477
|
result = rsp.to_json_string()
|
|
2478
2478
|
try:
|
|
2479
2479
|
json_obj = json.loads(result)
|
|
@@ -2492,7 +2492,7 @@ def doModifyCmqSubscriptionAttribute(args, parsed_globals):
|
|
|
2492
2492
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2493
2493
|
|
|
2494
2494
|
|
|
2495
|
-
def
|
|
2495
|
+
def doDeleteRabbitMQPermission(args, parsed_globals):
|
|
2496
2496
|
g_param = parse_global_arg(parsed_globals)
|
|
2497
2497
|
|
|
2498
2498
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -2524,11 +2524,11 @@ def doCreateSubscription(args, parsed_globals):
|
|
|
2524
2524
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2525
2525
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
2526
2526
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2527
|
-
model = models.
|
|
2527
|
+
model = models.DeleteRabbitMQPermissionRequest()
|
|
2528
2528
|
model.from_json_string(json.dumps(args))
|
|
2529
2529
|
start_time = time.time()
|
|
2530
2530
|
while True:
|
|
2531
|
-
rsp = client.
|
|
2531
|
+
rsp = client.DeleteRabbitMQPermission(model)
|
|
2532
2532
|
result = rsp.to_json_string()
|
|
2533
2533
|
try:
|
|
2534
2534
|
json_obj = json.loads(result)
|
|
@@ -2547,7 +2547,7 @@ def doCreateSubscription(args, parsed_globals):
|
|
|
2547
2547
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2548
2548
|
|
|
2549
2549
|
|
|
2550
|
-
def
|
|
2550
|
+
def doCreateRocketMQEnvironmentRole(args, parsed_globals):
|
|
2551
2551
|
g_param = parse_global_arg(parsed_globals)
|
|
2552
2552
|
|
|
2553
2553
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -2579,11 +2579,11 @@ def doDescribeRocketMQCluster(args, parsed_globals):
|
|
|
2579
2579
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2580
2580
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
2581
2581
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2582
|
-
model = models.
|
|
2582
|
+
model = models.CreateRocketMQEnvironmentRoleRequest()
|
|
2583
2583
|
model.from_json_string(json.dumps(args))
|
|
2584
2584
|
start_time = time.time()
|
|
2585
2585
|
while True:
|
|
2586
|
-
rsp = client.
|
|
2586
|
+
rsp = client.CreateRocketMQEnvironmentRole(model)
|
|
2587
2587
|
result = rsp.to_json_string()
|
|
2588
2588
|
try:
|
|
2589
2589
|
json_obj = json.loads(result)
|
|
@@ -2602,7 +2602,7 @@ def doDescribeRocketMQCluster(args, parsed_globals):
|
|
|
2602
2602
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2603
2603
|
|
|
2604
2604
|
|
|
2605
|
-
def
|
|
2605
|
+
def doDescribeRabbitMQVipInstance(args, parsed_globals):
|
|
2606
2606
|
g_param = parse_global_arg(parsed_globals)
|
|
2607
2607
|
|
|
2608
2608
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -2634,11 +2634,11 @@ def doDeleteTopics(args, parsed_globals):
|
|
|
2634
2634
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2635
2635
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
2636
2636
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2637
|
-
model = models.
|
|
2637
|
+
model = models.DescribeRabbitMQVipInstanceRequest()
|
|
2638
2638
|
model.from_json_string(json.dumps(args))
|
|
2639
2639
|
start_time = time.time()
|
|
2640
2640
|
while True:
|
|
2641
|
-
rsp = client.
|
|
2641
|
+
rsp = client.DescribeRabbitMQVipInstance(model)
|
|
2642
2642
|
result = rsp.to_json_string()
|
|
2643
2643
|
try:
|
|
2644
2644
|
json_obj = json.loads(result)
|
|
@@ -2657,7 +2657,7 @@ def doDeleteTopics(args, parsed_globals):
|
|
|
2657
2657
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2658
2658
|
|
|
2659
2659
|
|
|
2660
|
-
def
|
|
2660
|
+
def doCreateEnvironmentRole(args, parsed_globals):
|
|
2661
2661
|
g_param = parse_global_arg(parsed_globals)
|
|
2662
2662
|
|
|
2663
2663
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -2689,11 +2689,11 @@ def doResetMsgSubOffsetByTimestamp(args, parsed_globals):
|
|
|
2689
2689
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2690
2690
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
2691
2691
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2692
|
-
model = models.
|
|
2692
|
+
model = models.CreateEnvironmentRoleRequest()
|
|
2693
2693
|
model.from_json_string(json.dumps(args))
|
|
2694
2694
|
start_time = time.time()
|
|
2695
2695
|
while True:
|
|
2696
|
-
rsp = client.
|
|
2696
|
+
rsp = client.CreateEnvironmentRole(model)
|
|
2697
2697
|
result = rsp.to_json_string()
|
|
2698
2698
|
try:
|
|
2699
2699
|
json_obj = json.loads(result)
|
|
@@ -2712,7 +2712,7 @@ def doResetMsgSubOffsetByTimestamp(args, parsed_globals):
|
|
|
2712
2712
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2713
2713
|
|
|
2714
2714
|
|
|
2715
|
-
def
|
|
2715
|
+
def doDescribeRocketMQPublicAccessMonitorData(args, parsed_globals):
|
|
2716
2716
|
g_param = parse_global_arg(parsed_globals)
|
|
2717
2717
|
|
|
2718
2718
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -2744,11 +2744,11 @@ def doDescribeRabbitMQNodeList(args, parsed_globals):
|
|
|
2744
2744
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2745
2745
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
2746
2746
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2747
|
-
model = models.
|
|
2747
|
+
model = models.DescribeRocketMQPublicAccessMonitorDataRequest()
|
|
2748
2748
|
model.from_json_string(json.dumps(args))
|
|
2749
2749
|
start_time = time.time()
|
|
2750
2750
|
while True:
|
|
2751
|
-
rsp = client.
|
|
2751
|
+
rsp = client.DescribeRocketMQPublicAccessMonitorData(model)
|
|
2752
2752
|
result = rsp.to_json_string()
|
|
2753
2753
|
try:
|
|
2754
2754
|
json_obj = json.loads(result)
|
|
@@ -2767,7 +2767,7 @@ def doDescribeRabbitMQNodeList(args, parsed_globals):
|
|
|
2767
2767
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2768
2768
|
|
|
2769
2769
|
|
|
2770
|
-
def
|
|
2770
|
+
def doResetRocketMQConsumerOffSet(args, parsed_globals):
|
|
2771
2771
|
g_param = parse_global_arg(parsed_globals)
|
|
2772
2772
|
|
|
2773
2773
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -2799,11 +2799,11 @@ def doDescribeBindVpcs(args, parsed_globals):
|
|
|
2799
2799
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2800
2800
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
2801
2801
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2802
|
-
model = models.
|
|
2802
|
+
model = models.ResetRocketMQConsumerOffSetRequest()
|
|
2803
2803
|
model.from_json_string(json.dumps(args))
|
|
2804
2804
|
start_time = time.time()
|
|
2805
2805
|
while True:
|
|
2806
|
-
rsp = client.
|
|
2806
|
+
rsp = client.ResetRocketMQConsumerOffSet(model)
|
|
2807
2807
|
result = rsp.to_json_string()
|
|
2808
2808
|
try:
|
|
2809
2809
|
json_obj = json.loads(result)
|
|
@@ -2822,7 +2822,7 @@ def doDescribeBindVpcs(args, parsed_globals):
|
|
|
2822
2822
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2823
2823
|
|
|
2824
2824
|
|
|
2825
|
-
def
|
|
2825
|
+
def doDescribeSubscriptions(args, parsed_globals):
|
|
2826
2826
|
g_param = parse_global_arg(parsed_globals)
|
|
2827
2827
|
|
|
2828
2828
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -2854,11 +2854,11 @@ def doDeleteRocketMQTopic(args, parsed_globals):
|
|
|
2854
2854
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2855
2855
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
2856
2856
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2857
|
-
model = models.
|
|
2857
|
+
model = models.DescribeSubscriptionsRequest()
|
|
2858
2858
|
model.from_json_string(json.dumps(args))
|
|
2859
2859
|
start_time = time.time()
|
|
2860
2860
|
while True:
|
|
2861
|
-
rsp = client.
|
|
2861
|
+
rsp = client.DescribeSubscriptions(model)
|
|
2862
2862
|
result = rsp.to_json_string()
|
|
2863
2863
|
try:
|
|
2864
2864
|
json_obj = json.loads(result)
|
|
@@ -2877,7 +2877,7 @@ def doDeleteRocketMQTopic(args, parsed_globals):
|
|
|
2877
2877
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2878
2878
|
|
|
2879
2879
|
|
|
2880
|
-
def
|
|
2880
|
+
def doDescribeCmqTopicDetail(args, parsed_globals):
|
|
2881
2881
|
g_param = parse_global_arg(parsed_globals)
|
|
2882
2882
|
|
|
2883
2883
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -2909,11 +2909,11 @@ def doModifyCmqQueueAttribute(args, parsed_globals):
|
|
|
2909
2909
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2910
2910
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
2911
2911
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2912
|
-
model = models.
|
|
2912
|
+
model = models.DescribeCmqTopicDetailRequest()
|
|
2913
2913
|
model.from_json_string(json.dumps(args))
|
|
2914
2914
|
start_time = time.time()
|
|
2915
2915
|
while True:
|
|
2916
|
-
rsp = client.
|
|
2916
|
+
rsp = client.DescribeCmqTopicDetail(model)
|
|
2917
2917
|
result = rsp.to_json_string()
|
|
2918
2918
|
try:
|
|
2919
2919
|
json_obj = json.loads(result)
|
|
@@ -2932,7 +2932,7 @@ def doModifyCmqQueueAttribute(args, parsed_globals):
|
|
|
2932
2932
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2933
2933
|
|
|
2934
2934
|
|
|
2935
|
-
def
|
|
2935
|
+
def doDescribeRocketMQVipInstanceDetail(args, parsed_globals):
|
|
2936
2936
|
g_param = parse_global_arg(parsed_globals)
|
|
2937
2937
|
|
|
2938
2938
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -2964,11 +2964,11 @@ def doModifyRocketMQInstanceSpec(args, parsed_globals):
|
|
|
2964
2964
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2965
2965
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
2966
2966
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2967
|
-
model = models.
|
|
2967
|
+
model = models.DescribeRocketMQVipInstanceDetailRequest()
|
|
2968
2968
|
model.from_json_string(json.dumps(args))
|
|
2969
2969
|
start_time = time.time()
|
|
2970
2970
|
while True:
|
|
2971
|
-
rsp = client.
|
|
2971
|
+
rsp = client.DescribeRocketMQVipInstanceDetail(model)
|
|
2972
2972
|
result = rsp.to_json_string()
|
|
2973
2973
|
try:
|
|
2974
2974
|
json_obj = json.loads(result)
|
|
@@ -2987,7 +2987,7 @@ def doModifyRocketMQInstanceSpec(args, parsed_globals):
|
|
|
2987
2987
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2988
2988
|
|
|
2989
2989
|
|
|
2990
|
-
def
|
|
2990
|
+
def doDescribeRocketMQRoles(args, parsed_globals):
|
|
2991
2991
|
g_param = parse_global_arg(parsed_globals)
|
|
2992
2992
|
|
|
2993
2993
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -3019,11 +3019,11 @@ def doDescribeRocketMQVipInstances(args, parsed_globals):
|
|
|
3019
3019
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3020
3020
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
3021
3021
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3022
|
-
model = models.
|
|
3022
|
+
model = models.DescribeRocketMQRolesRequest()
|
|
3023
3023
|
model.from_json_string(json.dumps(args))
|
|
3024
3024
|
start_time = time.time()
|
|
3025
3025
|
while True:
|
|
3026
|
-
rsp = client.
|
|
3026
|
+
rsp = client.DescribeRocketMQRoles(model)
|
|
3027
3027
|
result = rsp.to_json_string()
|
|
3028
3028
|
try:
|
|
3029
3029
|
json_obj = json.loads(result)
|
|
@@ -3042,7 +3042,7 @@ def doDescribeRocketMQVipInstances(args, parsed_globals):
|
|
|
3042
3042
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3043
3043
|
|
|
3044
3044
|
|
|
3045
|
-
def
|
|
3045
|
+
def doDescribeRabbitMQUser(args, parsed_globals):
|
|
3046
3046
|
g_param = parse_global_arg(parsed_globals)
|
|
3047
3047
|
|
|
3048
3048
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -3074,7 +3074,1382 @@ def doCreateRabbitMQVipInstance(args, parsed_globals):
|
|
|
3074
3074
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3075
3075
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
3076
3076
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3077
|
-
model = models.
|
|
3077
|
+
model = models.DescribeRabbitMQUserRequest()
|
|
3078
|
+
model.from_json_string(json.dumps(args))
|
|
3079
|
+
start_time = time.time()
|
|
3080
|
+
while True:
|
|
3081
|
+
rsp = client.DescribeRabbitMQUser(model)
|
|
3082
|
+
result = rsp.to_json_string()
|
|
3083
|
+
try:
|
|
3084
|
+
json_obj = json.loads(result)
|
|
3085
|
+
except TypeError as e:
|
|
3086
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
3087
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
3088
|
+
break
|
|
3089
|
+
cur_time = time.time()
|
|
3090
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
3091
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
3092
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
3093
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
3094
|
+
else:
|
|
3095
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
3096
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
3097
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3098
|
+
|
|
3099
|
+
|
|
3100
|
+
def doDeleteRoles(args, parsed_globals):
|
|
3101
|
+
g_param = parse_global_arg(parsed_globals)
|
|
3102
|
+
|
|
3103
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
3104
|
+
cred = credential.CVMRoleCredential()
|
|
3105
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
3106
|
+
cred = credential.STSAssumeRoleCredential(
|
|
3107
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3108
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3109
|
+
)
|
|
3110
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
3111
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
3112
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
3113
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
3114
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3115
|
+
else:
|
|
3116
|
+
cred = credential.Credential(
|
|
3117
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
3118
|
+
)
|
|
3119
|
+
http_profile = HttpProfile(
|
|
3120
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
3121
|
+
reqMethod="POST",
|
|
3122
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
3123
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
3124
|
+
)
|
|
3125
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
3126
|
+
if g_param[OptionsDefine.Language]:
|
|
3127
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
3128
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
3129
|
+
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3130
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
3131
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3132
|
+
model = models.DeleteRolesRequest()
|
|
3133
|
+
model.from_json_string(json.dumps(args))
|
|
3134
|
+
start_time = time.time()
|
|
3135
|
+
while True:
|
|
3136
|
+
rsp = client.DeleteRoles(model)
|
|
3137
|
+
result = rsp.to_json_string()
|
|
3138
|
+
try:
|
|
3139
|
+
json_obj = json.loads(result)
|
|
3140
|
+
except TypeError as e:
|
|
3141
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
3142
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
3143
|
+
break
|
|
3144
|
+
cur_time = time.time()
|
|
3145
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
3146
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
3147
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
3148
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
3149
|
+
else:
|
|
3150
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
3151
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
3152
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3153
|
+
|
|
3154
|
+
|
|
3155
|
+
def doModifyRocketMQCluster(args, parsed_globals):
|
|
3156
|
+
g_param = parse_global_arg(parsed_globals)
|
|
3157
|
+
|
|
3158
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
3159
|
+
cred = credential.CVMRoleCredential()
|
|
3160
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
3161
|
+
cred = credential.STSAssumeRoleCredential(
|
|
3162
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3163
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3164
|
+
)
|
|
3165
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
3166
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
3167
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
3168
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
3169
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3170
|
+
else:
|
|
3171
|
+
cred = credential.Credential(
|
|
3172
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
3173
|
+
)
|
|
3174
|
+
http_profile = HttpProfile(
|
|
3175
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
3176
|
+
reqMethod="POST",
|
|
3177
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
3178
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
3179
|
+
)
|
|
3180
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
3181
|
+
if g_param[OptionsDefine.Language]:
|
|
3182
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
3183
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
3184
|
+
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3185
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
3186
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3187
|
+
model = models.ModifyRocketMQClusterRequest()
|
|
3188
|
+
model.from_json_string(json.dumps(args))
|
|
3189
|
+
start_time = time.time()
|
|
3190
|
+
while True:
|
|
3191
|
+
rsp = client.ModifyRocketMQCluster(model)
|
|
3192
|
+
result = rsp.to_json_string()
|
|
3193
|
+
try:
|
|
3194
|
+
json_obj = json.loads(result)
|
|
3195
|
+
except TypeError as e:
|
|
3196
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
3197
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
3198
|
+
break
|
|
3199
|
+
cur_time = time.time()
|
|
3200
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
3201
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
3202
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
3203
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
3204
|
+
else:
|
|
3205
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
3206
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
3207
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3208
|
+
|
|
3209
|
+
|
|
3210
|
+
def doModifyCmqTopicAttribute(args, parsed_globals):
|
|
3211
|
+
g_param = parse_global_arg(parsed_globals)
|
|
3212
|
+
|
|
3213
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
3214
|
+
cred = credential.CVMRoleCredential()
|
|
3215
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
3216
|
+
cred = credential.STSAssumeRoleCredential(
|
|
3217
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3218
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3219
|
+
)
|
|
3220
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
3221
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
3222
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
3223
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
3224
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3225
|
+
else:
|
|
3226
|
+
cred = credential.Credential(
|
|
3227
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
3228
|
+
)
|
|
3229
|
+
http_profile = HttpProfile(
|
|
3230
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
3231
|
+
reqMethod="POST",
|
|
3232
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
3233
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
3234
|
+
)
|
|
3235
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
3236
|
+
if g_param[OptionsDefine.Language]:
|
|
3237
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
3238
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
3239
|
+
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3240
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
3241
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3242
|
+
model = models.ModifyCmqTopicAttributeRequest()
|
|
3243
|
+
model.from_json_string(json.dumps(args))
|
|
3244
|
+
start_time = time.time()
|
|
3245
|
+
while True:
|
|
3246
|
+
rsp = client.ModifyCmqTopicAttribute(model)
|
|
3247
|
+
result = rsp.to_json_string()
|
|
3248
|
+
try:
|
|
3249
|
+
json_obj = json.loads(result)
|
|
3250
|
+
except TypeError as e:
|
|
3251
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
3252
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
3253
|
+
break
|
|
3254
|
+
cur_time = time.time()
|
|
3255
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
3256
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
3257
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
3258
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
3259
|
+
else:
|
|
3260
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
3261
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
3262
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3263
|
+
|
|
3264
|
+
|
|
3265
|
+
def doModifyCluster(args, parsed_globals):
|
|
3266
|
+
g_param = parse_global_arg(parsed_globals)
|
|
3267
|
+
|
|
3268
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
3269
|
+
cred = credential.CVMRoleCredential()
|
|
3270
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
3271
|
+
cred = credential.STSAssumeRoleCredential(
|
|
3272
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3273
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3274
|
+
)
|
|
3275
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
3276
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
3277
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
3278
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
3279
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3280
|
+
else:
|
|
3281
|
+
cred = credential.Credential(
|
|
3282
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
3283
|
+
)
|
|
3284
|
+
http_profile = HttpProfile(
|
|
3285
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
3286
|
+
reqMethod="POST",
|
|
3287
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
3288
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
3289
|
+
)
|
|
3290
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
3291
|
+
if g_param[OptionsDefine.Language]:
|
|
3292
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
3293
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
3294
|
+
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3295
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
3296
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3297
|
+
model = models.ModifyClusterRequest()
|
|
3298
|
+
model.from_json_string(json.dumps(args))
|
|
3299
|
+
start_time = time.time()
|
|
3300
|
+
while True:
|
|
3301
|
+
rsp = client.ModifyCluster(model)
|
|
3302
|
+
result = rsp.to_json_string()
|
|
3303
|
+
try:
|
|
3304
|
+
json_obj = json.loads(result)
|
|
3305
|
+
except TypeError as e:
|
|
3306
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
3307
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
3308
|
+
break
|
|
3309
|
+
cur_time = time.time()
|
|
3310
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
3311
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
3312
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
3313
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
3314
|
+
else:
|
|
3315
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
3316
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
3317
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3318
|
+
|
|
3319
|
+
|
|
3320
|
+
def doDescribePulsarProInstanceDetail(args, parsed_globals):
|
|
3321
|
+
g_param = parse_global_arg(parsed_globals)
|
|
3322
|
+
|
|
3323
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
3324
|
+
cred = credential.CVMRoleCredential()
|
|
3325
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
3326
|
+
cred = credential.STSAssumeRoleCredential(
|
|
3327
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3328
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3329
|
+
)
|
|
3330
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
3331
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
3332
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
3333
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
3334
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3335
|
+
else:
|
|
3336
|
+
cred = credential.Credential(
|
|
3337
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
3338
|
+
)
|
|
3339
|
+
http_profile = HttpProfile(
|
|
3340
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
3341
|
+
reqMethod="POST",
|
|
3342
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
3343
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
3344
|
+
)
|
|
3345
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
3346
|
+
if g_param[OptionsDefine.Language]:
|
|
3347
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
3348
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
3349
|
+
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3350
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
3351
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3352
|
+
model = models.DescribePulsarProInstanceDetailRequest()
|
|
3353
|
+
model.from_json_string(json.dumps(args))
|
|
3354
|
+
start_time = time.time()
|
|
3355
|
+
while True:
|
|
3356
|
+
rsp = client.DescribePulsarProInstanceDetail(model)
|
|
3357
|
+
result = rsp.to_json_string()
|
|
3358
|
+
try:
|
|
3359
|
+
json_obj = json.loads(result)
|
|
3360
|
+
except TypeError as e:
|
|
3361
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
3362
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
3363
|
+
break
|
|
3364
|
+
cur_time = time.time()
|
|
3365
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
3366
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
3367
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
3368
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
3369
|
+
else:
|
|
3370
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
3371
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
3372
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3373
|
+
|
|
3374
|
+
|
|
3375
|
+
def doModifyCmqSubscriptionAttribute(args, parsed_globals):
|
|
3376
|
+
g_param = parse_global_arg(parsed_globals)
|
|
3377
|
+
|
|
3378
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
3379
|
+
cred = credential.CVMRoleCredential()
|
|
3380
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
3381
|
+
cred = credential.STSAssumeRoleCredential(
|
|
3382
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3383
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3384
|
+
)
|
|
3385
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
3386
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
3387
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
3388
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
3389
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3390
|
+
else:
|
|
3391
|
+
cred = credential.Credential(
|
|
3392
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
3393
|
+
)
|
|
3394
|
+
http_profile = HttpProfile(
|
|
3395
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
3396
|
+
reqMethod="POST",
|
|
3397
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
3398
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
3399
|
+
)
|
|
3400
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
3401
|
+
if g_param[OptionsDefine.Language]:
|
|
3402
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
3403
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
3404
|
+
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3405
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
3406
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3407
|
+
model = models.ModifyCmqSubscriptionAttributeRequest()
|
|
3408
|
+
model.from_json_string(json.dumps(args))
|
|
3409
|
+
start_time = time.time()
|
|
3410
|
+
while True:
|
|
3411
|
+
rsp = client.ModifyCmqSubscriptionAttribute(model)
|
|
3412
|
+
result = rsp.to_json_string()
|
|
3413
|
+
try:
|
|
3414
|
+
json_obj = json.loads(result)
|
|
3415
|
+
except TypeError as e:
|
|
3416
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
3417
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
3418
|
+
break
|
|
3419
|
+
cur_time = time.time()
|
|
3420
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
3421
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
3422
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
3423
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
3424
|
+
else:
|
|
3425
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
3426
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
3427
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3428
|
+
|
|
3429
|
+
|
|
3430
|
+
def doCreateSubscription(args, parsed_globals):
|
|
3431
|
+
g_param = parse_global_arg(parsed_globals)
|
|
3432
|
+
|
|
3433
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
3434
|
+
cred = credential.CVMRoleCredential()
|
|
3435
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
3436
|
+
cred = credential.STSAssumeRoleCredential(
|
|
3437
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3438
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3439
|
+
)
|
|
3440
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
3441
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
3442
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
3443
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
3444
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3445
|
+
else:
|
|
3446
|
+
cred = credential.Credential(
|
|
3447
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
3448
|
+
)
|
|
3449
|
+
http_profile = HttpProfile(
|
|
3450
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
3451
|
+
reqMethod="POST",
|
|
3452
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
3453
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
3454
|
+
)
|
|
3455
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
3456
|
+
if g_param[OptionsDefine.Language]:
|
|
3457
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
3458
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
3459
|
+
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3460
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
3461
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3462
|
+
model = models.CreateSubscriptionRequest()
|
|
3463
|
+
model.from_json_string(json.dumps(args))
|
|
3464
|
+
start_time = time.time()
|
|
3465
|
+
while True:
|
|
3466
|
+
rsp = client.CreateSubscription(model)
|
|
3467
|
+
result = rsp.to_json_string()
|
|
3468
|
+
try:
|
|
3469
|
+
json_obj = json.loads(result)
|
|
3470
|
+
except TypeError as e:
|
|
3471
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
3472
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
3473
|
+
break
|
|
3474
|
+
cur_time = time.time()
|
|
3475
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
3476
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
3477
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
3478
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
3479
|
+
else:
|
|
3480
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
3481
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
3482
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3483
|
+
|
|
3484
|
+
|
|
3485
|
+
def doDescribeRocketMQCluster(args, parsed_globals):
|
|
3486
|
+
g_param = parse_global_arg(parsed_globals)
|
|
3487
|
+
|
|
3488
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
3489
|
+
cred = credential.CVMRoleCredential()
|
|
3490
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
3491
|
+
cred = credential.STSAssumeRoleCredential(
|
|
3492
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3493
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3494
|
+
)
|
|
3495
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
3496
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
3497
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
3498
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
3499
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3500
|
+
else:
|
|
3501
|
+
cred = credential.Credential(
|
|
3502
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
3503
|
+
)
|
|
3504
|
+
http_profile = HttpProfile(
|
|
3505
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
3506
|
+
reqMethod="POST",
|
|
3507
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
3508
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
3509
|
+
)
|
|
3510
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
3511
|
+
if g_param[OptionsDefine.Language]:
|
|
3512
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
3513
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
3514
|
+
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3515
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
3516
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3517
|
+
model = models.DescribeRocketMQClusterRequest()
|
|
3518
|
+
model.from_json_string(json.dumps(args))
|
|
3519
|
+
start_time = time.time()
|
|
3520
|
+
while True:
|
|
3521
|
+
rsp = client.DescribeRocketMQCluster(model)
|
|
3522
|
+
result = rsp.to_json_string()
|
|
3523
|
+
try:
|
|
3524
|
+
json_obj = json.loads(result)
|
|
3525
|
+
except TypeError as e:
|
|
3526
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
3527
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
3528
|
+
break
|
|
3529
|
+
cur_time = time.time()
|
|
3530
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
3531
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
3532
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
3533
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
3534
|
+
else:
|
|
3535
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
3536
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
3537
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3538
|
+
|
|
3539
|
+
|
|
3540
|
+
def doDeleteTopics(args, parsed_globals):
|
|
3541
|
+
g_param = parse_global_arg(parsed_globals)
|
|
3542
|
+
|
|
3543
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
3544
|
+
cred = credential.CVMRoleCredential()
|
|
3545
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
3546
|
+
cred = credential.STSAssumeRoleCredential(
|
|
3547
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3548
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3549
|
+
)
|
|
3550
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
3551
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
3552
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
3553
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
3554
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3555
|
+
else:
|
|
3556
|
+
cred = credential.Credential(
|
|
3557
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
3558
|
+
)
|
|
3559
|
+
http_profile = HttpProfile(
|
|
3560
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
3561
|
+
reqMethod="POST",
|
|
3562
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
3563
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
3564
|
+
)
|
|
3565
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
3566
|
+
if g_param[OptionsDefine.Language]:
|
|
3567
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
3568
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
3569
|
+
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3570
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
3571
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3572
|
+
model = models.DeleteTopicsRequest()
|
|
3573
|
+
model.from_json_string(json.dumps(args))
|
|
3574
|
+
start_time = time.time()
|
|
3575
|
+
while True:
|
|
3576
|
+
rsp = client.DeleteTopics(model)
|
|
3577
|
+
result = rsp.to_json_string()
|
|
3578
|
+
try:
|
|
3579
|
+
json_obj = json.loads(result)
|
|
3580
|
+
except TypeError as e:
|
|
3581
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
3582
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
3583
|
+
break
|
|
3584
|
+
cur_time = time.time()
|
|
3585
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
3586
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
3587
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
3588
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
3589
|
+
else:
|
|
3590
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
3591
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
3592
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3593
|
+
|
|
3594
|
+
|
|
3595
|
+
def doResetMsgSubOffsetByTimestamp(args, parsed_globals):
|
|
3596
|
+
g_param = parse_global_arg(parsed_globals)
|
|
3597
|
+
|
|
3598
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
3599
|
+
cred = credential.CVMRoleCredential()
|
|
3600
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
3601
|
+
cred = credential.STSAssumeRoleCredential(
|
|
3602
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3603
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3604
|
+
)
|
|
3605
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
3606
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
3607
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
3608
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
3609
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3610
|
+
else:
|
|
3611
|
+
cred = credential.Credential(
|
|
3612
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
3613
|
+
)
|
|
3614
|
+
http_profile = HttpProfile(
|
|
3615
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
3616
|
+
reqMethod="POST",
|
|
3617
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
3618
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
3619
|
+
)
|
|
3620
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
3621
|
+
if g_param[OptionsDefine.Language]:
|
|
3622
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
3623
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
3624
|
+
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3625
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
3626
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3627
|
+
model = models.ResetMsgSubOffsetByTimestampRequest()
|
|
3628
|
+
model.from_json_string(json.dumps(args))
|
|
3629
|
+
start_time = time.time()
|
|
3630
|
+
while True:
|
|
3631
|
+
rsp = client.ResetMsgSubOffsetByTimestamp(model)
|
|
3632
|
+
result = rsp.to_json_string()
|
|
3633
|
+
try:
|
|
3634
|
+
json_obj = json.loads(result)
|
|
3635
|
+
except TypeError as e:
|
|
3636
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
3637
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
3638
|
+
break
|
|
3639
|
+
cur_time = time.time()
|
|
3640
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
3641
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
3642
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
3643
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
3644
|
+
else:
|
|
3645
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
3646
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
3647
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3648
|
+
|
|
3649
|
+
|
|
3650
|
+
def doCreateRabbitMQBinding(args, parsed_globals):
|
|
3651
|
+
g_param = parse_global_arg(parsed_globals)
|
|
3652
|
+
|
|
3653
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
3654
|
+
cred = credential.CVMRoleCredential()
|
|
3655
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
3656
|
+
cred = credential.STSAssumeRoleCredential(
|
|
3657
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3658
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3659
|
+
)
|
|
3660
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
3661
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
3662
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
3663
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
3664
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3665
|
+
else:
|
|
3666
|
+
cred = credential.Credential(
|
|
3667
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
3668
|
+
)
|
|
3669
|
+
http_profile = HttpProfile(
|
|
3670
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
3671
|
+
reqMethod="POST",
|
|
3672
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
3673
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
3674
|
+
)
|
|
3675
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
3676
|
+
if g_param[OptionsDefine.Language]:
|
|
3677
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
3678
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
3679
|
+
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3680
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
3681
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3682
|
+
model = models.CreateRabbitMQBindingRequest()
|
|
3683
|
+
model.from_json_string(json.dumps(args))
|
|
3684
|
+
start_time = time.time()
|
|
3685
|
+
while True:
|
|
3686
|
+
rsp = client.CreateRabbitMQBinding(model)
|
|
3687
|
+
result = rsp.to_json_string()
|
|
3688
|
+
try:
|
|
3689
|
+
json_obj = json.loads(result)
|
|
3690
|
+
except TypeError as e:
|
|
3691
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
3692
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
3693
|
+
break
|
|
3694
|
+
cur_time = time.time()
|
|
3695
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
3696
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
3697
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
3698
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
3699
|
+
else:
|
|
3700
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
3701
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
3702
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3703
|
+
|
|
3704
|
+
|
|
3705
|
+
def doDescribeMsgTrace(args, parsed_globals):
|
|
3706
|
+
g_param = parse_global_arg(parsed_globals)
|
|
3707
|
+
|
|
3708
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
3709
|
+
cred = credential.CVMRoleCredential()
|
|
3710
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
3711
|
+
cred = credential.STSAssumeRoleCredential(
|
|
3712
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3713
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3714
|
+
)
|
|
3715
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
3716
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
3717
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
3718
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
3719
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3720
|
+
else:
|
|
3721
|
+
cred = credential.Credential(
|
|
3722
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
3723
|
+
)
|
|
3724
|
+
http_profile = HttpProfile(
|
|
3725
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
3726
|
+
reqMethod="POST",
|
|
3727
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
3728
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
3729
|
+
)
|
|
3730
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
3731
|
+
if g_param[OptionsDefine.Language]:
|
|
3732
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
3733
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
3734
|
+
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3735
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
3736
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3737
|
+
model = models.DescribeMsgTraceRequest()
|
|
3738
|
+
model.from_json_string(json.dumps(args))
|
|
3739
|
+
start_time = time.time()
|
|
3740
|
+
while True:
|
|
3741
|
+
rsp = client.DescribeMsgTrace(model)
|
|
3742
|
+
result = rsp.to_json_string()
|
|
3743
|
+
try:
|
|
3744
|
+
json_obj = json.loads(result)
|
|
3745
|
+
except TypeError as e:
|
|
3746
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
3747
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
3748
|
+
break
|
|
3749
|
+
cur_time = time.time()
|
|
3750
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
3751
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
3752
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
3753
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
3754
|
+
else:
|
|
3755
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
3756
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
3757
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3758
|
+
|
|
3759
|
+
|
|
3760
|
+
def doModifyRocketMQRole(args, parsed_globals):
|
|
3761
|
+
g_param = parse_global_arg(parsed_globals)
|
|
3762
|
+
|
|
3763
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
3764
|
+
cred = credential.CVMRoleCredential()
|
|
3765
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
3766
|
+
cred = credential.STSAssumeRoleCredential(
|
|
3767
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3768
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3769
|
+
)
|
|
3770
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
3771
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
3772
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
3773
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
3774
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3775
|
+
else:
|
|
3776
|
+
cred = credential.Credential(
|
|
3777
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
3778
|
+
)
|
|
3779
|
+
http_profile = HttpProfile(
|
|
3780
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
3781
|
+
reqMethod="POST",
|
|
3782
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
3783
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
3784
|
+
)
|
|
3785
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
3786
|
+
if g_param[OptionsDefine.Language]:
|
|
3787
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
3788
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
3789
|
+
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3790
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
3791
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3792
|
+
model = models.ModifyRocketMQRoleRequest()
|
|
3793
|
+
model.from_json_string(json.dumps(args))
|
|
3794
|
+
start_time = time.time()
|
|
3795
|
+
while True:
|
|
3796
|
+
rsp = client.ModifyRocketMQRole(model)
|
|
3797
|
+
result = rsp.to_json_string()
|
|
3798
|
+
try:
|
|
3799
|
+
json_obj = json.loads(result)
|
|
3800
|
+
except TypeError as e:
|
|
3801
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
3802
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
3803
|
+
break
|
|
3804
|
+
cur_time = time.time()
|
|
3805
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
3806
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
3807
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
3808
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
3809
|
+
else:
|
|
3810
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
3811
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
3812
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3813
|
+
|
|
3814
|
+
|
|
3815
|
+
def doDescribeRabbitMQNodeList(args, parsed_globals):
|
|
3816
|
+
g_param = parse_global_arg(parsed_globals)
|
|
3817
|
+
|
|
3818
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
3819
|
+
cred = credential.CVMRoleCredential()
|
|
3820
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
3821
|
+
cred = credential.STSAssumeRoleCredential(
|
|
3822
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3823
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3824
|
+
)
|
|
3825
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
3826
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
3827
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
3828
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
3829
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3830
|
+
else:
|
|
3831
|
+
cred = credential.Credential(
|
|
3832
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
3833
|
+
)
|
|
3834
|
+
http_profile = HttpProfile(
|
|
3835
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
3836
|
+
reqMethod="POST",
|
|
3837
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
3838
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
3839
|
+
)
|
|
3840
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
3841
|
+
if g_param[OptionsDefine.Language]:
|
|
3842
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
3843
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
3844
|
+
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3845
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
3846
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3847
|
+
model = models.DescribeRabbitMQNodeListRequest()
|
|
3848
|
+
model.from_json_string(json.dumps(args))
|
|
3849
|
+
start_time = time.time()
|
|
3850
|
+
while True:
|
|
3851
|
+
rsp = client.DescribeRabbitMQNodeList(model)
|
|
3852
|
+
result = rsp.to_json_string()
|
|
3853
|
+
try:
|
|
3854
|
+
json_obj = json.loads(result)
|
|
3855
|
+
except TypeError as e:
|
|
3856
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
3857
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
3858
|
+
break
|
|
3859
|
+
cur_time = time.time()
|
|
3860
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
3861
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
3862
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
3863
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
3864
|
+
else:
|
|
3865
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
3866
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
3867
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3868
|
+
|
|
3869
|
+
|
|
3870
|
+
def doDescribeBindVpcs(args, parsed_globals):
|
|
3871
|
+
g_param = parse_global_arg(parsed_globals)
|
|
3872
|
+
|
|
3873
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
3874
|
+
cred = credential.CVMRoleCredential()
|
|
3875
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
3876
|
+
cred = credential.STSAssumeRoleCredential(
|
|
3877
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3878
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3879
|
+
)
|
|
3880
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
3881
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
3882
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
3883
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
3884
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3885
|
+
else:
|
|
3886
|
+
cred = credential.Credential(
|
|
3887
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
3888
|
+
)
|
|
3889
|
+
http_profile = HttpProfile(
|
|
3890
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
3891
|
+
reqMethod="POST",
|
|
3892
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
3893
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
3894
|
+
)
|
|
3895
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
3896
|
+
if g_param[OptionsDefine.Language]:
|
|
3897
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
3898
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
3899
|
+
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3900
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
3901
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3902
|
+
model = models.DescribeBindVpcsRequest()
|
|
3903
|
+
model.from_json_string(json.dumps(args))
|
|
3904
|
+
start_time = time.time()
|
|
3905
|
+
while True:
|
|
3906
|
+
rsp = client.DescribeBindVpcs(model)
|
|
3907
|
+
result = rsp.to_json_string()
|
|
3908
|
+
try:
|
|
3909
|
+
json_obj = json.loads(result)
|
|
3910
|
+
except TypeError as e:
|
|
3911
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
3912
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
3913
|
+
break
|
|
3914
|
+
cur_time = time.time()
|
|
3915
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
3916
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
3917
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
3918
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
3919
|
+
else:
|
|
3920
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
3921
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
3922
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3923
|
+
|
|
3924
|
+
|
|
3925
|
+
def doDeleteRocketMQTopic(args, parsed_globals):
|
|
3926
|
+
g_param = parse_global_arg(parsed_globals)
|
|
3927
|
+
|
|
3928
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
3929
|
+
cred = credential.CVMRoleCredential()
|
|
3930
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
3931
|
+
cred = credential.STSAssumeRoleCredential(
|
|
3932
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3933
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3934
|
+
)
|
|
3935
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
3936
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
3937
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
3938
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
3939
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3940
|
+
else:
|
|
3941
|
+
cred = credential.Credential(
|
|
3942
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
3943
|
+
)
|
|
3944
|
+
http_profile = HttpProfile(
|
|
3945
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
3946
|
+
reqMethod="POST",
|
|
3947
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
3948
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
3949
|
+
)
|
|
3950
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
3951
|
+
if g_param[OptionsDefine.Language]:
|
|
3952
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
3953
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
3954
|
+
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3955
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
3956
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3957
|
+
model = models.DeleteRocketMQTopicRequest()
|
|
3958
|
+
model.from_json_string(json.dumps(args))
|
|
3959
|
+
start_time = time.time()
|
|
3960
|
+
while True:
|
|
3961
|
+
rsp = client.DeleteRocketMQTopic(model)
|
|
3962
|
+
result = rsp.to_json_string()
|
|
3963
|
+
try:
|
|
3964
|
+
json_obj = json.loads(result)
|
|
3965
|
+
except TypeError as e:
|
|
3966
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
3967
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
3968
|
+
break
|
|
3969
|
+
cur_time = time.time()
|
|
3970
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
3971
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
3972
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
3973
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
3974
|
+
else:
|
|
3975
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
3976
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
3977
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3978
|
+
|
|
3979
|
+
|
|
3980
|
+
def doRetryRocketMQDlqMessage(args, parsed_globals):
|
|
3981
|
+
g_param = parse_global_arg(parsed_globals)
|
|
3982
|
+
|
|
3983
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
3984
|
+
cred = credential.CVMRoleCredential()
|
|
3985
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
3986
|
+
cred = credential.STSAssumeRoleCredential(
|
|
3987
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3988
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3989
|
+
)
|
|
3990
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
3991
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
3992
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
3993
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
3994
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3995
|
+
else:
|
|
3996
|
+
cred = credential.Credential(
|
|
3997
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
3998
|
+
)
|
|
3999
|
+
http_profile = HttpProfile(
|
|
4000
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
4001
|
+
reqMethod="POST",
|
|
4002
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
4003
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
4004
|
+
)
|
|
4005
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
4006
|
+
if g_param[OptionsDefine.Language]:
|
|
4007
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
4008
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
4009
|
+
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
4010
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
4011
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
4012
|
+
model = models.RetryRocketMQDlqMessageRequest()
|
|
4013
|
+
model.from_json_string(json.dumps(args))
|
|
4014
|
+
start_time = time.time()
|
|
4015
|
+
while True:
|
|
4016
|
+
rsp = client.RetryRocketMQDlqMessage(model)
|
|
4017
|
+
result = rsp.to_json_string()
|
|
4018
|
+
try:
|
|
4019
|
+
json_obj = json.loads(result)
|
|
4020
|
+
except TypeError as e:
|
|
4021
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
4022
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
4023
|
+
break
|
|
4024
|
+
cur_time = time.time()
|
|
4025
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
4026
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
4027
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
4028
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
4029
|
+
else:
|
|
4030
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
4031
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
4032
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
4033
|
+
|
|
4034
|
+
|
|
4035
|
+
def doExportRocketMQMessageDetail(args, parsed_globals):
|
|
4036
|
+
g_param = parse_global_arg(parsed_globals)
|
|
4037
|
+
|
|
4038
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
4039
|
+
cred = credential.CVMRoleCredential()
|
|
4040
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
4041
|
+
cred = credential.STSAssumeRoleCredential(
|
|
4042
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
4043
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
4044
|
+
)
|
|
4045
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
4046
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
4047
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
4048
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
4049
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
4050
|
+
else:
|
|
4051
|
+
cred = credential.Credential(
|
|
4052
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
4053
|
+
)
|
|
4054
|
+
http_profile = HttpProfile(
|
|
4055
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
4056
|
+
reqMethod="POST",
|
|
4057
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
4058
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
4059
|
+
)
|
|
4060
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
4061
|
+
if g_param[OptionsDefine.Language]:
|
|
4062
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
4063
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
4064
|
+
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
4065
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
4066
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
4067
|
+
model = models.ExportRocketMQMessageDetailRequest()
|
|
4068
|
+
model.from_json_string(json.dumps(args))
|
|
4069
|
+
start_time = time.time()
|
|
4070
|
+
while True:
|
|
4071
|
+
rsp = client.ExportRocketMQMessageDetail(model)
|
|
4072
|
+
result = rsp.to_json_string()
|
|
4073
|
+
try:
|
|
4074
|
+
json_obj = json.loads(result)
|
|
4075
|
+
except TypeError as e:
|
|
4076
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
4077
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
4078
|
+
break
|
|
4079
|
+
cur_time = time.time()
|
|
4080
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
4081
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
4082
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
4083
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
4084
|
+
else:
|
|
4085
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
4086
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
4087
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
4088
|
+
|
|
4089
|
+
|
|
4090
|
+
def doDescribeRabbitMQQueues(args, parsed_globals):
|
|
4091
|
+
g_param = parse_global_arg(parsed_globals)
|
|
4092
|
+
|
|
4093
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
4094
|
+
cred = credential.CVMRoleCredential()
|
|
4095
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
4096
|
+
cred = credential.STSAssumeRoleCredential(
|
|
4097
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
4098
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
4099
|
+
)
|
|
4100
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
4101
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
4102
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
4103
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
4104
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
4105
|
+
else:
|
|
4106
|
+
cred = credential.Credential(
|
|
4107
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
4108
|
+
)
|
|
4109
|
+
http_profile = HttpProfile(
|
|
4110
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
4111
|
+
reqMethod="POST",
|
|
4112
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
4113
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
4114
|
+
)
|
|
4115
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
4116
|
+
if g_param[OptionsDefine.Language]:
|
|
4117
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
4118
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
4119
|
+
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
4120
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
4121
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
4122
|
+
model = models.DescribeRabbitMQQueuesRequest()
|
|
4123
|
+
model.from_json_string(json.dumps(args))
|
|
4124
|
+
start_time = time.time()
|
|
4125
|
+
while True:
|
|
4126
|
+
rsp = client.DescribeRabbitMQQueues(model)
|
|
4127
|
+
result = rsp.to_json_string()
|
|
4128
|
+
try:
|
|
4129
|
+
json_obj = json.loads(result)
|
|
4130
|
+
except TypeError as e:
|
|
4131
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
4132
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
4133
|
+
break
|
|
4134
|
+
cur_time = time.time()
|
|
4135
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
4136
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
4137
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
4138
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
4139
|
+
else:
|
|
4140
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
4141
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
4142
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
4143
|
+
|
|
4144
|
+
|
|
4145
|
+
def doModifyCmqQueueAttribute(args, parsed_globals):
|
|
4146
|
+
g_param = parse_global_arg(parsed_globals)
|
|
4147
|
+
|
|
4148
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
4149
|
+
cred = credential.CVMRoleCredential()
|
|
4150
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
4151
|
+
cred = credential.STSAssumeRoleCredential(
|
|
4152
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
4153
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
4154
|
+
)
|
|
4155
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
4156
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
4157
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
4158
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
4159
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
4160
|
+
else:
|
|
4161
|
+
cred = credential.Credential(
|
|
4162
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
4163
|
+
)
|
|
4164
|
+
http_profile = HttpProfile(
|
|
4165
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
4166
|
+
reqMethod="POST",
|
|
4167
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
4168
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
4169
|
+
)
|
|
4170
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
4171
|
+
if g_param[OptionsDefine.Language]:
|
|
4172
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
4173
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
4174
|
+
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
4175
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
4176
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
4177
|
+
model = models.ModifyCmqQueueAttributeRequest()
|
|
4178
|
+
model.from_json_string(json.dumps(args))
|
|
4179
|
+
start_time = time.time()
|
|
4180
|
+
while True:
|
|
4181
|
+
rsp = client.ModifyCmqQueueAttribute(model)
|
|
4182
|
+
result = rsp.to_json_string()
|
|
4183
|
+
try:
|
|
4184
|
+
json_obj = json.loads(result)
|
|
4185
|
+
except TypeError as e:
|
|
4186
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
4187
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
4188
|
+
break
|
|
4189
|
+
cur_time = time.time()
|
|
4190
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
4191
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
4192
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
4193
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
4194
|
+
else:
|
|
4195
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
4196
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
4197
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
4198
|
+
|
|
4199
|
+
|
|
4200
|
+
def doModifyRocketMQInstanceSpec(args, parsed_globals):
|
|
4201
|
+
g_param = parse_global_arg(parsed_globals)
|
|
4202
|
+
|
|
4203
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
4204
|
+
cred = credential.CVMRoleCredential()
|
|
4205
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
4206
|
+
cred = credential.STSAssumeRoleCredential(
|
|
4207
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
4208
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
4209
|
+
)
|
|
4210
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
4211
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
4212
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
4213
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
4214
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
4215
|
+
else:
|
|
4216
|
+
cred = credential.Credential(
|
|
4217
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
4218
|
+
)
|
|
4219
|
+
http_profile = HttpProfile(
|
|
4220
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
4221
|
+
reqMethod="POST",
|
|
4222
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
4223
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
4224
|
+
)
|
|
4225
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
4226
|
+
if g_param[OptionsDefine.Language]:
|
|
4227
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
4228
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
4229
|
+
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
4230
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
4231
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
4232
|
+
model = models.ModifyRocketMQInstanceSpecRequest()
|
|
4233
|
+
model.from_json_string(json.dumps(args))
|
|
4234
|
+
start_time = time.time()
|
|
4235
|
+
while True:
|
|
4236
|
+
rsp = client.ModifyRocketMQInstanceSpec(model)
|
|
4237
|
+
result = rsp.to_json_string()
|
|
4238
|
+
try:
|
|
4239
|
+
json_obj = json.loads(result)
|
|
4240
|
+
except TypeError as e:
|
|
4241
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
4242
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
4243
|
+
break
|
|
4244
|
+
cur_time = time.time()
|
|
4245
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
4246
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
4247
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
4248
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
4249
|
+
else:
|
|
4250
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
4251
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
4252
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
4253
|
+
|
|
4254
|
+
|
|
4255
|
+
def doDescribeRocketMQVipInstances(args, parsed_globals):
|
|
4256
|
+
g_param = parse_global_arg(parsed_globals)
|
|
4257
|
+
|
|
4258
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
4259
|
+
cred = credential.CVMRoleCredential()
|
|
4260
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
4261
|
+
cred = credential.STSAssumeRoleCredential(
|
|
4262
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
4263
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
4264
|
+
)
|
|
4265
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
4266
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
4267
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
4268
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
4269
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
4270
|
+
else:
|
|
4271
|
+
cred = credential.Credential(
|
|
4272
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
4273
|
+
)
|
|
4274
|
+
http_profile = HttpProfile(
|
|
4275
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
4276
|
+
reqMethod="POST",
|
|
4277
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
4278
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
4279
|
+
)
|
|
4280
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
4281
|
+
if g_param[OptionsDefine.Language]:
|
|
4282
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
4283
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
4284
|
+
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
4285
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
4286
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
4287
|
+
model = models.DescribeRocketMQVipInstancesRequest()
|
|
4288
|
+
model.from_json_string(json.dumps(args))
|
|
4289
|
+
start_time = time.time()
|
|
4290
|
+
while True:
|
|
4291
|
+
rsp = client.DescribeRocketMQVipInstances(model)
|
|
4292
|
+
result = rsp.to_json_string()
|
|
4293
|
+
try:
|
|
4294
|
+
json_obj = json.loads(result)
|
|
4295
|
+
except TypeError as e:
|
|
4296
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
4297
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
4298
|
+
break
|
|
4299
|
+
cur_time = time.time()
|
|
4300
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
4301
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
4302
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
4303
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
4304
|
+
else:
|
|
4305
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
4306
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
4307
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
4308
|
+
|
|
4309
|
+
|
|
4310
|
+
def doDescribeRocketMQTopUsages(args, parsed_globals):
|
|
4311
|
+
g_param = parse_global_arg(parsed_globals)
|
|
4312
|
+
|
|
4313
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
4314
|
+
cred = credential.CVMRoleCredential()
|
|
4315
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
4316
|
+
cred = credential.STSAssumeRoleCredential(
|
|
4317
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
4318
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
4319
|
+
)
|
|
4320
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
4321
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
4322
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
4323
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
4324
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
4325
|
+
else:
|
|
4326
|
+
cred = credential.Credential(
|
|
4327
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
4328
|
+
)
|
|
4329
|
+
http_profile = HttpProfile(
|
|
4330
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
4331
|
+
reqMethod="POST",
|
|
4332
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
4333
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
4334
|
+
)
|
|
4335
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
4336
|
+
if g_param[OptionsDefine.Language]:
|
|
4337
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
4338
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
4339
|
+
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
4340
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
4341
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
4342
|
+
model = models.DescribeRocketMQTopUsagesRequest()
|
|
4343
|
+
model.from_json_string(json.dumps(args))
|
|
4344
|
+
start_time = time.time()
|
|
4345
|
+
while True:
|
|
4346
|
+
rsp = client.DescribeRocketMQTopUsages(model)
|
|
4347
|
+
result = rsp.to_json_string()
|
|
4348
|
+
try:
|
|
4349
|
+
json_obj = json.loads(result)
|
|
4350
|
+
except TypeError as e:
|
|
4351
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
4352
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
4353
|
+
break
|
|
4354
|
+
cur_time = time.time()
|
|
4355
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
4356
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
4357
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
4358
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
4359
|
+
else:
|
|
4360
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
4361
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
4362
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
4363
|
+
|
|
4364
|
+
|
|
4365
|
+
def doCreateRabbitMQUser(args, parsed_globals):
|
|
4366
|
+
g_param = parse_global_arg(parsed_globals)
|
|
4367
|
+
|
|
4368
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
4369
|
+
cred = credential.CVMRoleCredential()
|
|
4370
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
4371
|
+
cred = credential.STSAssumeRoleCredential(
|
|
4372
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
4373
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
4374
|
+
)
|
|
4375
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
4376
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
4377
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
4378
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
4379
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
4380
|
+
else:
|
|
4381
|
+
cred = credential.Credential(
|
|
4382
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
4383
|
+
)
|
|
4384
|
+
http_profile = HttpProfile(
|
|
4385
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
4386
|
+
reqMethod="POST",
|
|
4387
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
4388
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
4389
|
+
)
|
|
4390
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
4391
|
+
if g_param[OptionsDefine.Language]:
|
|
4392
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
4393
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
4394
|
+
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
4395
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
4396
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
4397
|
+
model = models.CreateRabbitMQUserRequest()
|
|
4398
|
+
model.from_json_string(json.dumps(args))
|
|
4399
|
+
start_time = time.time()
|
|
4400
|
+
while True:
|
|
4401
|
+
rsp = client.CreateRabbitMQUser(model)
|
|
4402
|
+
result = rsp.to_json_string()
|
|
4403
|
+
try:
|
|
4404
|
+
json_obj = json.loads(result)
|
|
4405
|
+
except TypeError as e:
|
|
4406
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
4407
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
4408
|
+
break
|
|
4409
|
+
cur_time = time.time()
|
|
4410
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
4411
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
4412
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
4413
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
4414
|
+
else:
|
|
4415
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
4416
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
4417
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
4418
|
+
|
|
4419
|
+
|
|
4420
|
+
def doCreateRabbitMQVipInstance(args, parsed_globals):
|
|
4421
|
+
g_param = parse_global_arg(parsed_globals)
|
|
4422
|
+
|
|
4423
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
4424
|
+
cred = credential.CVMRoleCredential()
|
|
4425
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
4426
|
+
cred = credential.STSAssumeRoleCredential(
|
|
4427
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
4428
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
4429
|
+
)
|
|
4430
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
4431
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
4432
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
4433
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
4434
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
4435
|
+
else:
|
|
4436
|
+
cred = credential.Credential(
|
|
4437
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
4438
|
+
)
|
|
4439
|
+
http_profile = HttpProfile(
|
|
4440
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
4441
|
+
reqMethod="POST",
|
|
4442
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
4443
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
4444
|
+
)
|
|
4445
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
4446
|
+
if g_param[OptionsDefine.Language]:
|
|
4447
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
4448
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
4449
|
+
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
4450
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
4451
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
4452
|
+
model = models.CreateRabbitMQVipInstanceRequest()
|
|
3078
4453
|
model.from_json_string(json.dumps(args))
|
|
3079
4454
|
start_time = time.time()
|
|
3080
4455
|
while True:
|
|
@@ -3097,7 +4472,722 @@ def doCreateRabbitMQVipInstance(args, parsed_globals):
|
|
|
3097
4472
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3098
4473
|
|
|
3099
4474
|
|
|
3100
|
-
def
|
|
4475
|
+
def doDescribeMqMsgTrace(args, parsed_globals):
|
|
4476
|
+
g_param = parse_global_arg(parsed_globals)
|
|
4477
|
+
|
|
4478
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
4479
|
+
cred = credential.CVMRoleCredential()
|
|
4480
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
4481
|
+
cred = credential.STSAssumeRoleCredential(
|
|
4482
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
4483
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
4484
|
+
)
|
|
4485
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
4486
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
4487
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
4488
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
4489
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
4490
|
+
else:
|
|
4491
|
+
cred = credential.Credential(
|
|
4492
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
4493
|
+
)
|
|
4494
|
+
http_profile = HttpProfile(
|
|
4495
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
4496
|
+
reqMethod="POST",
|
|
4497
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
4498
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
4499
|
+
)
|
|
4500
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
4501
|
+
if g_param[OptionsDefine.Language]:
|
|
4502
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
4503
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
4504
|
+
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
4505
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
4506
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
4507
|
+
model = models.DescribeMqMsgTraceRequest()
|
|
4508
|
+
model.from_json_string(json.dumps(args))
|
|
4509
|
+
start_time = time.time()
|
|
4510
|
+
while True:
|
|
4511
|
+
rsp = client.DescribeMqMsgTrace(model)
|
|
4512
|
+
result = rsp.to_json_string()
|
|
4513
|
+
try:
|
|
4514
|
+
json_obj = json.loads(result)
|
|
4515
|
+
except TypeError as e:
|
|
4516
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
4517
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
4518
|
+
break
|
|
4519
|
+
cur_time = time.time()
|
|
4520
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
4521
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
4522
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
4523
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
4524
|
+
else:
|
|
4525
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
4526
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
4527
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
4528
|
+
|
|
4529
|
+
|
|
4530
|
+
def doSetRocketMQPublicAccessPoint(args, parsed_globals):
|
|
4531
|
+
g_param = parse_global_arg(parsed_globals)
|
|
4532
|
+
|
|
4533
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
4534
|
+
cred = credential.CVMRoleCredential()
|
|
4535
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
4536
|
+
cred = credential.STSAssumeRoleCredential(
|
|
4537
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
4538
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
4539
|
+
)
|
|
4540
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
4541
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
4542
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
4543
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
4544
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
4545
|
+
else:
|
|
4546
|
+
cred = credential.Credential(
|
|
4547
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
4548
|
+
)
|
|
4549
|
+
http_profile = HttpProfile(
|
|
4550
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
4551
|
+
reqMethod="POST",
|
|
4552
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
4553
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
4554
|
+
)
|
|
4555
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
4556
|
+
if g_param[OptionsDefine.Language]:
|
|
4557
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
4558
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
4559
|
+
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
4560
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
4561
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
4562
|
+
model = models.SetRocketMQPublicAccessPointRequest()
|
|
4563
|
+
model.from_json_string(json.dumps(args))
|
|
4564
|
+
start_time = time.time()
|
|
4565
|
+
while True:
|
|
4566
|
+
rsp = client.SetRocketMQPublicAccessPoint(model)
|
|
4567
|
+
result = rsp.to_json_string()
|
|
4568
|
+
try:
|
|
4569
|
+
json_obj = json.loads(result)
|
|
4570
|
+
except TypeError as e:
|
|
4571
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
4572
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
4573
|
+
break
|
|
4574
|
+
cur_time = time.time()
|
|
4575
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
4576
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
4577
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
4578
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
4579
|
+
else:
|
|
4580
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
4581
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
4582
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
4583
|
+
|
|
4584
|
+
|
|
4585
|
+
def doCreateRocketMQTopic(args, parsed_globals):
|
|
4586
|
+
g_param = parse_global_arg(parsed_globals)
|
|
4587
|
+
|
|
4588
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
4589
|
+
cred = credential.CVMRoleCredential()
|
|
4590
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
4591
|
+
cred = credential.STSAssumeRoleCredential(
|
|
4592
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
4593
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
4594
|
+
)
|
|
4595
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
4596
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
4597
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
4598
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
4599
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
4600
|
+
else:
|
|
4601
|
+
cred = credential.Credential(
|
|
4602
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
4603
|
+
)
|
|
4604
|
+
http_profile = HttpProfile(
|
|
4605
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
4606
|
+
reqMethod="POST",
|
|
4607
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
4608
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
4609
|
+
)
|
|
4610
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
4611
|
+
if g_param[OptionsDefine.Language]:
|
|
4612
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
4613
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
4614
|
+
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
4615
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
4616
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
4617
|
+
model = models.CreateRocketMQTopicRequest()
|
|
4618
|
+
model.from_json_string(json.dumps(args))
|
|
4619
|
+
start_time = time.time()
|
|
4620
|
+
while True:
|
|
4621
|
+
rsp = client.CreateRocketMQTopic(model)
|
|
4622
|
+
result = rsp.to_json_string()
|
|
4623
|
+
try:
|
|
4624
|
+
json_obj = json.loads(result)
|
|
4625
|
+
except TypeError as e:
|
|
4626
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
4627
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
4628
|
+
break
|
|
4629
|
+
cur_time = time.time()
|
|
4630
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
4631
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
4632
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
4633
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
4634
|
+
else:
|
|
4635
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
4636
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
4637
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
4638
|
+
|
|
4639
|
+
|
|
4640
|
+
def doDescribeRocketMQEnvironmentRoles(args, parsed_globals):
|
|
4641
|
+
g_param = parse_global_arg(parsed_globals)
|
|
4642
|
+
|
|
4643
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
4644
|
+
cred = credential.CVMRoleCredential()
|
|
4645
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
4646
|
+
cred = credential.STSAssumeRoleCredential(
|
|
4647
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
4648
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
4649
|
+
)
|
|
4650
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
4651
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
4652
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
4653
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
4654
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
4655
|
+
else:
|
|
4656
|
+
cred = credential.Credential(
|
|
4657
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
4658
|
+
)
|
|
4659
|
+
http_profile = HttpProfile(
|
|
4660
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
4661
|
+
reqMethod="POST",
|
|
4662
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
4663
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
4664
|
+
)
|
|
4665
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
4666
|
+
if g_param[OptionsDefine.Language]:
|
|
4667
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
4668
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
4669
|
+
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
4670
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
4671
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
4672
|
+
model = models.DescribeRocketMQEnvironmentRolesRequest()
|
|
4673
|
+
model.from_json_string(json.dumps(args))
|
|
4674
|
+
start_time = time.time()
|
|
4675
|
+
while True:
|
|
4676
|
+
rsp = client.DescribeRocketMQEnvironmentRoles(model)
|
|
4677
|
+
result = rsp.to_json_string()
|
|
4678
|
+
try:
|
|
4679
|
+
json_obj = json.loads(result)
|
|
4680
|
+
except TypeError as e:
|
|
4681
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
4682
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
4683
|
+
break
|
|
4684
|
+
cur_time = time.time()
|
|
4685
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
4686
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
4687
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
4688
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
4689
|
+
else:
|
|
4690
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
4691
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
4692
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
4693
|
+
|
|
4694
|
+
|
|
4695
|
+
def doDeleteRocketMQCluster(args, parsed_globals):
|
|
4696
|
+
g_param = parse_global_arg(parsed_globals)
|
|
4697
|
+
|
|
4698
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
4699
|
+
cred = credential.CVMRoleCredential()
|
|
4700
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
4701
|
+
cred = credential.STSAssumeRoleCredential(
|
|
4702
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
4703
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
4704
|
+
)
|
|
4705
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
4706
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
4707
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
4708
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
4709
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
4710
|
+
else:
|
|
4711
|
+
cred = credential.Credential(
|
|
4712
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
4713
|
+
)
|
|
4714
|
+
http_profile = HttpProfile(
|
|
4715
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
4716
|
+
reqMethod="POST",
|
|
4717
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
4718
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
4719
|
+
)
|
|
4720
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
4721
|
+
if g_param[OptionsDefine.Language]:
|
|
4722
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
4723
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
4724
|
+
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
4725
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
4726
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
4727
|
+
model = models.DeleteRocketMQClusterRequest()
|
|
4728
|
+
model.from_json_string(json.dumps(args))
|
|
4729
|
+
start_time = time.time()
|
|
4730
|
+
while True:
|
|
4731
|
+
rsp = client.DeleteRocketMQCluster(model)
|
|
4732
|
+
result = rsp.to_json_string()
|
|
4733
|
+
try:
|
|
4734
|
+
json_obj = json.loads(result)
|
|
4735
|
+
except TypeError as e:
|
|
4736
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
4737
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
4738
|
+
break
|
|
4739
|
+
cur_time = time.time()
|
|
4740
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
4741
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
4742
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
4743
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
4744
|
+
else:
|
|
4745
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
4746
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
4747
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
4748
|
+
|
|
4749
|
+
|
|
4750
|
+
def doDeleteRabbitMQUser(args, parsed_globals):
|
|
4751
|
+
g_param = parse_global_arg(parsed_globals)
|
|
4752
|
+
|
|
4753
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
4754
|
+
cred = credential.CVMRoleCredential()
|
|
4755
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
4756
|
+
cred = credential.STSAssumeRoleCredential(
|
|
4757
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
4758
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
4759
|
+
)
|
|
4760
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
4761
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
4762
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
4763
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
4764
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
4765
|
+
else:
|
|
4766
|
+
cred = credential.Credential(
|
|
4767
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
4768
|
+
)
|
|
4769
|
+
http_profile = HttpProfile(
|
|
4770
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
4771
|
+
reqMethod="POST",
|
|
4772
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
4773
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
4774
|
+
)
|
|
4775
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
4776
|
+
if g_param[OptionsDefine.Language]:
|
|
4777
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
4778
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
4779
|
+
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
4780
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
4781
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
4782
|
+
model = models.DeleteRabbitMQUserRequest()
|
|
4783
|
+
model.from_json_string(json.dumps(args))
|
|
4784
|
+
start_time = time.time()
|
|
4785
|
+
while True:
|
|
4786
|
+
rsp = client.DeleteRabbitMQUser(model)
|
|
4787
|
+
result = rsp.to_json_string()
|
|
4788
|
+
try:
|
|
4789
|
+
json_obj = json.loads(result)
|
|
4790
|
+
except TypeError as e:
|
|
4791
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
4792
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
4793
|
+
break
|
|
4794
|
+
cur_time = time.time()
|
|
4795
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
4796
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
4797
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
4798
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
4799
|
+
else:
|
|
4800
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
4801
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
4802
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
4803
|
+
|
|
4804
|
+
|
|
4805
|
+
def doCreateProCluster(args, parsed_globals):
|
|
4806
|
+
g_param = parse_global_arg(parsed_globals)
|
|
4807
|
+
|
|
4808
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
4809
|
+
cred = credential.CVMRoleCredential()
|
|
4810
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
4811
|
+
cred = credential.STSAssumeRoleCredential(
|
|
4812
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
4813
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
4814
|
+
)
|
|
4815
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
4816
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
4817
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
4818
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
4819
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
4820
|
+
else:
|
|
4821
|
+
cred = credential.Credential(
|
|
4822
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
4823
|
+
)
|
|
4824
|
+
http_profile = HttpProfile(
|
|
4825
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
4826
|
+
reqMethod="POST",
|
|
4827
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
4828
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
4829
|
+
)
|
|
4830
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
4831
|
+
if g_param[OptionsDefine.Language]:
|
|
4832
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
4833
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
4834
|
+
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
4835
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
4836
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
4837
|
+
model = models.CreateProClusterRequest()
|
|
4838
|
+
model.from_json_string(json.dumps(args))
|
|
4839
|
+
start_time = time.time()
|
|
4840
|
+
while True:
|
|
4841
|
+
rsp = client.CreateProCluster(model)
|
|
4842
|
+
result = rsp.to_json_string()
|
|
4843
|
+
try:
|
|
4844
|
+
json_obj = json.loads(result)
|
|
4845
|
+
except TypeError as e:
|
|
4846
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
4847
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
4848
|
+
break
|
|
4849
|
+
cur_time = time.time()
|
|
4850
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
4851
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
4852
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
4853
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
4854
|
+
else:
|
|
4855
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
4856
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
4857
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
4858
|
+
|
|
4859
|
+
|
|
4860
|
+
def doDescribeRabbitMQVirtualHost(args, parsed_globals):
|
|
4861
|
+
g_param = parse_global_arg(parsed_globals)
|
|
4862
|
+
|
|
4863
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
4864
|
+
cred = credential.CVMRoleCredential()
|
|
4865
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
4866
|
+
cred = credential.STSAssumeRoleCredential(
|
|
4867
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
4868
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
4869
|
+
)
|
|
4870
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
4871
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
4872
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
4873
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
4874
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
4875
|
+
else:
|
|
4876
|
+
cred = credential.Credential(
|
|
4877
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
4878
|
+
)
|
|
4879
|
+
http_profile = HttpProfile(
|
|
4880
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
4881
|
+
reqMethod="POST",
|
|
4882
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
4883
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
4884
|
+
)
|
|
4885
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
4886
|
+
if g_param[OptionsDefine.Language]:
|
|
4887
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
4888
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
4889
|
+
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
4890
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
4891
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
4892
|
+
model = models.DescribeRabbitMQVirtualHostRequest()
|
|
4893
|
+
model.from_json_string(json.dumps(args))
|
|
4894
|
+
start_time = time.time()
|
|
4895
|
+
while True:
|
|
4896
|
+
rsp = client.DescribeRabbitMQVirtualHost(model)
|
|
4897
|
+
result = rsp.to_json_string()
|
|
4898
|
+
try:
|
|
4899
|
+
json_obj = json.loads(result)
|
|
4900
|
+
except TypeError as e:
|
|
4901
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
4902
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
4903
|
+
break
|
|
4904
|
+
cur_time = time.time()
|
|
4905
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
4906
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
4907
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
4908
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
4909
|
+
else:
|
|
4910
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
4911
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
4912
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
4913
|
+
|
|
4914
|
+
|
|
4915
|
+
def doReceiveMessage(args, parsed_globals):
|
|
4916
|
+
g_param = parse_global_arg(parsed_globals)
|
|
4917
|
+
|
|
4918
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
4919
|
+
cred = credential.CVMRoleCredential()
|
|
4920
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
4921
|
+
cred = credential.STSAssumeRoleCredential(
|
|
4922
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
4923
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
4924
|
+
)
|
|
4925
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
4926
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
4927
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
4928
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
4929
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
4930
|
+
else:
|
|
4931
|
+
cred = credential.Credential(
|
|
4932
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
4933
|
+
)
|
|
4934
|
+
http_profile = HttpProfile(
|
|
4935
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
4936
|
+
reqMethod="POST",
|
|
4937
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
4938
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
4939
|
+
)
|
|
4940
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
4941
|
+
if g_param[OptionsDefine.Language]:
|
|
4942
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
4943
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
4944
|
+
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
4945
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
4946
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
4947
|
+
model = models.ReceiveMessageRequest()
|
|
4948
|
+
model.from_json_string(json.dumps(args))
|
|
4949
|
+
start_time = time.time()
|
|
4950
|
+
while True:
|
|
4951
|
+
rsp = client.ReceiveMessage(model)
|
|
4952
|
+
result = rsp.to_json_string()
|
|
4953
|
+
try:
|
|
4954
|
+
json_obj = json.loads(result)
|
|
4955
|
+
except TypeError as e:
|
|
4956
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
4957
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
4958
|
+
break
|
|
4959
|
+
cur_time = time.time()
|
|
4960
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
4961
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
4962
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
4963
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
4964
|
+
else:
|
|
4965
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
4966
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
4967
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
4968
|
+
|
|
4969
|
+
|
|
4970
|
+
def doDeleteRabbitMQVirtualHost(args, parsed_globals):
|
|
4971
|
+
g_param = parse_global_arg(parsed_globals)
|
|
4972
|
+
|
|
4973
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
4974
|
+
cred = credential.CVMRoleCredential()
|
|
4975
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
4976
|
+
cred = credential.STSAssumeRoleCredential(
|
|
4977
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
4978
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
4979
|
+
)
|
|
4980
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
4981
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
4982
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
4983
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
4984
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
4985
|
+
else:
|
|
4986
|
+
cred = credential.Credential(
|
|
4987
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
4988
|
+
)
|
|
4989
|
+
http_profile = HttpProfile(
|
|
4990
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
4991
|
+
reqMethod="POST",
|
|
4992
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
4993
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
4994
|
+
)
|
|
4995
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
4996
|
+
if g_param[OptionsDefine.Language]:
|
|
4997
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
4998
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
4999
|
+
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
5000
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
5001
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
5002
|
+
model = models.DeleteRabbitMQVirtualHostRequest()
|
|
5003
|
+
model.from_json_string(json.dumps(args))
|
|
5004
|
+
start_time = time.time()
|
|
5005
|
+
while True:
|
|
5006
|
+
rsp = client.DeleteRabbitMQVirtualHost(model)
|
|
5007
|
+
result = rsp.to_json_string()
|
|
5008
|
+
try:
|
|
5009
|
+
json_obj = json.loads(result)
|
|
5010
|
+
except TypeError as e:
|
|
5011
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
5012
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
5013
|
+
break
|
|
5014
|
+
cur_time = time.time()
|
|
5015
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
5016
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
5017
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
5018
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
5019
|
+
else:
|
|
5020
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
5021
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
5022
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
5023
|
+
|
|
5024
|
+
|
|
5025
|
+
def doSendCmqMsg(args, parsed_globals):
|
|
5026
|
+
g_param = parse_global_arg(parsed_globals)
|
|
5027
|
+
|
|
5028
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
5029
|
+
cred = credential.CVMRoleCredential()
|
|
5030
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
5031
|
+
cred = credential.STSAssumeRoleCredential(
|
|
5032
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
5033
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
5034
|
+
)
|
|
5035
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
5036
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
5037
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
5038
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
5039
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
5040
|
+
else:
|
|
5041
|
+
cred = credential.Credential(
|
|
5042
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
5043
|
+
)
|
|
5044
|
+
http_profile = HttpProfile(
|
|
5045
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
5046
|
+
reqMethod="POST",
|
|
5047
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
5048
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
5049
|
+
)
|
|
5050
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
5051
|
+
if g_param[OptionsDefine.Language]:
|
|
5052
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
5053
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
5054
|
+
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
5055
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
5056
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
5057
|
+
model = models.SendCmqMsgRequest()
|
|
5058
|
+
model.from_json_string(json.dumps(args))
|
|
5059
|
+
start_time = time.time()
|
|
5060
|
+
while True:
|
|
5061
|
+
rsp = client.SendCmqMsg(model)
|
|
5062
|
+
result = rsp.to_json_string()
|
|
5063
|
+
try:
|
|
5064
|
+
json_obj = json.loads(result)
|
|
5065
|
+
except TypeError as e:
|
|
5066
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
5067
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
5068
|
+
break
|
|
5069
|
+
cur_time = time.time()
|
|
5070
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
5071
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
5072
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
5073
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
5074
|
+
else:
|
|
5075
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
5076
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
5077
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
5078
|
+
|
|
5079
|
+
|
|
5080
|
+
def doModifyEnvironmentAttributes(args, parsed_globals):
|
|
5081
|
+
g_param = parse_global_arg(parsed_globals)
|
|
5082
|
+
|
|
5083
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
5084
|
+
cred = credential.CVMRoleCredential()
|
|
5085
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
5086
|
+
cred = credential.STSAssumeRoleCredential(
|
|
5087
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
5088
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
5089
|
+
)
|
|
5090
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
5091
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
5092
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
5093
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
5094
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
5095
|
+
else:
|
|
5096
|
+
cred = credential.Credential(
|
|
5097
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
5098
|
+
)
|
|
5099
|
+
http_profile = HttpProfile(
|
|
5100
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
5101
|
+
reqMethod="POST",
|
|
5102
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
5103
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
5104
|
+
)
|
|
5105
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
5106
|
+
if g_param[OptionsDefine.Language]:
|
|
5107
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
5108
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
5109
|
+
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
5110
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
5111
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
5112
|
+
model = models.ModifyEnvironmentAttributesRequest()
|
|
5113
|
+
model.from_json_string(json.dumps(args))
|
|
5114
|
+
start_time = time.time()
|
|
5115
|
+
while True:
|
|
5116
|
+
rsp = client.ModifyEnvironmentAttributes(model)
|
|
5117
|
+
result = rsp.to_json_string()
|
|
5118
|
+
try:
|
|
5119
|
+
json_obj = json.loads(result)
|
|
5120
|
+
except TypeError as e:
|
|
5121
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
5122
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
5123
|
+
break
|
|
5124
|
+
cur_time = time.time()
|
|
5125
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
5126
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
5127
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
5128
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
5129
|
+
else:
|
|
5130
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
5131
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
5132
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
5133
|
+
|
|
5134
|
+
|
|
5135
|
+
def doDescribeRoles(args, parsed_globals):
|
|
5136
|
+
g_param = parse_global_arg(parsed_globals)
|
|
5137
|
+
|
|
5138
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
5139
|
+
cred = credential.CVMRoleCredential()
|
|
5140
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
5141
|
+
cred = credential.STSAssumeRoleCredential(
|
|
5142
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
5143
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
5144
|
+
)
|
|
5145
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
5146
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
5147
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
5148
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
5149
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
5150
|
+
else:
|
|
5151
|
+
cred = credential.Credential(
|
|
5152
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
5153
|
+
)
|
|
5154
|
+
http_profile = HttpProfile(
|
|
5155
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
5156
|
+
reqMethod="POST",
|
|
5157
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
5158
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
5159
|
+
)
|
|
5160
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
5161
|
+
if g_param[OptionsDefine.Language]:
|
|
5162
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
5163
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
5164
|
+
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
5165
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
5166
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
5167
|
+
model = models.DescribeRolesRequest()
|
|
5168
|
+
model.from_json_string(json.dumps(args))
|
|
5169
|
+
start_time = time.time()
|
|
5170
|
+
while True:
|
|
5171
|
+
rsp = client.DescribeRoles(model)
|
|
5172
|
+
result = rsp.to_json_string()
|
|
5173
|
+
try:
|
|
5174
|
+
json_obj = json.loads(result)
|
|
5175
|
+
except TypeError as e:
|
|
5176
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
5177
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
5178
|
+
break
|
|
5179
|
+
cur_time = time.time()
|
|
5180
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
5181
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
5182
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
5183
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
5184
|
+
else:
|
|
5185
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
5186
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
5187
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
5188
|
+
|
|
5189
|
+
|
|
5190
|
+
def doUnbindCmqDeadLetter(args, parsed_globals):
|
|
3101
5191
|
g_param = parse_global_arg(parsed_globals)
|
|
3102
5192
|
|
|
3103
5193
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -3129,11 +5219,11 @@ def doDescribeRocketMQGroups(args, parsed_globals):
|
|
|
3129
5219
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3130
5220
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
3131
5221
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3132
|
-
model = models.
|
|
5222
|
+
model = models.UnbindCmqDeadLetterRequest()
|
|
3133
5223
|
model.from_json_string(json.dumps(args))
|
|
3134
5224
|
start_time = time.time()
|
|
3135
5225
|
while True:
|
|
3136
|
-
rsp = client.
|
|
5226
|
+
rsp = client.UnbindCmqDeadLetter(model)
|
|
3137
5227
|
result = rsp.to_json_string()
|
|
3138
5228
|
try:
|
|
3139
5229
|
json_obj = json.loads(result)
|
|
@@ -3152,7 +5242,7 @@ def doDescribeRocketMQGroups(args, parsed_globals):
|
|
|
3152
5242
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3153
5243
|
|
|
3154
5244
|
|
|
3155
|
-
def
|
|
5245
|
+
def doModifyRabbitMQUser(args, parsed_globals):
|
|
3156
5246
|
g_param = parse_global_arg(parsed_globals)
|
|
3157
5247
|
|
|
3158
5248
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -3184,11 +5274,11 @@ def doCreateRocketMQTopic(args, parsed_globals):
|
|
|
3184
5274
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3185
5275
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
3186
5276
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3187
|
-
model = models.
|
|
5277
|
+
model = models.ModifyRabbitMQUserRequest()
|
|
3188
5278
|
model.from_json_string(json.dumps(args))
|
|
3189
5279
|
start_time = time.time()
|
|
3190
5280
|
while True:
|
|
3191
|
-
rsp = client.
|
|
5281
|
+
rsp = client.ModifyRabbitMQUser(model)
|
|
3192
5282
|
result = rsp.to_json_string()
|
|
3193
5283
|
try:
|
|
3194
5284
|
json_obj = json.loads(result)
|
|
@@ -3207,7 +5297,7 @@ def doCreateRocketMQTopic(args, parsed_globals):
|
|
|
3207
5297
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3208
5298
|
|
|
3209
5299
|
|
|
3210
|
-
def
|
|
5300
|
+
def doCreateRocketMQNamespace(args, parsed_globals):
|
|
3211
5301
|
g_param = parse_global_arg(parsed_globals)
|
|
3212
5302
|
|
|
3213
5303
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -3239,11 +5329,11 @@ def doDeleteRocketMQCluster(args, parsed_globals):
|
|
|
3239
5329
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3240
5330
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
3241
5331
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3242
|
-
model = models.
|
|
5332
|
+
model = models.CreateRocketMQNamespaceRequest()
|
|
3243
5333
|
model.from_json_string(json.dumps(args))
|
|
3244
5334
|
start_time = time.time()
|
|
3245
5335
|
while True:
|
|
3246
|
-
rsp = client.
|
|
5336
|
+
rsp = client.CreateRocketMQNamespace(model)
|
|
3247
5337
|
result = rsp.to_json_string()
|
|
3248
5338
|
try:
|
|
3249
5339
|
json_obj = json.loads(result)
|
|
@@ -3262,7 +5352,7 @@ def doDeleteRocketMQCluster(args, parsed_globals):
|
|
|
3262
5352
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3263
5353
|
|
|
3264
5354
|
|
|
3265
|
-
def
|
|
5355
|
+
def doDescribeMsg(args, parsed_globals):
|
|
3266
5356
|
g_param = parse_global_arg(parsed_globals)
|
|
3267
5357
|
|
|
3268
5358
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -3294,11 +5384,11 @@ def doDeleteRabbitMQUser(args, parsed_globals):
|
|
|
3294
5384
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3295
5385
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
3296
5386
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3297
|
-
model = models.
|
|
5387
|
+
model = models.DescribeMsgRequest()
|
|
3298
5388
|
model.from_json_string(json.dumps(args))
|
|
3299
5389
|
start_time = time.time()
|
|
3300
5390
|
while True:
|
|
3301
|
-
rsp = client.
|
|
5391
|
+
rsp = client.DescribeMsg(model)
|
|
3302
5392
|
result = rsp.to_json_string()
|
|
3303
5393
|
try:
|
|
3304
5394
|
json_obj = json.loads(result)
|
|
@@ -3317,7 +5407,7 @@ def doDeleteRabbitMQUser(args, parsed_globals):
|
|
|
3317
5407
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3318
5408
|
|
|
3319
5409
|
|
|
3320
|
-
def
|
|
5410
|
+
def doSendBatchMessages(args, parsed_globals):
|
|
3321
5411
|
g_param = parse_global_arg(parsed_globals)
|
|
3322
5412
|
|
|
3323
5413
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -3349,11 +5439,11 @@ def doDeleteRoles(args, parsed_globals):
|
|
|
3349
5439
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3350
5440
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
3351
5441
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3352
|
-
model = models.
|
|
5442
|
+
model = models.SendBatchMessagesRequest()
|
|
3353
5443
|
model.from_json_string(json.dumps(args))
|
|
3354
5444
|
start_time = time.time()
|
|
3355
5445
|
while True:
|
|
3356
|
-
rsp = client.
|
|
5446
|
+
rsp = client.SendBatchMessages(model)
|
|
3357
5447
|
result = rsp.to_json_string()
|
|
3358
5448
|
try:
|
|
3359
5449
|
json_obj = json.loads(result)
|
|
@@ -3372,7 +5462,7 @@ def doDeleteRoles(args, parsed_globals):
|
|
|
3372
5462
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3373
5463
|
|
|
3374
5464
|
|
|
3375
|
-
def
|
|
5465
|
+
def doDescribeRocketMQTopicsByGroup(args, parsed_globals):
|
|
3376
5466
|
g_param = parse_global_arg(parsed_globals)
|
|
3377
5467
|
|
|
3378
5468
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -3404,11 +5494,11 @@ def doReceiveMessage(args, parsed_globals):
|
|
|
3404
5494
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3405
5495
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
3406
5496
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3407
|
-
model = models.
|
|
5497
|
+
model = models.DescribeRocketMQTopicsByGroupRequest()
|
|
3408
5498
|
model.from_json_string(json.dumps(args))
|
|
3409
5499
|
start_time = time.time()
|
|
3410
5500
|
while True:
|
|
3411
|
-
rsp = client.
|
|
5501
|
+
rsp = client.DescribeRocketMQTopicsByGroup(model)
|
|
3412
5502
|
result = rsp.to_json_string()
|
|
3413
5503
|
try:
|
|
3414
5504
|
json_obj = json.loads(result)
|
|
@@ -3427,7 +5517,7 @@ def doReceiveMessage(args, parsed_globals):
|
|
|
3427
5517
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3428
5518
|
|
|
3429
5519
|
|
|
3430
|
-
def
|
|
5520
|
+
def doDescribeRocketMQTopics(args, parsed_globals):
|
|
3431
5521
|
g_param = parse_global_arg(parsed_globals)
|
|
3432
5522
|
|
|
3433
5523
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -3459,11 +5549,11 @@ def doDeleteRabbitMQVirtualHost(args, parsed_globals):
|
|
|
3459
5549
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3460
5550
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
3461
5551
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3462
|
-
model = models.
|
|
5552
|
+
model = models.DescribeRocketMQTopicsRequest()
|
|
3463
5553
|
model.from_json_string(json.dumps(args))
|
|
3464
5554
|
start_time = time.time()
|
|
3465
5555
|
while True:
|
|
3466
|
-
rsp = client.
|
|
5556
|
+
rsp = client.DescribeRocketMQTopics(model)
|
|
3467
5557
|
result = rsp.to_json_string()
|
|
3468
5558
|
try:
|
|
3469
5559
|
json_obj = json.loads(result)
|
|
@@ -3482,7 +5572,7 @@ def doDeleteRabbitMQVirtualHost(args, parsed_globals):
|
|
|
3482
5572
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3483
5573
|
|
|
3484
5574
|
|
|
3485
|
-
def
|
|
5575
|
+
def doDescribeRocketMQClusters(args, parsed_globals):
|
|
3486
5576
|
g_param = parse_global_arg(parsed_globals)
|
|
3487
5577
|
|
|
3488
5578
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -3514,11 +5604,11 @@ def doSendCmqMsg(args, parsed_globals):
|
|
|
3514
5604
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3515
5605
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
3516
5606
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3517
|
-
model = models.
|
|
5607
|
+
model = models.DescribeRocketMQClustersRequest()
|
|
3518
5608
|
model.from_json_string(json.dumps(args))
|
|
3519
5609
|
start_time = time.time()
|
|
3520
5610
|
while True:
|
|
3521
|
-
rsp = client.
|
|
5611
|
+
rsp = client.DescribeRocketMQClusters(model)
|
|
3522
5612
|
result = rsp.to_json_string()
|
|
3523
5613
|
try:
|
|
3524
5614
|
json_obj = json.loads(result)
|
|
@@ -3537,7 +5627,7 @@ def doSendCmqMsg(args, parsed_globals):
|
|
|
3537
5627
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3538
5628
|
|
|
3539
5629
|
|
|
3540
|
-
def
|
|
5630
|
+
def doSendMessages(args, parsed_globals):
|
|
3541
5631
|
g_param = parse_global_arg(parsed_globals)
|
|
3542
5632
|
|
|
3543
5633
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -3569,11 +5659,11 @@ def doModifyEnvironmentAttributes(args, parsed_globals):
|
|
|
3569
5659
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3570
5660
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
3571
5661
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3572
|
-
model = models.
|
|
5662
|
+
model = models.SendMessagesRequest()
|
|
3573
5663
|
model.from_json_string(json.dumps(args))
|
|
3574
5664
|
start_time = time.time()
|
|
3575
5665
|
while True:
|
|
3576
|
-
rsp = client.
|
|
5666
|
+
rsp = client.SendMessages(model)
|
|
3577
5667
|
result = rsp.to_json_string()
|
|
3578
5668
|
try:
|
|
3579
5669
|
json_obj = json.loads(result)
|
|
@@ -3592,7 +5682,7 @@ def doModifyEnvironmentAttributes(args, parsed_globals):
|
|
|
3592
5682
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3593
5683
|
|
|
3594
5684
|
|
|
3595
|
-
def
|
|
5685
|
+
def doModifyTopic(args, parsed_globals):
|
|
3596
5686
|
g_param = parse_global_arg(parsed_globals)
|
|
3597
5687
|
|
|
3598
5688
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -3624,11 +5714,11 @@ def doDescribeRoles(args, parsed_globals):
|
|
|
3624
5714
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3625
5715
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
3626
5716
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3627
|
-
model = models.
|
|
5717
|
+
model = models.ModifyTopicRequest()
|
|
3628
5718
|
model.from_json_string(json.dumps(args))
|
|
3629
5719
|
start_time = time.time()
|
|
3630
5720
|
while True:
|
|
3631
|
-
rsp = client.
|
|
5721
|
+
rsp = client.ModifyTopic(model)
|
|
3632
5722
|
result = rsp.to_json_string()
|
|
3633
5723
|
try:
|
|
3634
5724
|
json_obj = json.loads(result)
|
|
@@ -3647,7 +5737,7 @@ def doDescribeRoles(args, parsed_globals):
|
|
|
3647
5737
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3648
5738
|
|
|
3649
5739
|
|
|
3650
|
-
def
|
|
5740
|
+
def doDescribeRabbitMQBindings(args, parsed_globals):
|
|
3651
5741
|
g_param = parse_global_arg(parsed_globals)
|
|
3652
5742
|
|
|
3653
5743
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -3679,11 +5769,11 @@ def doUnbindCmqDeadLetter(args, parsed_globals):
|
|
|
3679
5769
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3680
5770
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
3681
5771
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3682
|
-
model = models.
|
|
5772
|
+
model = models.DescribeRabbitMQBindingsRequest()
|
|
3683
5773
|
model.from_json_string(json.dumps(args))
|
|
3684
5774
|
start_time = time.time()
|
|
3685
5775
|
while True:
|
|
3686
|
-
rsp = client.
|
|
5776
|
+
rsp = client.DescribeRabbitMQBindings(model)
|
|
3687
5777
|
result = rsp.to_json_string()
|
|
3688
5778
|
try:
|
|
3689
5779
|
json_obj = json.loads(result)
|
|
@@ -3702,7 +5792,7 @@ def doUnbindCmqDeadLetter(args, parsed_globals):
|
|
|
3702
5792
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3703
5793
|
|
|
3704
5794
|
|
|
3705
|
-
def
|
|
5795
|
+
def doDescribeTopicMsgs(args, parsed_globals):
|
|
3706
5796
|
g_param = parse_global_arg(parsed_globals)
|
|
3707
5797
|
|
|
3708
5798
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -3734,11 +5824,11 @@ def doModifyRabbitMQUser(args, parsed_globals):
|
|
|
3734
5824
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3735
5825
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
3736
5826
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3737
|
-
model = models.
|
|
5827
|
+
model = models.DescribeTopicMsgsRequest()
|
|
3738
5828
|
model.from_json_string(json.dumps(args))
|
|
3739
5829
|
start_time = time.time()
|
|
3740
5830
|
while True:
|
|
3741
|
-
rsp = client.
|
|
5831
|
+
rsp = client.DescribeTopicMsgs(model)
|
|
3742
5832
|
result = rsp.to_json_string()
|
|
3743
5833
|
try:
|
|
3744
5834
|
json_obj = json.loads(result)
|
|
@@ -3757,7 +5847,7 @@ def doModifyRabbitMQUser(args, parsed_globals):
|
|
|
3757
5847
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3758
5848
|
|
|
3759
5849
|
|
|
3760
|
-
def
|
|
5850
|
+
def doCreateRole(args, parsed_globals):
|
|
3761
5851
|
g_param = parse_global_arg(parsed_globals)
|
|
3762
5852
|
|
|
3763
5853
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -3789,11 +5879,11 @@ def doCreateRocketMQNamespace(args, parsed_globals):
|
|
|
3789
5879
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3790
5880
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
3791
5881
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3792
|
-
model = models.
|
|
5882
|
+
model = models.CreateRoleRequest()
|
|
3793
5883
|
model.from_json_string(json.dumps(args))
|
|
3794
5884
|
start_time = time.time()
|
|
3795
5885
|
while True:
|
|
3796
|
-
rsp = client.
|
|
5886
|
+
rsp = client.CreateRole(model)
|
|
3797
5887
|
result = rsp.to_json_string()
|
|
3798
5888
|
try:
|
|
3799
5889
|
json_obj = json.loads(result)
|
|
@@ -3812,7 +5902,7 @@ def doCreateRocketMQNamespace(args, parsed_globals):
|
|
|
3812
5902
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3813
5903
|
|
|
3814
5904
|
|
|
3815
|
-
def
|
|
5905
|
+
def doModifyRocketMQNamespace(args, parsed_globals):
|
|
3816
5906
|
g_param = parse_global_arg(parsed_globals)
|
|
3817
5907
|
|
|
3818
5908
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -3844,11 +5934,11 @@ def doCreateEnvironmentRole(args, parsed_globals):
|
|
|
3844
5934
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3845
5935
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
3846
5936
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3847
|
-
model = models.
|
|
5937
|
+
model = models.ModifyRocketMQNamespaceRequest()
|
|
3848
5938
|
model.from_json_string(json.dumps(args))
|
|
3849
5939
|
start_time = time.time()
|
|
3850
5940
|
while True:
|
|
3851
|
-
rsp = client.
|
|
5941
|
+
rsp = client.ModifyRocketMQNamespace(model)
|
|
3852
5942
|
result = rsp.to_json_string()
|
|
3853
5943
|
try:
|
|
3854
5944
|
json_obj = json.loads(result)
|
|
@@ -3867,7 +5957,7 @@ def doCreateEnvironmentRole(args, parsed_globals):
|
|
|
3867
5957
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3868
5958
|
|
|
3869
5959
|
|
|
3870
|
-
def
|
|
5960
|
+
def doDescribeRocketMQGroups(args, parsed_globals):
|
|
3871
5961
|
g_param = parse_global_arg(parsed_globals)
|
|
3872
5962
|
|
|
3873
5963
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -3899,11 +5989,11 @@ def doDescribeRocketMQTopics(args, parsed_globals):
|
|
|
3899
5989
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3900
5990
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
3901
5991
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3902
|
-
model = models.
|
|
5992
|
+
model = models.DescribeRocketMQGroupsRequest()
|
|
3903
5993
|
model.from_json_string(json.dumps(args))
|
|
3904
5994
|
start_time = time.time()
|
|
3905
5995
|
while True:
|
|
3906
|
-
rsp = client.
|
|
5996
|
+
rsp = client.DescribeRocketMQGroups(model)
|
|
3907
5997
|
result = rsp.to_json_string()
|
|
3908
5998
|
try:
|
|
3909
5999
|
json_obj = json.loads(result)
|
|
@@ -3922,7 +6012,7 @@ def doDescribeRocketMQTopics(args, parsed_globals):
|
|
|
3922
6012
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3923
6013
|
|
|
3924
6014
|
|
|
3925
|
-
def
|
|
6015
|
+
def doClearCmqQueue(args, parsed_globals):
|
|
3926
6016
|
g_param = parse_global_arg(parsed_globals)
|
|
3927
6017
|
|
|
3928
6018
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -3954,11 +6044,11 @@ def doDescribeRocketMQClusters(args, parsed_globals):
|
|
|
3954
6044
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3955
6045
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
3956
6046
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3957
|
-
model = models.
|
|
6047
|
+
model = models.ClearCmqQueueRequest()
|
|
3958
6048
|
model.from_json_string(json.dumps(args))
|
|
3959
6049
|
start_time = time.time()
|
|
3960
6050
|
while True:
|
|
3961
|
-
rsp = client.
|
|
6051
|
+
rsp = client.ClearCmqQueue(model)
|
|
3962
6052
|
result = rsp.to_json_string()
|
|
3963
6053
|
try:
|
|
3964
6054
|
json_obj = json.loads(result)
|
|
@@ -3977,7 +6067,7 @@ def doDescribeRocketMQClusters(args, parsed_globals):
|
|
|
3977
6067
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3978
6068
|
|
|
3979
6069
|
|
|
3980
|
-
def
|
|
6070
|
+
def doDescribePulsarProInstances(args, parsed_globals):
|
|
3981
6071
|
g_param = parse_global_arg(parsed_globals)
|
|
3982
6072
|
|
|
3983
6073
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -4009,11 +6099,11 @@ def doModifyTopic(args, parsed_globals):
|
|
|
4009
6099
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
4010
6100
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
4011
6101
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
4012
|
-
model = models.
|
|
6102
|
+
model = models.DescribePulsarProInstancesRequest()
|
|
4013
6103
|
model.from_json_string(json.dumps(args))
|
|
4014
6104
|
start_time = time.time()
|
|
4015
6105
|
while True:
|
|
4016
|
-
rsp = client.
|
|
6106
|
+
rsp = client.DescribePulsarProInstances(model)
|
|
4017
6107
|
result = rsp.to_json_string()
|
|
4018
6108
|
try:
|
|
4019
6109
|
json_obj = json.loads(result)
|
|
@@ -4032,7 +6122,7 @@ def doModifyTopic(args, parsed_globals):
|
|
|
4032
6122
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
4033
6123
|
|
|
4034
6124
|
|
|
4035
|
-
def
|
|
6125
|
+
def doDescribePublishers(args, parsed_globals):
|
|
4036
6126
|
g_param = parse_global_arg(parsed_globals)
|
|
4037
6127
|
|
|
4038
6128
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -4064,11 +6154,11 @@ def doCreateRole(args, parsed_globals):
|
|
|
4064
6154
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
4065
6155
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
4066
6156
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
4067
|
-
model = models.
|
|
6157
|
+
model = models.DescribePublishersRequest()
|
|
4068
6158
|
model.from_json_string(json.dumps(args))
|
|
4069
6159
|
start_time = time.time()
|
|
4070
6160
|
while True:
|
|
4071
|
-
rsp = client.
|
|
6161
|
+
rsp = client.DescribePublishers(model)
|
|
4072
6162
|
result = rsp.to_json_string()
|
|
4073
6163
|
try:
|
|
4074
6164
|
json_obj = json.loads(result)
|
|
@@ -4087,7 +6177,7 @@ def doCreateRole(args, parsed_globals):
|
|
|
4087
6177
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
4088
6178
|
|
|
4089
6179
|
|
|
4090
|
-
def
|
|
6180
|
+
def doCreateRocketMQCluster(args, parsed_globals):
|
|
4091
6181
|
g_param = parse_global_arg(parsed_globals)
|
|
4092
6182
|
|
|
4093
6183
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -4119,11 +6209,11 @@ def doModifyRocketMQNamespace(args, parsed_globals):
|
|
|
4119
6209
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
4120
6210
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
4121
6211
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
4122
|
-
model = models.
|
|
6212
|
+
model = models.CreateRocketMQClusterRequest()
|
|
4123
6213
|
model.from_json_string(json.dumps(args))
|
|
4124
6214
|
start_time = time.time()
|
|
4125
6215
|
while True:
|
|
4126
|
-
rsp = client.
|
|
6216
|
+
rsp = client.CreateRocketMQCluster(model)
|
|
4127
6217
|
result = rsp.to_json_string()
|
|
4128
6218
|
try:
|
|
4129
6219
|
json_obj = json.loads(result)
|
|
@@ -4142,7 +6232,7 @@ def doModifyRocketMQNamespace(args, parsed_globals):
|
|
|
4142
6232
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
4143
6233
|
|
|
4144
6234
|
|
|
4145
|
-
def
|
|
6235
|
+
def doDescribeRabbitMQQueueDetail(args, parsed_globals):
|
|
4146
6236
|
g_param = parse_global_arg(parsed_globals)
|
|
4147
6237
|
|
|
4148
6238
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -4174,11 +6264,11 @@ def doSendBatchMessages(args, parsed_globals):
|
|
|
4174
6264
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
4175
6265
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
4176
6266
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
4177
|
-
model = models.
|
|
6267
|
+
model = models.DescribeRabbitMQQueueDetailRequest()
|
|
4178
6268
|
model.from_json_string(json.dumps(args))
|
|
4179
6269
|
start_time = time.time()
|
|
4180
6270
|
while True:
|
|
4181
|
-
rsp = client.
|
|
6271
|
+
rsp = client.DescribeRabbitMQQueueDetail(model)
|
|
4182
6272
|
result = rsp.to_json_string()
|
|
4183
6273
|
try:
|
|
4184
6274
|
json_obj = json.loads(result)
|
|
@@ -4197,7 +6287,7 @@ def doSendBatchMessages(args, parsed_globals):
|
|
|
4197
6287
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
4198
6288
|
|
|
4199
6289
|
|
|
4200
|
-
def
|
|
6290
|
+
def doDescribeRocketMQMsg(args, parsed_globals):
|
|
4201
6291
|
g_param = parse_global_arg(parsed_globals)
|
|
4202
6292
|
|
|
4203
6293
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -4229,11 +6319,11 @@ def doClearCmqQueue(args, parsed_globals):
|
|
|
4229
6319
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
4230
6320
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
4231
6321
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
4232
|
-
model = models.
|
|
6322
|
+
model = models.DescribeRocketMQMsgRequest()
|
|
4233
6323
|
model.from_json_string(json.dumps(args))
|
|
4234
6324
|
start_time = time.time()
|
|
4235
6325
|
while True:
|
|
4236
|
-
rsp = client.
|
|
6326
|
+
rsp = client.DescribeRocketMQMsg(model)
|
|
4237
6327
|
result = rsp.to_json_string()
|
|
4238
6328
|
try:
|
|
4239
6329
|
json_obj = json.loads(result)
|
|
@@ -4307,7 +6397,7 @@ def doDescribeEnvironmentRoles(args, parsed_globals):
|
|
|
4307
6397
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
4308
6398
|
|
|
4309
6399
|
|
|
4310
|
-
def
|
|
6400
|
+
def doDeleteRabbitMQVipInstance(args, parsed_globals):
|
|
4311
6401
|
g_param = parse_global_arg(parsed_globals)
|
|
4312
6402
|
|
|
4313
6403
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -4339,11 +6429,11 @@ def doDescribePublishers(args, parsed_globals):
|
|
|
4339
6429
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
4340
6430
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
4341
6431
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
4342
|
-
model = models.
|
|
6432
|
+
model = models.DeleteRabbitMQVipInstanceRequest()
|
|
4343
6433
|
model.from_json_string(json.dumps(args))
|
|
4344
6434
|
start_time = time.time()
|
|
4345
6435
|
while True:
|
|
4346
|
-
rsp = client.
|
|
6436
|
+
rsp = client.DeleteRabbitMQVipInstance(model)
|
|
4347
6437
|
result = rsp.to_json_string()
|
|
4348
6438
|
try:
|
|
4349
6439
|
json_obj = json.loads(result)
|
|
@@ -4362,7 +6452,7 @@ def doDescribePublishers(args, parsed_globals):
|
|
|
4362
6452
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
4363
6453
|
|
|
4364
6454
|
|
|
4365
|
-
def
|
|
6455
|
+
def doPublishCmqMsg(args, parsed_globals):
|
|
4366
6456
|
g_param = parse_global_arg(parsed_globals)
|
|
4367
6457
|
|
|
4368
6458
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -4394,11 +6484,11 @@ def doCreateRocketMQCluster(args, parsed_globals):
|
|
|
4394
6484
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
4395
6485
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
4396
6486
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
4397
|
-
model = models.
|
|
6487
|
+
model = models.PublishCmqMsgRequest()
|
|
4398
6488
|
model.from_json_string(json.dumps(args))
|
|
4399
6489
|
start_time = time.time()
|
|
4400
6490
|
while True:
|
|
4401
|
-
rsp = client.
|
|
6491
|
+
rsp = client.PublishCmqMsg(model)
|
|
4402
6492
|
result = rsp.to_json_string()
|
|
4403
6493
|
try:
|
|
4404
6494
|
json_obj = json.loads(result)
|
|
@@ -4417,7 +6507,7 @@ def doCreateRocketMQCluster(args, parsed_globals):
|
|
|
4417
6507
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
4418
6508
|
|
|
4419
6509
|
|
|
4420
|
-
def
|
|
6510
|
+
def doDescribeBindClusters(args, parsed_globals):
|
|
4421
6511
|
g_param = parse_global_arg(parsed_globals)
|
|
4422
6512
|
|
|
4423
6513
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -4449,11 +6539,11 @@ def doDescribeRocketMQMsg(args, parsed_globals):
|
|
|
4449
6539
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
4450
6540
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
4451
6541
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
4452
|
-
model = models.
|
|
6542
|
+
model = models.DescribeBindClustersRequest()
|
|
4453
6543
|
model.from_json_string(json.dumps(args))
|
|
4454
6544
|
start_time = time.time()
|
|
4455
6545
|
while True:
|
|
4456
|
-
rsp = client.
|
|
6546
|
+
rsp = client.DescribeBindClusters(model)
|
|
4457
6547
|
result = rsp.to_json_string()
|
|
4458
6548
|
try:
|
|
4459
6549
|
json_obj = json.loads(result)
|
|
@@ -4472,7 +6562,7 @@ def doDescribeRocketMQMsg(args, parsed_globals):
|
|
|
4472
6562
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
4473
6563
|
|
|
4474
6564
|
|
|
4475
|
-
def
|
|
6565
|
+
def doDescribeCmqQueueDetail(args, parsed_globals):
|
|
4476
6566
|
g_param = parse_global_arg(parsed_globals)
|
|
4477
6567
|
|
|
4478
6568
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -4504,11 +6594,11 @@ def doDescribePulsarProInstances(args, parsed_globals):
|
|
|
4504
6594
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
4505
6595
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
4506
6596
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
4507
|
-
model = models.
|
|
6597
|
+
model = models.DescribeCmqQueueDetailRequest()
|
|
4508
6598
|
model.from_json_string(json.dumps(args))
|
|
4509
6599
|
start_time = time.time()
|
|
4510
6600
|
while True:
|
|
4511
|
-
rsp = client.
|
|
6601
|
+
rsp = client.DescribeCmqQueueDetail(model)
|
|
4512
6602
|
result = rsp.to_json_string()
|
|
4513
6603
|
try:
|
|
4514
6604
|
json_obj = json.loads(result)
|
|
@@ -4527,7 +6617,7 @@ def doDescribePulsarProInstances(args, parsed_globals):
|
|
|
4527
6617
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
4528
6618
|
|
|
4529
6619
|
|
|
4530
|
-
def
|
|
6620
|
+
def doSendMsg(args, parsed_globals):
|
|
4531
6621
|
g_param = parse_global_arg(parsed_globals)
|
|
4532
6622
|
|
|
4533
6623
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -4559,11 +6649,11 @@ def doDeleteRabbitMQVipInstance(args, parsed_globals):
|
|
|
4559
6649
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
4560
6650
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
4561
6651
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
4562
|
-
model = models.
|
|
6652
|
+
model = models.SendMsgRequest()
|
|
4563
6653
|
model.from_json_string(json.dumps(args))
|
|
4564
6654
|
start_time = time.time()
|
|
4565
6655
|
while True:
|
|
4566
|
-
rsp = client.
|
|
6656
|
+
rsp = client.SendMsg(model)
|
|
4567
6657
|
result = rsp.to_json_string()
|
|
4568
6658
|
try:
|
|
4569
6659
|
json_obj = json.loads(result)
|
|
@@ -4582,7 +6672,7 @@ def doDeleteRabbitMQVipInstance(args, parsed_globals):
|
|
|
4582
6672
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
4583
6673
|
|
|
4584
6674
|
|
|
4585
|
-
def
|
|
6675
|
+
def doDeleteRocketMQVipInstance(args, parsed_globals):
|
|
4586
6676
|
g_param = parse_global_arg(parsed_globals)
|
|
4587
6677
|
|
|
4588
6678
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -4614,11 +6704,11 @@ def doPublishCmqMsg(args, parsed_globals):
|
|
|
4614
6704
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
4615
6705
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
4616
6706
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
4617
|
-
model = models.
|
|
6707
|
+
model = models.DeleteRocketMQVipInstanceRequest()
|
|
4618
6708
|
model.from_json_string(json.dumps(args))
|
|
4619
6709
|
start_time = time.time()
|
|
4620
6710
|
while True:
|
|
4621
|
-
rsp = client.
|
|
6711
|
+
rsp = client.DeleteRocketMQVipInstance(model)
|
|
4622
6712
|
result = rsp.to_json_string()
|
|
4623
6713
|
try:
|
|
4624
6714
|
json_obj = json.loads(result)
|
|
@@ -4637,7 +6727,7 @@ def doPublishCmqMsg(args, parsed_globals):
|
|
|
4637
6727
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
4638
6728
|
|
|
4639
6729
|
|
|
4640
|
-
def
|
|
6730
|
+
def doSendRocketMQMessage(args, parsed_globals):
|
|
4641
6731
|
g_param = parse_global_arg(parsed_globals)
|
|
4642
6732
|
|
|
4643
6733
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -4669,11 +6759,11 @@ def doDescribeBindClusters(args, parsed_globals):
|
|
|
4669
6759
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
4670
6760
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
4671
6761
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
4672
|
-
model = models.
|
|
6762
|
+
model = models.SendRocketMQMessageRequest()
|
|
4673
6763
|
model.from_json_string(json.dumps(args))
|
|
4674
6764
|
start_time = time.time()
|
|
4675
6765
|
while True:
|
|
4676
|
-
rsp = client.
|
|
6766
|
+
rsp = client.SendRocketMQMessage(model)
|
|
4677
6767
|
result = rsp.to_json_string()
|
|
4678
6768
|
try:
|
|
4679
6769
|
json_obj = json.loads(result)
|
|
@@ -4692,7 +6782,7 @@ def doDescribeBindClusters(args, parsed_globals):
|
|
|
4692
6782
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
4693
6783
|
|
|
4694
6784
|
|
|
4695
|
-
def
|
|
6785
|
+
def doClearCmqSubscriptionFilterTags(args, parsed_globals):
|
|
4696
6786
|
g_param = parse_global_arg(parsed_globals)
|
|
4697
6787
|
|
|
4698
6788
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -4724,11 +6814,11 @@ def doDescribeCmqQueueDetail(args, parsed_globals):
|
|
|
4724
6814
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
4725
6815
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
4726
6816
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
4727
|
-
model = models.
|
|
6817
|
+
model = models.ClearCmqSubscriptionFilterTagsRequest()
|
|
4728
6818
|
model.from_json_string(json.dumps(args))
|
|
4729
6819
|
start_time = time.time()
|
|
4730
6820
|
while True:
|
|
4731
|
-
rsp = client.
|
|
6821
|
+
rsp = client.ClearCmqSubscriptionFilterTags(model)
|
|
4732
6822
|
result = rsp.to_json_string()
|
|
4733
6823
|
try:
|
|
4734
6824
|
json_obj = json.loads(result)
|
|
@@ -4747,7 +6837,7 @@ def doDescribeCmqQueueDetail(args, parsed_globals):
|
|
|
4747
6837
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
4748
6838
|
|
|
4749
6839
|
|
|
4750
|
-
def
|
|
6840
|
+
def doModifyEnvironmentRole(args, parsed_globals):
|
|
4751
6841
|
g_param = parse_global_arg(parsed_globals)
|
|
4752
6842
|
|
|
4753
6843
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -4779,11 +6869,11 @@ def doSendMsg(args, parsed_globals):
|
|
|
4779
6869
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
4780
6870
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
4781
6871
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
4782
|
-
model = models.
|
|
6872
|
+
model = models.ModifyEnvironmentRoleRequest()
|
|
4783
6873
|
model.from_json_string(json.dumps(args))
|
|
4784
6874
|
start_time = time.time()
|
|
4785
6875
|
while True:
|
|
4786
|
-
rsp = client.
|
|
6876
|
+
rsp = client.ModifyEnvironmentRole(model)
|
|
4787
6877
|
result = rsp.to_json_string()
|
|
4788
6878
|
try:
|
|
4789
6879
|
json_obj = json.loads(result)
|
|
@@ -4802,7 +6892,7 @@ def doSendMsg(args, parsed_globals):
|
|
|
4802
6892
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
4803
6893
|
|
|
4804
6894
|
|
|
4805
|
-
def
|
|
6895
|
+
def doDescribeRocketMQPublicAccessPoint(args, parsed_globals):
|
|
4806
6896
|
g_param = parse_global_arg(parsed_globals)
|
|
4807
6897
|
|
|
4808
6898
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -4834,11 +6924,11 @@ def doSendRocketMQMessage(args, parsed_globals):
|
|
|
4834
6924
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
4835
6925
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
4836
6926
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
4837
|
-
model = models.
|
|
6927
|
+
model = models.DescribeRocketMQPublicAccessPointRequest()
|
|
4838
6928
|
model.from_json_string(json.dumps(args))
|
|
4839
6929
|
start_time = time.time()
|
|
4840
6930
|
while True:
|
|
4841
|
-
rsp = client.
|
|
6931
|
+
rsp = client.DescribeRocketMQPublicAccessPoint(model)
|
|
4842
6932
|
result = rsp.to_json_string()
|
|
4843
6933
|
try:
|
|
4844
6934
|
json_obj = json.loads(result)
|
|
@@ -4857,7 +6947,7 @@ def doSendRocketMQMessage(args, parsed_globals):
|
|
|
4857
6947
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
4858
6948
|
|
|
4859
6949
|
|
|
4860
|
-
def
|
|
6950
|
+
def doDeleteRabbitMQBinding(args, parsed_globals):
|
|
4861
6951
|
g_param = parse_global_arg(parsed_globals)
|
|
4862
6952
|
|
|
4863
6953
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -4889,11 +6979,11 @@ def doClearCmqSubscriptionFilterTags(args, parsed_globals):
|
|
|
4889
6979
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
4890
6980
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
4891
6981
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
4892
|
-
model = models.
|
|
6982
|
+
model = models.DeleteRabbitMQBindingRequest()
|
|
4893
6983
|
model.from_json_string(json.dumps(args))
|
|
4894
6984
|
start_time = time.time()
|
|
4895
6985
|
while True:
|
|
4896
|
-
rsp = client.
|
|
6986
|
+
rsp = client.DeleteRabbitMQBinding(model)
|
|
4897
6987
|
result = rsp.to_json_string()
|
|
4898
6988
|
try:
|
|
4899
6989
|
json_obj = json.loads(result)
|
|
@@ -4912,7 +7002,7 @@ def doClearCmqSubscriptionFilterTags(args, parsed_globals):
|
|
|
4912
7002
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
4913
7003
|
|
|
4914
7004
|
|
|
4915
|
-
def
|
|
7005
|
+
def doModifyRole(args, parsed_globals):
|
|
4916
7006
|
g_param = parse_global_arg(parsed_globals)
|
|
4917
7007
|
|
|
4918
7008
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -4944,11 +7034,11 @@ def doModifyEnvironmentRole(args, parsed_globals):
|
|
|
4944
7034
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
4945
7035
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
4946
7036
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
4947
|
-
model = models.
|
|
7037
|
+
model = models.ModifyRoleRequest()
|
|
4948
7038
|
model.from_json_string(json.dumps(args))
|
|
4949
7039
|
start_time = time.time()
|
|
4950
7040
|
while True:
|
|
4951
|
-
rsp = client.
|
|
7041
|
+
rsp = client.ModifyRole(model)
|
|
4952
7042
|
result = rsp.to_json_string()
|
|
4953
7043
|
try:
|
|
4954
7044
|
json_obj = json.loads(result)
|
|
@@ -4967,7 +7057,7 @@ def doModifyEnvironmentRole(args, parsed_globals):
|
|
|
4967
7057
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
4968
7058
|
|
|
4969
7059
|
|
|
4970
|
-
def
|
|
7060
|
+
def doCreateRocketMQVipInstance(args, parsed_globals):
|
|
4971
7061
|
g_param = parse_global_arg(parsed_globals)
|
|
4972
7062
|
|
|
4973
7063
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -4999,11 +7089,11 @@ def doModifyRole(args, parsed_globals):
|
|
|
4999
7089
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
5000
7090
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
5001
7091
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
5002
|
-
model = models.
|
|
7092
|
+
model = models.CreateRocketMQVipInstanceRequest()
|
|
5003
7093
|
model.from_json_string(json.dumps(args))
|
|
5004
7094
|
start_time = time.time()
|
|
5005
7095
|
while True:
|
|
5006
|
-
rsp = client.
|
|
7096
|
+
rsp = client.CreateRocketMQVipInstance(model)
|
|
5007
7097
|
result = rsp.to_json_string()
|
|
5008
7098
|
try:
|
|
5009
7099
|
json_obj = json.loads(result)
|
|
@@ -5022,7 +7112,7 @@ def doModifyRole(args, parsed_globals):
|
|
|
5022
7112
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
5023
7113
|
|
|
5024
7114
|
|
|
5025
|
-
def
|
|
7115
|
+
def doDeleteRocketMQEnvironmentRoles(args, parsed_globals):
|
|
5026
7116
|
g_param = parse_global_arg(parsed_globals)
|
|
5027
7117
|
|
|
5028
7118
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -5054,11 +7144,11 @@ def doDescribeRabbitMQVirtualHostList(args, parsed_globals):
|
|
|
5054
7144
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
|
5055
7145
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
5056
7146
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
5057
|
-
model = models.
|
|
7147
|
+
model = models.DeleteRocketMQEnvironmentRolesRequest()
|
|
5058
7148
|
model.from_json_string(json.dumps(args))
|
|
5059
7149
|
start_time = time.time()
|
|
5060
7150
|
while True:
|
|
5061
|
-
rsp = client.
|
|
7151
|
+
rsp = client.DeleteRocketMQEnvironmentRoles(model)
|
|
5062
7152
|
result = rsp.to_json_string()
|
|
5063
7153
|
try:
|
|
5064
7154
|
json_obj = json.loads(result)
|
|
@@ -5201,15 +7291,22 @@ ACTION_MAP = {
|
|
|
5201
7291
|
"DeleteEnvironments": doDeleteEnvironments,
|
|
5202
7292
|
"CreateCluster": doCreateCluster,
|
|
5203
7293
|
"DescribeRocketMQNamespaces": doDescribeRocketMQNamespaces,
|
|
7294
|
+
"DescribeRabbitMQExchanges": doDescribeRabbitMQExchanges,
|
|
7295
|
+
"DescribeRocketMQMsgTrace": doDescribeRocketMQMsgTrace,
|
|
7296
|
+
"CreateRocketMQRole": doCreateRocketMQRole,
|
|
5204
7297
|
"CreateCmqTopic": doCreateCmqTopic,
|
|
5205
7298
|
"DeleteCmqQueue": doDeleteCmqQueue,
|
|
5206
7299
|
"ModifyRabbitMQVirtualHost": doModifyRabbitMQVirtualHost,
|
|
5207
7300
|
"DescribeCmqTopics": doDescribeCmqTopics,
|
|
5208
7301
|
"DeleteEnvironmentRoles": doDeleteEnvironmentRoles,
|
|
5209
7302
|
"DeleteRocketMQGroup": doDeleteRocketMQGroup,
|
|
5210
|
-
"
|
|
7303
|
+
"DeleteProCluster": doDeleteProCluster,
|
|
7304
|
+
"DeleteRocketMQRoles": doDeleteRocketMQRoles,
|
|
7305
|
+
"DescribeTopics": doDescribeTopics,
|
|
7306
|
+
"ModifyRabbitMQPermission": doModifyRabbitMQPermission,
|
|
5211
7307
|
"DescribeRabbitMQVipInstances": doDescribeRabbitMQVipInstances,
|
|
5212
7308
|
"RewindCmqQueue": doRewindCmqQueue,
|
|
7309
|
+
"DescribeRocketMQTopicStats": doDescribeRocketMQTopicStats,
|
|
5213
7310
|
"CreateTopic": doCreateTopic,
|
|
5214
7311
|
"DescribeCmqQueues": doDescribeCmqQueues,
|
|
5215
7312
|
"DescribeEnvironments": doDescribeEnvironments,
|
|
@@ -5217,29 +7314,39 @@ ACTION_MAP = {
|
|
|
5217
7314
|
"CreateRocketMQGroup": doCreateRocketMQGroup,
|
|
5218
7315
|
"AcknowledgeMessage": doAcknowledgeMessage,
|
|
5219
7316
|
"CreateEnvironment": doCreateEnvironment,
|
|
5220
|
-
"
|
|
5221
|
-
"
|
|
7317
|
+
"DescribeClusters": doDescribeClusters,
|
|
7318
|
+
"ModifyPublicNetworkSecurityPolicy": doModifyPublicNetworkSecurityPolicy,
|
|
7319
|
+
"ModifyRocketMQEnvironmentRole": doModifyRocketMQEnvironmentRole,
|
|
5222
7320
|
"ModifyRocketMQTopic": doModifyRocketMQTopic,
|
|
7321
|
+
"DescribeRocketMQTopicMsgs": doDescribeRocketMQTopicMsgs,
|
|
7322
|
+
"DescribeRocketMQProducers": doDescribeRocketMQProducers,
|
|
5223
7323
|
"DescribeEnvironmentAttributes": doDescribeEnvironmentAttributes,
|
|
5224
7324
|
"CreateCmqSubscribe": doCreateCmqSubscribe,
|
|
5225
7325
|
"DescribePublisherSummary": doDescribePublisherSummary,
|
|
5226
7326
|
"DeleteRocketMQNamespace": doDeleteRocketMQNamespace,
|
|
5227
7327
|
"CreateRabbitMQVirtualHost": doCreateRabbitMQVirtualHost,
|
|
5228
|
-
"DeleteCluster": doDeleteCluster,
|
|
5229
7328
|
"DeleteCmqTopic": doDeleteCmqTopic,
|
|
7329
|
+
"ModifyRocketMQInstance": doModifyRocketMQInstance,
|
|
5230
7330
|
"CreateCmqQueue": doCreateCmqQueue,
|
|
5231
7331
|
"ModifyRocketMQGroup": doModifyRocketMQGroup,
|
|
5232
|
-
"
|
|
7332
|
+
"DescribeRocketMQTopic": doDescribeRocketMQTopic,
|
|
5233
7333
|
"DescribeCmqSubscriptionDetail": doDescribeCmqSubscriptionDetail,
|
|
5234
|
-
"
|
|
5235
|
-
"
|
|
5236
|
-
"
|
|
7334
|
+
"DeleteCluster": doDeleteCluster,
|
|
7335
|
+
"DescribeRabbitMQPermission": doDescribeRabbitMQPermission,
|
|
7336
|
+
"DeleteRabbitMQPermission": doDeleteRabbitMQPermission,
|
|
7337
|
+
"CreateRocketMQEnvironmentRole": doCreateRocketMQEnvironmentRole,
|
|
7338
|
+
"DescribeRabbitMQVipInstance": doDescribeRabbitMQVipInstance,
|
|
7339
|
+
"CreateEnvironmentRole": doCreateEnvironmentRole,
|
|
7340
|
+
"DescribeRocketMQPublicAccessMonitorData": doDescribeRocketMQPublicAccessMonitorData,
|
|
5237
7341
|
"ResetRocketMQConsumerOffSet": doResetRocketMQConsumerOffSet,
|
|
5238
7342
|
"DescribeSubscriptions": doDescribeSubscriptions,
|
|
5239
7343
|
"DescribeCmqTopicDetail": doDescribeCmqTopicDetail,
|
|
5240
7344
|
"DescribeRocketMQVipInstanceDetail": doDescribeRocketMQVipInstanceDetail,
|
|
7345
|
+
"DescribeRocketMQRoles": doDescribeRocketMQRoles,
|
|
5241
7346
|
"DescribeRabbitMQUser": doDescribeRabbitMQUser,
|
|
7347
|
+
"DeleteRoles": doDeleteRoles,
|
|
5242
7348
|
"ModifyRocketMQCluster": doModifyRocketMQCluster,
|
|
7349
|
+
"ModifyCmqTopicAttribute": doModifyCmqTopicAttribute,
|
|
5243
7350
|
"ModifyCluster": doModifyCluster,
|
|
5244
7351
|
"DescribePulsarProInstanceDetail": doDescribePulsarProInstanceDetail,
|
|
5245
7352
|
"ModifyCmqSubscriptionAttribute": doModifyCmqSubscriptionAttribute,
|
|
@@ -5247,18 +7354,29 @@ ACTION_MAP = {
|
|
|
5247
7354
|
"DescribeRocketMQCluster": doDescribeRocketMQCluster,
|
|
5248
7355
|
"DeleteTopics": doDeleteTopics,
|
|
5249
7356
|
"ResetMsgSubOffsetByTimestamp": doResetMsgSubOffsetByTimestamp,
|
|
7357
|
+
"CreateRabbitMQBinding": doCreateRabbitMQBinding,
|
|
7358
|
+
"DescribeMsgTrace": doDescribeMsgTrace,
|
|
7359
|
+
"ModifyRocketMQRole": doModifyRocketMQRole,
|
|
5250
7360
|
"DescribeRabbitMQNodeList": doDescribeRabbitMQNodeList,
|
|
5251
7361
|
"DescribeBindVpcs": doDescribeBindVpcs,
|
|
5252
7362
|
"DeleteRocketMQTopic": doDeleteRocketMQTopic,
|
|
7363
|
+
"RetryRocketMQDlqMessage": doRetryRocketMQDlqMessage,
|
|
7364
|
+
"ExportRocketMQMessageDetail": doExportRocketMQMessageDetail,
|
|
7365
|
+
"DescribeRabbitMQQueues": doDescribeRabbitMQQueues,
|
|
5253
7366
|
"ModifyCmqQueueAttribute": doModifyCmqQueueAttribute,
|
|
5254
7367
|
"ModifyRocketMQInstanceSpec": doModifyRocketMQInstanceSpec,
|
|
5255
7368
|
"DescribeRocketMQVipInstances": doDescribeRocketMQVipInstances,
|
|
7369
|
+
"DescribeRocketMQTopUsages": doDescribeRocketMQTopUsages,
|
|
7370
|
+
"CreateRabbitMQUser": doCreateRabbitMQUser,
|
|
5256
7371
|
"CreateRabbitMQVipInstance": doCreateRabbitMQVipInstance,
|
|
5257
|
-
"
|
|
7372
|
+
"DescribeMqMsgTrace": doDescribeMqMsgTrace,
|
|
7373
|
+
"SetRocketMQPublicAccessPoint": doSetRocketMQPublicAccessPoint,
|
|
5258
7374
|
"CreateRocketMQTopic": doCreateRocketMQTopic,
|
|
7375
|
+
"DescribeRocketMQEnvironmentRoles": doDescribeRocketMQEnvironmentRoles,
|
|
5259
7376
|
"DeleteRocketMQCluster": doDeleteRocketMQCluster,
|
|
5260
7377
|
"DeleteRabbitMQUser": doDeleteRabbitMQUser,
|
|
5261
|
-
"
|
|
7378
|
+
"CreateProCluster": doCreateProCluster,
|
|
7379
|
+
"DescribeRabbitMQVirtualHost": doDescribeRabbitMQVirtualHost,
|
|
5262
7380
|
"ReceiveMessage": doReceiveMessage,
|
|
5263
7381
|
"DeleteRabbitMQVirtualHost": doDeleteRabbitMQVirtualHost,
|
|
5264
7382
|
"SendCmqMsg": doSendCmqMsg,
|
|
@@ -5267,29 +7385,39 @@ ACTION_MAP = {
|
|
|
5267
7385
|
"UnbindCmqDeadLetter": doUnbindCmqDeadLetter,
|
|
5268
7386
|
"ModifyRabbitMQUser": doModifyRabbitMQUser,
|
|
5269
7387
|
"CreateRocketMQNamespace": doCreateRocketMQNamespace,
|
|
5270
|
-
"
|
|
7388
|
+
"DescribeMsg": doDescribeMsg,
|
|
7389
|
+
"SendBatchMessages": doSendBatchMessages,
|
|
7390
|
+
"DescribeRocketMQTopicsByGroup": doDescribeRocketMQTopicsByGroup,
|
|
5271
7391
|
"DescribeRocketMQTopics": doDescribeRocketMQTopics,
|
|
5272
7392
|
"DescribeRocketMQClusters": doDescribeRocketMQClusters,
|
|
7393
|
+
"SendMessages": doSendMessages,
|
|
5273
7394
|
"ModifyTopic": doModifyTopic,
|
|
7395
|
+
"DescribeRabbitMQBindings": doDescribeRabbitMQBindings,
|
|
7396
|
+
"DescribeTopicMsgs": doDescribeTopicMsgs,
|
|
5274
7397
|
"CreateRole": doCreateRole,
|
|
5275
7398
|
"ModifyRocketMQNamespace": doModifyRocketMQNamespace,
|
|
5276
|
-
"
|
|
7399
|
+
"DescribeRocketMQGroups": doDescribeRocketMQGroups,
|
|
5277
7400
|
"ClearCmqQueue": doClearCmqQueue,
|
|
5278
|
-
"
|
|
7401
|
+
"DescribePulsarProInstances": doDescribePulsarProInstances,
|
|
5279
7402
|
"DescribePublishers": doDescribePublishers,
|
|
5280
7403
|
"CreateRocketMQCluster": doCreateRocketMQCluster,
|
|
7404
|
+
"DescribeRabbitMQQueueDetail": doDescribeRabbitMQQueueDetail,
|
|
5281
7405
|
"DescribeRocketMQMsg": doDescribeRocketMQMsg,
|
|
5282
|
-
"
|
|
7406
|
+
"DescribeEnvironmentRoles": doDescribeEnvironmentRoles,
|
|
5283
7407
|
"DeleteRabbitMQVipInstance": doDeleteRabbitMQVipInstance,
|
|
5284
7408
|
"PublishCmqMsg": doPublishCmqMsg,
|
|
5285
7409
|
"DescribeBindClusters": doDescribeBindClusters,
|
|
5286
7410
|
"DescribeCmqQueueDetail": doDescribeCmqQueueDetail,
|
|
5287
7411
|
"SendMsg": doSendMsg,
|
|
7412
|
+
"DeleteRocketMQVipInstance": doDeleteRocketMQVipInstance,
|
|
5288
7413
|
"SendRocketMQMessage": doSendRocketMQMessage,
|
|
5289
7414
|
"ClearCmqSubscriptionFilterTags": doClearCmqSubscriptionFilterTags,
|
|
5290
7415
|
"ModifyEnvironmentRole": doModifyEnvironmentRole,
|
|
7416
|
+
"DescribeRocketMQPublicAccessPoint": doDescribeRocketMQPublicAccessPoint,
|
|
7417
|
+
"DeleteRabbitMQBinding": doDeleteRabbitMQBinding,
|
|
5291
7418
|
"ModifyRole": doModifyRole,
|
|
5292
|
-
"
|
|
7419
|
+
"CreateRocketMQVipInstance": doCreateRocketMQVipInstance,
|
|
7420
|
+
"DeleteRocketMQEnvironmentRoles": doDeleteRocketMQEnvironmentRoles,
|
|
5293
7421
|
"DeleteCmqSubscribe": doDeleteCmqSubscribe,
|
|
5294
7422
|
"DeleteSubscriptions": doDeleteSubscriptions,
|
|
5295
7423
|
|