tccli 3.0.1102.1__py2.py3-none-any.whl → 3.0.1103.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.
Files changed (45) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/examples/iotexplorer/v20190423/CreateTRTCSignaturesWithRoomId.md +30 -0
  3. tccli/examples/iotexplorer/v20190423/DescribeCloudStorageAIServiceTask.md +36 -0
  4. tccli/examples/iotexplorer/v20190423/DescribeCloudStorageAIServiceTasks.md +3 -0
  5. tccli/examples/iotexplorer/v20190423/DismissRoomByStrRoomIdFromTRTC.md +20 -0
  6. tccli/examples/iotexplorer/v20190423/GenerateCloudStorageAIServiceTaskFileURL.md +24 -0
  7. tccli/examples/iotexplorer/v20190423/RemoveUserByRoomIdFromTRTC.md +21 -0
  8. tccli/examples/lighthouse/v20200324/DescribeInstancesDeniedActions.md +11 -6
  9. tccli/examples/mrs/v20200910/DrugInstructionObject.md +0 -0
  10. tccli/examples/waf/v20180125/CreateIpAccessControl.md +27 -0
  11. tccli/examples/waf/v20180125/DeleteIpAccessControlV2.md +25 -0
  12. tccli/examples/waf/v20180125/ImportIpAccessControl.md +30 -0
  13. tccli/examples/waf/v20180125/ModifyIpAccessControl.md +28 -0
  14. tccli/services/captcha/v20190722/api.json +2 -2
  15. tccli/services/ccc/v20200210/api.json +3 -3
  16. tccli/services/clb/v20180317/api.json +1 -1
  17. tccli/services/cls/v20201016/api.json +1 -1
  18. tccli/services/dlc/v20210125/api.json +70 -1
  19. tccli/services/fmu/v20191213/api.json +1 -1
  20. tccli/services/iotexplorer/iotexplorer_client.py +298 -33
  21. tccli/services/iotexplorer/v20190423/api.json +359 -20
  22. tccli/services/iotexplorer/v20190423/examples.json +41 -1
  23. tccli/services/iss/v20230517/api.json +10 -0
  24. tccli/services/lighthouse/v20200324/api.json +30 -28
  25. tccli/services/lighthouse/v20200324/examples.json +3 -3
  26. tccli/services/lke/v20231130/api.json +1 -1
  27. tccli/services/mrs/mrs_client.py +53 -0
  28. tccli/services/mrs/v20200910/api.json +1649 -415
  29. tccli/services/mrs/v20200910/examples.json +8 -0
  30. tccli/services/ocr/v20181119/api.json +1 -1
  31. tccli/services/rce/rce_client.py +0 -53
  32. tccli/services/rce/v20201103/api.json +0 -197
  33. tccli/services/rce/v20201103/examples.json +0 -8
  34. tccli/services/tdmq/v20200217/api.json +30 -0
  35. tccli/services/tke/v20180525/api.json +1 -1
  36. tccli/services/trtc/v20190722/api.json +1 -1
  37. tccli/services/tse/v20201207/api.json +2 -2
  38. tccli/services/waf/v20180125/api.json +396 -0
  39. tccli/services/waf/v20180125/examples.json +32 -0
  40. tccli/services/waf/waf_client.py +216 -4
  41. {tccli-3.0.1102.1.dist-info → tccli-3.0.1103.1.dist-info}/METADATA +2 -2
  42. {tccli-3.0.1102.1.dist-info → tccli-3.0.1103.1.dist-info}/RECORD +45 -35
  43. {tccli-3.0.1102.1.dist-info → tccli-3.0.1103.1.dist-info}/WHEEL +0 -0
  44. {tccli-3.0.1102.1.dist-info → tccli-3.0.1103.1.dist-info}/entry_points.txt +0 -0
  45. {tccli-3.0.1102.1.dist-info → tccli-3.0.1103.1.dist-info}/license_files/LICENSE +0 -0
@@ -17,6 +17,58 @@ from tencentcloud.iotexplorer.v20190423 import models as models_v20190423
17
17
  from jmespath import search
18
18
  import time
19
19
 
