tccli 3.0.1209.1__py2.py3-none-any.whl → 3.0.1211.1__py2.py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/bma/v20221115/api.json +26 -1
  3. tccli/services/bma/v20221115/examples.json +6 -6
  4. tccli/services/cam/v20190116/api.json +38 -30
  5. tccli/services/cam/v20190116/examples.json +2 -2
  6. tccli/services/cdwdoris/v20211228/api.json +20 -1
  7. tccli/services/cfg/v20210820/api.json +21 -1
  8. tccli/services/cls/v20201016/api.json +72 -11
  9. tccli/services/cynosdb/v20190107/api.json +19 -9
  10. tccli/services/cynosdb/v20190107/examples.json +2 -2
  11. tccli/services/dasb/v20191018/api.json +19 -10
  12. tccli/services/dasb/v20191018/examples.json +1 -1
  13. tccli/services/dnspod/v20210323/api.json +3 -1
  14. tccli/services/emr/emr_client.py +238 -26
  15. tccli/services/emr/v20190103/api.json +1011 -115
  16. tccli/services/emr/v20190103/examples.json +32 -0
  17. tccli/services/es/v20180416/api.json +144 -2
  18. tccli/services/ess/v20201111/api.json +2 -2
  19. tccli/services/ess/v20201111/examples.json +2 -2
  20. tccli/services/essbasic/v20210526/api.json +13 -4
  21. tccli/services/gwlb/v20240906/api.json +23 -23
  22. tccli/services/hunyuan/v20230901/api.json +85 -9
  23. tccli/services/hunyuan/v20230901/examples.json +1 -1
  24. tccli/services/iss/v20230517/api.json +62 -14
  25. tccli/services/iss/v20230517/examples.json +19 -13
  26. tccli/services/redis/v20180412/api.json +2 -2
  27. tccli/services/sms/v20210111/api.json +3 -3
  28. tccli/services/sms/v20210111/examples.json +2 -2
  29. tccli/services/sqlserver/v20180328/api.json +32 -11
  30. tccli/services/sqlserver/v20180328/examples.json +1 -1
  31. tccli/services/sts/v20180813/api.json +11 -10
  32. tccli/services/sts/v20180813/examples.json +2 -2
  33. tccli/services/tcss/v20201101/api.json +136 -19
  34. tccli/services/teo/v20220901/api.json +19 -19
  35. tccli/services/teo/v20220901/examples.json +4 -58
  36. tccli/services/tke/tke_client.py +118 -12
  37. tccli/services/tke/v20180525/api.json +152 -0
  38. tccli/services/tke/v20180525/examples.json +16 -0
  39. tccli/services/vclm/v20240523/api.json +32 -3
  40. tccli/services/vpc/v20170312/api.json +59 -43
  41. tccli/services/vpc/v20170312/examples.json +1 -1
  42. {tccli-3.0.1209.1.dist-info → tccli-3.0.1211.1.dist-info}/METADATA +2 -2
  43. {tccli-3.0.1209.1.dist-info → tccli-3.0.1211.1.dist-info}/RECORD +46 -46
  44. {tccli-3.0.1209.1.dist-info → tccli-3.0.1211.1.dist-info}/WHEEL +0 -0
  45. {tccli-3.0.1209.1.dist-info → tccli-3.0.1211.1.dist-info}/entry_points.txt +0 -0
  46. {tccli-3.0.1209.1.dist-info → tccli-3.0.1211.1.dist-info}/license_files/LICENSE +0 -0
@@ -433,6 +433,58 @@ def doModifyYarnQueueV2(args, parsed_globals):
433
433
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
434
434
 
435
435
 
436
+ def doDescribeHDFSStorageInfo(args, parsed_globals):
437
+ g_param = parse_global_arg(parsed_globals)
438
+
439
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
440
+ cred = credential.CVMRoleCredential()
441
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
442
+ cred = credential.STSAssumeRoleCredential(
443
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
444
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
445
+ )
446
+ 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):
447
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
448
+ else:
449
+ cred = credential.Credential(
450
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
451
+ )
452
+ http_profile = HttpProfile(
453
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
454
+ reqMethod="POST",
455
+ endpoint=g_param[OptionsDefine.Endpoint],
456
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
457
+ )
458
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
459
+ if g_param[OptionsDefine.Language]:
460
+ profile.language = g_param[OptionsDefine.Language]
461
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
462
+ client = mod.EmrClient(cred, g_param[OptionsDefine.Region], profile)
463
+ client._sdkVersion += ("_CLI_" + __version__)
464
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
465
+ model = models.DescribeHDFSStorageInfoRequest()
466
+ model.from_json_string(json.dumps(args))
467
+ start_time = time.time()
468
+ while True:
469
+ rsp = client.DescribeHDFSStorageInfo(model)
470
+ result = rsp.to_json_string()
471
+ try:
472
+ json_obj = json.loads(result)
473
+ except TypeError as e:
474
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
475
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
476
+ break
477
+ cur_time = time.time()
478
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
479
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
480
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
481
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
482
+ else:
483
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
484
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
485
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
486
+
487
+
436
488
  def doDeployYarnConf(args, parsed_globals):
