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