20
+ def doCreateProject(args, parsed_globals):
21
+ g_param = parse_global_arg(parsed_globals)
22
+
23
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
24
+ cred = credential.CVMRoleCredential()
25
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
26
+ cred = credential.STSAssumeRoleCredential(
27
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
28
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
29
+ )
30
+ 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):
31
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
32
+ else:
33
+ cred = credential.Credential(
34
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
35
+ )
36
+ http_profile = HttpProfile(
37
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
38
+ reqMethod="POST",
39
+ endpoint=g_param[OptionsDefine.Endpoint],
40
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
41
+ )
42
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
43
+ if g_param[OptionsDefine.Language]:
44
+ profile.language = g_param[OptionsDefine.Language]
45
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
46
+ client = mod.IotexplorerClient(cred, g_param[OptionsDefine.Region], profile)
47
+ client._sdkVersion += ("_CLI_" + __version__)
48
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
49
+ model = models.CreateProjectRequest()
50
+ model.from_json_string(json.dumps(args))
51
+ start_time = time.time()
52
+ while True:
53
+ rsp = client.CreateProject(model)
54
+ result = rsp.to_json_string()
55
+ try:
56
+ json_obj = json.loads(result)
57
+ except TypeError as e:
58
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
59
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
60
+ break
61
+ cur_time = time.time()
62
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
63
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
64
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
65
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
66
+ else:
67
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
68
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
69
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
70
+
71
+
20
72
  def doGetCOSURL(args, parsed_globals):
21
73
  g_param = parse_global_arg(parsed_globals)
22
74
 
@@ -225,6 +277,58 @@ def doDescribeDevice(args, parsed_globals):
225
277
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
226
278
 
227
279
 
280
+ def doGenSingleDeviceSignatureOfPublic(args, parsed_globals):
281
+ g_param = parse_global_arg(parsed_globals)
282
+
283
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
284
+ cred = credential.CVMRoleCredential()
285
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
286
+ cred = credential.STSAssumeRoleCredential(
287
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
288
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
289
+ )
290
+ 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):
291
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
292
+ else:
293
+ cred = credential.Credential(
294
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
295
+ )
296
+ http_profile = HttpProfile(
297
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
298
+ reqMethod="POST",
299
+ endpoint=g_param[OptionsDefine.Endpoint],
300
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
301
+ )
302
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
303
+ if g_param[OptionsDefine.Language]:
304
+ profile.language = g_param[OptionsDefine.Language]
305
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
306
+ client = mod.IotexplorerClient(cred, g_param[OptionsDefine.Region], profile)
307
+ client._sdkVersion += ("_CLI_" + __version__)
308
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
309
+ model = models.GenSingleDeviceSignatureOfPublicRequest()
310
+ model.from_json_string(json.dumps(args))
311
+ start_time = time.time()
312
+ while True:
313
+ rsp = client.GenSingleDeviceSignatureOfPublic(model)
314
+ result = rsp.to_json_string()
315
+ try:
316
+ json_obj = json.loads(result)
317
+ except TypeError as e:
318
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
319
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
320
+ break
321
+ cur_time = time.time()
322
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
323
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
324
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
325
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
326
+ else:
327
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
328
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
329
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
330
+
331
+
228
332
  def doDescribeTopicPolicy(args, parsed_globals):
229
333
  g_param = parse_global_arg(parsed_globals)
230
334
 
@@ -1005,6 +1109,58 @@ def doDescribeCloudStorageThumbnailList(args, parsed_globals):
1005
1109
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1006
1110
 
1007
1111
 
1112
+ def doCreateTRTCSignaturesWithRoomId(args, parsed_globals):
1113
+ g_param = parse_global_arg(parsed_globals)
1114
+
1115
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1116
+ cred = credential.CVMRoleCredential()
1117
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1118
+ cred = credential.STSAssumeRoleCredential(
1119
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1120
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1121
+ )
1122
+ 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):
1123
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1124
+ else:
1125
+ cred = credential.Credential(
1126
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1127
+ )
1128
+ http_profile = HttpProfile(
1129
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1130
+ reqMethod="POST",
1131
+ endpoint=g_param[OptionsDefine.Endpoint],
1132
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1133
+ )
1134
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1135
+ if g_param[OptionsDefine.Language]:
1136
+ profile.language = g_param[OptionsDefine.Language]
1137
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1138
+ client = mod.IotexplorerClient(cred, g_param[OptionsDefine.Region], profile)
1139
+ client._sdkVersion += ("_CLI_" + __version__)
1140
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1141
+ model = models.CreateTRTCSignaturesWithRoomIdRequest()
1142
+ model.from_json_string(json.dumps(args))
1143
+ start_time = time.time()
1144
+ while True:
1145
+ rsp = client.CreateTRTCSignaturesWithRoomId(model)
1146
+ result = rsp.to_json_string()
1147
+ try:
1148
+ json_obj = json.loads(result)
1149
+ except TypeError as e:
1150
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1151
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1152
+ break
1153
+ cur_time = time.time()
1154
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1155
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1156
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1157
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1158
+ else:
1159
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1160
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1161
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1162
+
1163
+
1008
1164
  def doModifyFenceBind(args, parsed_globals):