437
489
  g_param = parse_global_arg(parsed_globals)
438
490
 
@@ -693,7 +745,7 @@ def doDescribeCvmQuota(args, parsed_globals):
693
745
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
694
746
 
695
747
 
696
- def doModifyGlobalConfig(args, parsed_globals):
748
+ def doScaleOutInstance(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 doModifyGlobalConfig(args, parsed_globals):
722
774
  client = mod.EmrClient(cred, g_param[OptionsDefine.Region], profile)
723
775
  client._sdkVersion += ("_CLI_" + __version__)
724
776
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
725
- model = models.ModifyGlobalConfigRequest()
777
+ model = models.ScaleOutInstanceRequest()
726
778
  model.from_json_string(json.dumps(args))
727
779
  start_time = time.time()
728
780
  while True:
729
- rsp = client.ModifyGlobalConfig(model)
781
+ rsp = client.ScaleOutInstance(model)
730
782
  result = rsp.to_json_string()
731
783
  try:
732
784
  json_obj = json.loads(result)
@@ -745,7 +797,7 @@ def doModifyGlobalConfig(args, parsed_globals):
745
797
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
746
798
 
747
799
 
748
- def doScaleOutInstance(args, parsed_globals):
800
+ def doDescribeStarRocksQueryInfo(args, parsed_globals):
749
801
  g_param = parse_global_arg(parsed_globals)
750
802
 
751
803
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -774,11 +826,11 @@ def doScaleOutInstance(args, parsed_globals):
774
826
  client = mod.EmrClient(cred, g_param[OptionsDefine.Region], profile)
775
827
  client._sdkVersion += ("_CLI_" + __version__)
776
828
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
777
- model = models.ScaleOutInstanceRequest()
829
+ model = models.DescribeStarRocksQueryInfoRequest()
778
830
  model.from_json_string(json.dumps(args))
779
831
  start_time = time.time()
780
832
  while True:
781
- rsp = client.ScaleOutInstance(model)
833
+ rsp = client.DescribeStarRocksQueryInfo(model)
782
834
  result = rsp.to_json_string()
783
835
  try:
784
836
  json_obj = json.loads(result)
@@ -797,7 +849,7 @@ def doScaleOutInstance(args, parsed_globals):
797
849
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
798
850
 
799
851
 
800
- def doModifyUserManagerPwd(args, parsed_globals):
852
+ def doDescribeHBaseTableOverview(args, parsed_globals):
801
853
  g_param = parse_global_arg(parsed_globals)
802
854
 
803
855
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -826,11 +878,11 @@ def doModifyUserManagerPwd(args, parsed_globals):
826
878
  client = mod.EmrClient(cred, g_param[OptionsDefine.Region], profile)
827
879
  client._sdkVersion += ("_CLI_" + __version__)
828
880
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
829
- model = models.ModifyUserManagerPwdRequest()
881
+ model = models.DescribeHBaseTableOverviewRequest()
830
882
  model.from_json_string(json.dumps(args))
831
883
  start_time = time.time()
832
884
  while True:
833
- rsp = client.ModifyUserManagerPwd(model)
885
+ rsp = client.DescribeHBaseTableOverview(model)
834
886
  result = rsp.to_json_string()
835
887
  try:
836
888
  json_obj = json.loads(result)
@@ -849,7 +901,7 @@ def doModifyUserManagerPwd(args, parsed_globals):
849
901
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
850
902
 
851
903
 
852
- def doDescribeHBaseTableOverview(args, parsed_globals):
904
+ def doAddMetricScaleStrategy(args, parsed_globals):
853
905
  g_param = parse_global_arg(parsed_globals)
854
906
 
855
907
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -878,11 +930,11 @@ def doDescribeHBaseTableOverview(args, parsed_globals):
878
930
  client = mod.EmrClient(cred, g_param[OptionsDefine.Region], profile)
879
931
  client._sdkVersion += ("_CLI_" + __version__)
880
932
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
881
- model = models.DescribeHBaseTableOverviewRequest()
933
+ model = models.AddMetricScaleStrategyRequest()
882
934
  model.from_json_string(json.dumps(args))
883
935
  start_time = time.time()
884
936
  while True:
885
- rsp = client.DescribeHBaseTableOverview(model)
937
+ rsp = client.AddMetricScaleStrategy(model)
886
938
  result = rsp.to_json_string()
887
939
  try:
888
940
  json_obj = json.loads(result)
@@ -1057,6 +1109,58 @@ def doModifyYarnDeploy(args, parsed_globals):
1057
1109
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1058
1110
 
1059
1111
 
1112
+ def doTerminateTasks(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.EmrClient(cred, g_param[OptionsDefine.Region], profile)
1139
+ client._sdkVersion += ("_CLI_" + __version__)
1140
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1141
+ model = models.TerminateTasksRequest()
1142
+ model.from_json_string(json.dumps(args))
1143
+ start_time = time.time()
1144
+ while True:
1145
+ rsp = client.TerminateTasks(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
+
1060
1164
  def doTerminateClusterNodes(args, parsed_globals):
1061
1165
  g_param = parse_global_arg(parsed_globals)
1062
1166
 
@@ -1213,7 +1317,7 @@ def doDescribeUsersForUserManager(args, parsed_globals):
1213
1317
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1214
1318
 
1215
1319
 
1216
- def doAddMetricScaleStrategy(args, parsed_globals):
1320
+ def doModifyUserManagerPwd(args, parsed_globals):
1217
1321
  g_param = parse_global_arg(parsed_globals)
1218
1322
 
1219
1323
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1242,11 +1346,11 @@ def doAddMetricScaleStrategy(args, parsed_globals):
1242
1346
  client = mod.EmrClient(cred, g_param[OptionsDefine.Region], profile)
1243
1347
  client._sdkVersion += ("_CLI_" + __version__)
1244
1348
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1245
- model = models.AddMetricScaleStrategyRequest()
1349
+ model = models.ModifyUserManagerPwdRequest()
1246
1350
  model.from_json_string(json.dumps(args))
1247
1351
  start_time = time.time()
1248
1352
  while True:
1249
- rsp = client.AddMetricScaleStrategy(model)
1353
+ rsp = client.ModifyUserManagerPwd(model)
1250
1354
  result = rsp.to_json_string()
1251
1355
  try:
1252
1356
  json_obj = json.loads(result)
@@ -1681,6 +1785,58 @@ def doModifyAutoScaleStrategy(args, parsed_globals):
1681
1785
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1682
1786
 
1683
1787
 
1788
+ def doDescribeKyuubiQueryInfo(args, parsed_globals):
1789
+ g_param = parse_global_arg(parsed_globals)
1790
+
1791
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1792
+ cred = credential.CVMRoleCredential()
1793
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1794
+ cred = credential.STSAssumeRoleCredential(
1795
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1796
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1797
+ )
1798
+ 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):
1799
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1800
+ else:
1801
+ cred = credential.Credential(
1802
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1803
+ )
1804
+ http_profile = HttpProfile(
1805
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1806
+ reqMethod="POST",
1807
+ endpoint=g_param[OptionsDefine.Endpoint],
1808
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1809
+ )
1810
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1811
+ if g_param[OptionsDefine.Language]:
1812
+ profile.language = g_param[OptionsDefine.Language]
1813
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1814
+ client = mod.EmrClient(cred, g_param[OptionsDefine.Region], profile)
1815
+ client._sdkVersion += ("_CLI_" + __version__)
1816
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1817
+ model = models.DescribeKyuubiQueryInfoRequest()
1818
+ model.from_json_string(json.dumps(args))
1819
+ start_time = time.time()
1820
+ while True:
1821
+ rsp = client.DescribeKyuubiQueryInfo(model)
1822
+ result = rsp.to_json_string()
1823
+ try:
1824
+ json_obj = json.loads(result)
1825
+ except TypeError as e:
1826
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1827
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1828
+ break
1829
+ cur_time = time.time()
1830
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1831
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1832
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1833
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1834
+ else:
1835
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1836
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1837
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1838
+
1839
+
1684
1840
  def doDeleteAutoScaleStrategy(args, parsed_globals):
1685
1841
  g_param = parse_global_arg(parsed_globals)
1686
1842
 
@@ -1993,7 +2149,7 @@ def doDescribeSLInstance(args, parsed_globals):
1993
2149
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1994
2150
 
1995
2151
 
1996
- def doModifySLInstance(args, parsed_globals):
2152
+ def doDescribeSparkQueries(args, parsed_globals):
1997
2153
  g_param = parse_global_arg(parsed_globals)
1998
2154
 
1999
2155
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2022,11 +2178,11 @@ def doModifySLInstance(args, parsed_globals):
2022
2178
  client = mod.EmrClient(cred, g_param[OptionsDefine.Region], profile)
2023
2179
  client._sdkVersion += ("_CLI_" + __version__)
2024
2180
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2025
- model = models.ModifySLInstanceRequest()
2181
+ model = models.DescribeSparkQueriesRequest()
2026
2182
  model.from_json_string(json.dumps(args))
2027
2183
  start_time = time.time()
2028
2184
  while True:
2029
- rsp = client.ModifySLInstance(model)
2185
+ rsp = client.DescribeSparkQueries(model)
2030
2186
  result = rsp.to_json_string()
2031
2187
  try:
2032
2188
  json_obj = json.loads(result)
@@ -2513,7 +2669,7 @@ def doSyncPodState(args, parsed_globals):
2513
2669
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2514
2670
 
2515
2671
 
2516
- def doTerminateTasks(args, parsed_globals):
2672
+ def doModifyGlobalConfig(args, parsed_globals):
2517
2673
  g_param = parse_global_arg(parsed_globals)
2518
2674
 
2519
2675
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2542,11 +2698,11 @@ def doTerminateTasks(args, parsed_globals):
2542
2698
  client = mod.EmrClient(cred, g_param[OptionsDefine.Region], profile)
2543
2699
  client._sdkVersion += ("_CLI_" + __version__)
2544
2700
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2545
- model = models.TerminateTasksRequest()
2701
+ model = models.ModifyGlobalConfigRequest()
2546
2702
  model.from_json_string(json.dumps(args))
2547
2703
  start_time = time.time()
2548
2704
  while True:
2549
- rsp = client.TerminateTasks(model)
2705
+ rsp = client.ModifyGlobalConfig(model)
2550
2706
  result = rsp.to_json_string()
2551
2707
  try:
2552
2708
  json_obj = json.loads(result)
@@ -2617,6 +2773,58 @@ def doTerminateInstance(args, parsed_globals):
2617
2773
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2618
2774
 
2619
2775
 
2776
+ def doModifySLInstance(args, parsed_globals):
2777
+ g_param = parse_global_arg(parsed_globals)
2778
+
2779
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
2780
+ cred = credential.CVMRoleCredential()
2781
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
2782
+ cred = credential.STSAssumeRoleCredential(
2783
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
2784
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
2785
+ )
2786
+ 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):
2787
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
2788
+ else:
2789
+ cred = credential.Credential(
2790
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
2791
+ )
2792
+ http_profile = HttpProfile(
2793
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
2794
+ reqMethod="POST",
2795
+ endpoint=g_param[OptionsDefine.Endpoint],
2796
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
2797
+ )
2798
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
2799
+ if g_param[OptionsDefine.Language]:
2800
+ profile.language = g_param[OptionsDefine.Language]
2801
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
2802
+ client = mod.EmrClient(cred, g_param[OptionsDefine.Region], profile)
2803
+ client._sdkVersion += ("_CLI_" + __version__)
2804
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
2805
+ model = models.ModifySLInstanceRequest()
2806
+ model.from_json_string(json.dumps(args))
2807
+ start_time = time.time()
2808
+ while True:
2809
+ rsp = client.ModifySLInstance(model)
2810
+ result = rsp.to_json_string()
2811
+ try:
2812
+ json_obj = json.loads(result)
2813
+ except TypeError as e:
2814
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
2815
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
2816
+ break
2817
+ cur_time = time.time()
2818
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
2819
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
2820
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
2821
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
2822
+ else:
2823
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
2824
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
2825
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2826
+
2827
+
2620
2828
  def doDescribeAutoScaleStrategies(args, parsed_globals):
2621
2829
  g_param = parse_global_arg(parsed_globals)
2622
2830
 
@@ -3208,22 +3416,24 @@ ACTION_MAP = {
3208
3416
  "DescribeImpalaQueries": doDescribeImpalaQueries,
3209
3417
  "DescribeYarnQueue": doDescribeYarnQueue,
3210
3418
  "ModifyYarnQueueV2": doModifyYarnQueueV2,
3419
+ "DescribeHDFSStorageInfo": doDescribeHDFSStorageInfo,
3211
3420
  "DeployYarnConf": doDeployYarnConf,
3212
3421
  "DescribeClusterFlowStatusDetail": doDescribeClusterFlowStatusDetail,
3213
3422
  "InquiryPriceScaleOutInstance": doInquiryPriceScaleOutInstance,
3214
3423
  "DescribeAutoScaleRecords": doDescribeAutoScaleRecords,
3215
3424
  "DescribeCvmQuota": doDescribeCvmQuota,
3216
- "ModifyGlobalConfig": doModifyGlobalConfig,
3217
3425
  "ScaleOutInstance": doScaleOutInstance,
3218
- "ModifyUserManagerPwd": doModifyUserManagerPwd,
3426
+ "DescribeStarRocksQueryInfo": doDescribeStarRocksQueryInfo,
3219
3427
  "DescribeHBaseTableOverview": doDescribeHBaseTableOverview,
3428
+ "AddMetricScaleStrategy": doAddMetricScaleStrategy,
3220
3429
  "DescribeServiceNodeInfos": doDescribeServiceNodeInfos,
3221
3430
  "DescribeInstances": doDescribeInstances,
3222
3431
  "ModifyYarnDeploy": doModifyYarnDeploy,
3432
+ "TerminateTasks": doTerminateTasks,
3223
3433
  "TerminateClusterNodes": doTerminateClusterNodes,
3224
3434
  "ResetYarnConfig": doResetYarnConfig,
3225
3435
  "DescribeUsersForUserManager": doDescribeUsersForUserManager,
3226
- "AddMetricScaleStrategy": doAddMetricScaleStrategy,
3436
+ "ModifyUserManagerPwd": doModifyUserManagerPwd,
3227
3437
  "DeleteUserManagerUserList": doDeleteUserManagerUserList,
3228
3438
  "TerminateSLInstance": doTerminateSLInstance,
3229
3439
  "AddUsersForUserManager": doAddUsersForUserManager,
@@ -3232,13 +3442,14 @@ ACTION_MAP = {
3232
3442
  "DescribeSLInstanceList": doDescribeSLInstanceList,
3233
3443
  "DescribeJobFlow": doDescribeJobFlow,
3234
3444
  "ModifyAutoScaleStrategy": doModifyAutoScaleStrategy,
3445
+ "DescribeKyuubiQueryInfo": doDescribeKyuubiQueryInfo,
3235
3446
  "DeleteAutoScaleStrategy": doDeleteAutoScaleStrategy,
3236
3447
  "DescribeEmrApplicationStatics": doDescribeEmrApplicationStatics,
3237
3448
  "DescribeInstanceRenewNodes": doDescribeInstanceRenewNodes,
3238
3449
  "ModifyResourceScheduler": doModifyResourceScheduler,
3239
3450
  "DescribeResourceScheduleDiffDetail": doDescribeResourceScheduleDiffDetail,
3240
3451
  "DescribeSLInstance": doDescribeSLInstance,
3241
- "ModifySLInstance": doModifySLInstance,
3452
+ "DescribeSparkQueries": doDescribeSparkQueries,
3242
3453
  "CreateInstance": doCreateInstance,
3243
3454
  "InquiryPriceCreateInstance": doInquiryPriceCreateInstance,
3244
3455
  "InquirePriceRenewEmr": doInquirePriceRenewEmr,
@@ -3248,8 +3459,9 @@ ACTION_MAP = {
3248
3459
  "DescribeHiveQueries": doDescribeHiveQueries,
3249
3460
  "StartStopServiceOrMonitor": doStartStopServiceOrMonitor,
3250
3461
  "SyncPodState": doSyncPodState,
3251
- "TerminateTasks": doTerminateTasks,
3462
+ "ModifyGlobalConfig": doModifyGlobalConfig,
3252
3463
  "TerminateInstance": doTerminateInstance,
3464
+ "ModifySLInstance": doModifySLInstance,
3253
3465
  "DescribeAutoScaleStrategies": doDescribeAutoScaleStrategies,
3254
3466
  "DescribeGlobalConfig": doDescribeGlobalConfig,
3255
3467
  "DescribeAutoScaleGroupGlobalConf": doDescribeAutoScaleGroupGlobalConf,