tccli 3.0.1132.1__py2.py3-none-any.whl → 3.0.1134.1__py2.py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- tccli/__init__.py +1 -1
- tccli/services/apm/v20210622/api.json +1 -0
- tccli/services/apm/v20210622/examples.json +1 -1
- tccli/services/asr/v20190614/api.json +2 -2
- tccli/services/billing/v20180709/api.json +10 -0
- tccli/services/cam/v20190116/api.json +41 -12
- tccli/services/cdwch/v20200915/api.json +9 -9
- tccli/services/cdwch/v20200915/examples.json +1 -1
- tccli/services/cdwdoris/v20211228/api.json +18 -0
- tccli/services/cfw/v20190904/api.json +4 -4
- tccli/services/ckafka/v20190819/api.json +130 -74
- tccli/services/ckafka/v20190819/examples.json +17 -17
- tccli/services/cls/v20201016/api.json +1 -1
- tccli/services/cls/v20201016/examples.json +1 -1
- tccli/services/cmq/v20190304/api.json +53 -49
- tccli/services/cmq/v20190304/examples.json +2 -2
- tccli/services/cms/v20190321/api.json +2 -0
- tccli/services/cms/v20190321/examples.json +1 -1
- tccli/services/csip/v20221121/api.json +137 -42
- tccli/services/csip/v20221121/examples.json +4 -4
- tccli/services/cynosdb/cynosdb_client.py +57 -4
- tccli/services/cynosdb/v20190107/api.json +451 -0
- tccli/services/cynosdb/v20190107/examples.json +8 -0
- tccli/services/dlc/dlc_client.py +106 -0
- tccli/services/dlc/v20210125/api.json +181 -0
- tccli/services/dlc/v20210125/examples.json +16 -0
- tccli/services/dsgc/v20190723/api.json +65 -58
- tccli/services/dsgc/v20190723/examples.json +5 -5
- tccli/services/dts/dts_client.py +0 -53
- tccli/services/dts/v20180330/api.json +0 -98
- tccli/services/dts/v20180330/examples.json +0 -8
- tccli/services/eb/v20210416/examples.json +1 -1
- tccli/services/emr/v20190103/api.json +5 -5
- tccli/services/ess/ess_client.py +411 -305
- tccli/services/ess/v20201111/api.json +144 -0
- tccli/services/ess/v20201111/examples.json +16 -0
- tccli/services/essbasic/essbasic_client.py +110 -4
- tccli/services/essbasic/v20210526/api.json +139 -4
- tccli/services/essbasic/v20210526/examples.json +16 -0
- tccli/services/gaap/v20180529/api.json +1 -1
- tccli/services/gaap/v20180529/examples.json +0 -6
- tccli/services/iecp/v20210914/api.json +40 -40
- tccli/services/ims/v20201229/api.json +2 -2
- tccli/services/lke/lke_client.py +171 -12
- tccli/services/lke/v20231130/api.json +524 -0
- tccli/services/lke/v20231130/examples.json +24 -0
- tccli/services/mongodb/mongodb_client.py +57 -4
- tccli/services/mongodb/v20190725/api.json +96 -0
- tccli/services/mongodb/v20190725/examples.json +8 -0
- tccli/services/monitor/v20180724/api.json +47 -19
- tccli/services/monitor/v20180724/examples.json +4 -4
- tccli/services/mps/v20190612/api.json +57 -7
- tccli/services/mps/v20190612/examples.json +1 -1
- tccli/services/ocr/v20181119/api.json +373 -3
- tccli/services/organization/organization_client.py +118 -12
- tccli/services/organization/v20210331/api.json +68 -0
- tccli/services/organization/v20210331/examples.json +16 -0
- tccli/services/pts/v20210728/api.json +1 -1
- tccli/services/pts/v20210728/examples.json +1 -1
- tccli/services/rum/v20210622/api.json +2 -0
- tccli/services/rum/v20210622/examples.json +1 -1
- tccli/services/sms/v20210111/api.json +26 -26
- tccli/services/tcr/v20190924/api.json +13 -10
- tccli/services/tcr/v20190924/examples.json +2 -2
- tccli/services/tdmq/tdmq_client.py +443 -19
- tccli/services/tdmq/v20200217/api.json +570 -0
- tccli/services/tdmq/v20200217/examples.json +64 -0
- tccli/services/tke/tke_client.py +53 -0
- tccli/services/tke/v20180525/api.json +227 -41
- tccli/services/tke/v20180525/examples.json +26 -0
- tccli/services/trro/v20220325/api.json +6 -6
- tccli/services/trtc/v20190722/api.json +1 -1
- tccli/services/tse/v20201207/api.json +13 -2
- tccli/services/tsf/v20180326/api.json +47 -35
- tccli/services/tsf/v20180326/examples.json +4 -4
- tccli/services/waf/v20180125/api.json +65 -9
- tccli/services/waf/v20180125/examples.json +1 -1
- tccli/services/wedata/v20210820/api.json +30 -19
- {tccli-3.0.1132.1.dist-info → tccli-3.0.1134.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1132.1.dist-info → tccli-3.0.1134.1.dist-info}/RECORD +83 -83
- {tccli-3.0.1132.1.dist-info → tccli-3.0.1134.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1132.1.dist-info → tccli-3.0.1134.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1132.1.dist-info → tccli-3.0.1134.1.dist-info}/license_files/LICENSE +0 -0
@@ -329,6 +329,58 @@ def doDescribeRocketMQMsgTrace(args, parsed_globals):
|
|
329
329
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
330
330
|
|
331
331
|
|
332
|
+
def doCreateRocketMQRole(args, parsed_globals):
|
333
|
+
g_param = parse_global_arg(parsed_globals)
|
334
|
+
|
335
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
336
|
+
cred = credential.CVMRoleCredential()
|
337
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
338
|
+
cred = credential.STSAssumeRoleCredential(
|
339
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
340
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
341
|
+
)
|
342
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
343
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
344
|
+
else:
|
345
|
+
cred = credential.Credential(
|
346
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
347
|
+
)
|
348
|
+
http_profile = HttpProfile(
|
349
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
350
|
+
reqMethod="POST",
|
351
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
352
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
353
|
+
)
|
354
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
355
|
+
if g_param[OptionsDefine.Language]:
|
356
|
+
profile.language = g_param[OptionsDefine.Language]
|
357
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
358
|
+
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
359
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
360
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
361
|
+
model = models.CreateRocketMQRoleRequest()
|
362
|
+
model.from_json_string(json.dumps(args))
|
363
|
+
start_time = time.time()
|
364
|
+
while True:
|
365
|
+
rsp = client.CreateRocketMQRole(model)
|
366
|
+
result = rsp.to_json_string()
|
367
|
+
try:
|
368
|
+
json_obj = json.loads(result)
|
369
|
+
except TypeError as e:
|
370
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
371
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
372
|
+
break
|
373
|
+
cur_time = time.time()
|
374
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
375
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
376
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
377
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
378
|
+
else:
|
379
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
380
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
381
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
382
|
+
|
383
|
+
|
332
384
|
def doCreateCmqTopic(args, parsed_globals):
|
333
385
|
g_param = parse_global_arg(parsed_globals)
|
334
386
|
|
@@ -693,7 +745,7 @@ def doDeleteProCluster(args, parsed_globals):
|
|
693
745
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
694
746
|
|
695
747
|
|
696
|
-
def
|
748
|
+
def doDeleteRocketMQRoles(args, parsed_globals):
|
697
749
|
g_param = parse_global_arg(parsed_globals)
|
698
750
|
|
699
751
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -722,11 +774,11 @@ def doDescribeRocketMQSmoothMigrationTaskList(args, parsed_globals):
|
|
722
774
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
723
775
|
client._sdkVersion += ("_CLI_" + __version__)
|
724
776
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
725
|
-
model = models.
|
777
|
+
model = models.DeleteRocketMQRolesRequest()
|
726
778
|
model.from_json_string(json.dumps(args))
|
727
779
|
start_time = time.time()
|
728
780
|
while True:
|
729
|
-
rsp = client.
|
781
|
+
rsp = client.DeleteRocketMQRoles(model)
|
730
782
|
result = rsp.to_json_string()
|
731
783
|
try:
|
732
784
|
json_obj = json.loads(result)
|
@@ -1369,7 +1421,7 @@ def doDescribeTopics(args, parsed_globals):
|
|
1369
1421
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1370
1422
|
|
1371
1423
|
|
1372
|
-
def
|
1424
|
+
def doModifyRocketMQEnvironmentRole(args, parsed_globals):
|
1373
1425
|
g_param = parse_global_arg(parsed_globals)
|
1374
1426
|
|
1375
1427
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1398,11 +1450,11 @@ def doSendMessages(args, parsed_globals):
|
|
1398
1450
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
1399
1451
|
client._sdkVersion += ("_CLI_" + __version__)
|
1400
1452
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1401
|
-
model = models.
|
1453
|
+
model = models.ModifyRocketMQEnvironmentRoleRequest()
|
1402
1454
|
model.from_json_string(json.dumps(args))
|
1403
1455
|
start_time = time.time()
|
1404
1456
|
while True:
|
1405
|
-
rsp = client.
|
1457
|
+
rsp = client.ModifyRocketMQEnvironmentRole(model)
|
1406
1458
|
result = rsp.to_json_string()
|
1407
1459
|
try:
|
1408
1460
|
json_obj = json.loads(result)
|
@@ -2201,6 +2253,58 @@ def doDescribeCmqSubscriptionDetail(args, parsed_globals):
|
|
2201
2253
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2202
2254
|
|
2203
2255
|
|
2256
|
+
def doDescribeRabbitMQVirtualHost(args, parsed_globals):
|
2257
|
+
g_param = parse_global_arg(parsed_globals)
|
2258
|
+
|
2259
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
2260
|
+
cred = credential.CVMRoleCredential()
|
2261
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2262
|
+
cred = credential.STSAssumeRoleCredential(
|
2263
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2264
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2265
|
+
)
|
2266
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
2267
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
2268
|
+
else:
|
2269
|
+
cred = credential.Credential(
|
2270
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
2271
|
+
)
|
2272
|
+
http_profile = HttpProfile(
|
2273
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
2274
|
+
reqMethod="POST",
|
2275
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
2276
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
2277
|
+
)
|
2278
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
2279
|
+
if g_param[OptionsDefine.Language]:
|
2280
|
+
profile.language = g_param[OptionsDefine.Language]
|
2281
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
2282
|
+
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
2283
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
2284
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2285
|
+
model = models.DescribeRabbitMQVirtualHostRequest()
|
2286
|
+
model.from_json_string(json.dumps(args))
|
2287
|
+
start_time = time.time()
|
2288
|
+
while True:
|
2289
|
+
rsp = client.DescribeRabbitMQVirtualHost(model)
|
2290
|
+
result = rsp.to_json_string()
|
2291
|
+
try:
|
2292
|
+
json_obj = json.loads(result)
|
2293
|
+
except TypeError as e:
|
2294
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
2295
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
2296
|
+
break
|
2297
|
+
cur_time = time.time()
|
2298
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
2299
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
2300
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
2301
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
2302
|
+
else:
|
2303
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
2304
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
2305
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2306
|
+
|
2307
|
+
|
2204
2308
|
def doDescribeCmqDeadLetterSourceQueues(args, parsed_globals):
|
2205
2309
|
g_param = parse_global_arg(parsed_globals)
|
2206
2310
|
|
@@ -2461,6 +2565,58 @@ def doDescribeRocketMQSourceClusterTopicList(args, parsed_globals):
|
|
2461
2565
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2462
2566
|
|
2463
2567
|
|
2568
|
+
def doCreateRocketMQEnvironmentRole(args, parsed_globals):
|
2569
|
+
g_param = parse_global_arg(parsed_globals)
|
2570
|
+
|
2571
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
2572
|
+
cred = credential.CVMRoleCredential()
|
2573
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2574
|
+
cred = credential.STSAssumeRoleCredential(
|
2575
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2576
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2577
|
+
)
|
2578
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
2579
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
2580
|
+
else:
|
2581
|
+
cred = credential.Credential(
|
2582
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
2583
|
+
)
|
2584
|
+
http_profile = HttpProfile(
|
2585
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
2586
|
+
reqMethod="POST",
|
2587
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
2588
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
2589
|
+
)
|
2590
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
2591
|
+
if g_param[OptionsDefine.Language]:
|
2592
|
+
profile.language = g_param[OptionsDefine.Language]
|
2593
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
2594
|
+
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
2595
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
2596
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2597
|
+
model = models.CreateRocketMQEnvironmentRoleRequest()
|
2598
|
+
model.from_json_string(json.dumps(args))
|
2599
|
+
start_time = time.time()
|
2600
|
+
while True:
|
2601
|
+
rsp = client.CreateRocketMQEnvironmentRole(model)
|
2602
|
+
result = rsp.to_json_string()
|
2603
|
+
try:
|
2604
|
+
json_obj = json.loads(result)
|
2605
|
+
except TypeError as e:
|
2606
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
2607
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
2608
|
+
break
|
2609
|
+
cur_time = time.time()
|
2610
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
2611
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
2612
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
2613
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
2614
|
+
else:
|
2615
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
2616
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
2617
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2618
|
+
|
2619
|
+
|
2464
2620
|
def doDescribeRocketMQConsumerConnectionDetail(args, parsed_globals):
|
2465
2621
|
g_param = parse_global_arg(parsed_globals)
|
2466
2622
|
|
@@ -2825,7 +2981,7 @@ def doDescribeRocketMQVipInstanceDetail(args, parsed_globals):
|
|
2825
2981
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2826
2982
|
|
2827
2983
|
|
2828
|
-
def
|
2984
|
+
def doDescribeRocketMQRoles(args, parsed_globals):
|
2829
2985
|
g_param = parse_global_arg(parsed_globals)
|
2830
2986
|
|
2831
2987
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2854,11 +3010,11 @@ def doDescribeRabbitMQUser(args, parsed_globals):
|
|
2854
3010
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
2855
3011
|
client._sdkVersion += ("_CLI_" + __version__)
|
2856
3012
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2857
|
-
model = models.
|
3013
|
+
model = models.DescribeRocketMQRolesRequest()
|
2858
3014
|
model.from_json_string(json.dumps(args))
|
2859
3015
|
start_time = time.time()
|
2860
3016
|
while True:
|
2861
|
-
rsp = client.
|
3017
|
+
rsp = client.DescribeRocketMQRoles(model)
|
2862
3018
|
result = rsp.to_json_string()
|
2863
3019
|
try:
|
2864
3020
|
json_obj = json.loads(result)
|
@@ -2877,7 +3033,7 @@ def doDescribeRabbitMQUser(args, parsed_globals):
|
|
2877
3033
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2878
3034
|
|
2879
3035
|
|
2880
|
-
def
|
3036
|
+
def doDescribeRabbitMQUser(args, parsed_globals):
|
2881
3037
|
g_param = parse_global_arg(parsed_globals)
|
2882
3038
|
|
2883
3039
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2906,11 +3062,11 @@ def doDeleteRoles(args, parsed_globals):
|
|
2906
3062
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
2907
3063
|
client._sdkVersion += ("_CLI_" + __version__)
|
2908
3064
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2909
|
-
model = models.
|
3065
|
+
model = models.DescribeRabbitMQUserRequest()
|
2910
3066
|
model.from_json_string(json.dumps(args))
|
2911
3067
|
start_time = time.time()
|
2912
3068
|
while True:
|
2913
|
-
rsp = client.
|
3069
|
+
rsp = client.DescribeRabbitMQUser(model)
|
2914
3070
|
result = rsp.to_json_string()
|
2915
3071
|
try:
|
2916
3072
|
json_obj = json.loads(result)
|
@@ -3449,6 +3605,58 @@ def doDescribeMsgTrace(args, parsed_globals):
|
|
3449
3605
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3450
3606
|
|
3451
3607
|
|
3608
|
+
def doModifyRocketMQRole(args, parsed_globals):
|
3609
|
+
g_param = parse_global_arg(parsed_globals)
|
3610
|
+
|
3611
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
3612
|
+
cred = credential.CVMRoleCredential()
|
3613
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3614
|
+
cred = credential.STSAssumeRoleCredential(
|
3615
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3616
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3617
|
+
)
|
3618
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
3619
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
3620
|
+
else:
|
3621
|
+
cred = credential.Credential(
|
3622
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
3623
|
+
)
|
3624
|
+
http_profile = HttpProfile(
|
3625
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
3626
|
+
reqMethod="POST",
|
3627
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
3628
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
3629
|
+
)
|
3630
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
3631
|
+
if g_param[OptionsDefine.Language]:
|
3632
|
+
profile.language = g_param[OptionsDefine.Language]
|
3633
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
3634
|
+
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
3635
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
3636
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3637
|
+
model = models.ModifyRocketMQRoleRequest()
|
3638
|
+
model.from_json_string(json.dumps(args))
|
3639
|
+
start_time = time.time()
|
3640
|
+
while True:
|
3641
|
+
rsp = client.ModifyRocketMQRole(model)
|
3642
|
+
result = rsp.to_json_string()
|
3643
|
+
try:
|
3644
|
+
json_obj = json.loads(result)
|
3645
|
+
except TypeError as e:
|
3646
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
3647
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
3648
|
+
break
|
3649
|
+
cur_time = time.time()
|
3650
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
3651
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
3652
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
3653
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
3654
|
+
else:
|
3655
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
3656
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
3657
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3658
|
+
|
3659
|
+
|
3452
3660
|
def doDescribeRabbitMQNodeList(args, parsed_globals):
|
3453
3661
|
g_param = parse_global_arg(parsed_globals)
|
3454
3662
|
|
@@ -3605,6 +3813,58 @@ def doDeleteRocketMQTopic(args, parsed_globals):
|
|
3605
3813
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3606
3814
|
|
3607
3815
|
|
3816
|
+
def doDescribeRocketMQSmoothMigrationTaskList(args, parsed_globals):
|
3817
|
+
g_param = parse_global_arg(parsed_globals)
|
3818
|
+
|
3819
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
3820
|
+
cred = credential.CVMRoleCredential()
|
3821
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3822
|
+
cred = credential.STSAssumeRoleCredential(
|
3823
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3824
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3825
|
+
)
|
3826
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
3827
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
3828
|
+
else:
|
3829
|
+
cred = credential.Credential(
|
3830
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
3831
|
+
)
|
3832
|
+
http_profile = HttpProfile(
|
3833
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
3834
|
+
reqMethod="POST",
|
3835
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
3836
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
3837
|
+
)
|
3838
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
3839
|
+
if g_param[OptionsDefine.Language]:
|
3840
|
+
profile.language = g_param[OptionsDefine.Language]
|
3841
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
3842
|
+
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
3843
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
3844
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3845
|
+
model = models.DescribeRocketMQSmoothMigrationTaskListRequest()
|
3846
|
+
model.from_json_string(json.dumps(args))
|
3847
|
+
start_time = time.time()
|
3848
|
+
while True:
|
3849
|
+
rsp = client.DescribeRocketMQSmoothMigrationTaskList(model)
|
3850
|
+
result = rsp.to_json_string()
|
3851
|
+
try:
|
3852
|
+
json_obj = json.loads(result)
|
3853
|
+
except TypeError as e:
|
3854
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
3855
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
3856
|
+
break
|
3857
|
+
cur_time = time.time()
|
3858
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
3859
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
3860
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
3861
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
3862
|
+
else:
|
3863
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
3864
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
3865
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3866
|
+
|
3867
|
+
|
3608
3868
|
def doExportRocketMQMessageDetail(args, parsed_globals):
|
3609
3869
|
g_param = parse_global_arg(parsed_globals)
|
3610
3870
|
|
@@ -4229,6 +4489,58 @@ def doCreateRocketMQTopic(args, parsed_globals):
|
|
4229
4489
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4230
4490
|
|
4231
4491
|
|
4492
|
+
def doDescribeRocketMQEnvironmentRoles(args, parsed_globals):
|
4493
|
+
g_param = parse_global_arg(parsed_globals)
|
4494
|
+
|
4495
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
4496
|
+
cred = credential.CVMRoleCredential()
|
4497
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
4498
|
+
cred = credential.STSAssumeRoleCredential(
|
4499
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
4500
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
4501
|
+
)
|
4502
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
4503
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
4504
|
+
else:
|
4505
|
+
cred = credential.Credential(
|
4506
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
4507
|
+
)
|
4508
|
+
http_profile = HttpProfile(
|
4509
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
4510
|
+
reqMethod="POST",
|
4511
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
4512
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
4513
|
+
)
|
4514
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
4515
|
+
if g_param[OptionsDefine.Language]:
|
4516
|
+
profile.language = g_param[OptionsDefine.Language]
|
4517
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
4518
|
+
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
4519
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
4520
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4521
|
+
model = models.DescribeRocketMQEnvironmentRolesRequest()
|
4522
|
+
model.from_json_string(json.dumps(args))
|
4523
|
+
start_time = time.time()
|
4524
|
+
while True:
|
4525
|
+
rsp = client.DescribeRocketMQEnvironmentRoles(model)
|
4526
|
+
result = rsp.to_json_string()
|
4527
|
+
try:
|
4528
|
+
json_obj = json.loads(result)
|
4529
|
+
except TypeError as e:
|
4530
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
4531
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
4532
|
+
break
|
4533
|
+
cur_time = time.time()
|
4534
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
4535
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
4536
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
4537
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
4538
|
+
else:
|
4539
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
4540
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
4541
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4542
|
+
|
4543
|
+
|
4232
4544
|
def doDeleteRocketMQCluster(args, parsed_globals):
|
4233
4545
|
g_param = parse_global_arg(parsed_globals)
|
4234
4546
|
|
@@ -4385,7 +4697,7 @@ def doCreateProCluster(args, parsed_globals):
|
|
4385
4697
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4386
4698
|
|
4387
4699
|
|
4388
|
-
def
|
4700
|
+
def doDeleteRoles(args, parsed_globals):
|
4389
4701
|
g_param = parse_global_arg(parsed_globals)
|
4390
4702
|
|
4391
4703
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -4414,11 +4726,11 @@ def doDescribeRabbitMQVirtualHost(args, parsed_globals):
|
|
4414
4726
|
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
4415
4727
|
client._sdkVersion += ("_CLI_" + __version__)
|
4416
4728
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4417
|
-
model = models.
|
4729
|
+
model = models.DeleteRolesRequest()
|
4418
4730
|
model.from_json_string(json.dumps(args))
|
4419
4731
|
start_time = time.time()
|
4420
4732
|
while True:
|
4421
|
-
rsp = client.
|
4733
|
+
rsp = client.DeleteRoles(model)
|
4422
4734
|
result = rsp.to_json_string()
|
4423
4735
|
try:
|
4424
4736
|
json_obj = json.loads(result)
|
@@ -5217,6 +5529,58 @@ def doDescribeRocketMQClusters(args, parsed_globals):
|
|
5217
5529
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
5218
5530
|
|
5219
5531
|
|
5532
|
+
def doSendMessages(args, parsed_globals):
|
5533
|
+
g_param = parse_global_arg(parsed_globals)
|
5534
|
+
|
5535
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
5536
|
+
cred = credential.CVMRoleCredential()
|
5537
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
5538
|
+
cred = credential.STSAssumeRoleCredential(
|
5539
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
5540
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
5541
|
+
)
|
5542
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
5543
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
5544
|
+
else:
|
5545
|
+
cred = credential.Credential(
|
5546
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
5547
|
+
)
|
5548
|
+
http_profile = HttpProfile(
|
5549
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
5550
|
+
reqMethod="POST",
|
5551
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
5552
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
5553
|
+
)
|
5554
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
5555
|
+
if g_param[OptionsDefine.Language]:
|
5556
|
+
profile.language = g_param[OptionsDefine.Language]
|
5557
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
5558
|
+
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
5559
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
5560
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
5561
|
+
model = models.SendMessagesRequest()
|
5562
|
+
model.from_json_string(json.dumps(args))
|
5563
|
+
start_time = time.time()
|
5564
|
+
while True:
|
5565
|
+
rsp = client.SendMessages(model)
|
5566
|
+
result = rsp.to_json_string()
|
5567
|
+
try:
|
5568
|
+
json_obj = json.loads(result)
|
5569
|
+
except TypeError as e:
|
5570
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
5571
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
5572
|
+
break
|
5573
|
+
cur_time = time.time()
|
5574
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
5575
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
5576
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
5577
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
5578
|
+
else:
|
5579
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
5580
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
5581
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
5582
|
+
|
5583
|
+
|
5220
5584
|
def doModifyTopic(args, parsed_globals):
|
5221
5585
|
g_param = parse_global_arg(parsed_globals)
|
5222
5586
|
|
@@ -6569,6 +6933,58 @@ def doDescribeRabbitMQVirtualHostList(args, parsed_globals):
|
|
6569
6933
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
6570
6934
|
|
6571
6935
|
|
6936
|
+
def doDeleteRocketMQEnvironmentRoles(args, parsed_globals):
|
6937
|
+
g_param = parse_global_arg(parsed_globals)
|
6938
|
+
|
6939
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
6940
|
+
cred = credential.CVMRoleCredential()
|
6941
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
6942
|
+
cred = credential.STSAssumeRoleCredential(
|
6943
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
6944
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
6945
|
+
)
|
6946
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
6947
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
6948
|
+
else:
|
6949
|
+
cred = credential.Credential(
|
6950
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
6951
|
+
)
|
6952
|
+
http_profile = HttpProfile(
|
6953
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
6954
|
+
reqMethod="POST",
|
6955
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
6956
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
6957
|
+
)
|
6958
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
6959
|
+
if g_param[OptionsDefine.Language]:
|
6960
|
+
profile.language = g_param[OptionsDefine.Language]
|
6961
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
6962
|
+
client = mod.TdmqClient(cred, g_param[OptionsDefine.Region], profile)
|
6963
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
6964
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
6965
|
+
model = models.DeleteRocketMQEnvironmentRolesRequest()
|
6966
|
+
model.from_json_string(json.dumps(args))
|
6967
|
+
start_time = time.time()
|
6968
|
+
while True:
|
6969
|
+
rsp = client.DeleteRocketMQEnvironmentRoles(model)
|
6970
|
+
result = rsp.to_json_string()
|
6971
|
+
try:
|
6972
|
+
json_obj = json.loads(result)
|
6973
|
+
except TypeError as e:
|
6974
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
6975
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
6976
|
+
break
|
6977
|
+
cur_time = time.time()
|
6978
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
6979
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
6980
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
6981
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
6982
|
+
else:
|
6983
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
6984
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
6985
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
6986
|
+
|
6987
|
+
|
6572
6988
|
def doDeleteCmqSubscribe(args, parsed_globals):
|
6573
6989
|
g_param = parse_global_arg(parsed_globals)
|
6574
6990
|
|
@@ -6794,6 +7210,7 @@ ACTION_MAP = {
|
|
6794
7210
|
"DescribeRocketMQNamespaces": doDescribeRocketMQNamespaces,
|
6795
7211
|
"ModifyAMQPCluster": doModifyAMQPCluster,
|
6796
7212
|
"DescribeRocketMQMsgTrace": doDescribeRocketMQMsgTrace,
|
7213
|
+
"CreateRocketMQRole": doCreateRocketMQRole,
|
6797
7214
|
"CreateCmqTopic": doCreateCmqTopic,
|
6798
7215
|
"DeleteCmqQueue": doDeleteCmqQueue,
|
6799
7216
|
"ModifyRabbitMQVirtualHost": doModifyRabbitMQVirtualHost,
|
@@ -6801,7 +7218,7 @@ ACTION_MAP = {
|
|
6801
7218
|
"DeleteEnvironmentRoles": doDeleteEnvironmentRoles,
|
6802
7219
|
"DeleteRocketMQGroup": doDeleteRocketMQGroup,
|
6803
7220
|
"DeleteProCluster": doDeleteProCluster,
|
6804
|
-
"
|
7221
|
+
"DeleteRocketMQRoles": doDeleteRocketMQRoles,
|
6805
7222
|
"DescribeRocketMQConsumerConnections": doDescribeRocketMQConsumerConnections,
|
6806
7223
|
"CreateRabbitMQUser": doCreateRabbitMQUser,
|
6807
7224
|
"DescribeRabbitMQVipInstances": doDescribeRabbitMQVipInstances,
|
@@ -6814,7 +7231,7 @@ ACTION_MAP = {
|
|
6814
7231
|
"AcknowledgeMessage": doAcknowledgeMessage,
|
6815
7232
|
"CreateEnvironment": doCreateEnvironment,
|
6816
7233
|
"DescribeTopics": doDescribeTopics,
|
6817
|
-
"
|
7234
|
+
"ModifyRocketMQEnvironmentRole": doModifyRocketMQEnvironmentRole,
|
6818
7235
|
"ModifyRocketMQTopic": doModifyRocketMQTopic,
|
6819
7236
|
"DescribeRocketMQTopicMsgs": doDescribeRocketMQTopicMsgs,
|
6820
7237
|
"DescribeEnvironmentAttributes": doDescribeEnvironmentAttributes,
|
@@ -6830,11 +7247,13 @@ ACTION_MAP = {
|
|
6830
7247
|
"ModifyCmqTopicAttribute": doModifyCmqTopicAttribute,
|
6831
7248
|
"DescribeRocketMQMigratingTopicList": doDescribeRocketMQMigratingTopicList,
|
6832
7249
|
"DescribeCmqSubscriptionDetail": doDescribeCmqSubscriptionDetail,
|
7250
|
+
"DescribeRabbitMQVirtualHost": doDescribeRabbitMQVirtualHost,
|
6833
7251
|
"DescribeCmqDeadLetterSourceQueues": doDescribeCmqDeadLetterSourceQueues,
|
6834
7252
|
"CreateRocketMQVipInstance": doCreateRocketMQVipInstance,
|
6835
7253
|
"ResetRocketMQConsumerOffSet": doResetRocketMQConsumerOffSet,
|
6836
7254
|
"DescribeClusters": doDescribeClusters,
|
6837
7255
|
"DescribeRocketMQSourceClusterTopicList": doDescribeRocketMQSourceClusterTopicList,
|
7256
|
+
"CreateRocketMQEnvironmentRole": doCreateRocketMQEnvironmentRole,
|
6838
7257
|
"DescribeRocketMQConsumerConnectionDetail": doDescribeRocketMQConsumerConnectionDetail,
|
6839
7258
|
"DescribeRabbitMQVipInstance": doDescribeRabbitMQVipInstance,
|
6840
7259
|
"DescribeRocketMQPublicAccessMonitorData": doDescribeRocketMQPublicAccessMonitorData,
|
@@ -6842,8 +7261,8 @@ ACTION_MAP = {
|
|
6842
7261
|
"DescribeSubscriptions": doDescribeSubscriptions,
|
6843
7262
|
"DescribeCmqTopicDetail": doDescribeCmqTopicDetail,
|
6844
7263
|
"DescribeRocketMQVipInstanceDetail": doDescribeRocketMQVipInstanceDetail,
|
7264
|
+
"DescribeRocketMQRoles": doDescribeRocketMQRoles,
|
6845
7265
|
"DescribeRabbitMQUser": doDescribeRabbitMQUser,
|
6846
|
-
"DeleteRoles": doDeleteRoles,
|
6847
7266
|
"ModifyRocketMQCluster": doModifyRocketMQCluster,
|
6848
7267
|
"ModifyCluster": doModifyCluster,
|
6849
7268
|
"DescribePulsarProInstanceDetail": doDescribePulsarProInstanceDetail,
|
@@ -6854,9 +7273,11 @@ ACTION_MAP = {
|
|
6854
7273
|
"DeleteTopics": doDeleteTopics,
|
6855
7274
|
"ResetMsgSubOffsetByTimestamp": doResetMsgSubOffsetByTimestamp,
|
6856
7275
|
"DescribeMsgTrace": doDescribeMsgTrace,
|
7276
|
+
"ModifyRocketMQRole": doModifyRocketMQRole,
|
6857
7277
|
"DescribeRabbitMQNodeList": doDescribeRabbitMQNodeList,
|
6858
7278
|
"DescribeBindVpcs": doDescribeBindVpcs,
|
6859
7279
|
"DeleteRocketMQTopic": doDeleteRocketMQTopic,
|
7280
|
+
"DescribeRocketMQSmoothMigrationTaskList": doDescribeRocketMQSmoothMigrationTaskList,
|
6860
7281
|
"ExportRocketMQMessageDetail": doExportRocketMQMessageDetail,
|
6861
7282
|
"DescribeRabbitMQQueues": doDescribeRabbitMQQueues,
|
6862
7283
|
"ModifyCmqQueueAttribute": doModifyCmqQueueAttribute,
|
@@ -6869,10 +7290,11 @@ ACTION_MAP = {
|
|
6869
7290
|
"DescribeMqMsgTrace": doDescribeMqMsgTrace,
|
6870
7291
|
"SetRocketMQPublicAccessPoint": doSetRocketMQPublicAccessPoint,
|
6871
7292
|
"CreateRocketMQTopic": doCreateRocketMQTopic,
|
7293
|
+
"DescribeRocketMQEnvironmentRoles": doDescribeRocketMQEnvironmentRoles,
|
6872
7294
|
"DeleteRocketMQCluster": doDeleteRocketMQCluster,
|
6873
7295
|
"DeleteRabbitMQUser": doDeleteRabbitMQUser,
|
6874
7296
|
"CreateProCluster": doCreateProCluster,
|
6875
|
-
"
|
7297
|
+
"DeleteRoles": doDeleteRoles,
|
6876
7298
|
"ReceiveMessage": doReceiveMessage,
|
6877
7299
|
"DeleteRabbitMQVirtualHost": doDeleteRabbitMQVirtualHost,
|
6878
7300
|
"SendCmqMsg": doSendCmqMsg,
|
@@ -6888,6 +7310,7 @@ ACTION_MAP = {
|
|
6888
7310
|
"CreateEnvironmentRole": doCreateEnvironmentRole,
|
6889
7311
|
"DescribeRocketMQTopics": doDescribeRocketMQTopics,
|
6890
7312
|
"DescribeRocketMQClusters": doDescribeRocketMQClusters,
|
7313
|
+
"SendMessages": doSendMessages,
|
6891
7314
|
"ModifyTopic": doModifyTopic,
|
6892
7315
|
"DescribeTopicMsgs": doDescribeTopicMsgs,
|
6893
7316
|
"DescribeNodeHealthOpt": doDescribeNodeHealthOpt,
|
@@ -6914,6 +7337,7 @@ ACTION_MAP = {
|
|
6914
7337
|
"DescribeRocketMQPublicAccessPoint": doDescribeRocketMQPublicAccessPoint,
|
6915
7338
|
"ModifyRole": doModifyRole,
|
6916
7339
|
"DescribeRabbitMQVirtualHostList": doDescribeRabbitMQVirtualHostList,
|
7340
|
+
"DeleteRocketMQEnvironmentRoles": doDeleteRocketMQEnvironmentRoles,
|
6917
7341
|
"DeleteCmqSubscribe": doDeleteCmqSubscribe,
|
6918
7342
|
"DescribeAllTenants": doDescribeAllTenants,
|
6919
7343
|
"DescribeNamespaceBundlesOpt": doDescribeNamespaceBundlesOpt,
|