1009
1165
  g_param = parse_global_arg(parsed_globals)
1010
1166
 
@@ -2565,7 +2721,7 @@ def doDescribeLoRaFrequency(args, parsed_globals):
2565
2721
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2566
2722
 
2567
2723
 
2568
- def doModifyPositionSpace(args, parsed_globals):
2724
+ def doModifyTopicPolicy(args, parsed_globals):
2569
2725
  g_param = parse_global_arg(parsed_globals)
2570
2726
 
2571
2727
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2594,11 +2750,11 @@ def doModifyPositionSpace(args, parsed_globals):
2594
2750
  client = mod.IotexplorerClient(cred, g_param[OptionsDefine.Region], profile)
2595
2751
  client._sdkVersion += ("_CLI_" + __version__)
2596
2752
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2597
- model = models.ModifyPositionSpaceRequest()
2753
+ model = models.ModifyTopicPolicyRequest()
2598
2754
  model.from_json_string(json.dumps(args))
2599
2755
  start_time = time.time()
2600
2756
  while True:
2601
- rsp = client.ModifyPositionSpace(model)
2757
+ rsp = client.ModifyTopicPolicy(model)
2602
2758
  result = rsp.to_json_string()
2603
2759
  try:
2604
2760
  json_obj = json.loads(result)
@@ -2773,7 +2929,7 @@ def doDescribeCloudStorageThumbnail(args, parsed_globals):
2773
2929
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2774
2930
 
2775
2931
 
2776
- def doCreateProject(args, parsed_globals):
2932
+ def doDescribeCloudStorageMultiThumbnail(args, parsed_globals):
2777
2933
  g_param = parse_global_arg(parsed_globals)
2778
2934
 
2779
2935
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2802,11 +2958,11 @@ def doCreateProject(args, parsed_globals):
2802
2958
  client = mod.IotexplorerClient(cred, g_param[OptionsDefine.Region], profile)
2803
2959
  client._sdkVersion += ("_CLI_" + __version__)
2804
2960
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2805
- model = models.CreateProjectRequest()
2961
+ model = models.DescribeCloudStorageMultiThumbnailRequest()
2806
2962
  model.from_json_string(json.dumps(args))
2807
2963
  start_time = time.time()
2808
2964
  while True:
2809
- rsp = client.CreateProject(model)
2965
+ rsp = client.DescribeCloudStorageMultiThumbnail(model)
2810
2966
  result = rsp.to_json_string()
2811
2967
  try:
2812
2968
  json_obj = json.loads(result)
@@ -3345,6 +3501,58 @@ def doDirectBindDeviceInFamily(args, parsed_globals):
3345
3501
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3346
3502
 
3347
3503
 
3504
+ def doDismissRoomByStrRoomIdFromTRTC(args, parsed_globals):
3505
+ g_param = parse_global_arg(parsed_globals)
3506
+
3507
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
3508
+ cred = credential.CVMRoleCredential()
3509
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
3510
+ cred = credential.STSAssumeRoleCredential(
3511
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
3512
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
3513
+ )
3514
+ 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):
3515
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
3516
+ else:
3517
+ cred = credential.Credential(
3518
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
3519
+ )
3520
+ http_profile = HttpProfile(
3521
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
3522
+ reqMethod="POST",
3523
+ endpoint=g_param[OptionsDefine.Endpoint],
3524
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
3525
+ )
3526
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
3527
+ if g_param[OptionsDefine.Language]:
3528
+ profile.language = g_param[OptionsDefine.Language]
3529
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
3530
+ client = mod.IotexplorerClient(cred, g_param[OptionsDefine.Region], profile)
3531
+ client._sdkVersion += ("_CLI_" + __version__)
3532
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
3533
+ model = models.DismissRoomByStrRoomIdFromTRTCRequest()
3534
+ model.from_json_string(json.dumps(args))
3535
+ start_time = time.time()
3536
+ while True:
3537
+ rsp = client.DismissRoomByStrRoomIdFromTRTC(model)
3538
+ result = rsp.to_json_string()
3539
+ try:
3540
+ json_obj = json.loads(result)
3541
+ except TypeError as e:
3542
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
3543
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
3544
+ break
3545
+ cur_time = time.time()
3546
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
3547
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
3548
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
3549
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
3550
+ else:
3551
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
3552
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
3553
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3554
+
3555
+
3348
3556
  def doCreatePositionFence(args, parsed_globals):
3349
3557
  g_param = parse_global_arg(parsed_globals)
3350
3558
 
@@ -3917,6 +4125,58 @@ def doBindProducts(args, parsed_globals):
3917
4125
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3918
4126
 
3919
4127
 
4128
+ def doRemoveUserByRoomIdFromTRTC(args, parsed_globals):
4129
+ g_param = parse_global_arg(parsed_globals)
4130
+
4131
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
4132
+ cred = credential.CVMRoleCredential()
4133
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
4134
+ cred = credential.STSAssumeRoleCredential(
4135
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
4136
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
4137
+ )
4138
+ 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):
4139
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
4140
+ else:
4141
+ cred = credential.Credential(
4142
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
4143
+ )
4144
+ http_profile = HttpProfile(
4145
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
4146
+ reqMethod="POST",
4147
+ endpoint=g_param[OptionsDefine.Endpoint],
4148
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
4149
+ )
4150
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
4151
+ if g_param[OptionsDefine.Language]:
4152
+ profile.language = g_param[OptionsDefine.Language]
4153
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
4154
+ client = mod.IotexplorerClient(cred, g_param[OptionsDefine.Region], profile)
4155
+ client._sdkVersion += ("_CLI_" + __version__)
4156
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
4157
+ model = models.RemoveUserByRoomIdFromTRTCRequest()
4158
+ model.from_json_string(json.dumps(args))
4159
+ start_time = time.time()
4160
+ while True:
4161
+ rsp = client.RemoveUserByRoomIdFromTRTC(model)
4162
+ result = rsp.to_json_string()
4163
+ try:
4164
+ json_obj = json.loads(result)
4165
+ except TypeError as e:
4166
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
4167
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
4168
+ break
4169
+ cur_time = time.time()
4170
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
4171
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
4172
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
4173
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
4174
+ else:
4175
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
4176
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
4177
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4178
+
4179
+
3920
4180
  def doSearchPositionSpace(args, parsed_globals):
3921
4181
  g_param = parse_global_arg(parsed_globals)
3922
4182
 
@@ -3969,7 +4229,7 @@ def doSearchPositionSpace(args, parsed_globals):
3969
4229
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3970
4230
 
3971
4231
 
3972
- def doModifyTopicPolicy(args, parsed_globals):
4232
+ def doModifyPositionSpace(args, parsed_globals):
3973
4233
  g_param = parse_global_arg(parsed_globals)
3974
4234
 
3975
4235
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3998,11 +4258,11 @@ def doModifyTopicPolicy(args, parsed_globals):
3998
4258
  client = mod.IotexplorerClient(cred, g_param[OptionsDefine.Region], profile)
3999
4259
  client._sdkVersion += ("_CLI_" + __version__)
4000
4260
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
4001
- model = models.ModifyTopicPolicyRequest()
4261
+ model = models.ModifyPositionSpaceRequest()
4002
4262
  model.from_json_string(json.dumps(args))
4003
4263
  start_time = time.time()
4004
4264
  while True:
4005
- rsp = client.ModifyTopicPolicy(model)
4265
+ rsp = client.ModifyPositionSpace(model)
4006
4266
  result = rsp.to_json_string()
4007
4267
  try:
4008
4268
  json_obj = json.loads(result)
@@ -4645,7 +4905,7 @@ def doDescribeModelDefinition(args, parsed_globals):
4645
4905
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4646
4906
 
4647
4907
 
4648
- def doGetGatewaySubDeviceList(args, parsed_globals):
4908
+ def doDescribeBatchProduction(args, parsed_globals):
4649
4909
  g_param = parse_global_arg(parsed_globals)
4650
4910
 
4651
4911
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -4674,11 +4934,11 @@ def doGetGatewaySubDeviceList(args, parsed_globals):
4674
4934
  client = mod.IotexplorerClient(cred, g_param[OptionsDefine.Region], profile)
4675
4935
  client._sdkVersion += ("_CLI_" + __version__)
4676
4936
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
4677
- model = models.GetGatewaySubDeviceListRequest()
4937
+ model = models.DescribeBatchProductionRequest()
4678
4938
  model.from_json_string(json.dumps(args))
4679
4939
  start_time = time.time()
4680
4940
  while True:
4681
- rsp = client.GetGatewaySubDeviceList(model)
4941
+ rsp = client.DescribeBatchProduction(model)
4682
4942
  result = rsp.to_json_string()
4683
4943
  try:
4684
4944
  json_obj = json.loads(result)
@@ -4697,7 +4957,7 @@ def doGetGatewaySubDeviceList(args, parsed_globals):
4697
4957
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4698
4958
 
4699
4959
 
4700
- def doDescribeBatchProduction(args, parsed_globals):
4960
+ def doDeleteCloudStorageEvent(args, parsed_globals):
4701
4961
  g_param = parse_global_arg(parsed_globals)
4702
4962
 
4703
4963
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -4726,11 +4986,11 @@ def doDescribeBatchProduction(args, parsed_globals):
4726
4986
  client = mod.IotexplorerClient(cred, g_param[OptionsDefine.Region], profile)
4727
4987
  client._sdkVersion += ("_CLI_" + __version__)
4728
4988
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
4729
- model = models.DescribeBatchProductionRequest()
4989
+ model = models.DeleteCloudStorageEventRequest()
4730
4990
  model.from_json_string(json.dumps(args))
4731
4991
  start_time = time.time()
4732
4992
  while True:
4733
- rsp = client.DescribeBatchProduction(model)
4993
+ rsp = client.DeleteCloudStorageEvent(model)
4734
4994
  result = rsp.to_json_string()
4735
4995
  try:
4736
4996
  json_obj = json.loads(result)
@@ -4749,7 +5009,7 @@ def doDescribeBatchProduction(args, parsed_globals):
4749
5009
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4750
5010
 
4751
5011
 
4752
- def doDeleteCloudStorageEvent(args, parsed_globals):
5012
+ def doDeleteDevices(args, parsed_globals):
4753
5013
  g_param = parse_global_arg(parsed_globals)
4754
5014
 
4755
5015
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -4778,11 +5038,11 @@ def doDeleteCloudStorageEvent(args, parsed_globals):
4778
5038
  client = mod.IotexplorerClient(cred, g_param[OptionsDefine.Region], profile)
4779
5039
  client._sdkVersion += ("_CLI_" + __version__)
4780
5040
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
4781
- model = models.DeleteCloudStorageEventRequest()
5041
+ model = models.DeleteDevicesRequest()
4782
5042
  model.from_json_string(json.dumps(args))
4783
5043
  start_time = time.time()
4784
5044
  while True:
4785
- rsp = client.DeleteCloudStorageEvent(model)
5045
+ rsp = client.DeleteDevices(model)
4786
5046
  result = rsp.to_json_string()
4787
5047
  try:
4788
5048
  json_obj = json.loads(result)
@@ -4801,7 +5061,7 @@ def doDeleteCloudStorageEvent(args, parsed_globals):
4801
5061
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4802
5062
 
4803
5063
 
4804
- def doDeleteDevices(args, parsed_globals):
5064
+ def doGetGatewaySubDeviceList(args, parsed_globals):
4805
5065
  g_param = parse_global_arg(parsed_globals)
4806
5066
 
4807
5067
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -4830,11 +5090,11 @@ def doDeleteDevices(args, parsed_globals):
4830
5090
  client = mod.IotexplorerClient(cred, g_param[OptionsDefine.Region], profile)
4831
5091
  client._sdkVersion += ("_CLI_" + __version__)
4832
5092
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
4833
- model = models.DeleteDevicesRequest()
5093
+ model = models.GetGatewaySubDeviceListRequest()
4834
5094
  model.from_json_string(json.dumps(args))
4835
5095
  start_time = time.time()
4836
5096
  while True:
4837
- rsp = client.DeleteDevices(model)
5097
+ rsp = client.GetGatewaySubDeviceList(model)
4838
5098
  result = rsp.to_json_string()
4839
5099
  try:
4840
5100
  json_obj = json.loads(result)
@@ -4853,7 +5113,7 @@ def doDeleteDevices(args, parsed_globals):
4853
5113
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4854
5114
 
4855
5115
 
4856
- def doDescribeCloudStorageMultiThumbnail(args, parsed_globals):
5116
+ def doGenerateCloudStorageAIServiceTaskFileURL(args, parsed_globals):
4857
5117
  g_param = parse_global_arg(parsed_globals)
4858
5118
 
4859
5119
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -4882,11 +5142,11 @@ def doDescribeCloudStorageMultiThumbnail(args, parsed_globals):
4882
5142
  client = mod.IotexplorerClient(cred, g_param[OptionsDefine.Region], profile)
4883
5143
  client._sdkVersion += ("_CLI_" + __version__)
4884
5144
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
4885
- model = models.DescribeCloudStorageMultiThumbnailRequest()
5145
+ model = models.GenerateCloudStorageAIServiceTaskFileURLRequest()
4886
5146
  model.from_json_string(json.dumps(args))
4887
5147
  start_time = time.time()
4888
5148
  while True:
4889
- rsp = client.DescribeCloudStorageMultiThumbnail(model)
5149
+ rsp = client.GenerateCloudStorageAIServiceTaskFileURL(model)
4890
5150
  result = rsp.to_json_string()
4891
5151
  try:
4892
5152
  json_obj = json.loads(result)
@@ -5633,7 +5893,7 @@ def doListTopicPolicy(args, parsed_globals):
5633
5893
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
5634
5894
 
5635
5895
 
5636
- def doGenSingleDeviceSignatureOfPublic(args, parsed_globals):
5896
+ def doDescribeCloudStorageAIServiceTask(args, parsed_globals):
5637
5897
  g_param = parse_global_arg(parsed_globals)
5638
5898
 
5639
5899
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -5662,11 +5922,11 @@ def doGenSingleDeviceSignatureOfPublic(args, parsed_globals):
5662
5922
  client = mod.IotexplorerClient(cred, g_param[OptionsDefine.Region], profile)
5663
5923
  client._sdkVersion += ("_CLI_" + __version__)
5664
5924
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
5665
- model = models.GenSingleDeviceSignatureOfPublicRequest()
5925
+ model = models.DescribeCloudStorageAIServiceTaskRequest()
5666
5926
  model.from_json_string(json.dumps(args))
5667
5927
  start_time = time.time()
5668
5928
  while True:
5669
- rsp = client.GenSingleDeviceSignatureOfPublic(model)
5929
+ rsp = client.DescribeCloudStorageAIServiceTask(model)
5670
5930
  result = rsp.to_json_string()
5671
5931
  try:
5672
5932
  json_obj = json.loads(result)
@@ -6476,10 +6736,12 @@ MODELS_MAP = {
6476
6736
  }
6477
6737
 
6478
6738
  ACTION_MAP = {
6739
+ "CreateProject": doCreateProject,
6479
6740
  "GetCOSURL": doGetCOSURL,
6480
6741
  "ModifyStudioProduct": doModifyStudioProduct,
6481
6742
  "DescribeDevicePackages": doDescribeDevicePackages,
6482
6743
  "DescribeDevice": doDescribeDevice,
6744
+ "GenSingleDeviceSignatureOfPublic": doGenSingleDeviceSignatureOfPublic,
6483
6745
  "DescribeTopicPolicy": doDescribeTopicPolicy,
6484
6746
  "ModifyProductCloudStorageAIService": doModifyProductCloudStorageAIService,
6485
6747
  "GetProjectList": doGetProjectList,
@@ -6495,6 +6757,7 @@ ACTION_MAP = {
6495
6757
  "GetLoRaGatewayList": doGetLoRaGatewayList,
6496
6758
  "ReleaseStudioProduct": doReleaseStudioProduct,
6497
6759
  "DescribeCloudStorageThumbnailList": doDescribeCloudStorageThumbnailList,
6760
+ "CreateTRTCSignaturesWithRoomId": doCreateTRTCSignaturesWithRoomId,
6498
6761
  "ModifyFenceBind": doModifyFenceBind,
6499
6762
  "DescribeProductCloudStorageAIService": doDescribeProductCloudStorageAIService,
6500
6763
  "DescribePackageConsumeTasks": doDescribePackageConsumeTasks,
@@ -6525,11 +6788,11 @@ ACTION_MAP = {
6525
6788
  "GetPositionSpaceList": doGetPositionSpaceList,
6526
6789
  "ResetCloudStorage": doResetCloudStorage,
6527
6790
  "DescribeLoRaFrequency": doDescribeLoRaFrequency,
6528
- "ModifyPositionSpace": doModifyPositionSpace,
6791
+ "ModifyTopicPolicy": doModifyTopicPolicy,
6529
6792
  "DescribeCloudStorageTime": doDescribeCloudStorageTime,
6530
6793
  "GetTopicRuleList": doGetTopicRuleList,
6531
6794
  "DescribeCloudStorageThumbnail": doDescribeCloudStorageThumbnail,
6532
- "CreateProject": doCreateProject,
6795
+ "DescribeCloudStorageMultiThumbnail": doDescribeCloudStorageMultiThumbnail,
6533
6796
  "CallDeviceActionAsync": doCallDeviceActionAsync,
6534
6797
  "DescribeCloudStorageStreamData": doDescribeCloudStorageStreamData,
6535
6798
  "GetDeviceSumStatistics": doGetDeviceSumStatistics,
@@ -6540,6 +6803,7 @@ ACTION_MAP = {
6540
6803
  "GetBatchProductionsList": doGetBatchProductionsList,
6541
6804
  "DescribeDeviceData": doDescribeDeviceData,
6542
6805
  "DirectBindDeviceInFamily": doDirectBindDeviceInFamily,
6806
+ "DismissRoomByStrRoomIdFromTRTC": doDismissRoomByStrRoomIdFromTRTC,
6543
6807
  "CreatePositionFence": doCreatePositionFence,
6544
6808
  "CreateLoRaGateway": doCreateLoRaGateway,
6545
6809
  "CreateTopicRule": doCreateTopicRule,
@@ -6551,8 +6815,9 @@ ACTION_MAP = {
6551
6815
  "UpdateDevicesEnableState": doUpdateDevicesEnableState,
6552
6816
  "ModifyProject": doModifyProject,
6553
6817
  "BindProducts": doBindProducts,
6818
+ "RemoveUserByRoomIdFromTRTC": doRemoveUserByRoomIdFromTRTC,
6554
6819
  "SearchPositionSpace": doSearchPositionSpace,
6555
- "ModifyTopicPolicy": doModifyTopicPolicy,
6820
+ "ModifyPositionSpace": doModifyPositionSpace,
6556
6821
  "DescribeSpaceFenceEventList": doDescribeSpaceFenceEventList,
6557
6822
  "UpdateFirmware": doUpdateFirmware,
6558
6823
  "DescribeGatewaySubProducts": doDescribeGatewaySubProducts,
@@ -6565,11 +6830,11 @@ ACTION_MAP = {
6565
6830
  "ModifyCloudStorageAIService": doModifyCloudStorageAIService,
6566
6831
  "GetStudioProductList": doGetStudioProductList,
6567
6832
  "DescribeModelDefinition": doDescribeModelDefinition,
6568
- "GetGatewaySubDeviceList": doGetGatewaySubDeviceList,
6569
6833
  "DescribeBatchProduction": doDescribeBatchProduction,
6570
6834
  "DeleteCloudStorageEvent": doDeleteCloudStorageEvent,
6571
6835
  "DeleteDevices": doDeleteDevices,
6572
- "DescribeCloudStorageMultiThumbnail": doDescribeCloudStorageMultiThumbnail,
6836
+ "GetGatewaySubDeviceList": doGetGatewaySubDeviceList,
6837
+ "GenerateCloudStorageAIServiceTaskFileURL": doGenerateCloudStorageAIServiceTaskFileURL,
6573
6838
  "DescribeCloudStorageOrder": doDescribeCloudStorageOrder,
6574
6839
  "PublishMessage": doPublishMessage,
6575
6840
  "DescribeDeviceDataHistory": doDescribeDeviceDataHistory,
@@ -6584,7 +6849,7 @@ ACTION_MAP = {
6584
6849
  "DeleteTopicPolicy": doDeleteTopicPolicy,
6585
6850
  "GetDeviceList": doGetDeviceList,
6586
6851
  "ListTopicPolicy": doListTopicPolicy,
6587
- "GenSingleDeviceSignatureOfPublic": doGenSingleDeviceSignatureOfPublic,
6852
+ "DescribeCloudStorageAIServiceTask": doDescribeCloudStorageAIServiceTask,
6588
6853
  "DescribeInstance": doDescribeInstance,
6589
6854
  "ModifyLoRaFrequency": doModifyLoRaFrequency,
6590
6855
  "DeletePositionFence": doDeletePositionFence,