tccli 3.0.1099.1__py2.py3-none-any.whl → 3.0.1100.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 (83) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/examples/cls/v20201016/CreateCosRecharge.md +4 -4
  3. tccli/examples/cls/v20201016/CreateDashboardSubscribe.md +18 -0
  4. tccli/examples/cls/v20201016/DeleteDashboardSubscribe.md +18 -0
  5. tccli/examples/cls/v20201016/DescribeDashboardSubscribes.md +18 -0
  6. tccli/examples/cls/v20201016/ModifyCosRecharge.md +3 -3
  7. tccli/examples/cls/v20201016/ModifyDashboardSubscribe.md +18 -0
  8. tccli/examples/cls/v20201016/SearchDashboardSubscribe.md +35 -0
  9. tccli/examples/dlc/v20210125/CreateSparkSessionBatchSQL.md +1 -1
  10. tccli/examples/domain/v20180808/ModifyTemplate.md +73 -0
  11. tccli/examples/ess/v20201111/DescribeBatchOrganizationRegistrationUrls.md +27 -0
  12. tccli/examples/hunyuan/v20230901/ChatCompletions.md +141 -1
  13. tccli/examples/hunyuan/v20230901/ChatPro.md +2 -2
  14. tccli/examples/lke/v20231130/GetEmbedding.md +1 -1
  15. tccli/examples/lke/v20231130/GetMsgRecord.md +4 -1
  16. tccli/examples/ocr/v20181119/RecognizeGeneralTextImageWarn.md +83 -0
  17. tccli/examples/rum/v20210622/CreateWhitelist.md +2 -2
  18. tccli/examples/rum/v20210622/DescribeRumGroupLog.md +3 -3
  19. tccli/examples/rum/v20210622/DescribeRumLogExport.md +6 -6
  20. tccli/examples/rum/v20210622/DescribeRumStatsLogList.md +2 -2
  21. tccli/examples/teo/v20220901/CreatePlan.md +47 -0
  22. tccli/examples/teo/v20220901/DestroyPlan.md +20 -0
  23. tccli/examples/teo/v20220901/IncreasePlanQuota.md +46 -0
  24. tccli/examples/teo/v20220901/ModifyPlan.md +21 -0
  25. tccli/examples/teo/v20220901/RenewPlan.md +23 -0
  26. tccli/examples/teo/v20220901/UpgradePlan.md +23 -0
  27. tccli/examples/tione/v20191022/UpdateCodeRepository.md +1 -1
  28. tccli/examples/tke/v20180525/CheckInstancesUpgradeAble.md +15 -7
  29. tccli/examples/tke/v20180525/CreateCluster.md +58 -142
  30. tccli/examples/tke/v20180525/DescribeClusterNodePools.md +1 -0
  31. tccli/examples/tke/v20180525/GetUpgradeInstanceProgress.md +18 -19
  32. tccli/examples/tke/v20180525/ModifyClusterAuthenticationOptions.md +3 -0
  33. tccli/examples/tke/v20180525/ModifyNodePoolInstanceTypes.md +1 -1
  34. tccli/examples/tms/v20201229/AnswerQuestion.md +21 -0
  35. tccli/examples/vpc/v20170312/DescribeVpnGatewayRoutes.md +2 -1
  36. tccli/examples/vpc/v20170312/ModifyVpnGatewayRoutes.md +8 -4
  37. tccli/services/aiart/v20221229/api.json +5 -5
  38. tccli/services/cls/cls_client.py +337 -72
  39. tccli/services/cls/v20201016/api.json +433 -22
  40. tccli/services/cls/v20201016/examples.json +44 -4
  41. tccli/services/dlc/v20210125/api.json +14 -4
  42. tccli/services/dlc/v20210125/examples.json +1 -1
  43. tccli/services/domain/domain_client.py +53 -0
  44. tccli/services/domain/v20180808/api.json +62 -0
  45. tccli/services/domain/v20180808/examples.json +8 -0
  46. tccli/services/dts/v20211206/api.json +1 -1
  47. tccli/services/ess/ess_client.py +57 -4
  48. tccli/services/ess/v20201111/api.json +88 -0
  49. tccli/services/ess/v20201111/examples.json +8 -0
  50. tccli/services/essbasic/v20210526/api.json +1 -1
  51. tccli/services/hunyuan/v20230901/api.json +10 -10
  52. tccli/services/hunyuan/v20230901/examples.json +26 -2
  53. tccli/services/ims/v20201229/api.json +2 -1
  54. tccli/services/iotvideo/v20211125/api.json +15 -0
  55. tccli/services/lke/lke_client.py +114 -8
  56. tccli/services/lke/v20231130/api.json +492 -0
  57. tccli/services/lke/v20231130/examples.json +18 -2
  58. tccli/services/ocr/ocr_client.py +53 -0
  59. tccli/services/ocr/v20181119/api.json +156 -0
  60. tccli/services/ocr/v20181119/examples.json +8 -0
  61. tccli/services/rce/v20201103/api.json +9 -9
  62. tccli/services/rum/v20210622/api.json +35 -33
  63. tccli/services/rum/v20210622/examples.json +7 -7
  64. tccli/services/tdmq/v20200217/api.json +6 -6
  65. tccli/services/teo/teo_client.py +338 -20
  66. tccli/services/teo/v20220901/api.json +375 -1
  67. tccli/services/teo/v20220901/examples.json +60 -0
  68. tccli/services/tione/v20191022/api.json +6 -7
  69. tccli/services/tione/v20191022/examples.json +1 -1
  70. tccli/services/tione/v20211111/api.json +2 -0
  71. tccli/services/tke/v20180525/api.json +77 -93
  72. tccli/services/tke/v20180525/examples.json +7 -7
  73. tccli/services/tms/tms_client.py +53 -0
  74. tccli/services/tms/v20201229/api.json +44 -0
  75. tccli/services/tms/v20201229/examples.json +8 -0
  76. tccli/services/tse/v20201207/api.json +49 -1
  77. tccli/services/vpc/v20170312/api.json +3 -0
  78. tccli/services/vpc/v20170312/examples.json +3 -3
  79. {tccli-3.0.1099.1.dist-info → tccli-3.0.1100.1.dist-info}/METADATA +2 -2
  80. {tccli-3.0.1099.1.dist-info → tccli-3.0.1100.1.dist-info}/RECORD +83 -68
  81. {tccli-3.0.1099.1.dist-info → tccli-3.0.1100.1.dist-info}/WHEEL +0 -0
  82. {tccli-3.0.1099.1.dist-info → tccli-3.0.1100.1.dist-info}/entry_points.txt +0 -0
  83. {tccli-3.0.1099.1.dist-info → tccli-3.0.1100.1.dist-info}/license_files/LICENSE +0 -0
@@ -225,6 +225,58 @@ def doCreateIndex(args, parsed_globals):
225
225
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
226
226
 
227
227
 
228
+ def doQueryMetric(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.ClsClient(cred, g_param[OptionsDefine.Region], profile)
255
+ client._sdkVersion += ("_CLI_" + __version__)
256
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
257
+ model = models.QueryMetricRequest()
258
+ model.from_json_string(json.dumps(args))
259
+ start_time = time.time()
260
+ while True:
261
+ rsp = client.QueryMetric(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
+
228
280
  def doModifyShipper(args, parsed_globals):
229
281
  g_param = parse_global_arg(parsed_globals)
230
282
 
@@ -849,7 +901,7 @@ def doCreateConfig(args, parsed_globals):
849
901
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
850
902
 
851
903
 
852
- def doQueryMetric(args, parsed_globals):
904
+ def doDescribeLogsets(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 doQueryMetric(args, parsed_globals):
878
930
  client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
879
931
  client._sdkVersion += ("_CLI_" + __version__)
880
932
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
881
- model = models.QueryMetricRequest()
933
+ model = models.DescribeLogsetsRequest()
882
934
  model.from_json_string(json.dumps(args))
883
935
  start_time = time.time()
884
936
  while True:
885
- rsp = client.QueryMetric(model)
937
+ rsp = client.DescribeLogsets(model)
886
938
  result = rsp.to_json_string()
887
939
  try:
888
940
  json_obj = json.loads(result)
@@ -1993,7 +2045,7 @@ def doOpenKafkaConsumer(args, parsed_globals):
1993
2045
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1994
2046
 
1995
2047
 
1996
- def doDescribeShipperTasks(args, parsed_globals):
2048
+ def doCreateDashboardSubscribe(args, parsed_globals):
1997
2049
  g_param = parse_global_arg(parsed_globals)
1998
2050
 
1999
2051
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2022,11 +2074,63 @@ def doDescribeShipperTasks(args, parsed_globals):
2022
2074
  client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
2023
2075
  client._sdkVersion += ("_CLI_" + __version__)
2024
2076
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2025
- model = models.DescribeShipperTasksRequest()
2077
+ model = models.CreateDashboardSubscribeRequest()
2026
2078
  model.from_json_string(json.dumps(args))
2027
2079
  start_time = time.time()
2028
2080
  while True:
2029
- rsp = client.DescribeShipperTasks(model)
2081
+ rsp = client.CreateDashboardSubscribe(model)
2082
+ result = rsp.to_json_string()
2083
+ try:
2084
+ json_obj = json.loads(result)
2085
+ except TypeError as e:
2086
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
2087
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
2088
+ break
2089
+ cur_time = time.time()
2090
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
2091
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
2092
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
2093
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
2094
+ else:
2095
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
2096
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
2097
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2098
+
2099
+
2100
+ def doModifyDashboardSubscribe(args, parsed_globals):
2101
+ g_param = parse_global_arg(parsed_globals)
2102
+
2103
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
2104
+ cred = credential.CVMRoleCredential()
2105
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
2106
+ cred = credential.STSAssumeRoleCredential(
2107
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
2108
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
2109
+ )
2110
+ 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):
2111
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
2112
+ else:
2113
+ cred = credential.Credential(
2114
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
2115
+ )
2116
+ http_profile = HttpProfile(
2117
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
2118
+ reqMethod="POST",
2119
+ endpoint=g_param[OptionsDefine.Endpoint],
2120
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
2121
+ )
2122
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
2123
+ if g_param[OptionsDefine.Language]:
2124
+ profile.language = g_param[OptionsDefine.Language]
2125
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
2126
+ client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
2127
+ client._sdkVersion += ("_CLI_" + __version__)
2128
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
2129
+ model = models.ModifyDashboardSubscribeRequest()
2130
+ model.from_json_string(json.dumps(args))
2131
+ start_time = time.time()
2132
+ while True:
2133
+ rsp = client.ModifyDashboardSubscribe(model)
2030
2134
  result = rsp.to_json_string()
2031
2135
  try:
2032
2136
  json_obj = json.loads(result)
@@ -2305,6 +2409,58 @@ def doModifyAlarmShield(args, parsed_globals):
2305
2409
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2306
2410
 
2307
2411
 
2412
+ def doSearchDashboardSubscribe(args, parsed_globals):
2413
+ g_param = parse_global_arg(parsed_globals)
2414
+
2415
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
2416
+ cred = credential.CVMRoleCredential()
2417
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
2418
+ cred = credential.STSAssumeRoleCredential(
2419
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
2420
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
2421
+ )
2422
+ 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):
2423
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
2424
+ else:
2425
+ cred = credential.Credential(
2426
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
2427
+ )
2428
+ http_profile = HttpProfile(
2429
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
2430
+ reqMethod="POST",
2431
+ endpoint=g_param[OptionsDefine.Endpoint],
2432
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
2433
+ )
2434
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
2435
+ if g_param[OptionsDefine.Language]:
2436
+ profile.language = g_param[OptionsDefine.Language]
2437
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
2438
+ client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
2439
+ client._sdkVersion += ("_CLI_" + __version__)
2440
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
2441
+ model = models.SearchDashboardSubscribeRequest()
2442
+ model.from_json_string(json.dumps(args))
2443
+ start_time = time.time()
2444
+ while True:
2445
+ rsp = client.SearchDashboardSubscribe(model)
2446
+ result = rsp.to_json_string()
2447
+ try:
2448
+ json_obj = json.loads(result)
2449
+ except TypeError as e:
2450
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
2451
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
2452
+ break
2453
+ cur_time = time.time()
2454
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
2455
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
2456
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
2457
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
2458
+ else:
2459
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
2460
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
2461
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2462
+
2463
+
2308
2464
  def doCreateConfigExtra(args, parsed_globals):
2309
2465
  g_param = parse_global_arg(parsed_globals)
2310
2466
 
@@ -2617,7 +2773,7 @@ def doGetAlarmLog(args, parsed_globals):
2617
2773
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2618
2774
 
2619
2775
 
2620
- def doDescribeLogsets(args, parsed_globals):
2776
+ def doDescribeMachineGroupConfigs(args, parsed_globals):
2621
2777
  g_param = parse_global_arg(parsed_globals)
2622
2778
 
2623
2779
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2646,11 +2802,63 @@ def doDescribeLogsets(args, parsed_globals):
2646
2802
  client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
2647
2803
  client._sdkVersion += ("_CLI_" + __version__)
2648
2804
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2649
- model = models.DescribeLogsetsRequest()
2805
+ model = models.DescribeMachineGroupConfigsRequest()
2650
2806
  model.from_json_string(json.dumps(args))
2651
2807
  start_time = time.time()
2652
2808
  while True:
2653
- rsp = client.DescribeLogsets(model)
2809
+ rsp = client.DescribeMachineGroupConfigs(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
+
2828
+ def doDescribeShipperTasks(args, parsed_globals):
2829
+ g_param = parse_global_arg(parsed_globals)
2830
+
2831
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
2832
+ cred = credential.CVMRoleCredential()
2833
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
2834
+ cred = credential.STSAssumeRoleCredential(
2835
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
2836
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
2837
+ )
2838
+ 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):
2839
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
2840
+ else:
2841
+ cred = credential.Credential(
2842
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
2843
+ )
2844
+ http_profile = HttpProfile(
2845
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
2846
+ reqMethod="POST",
2847
+ endpoint=g_param[OptionsDefine.Endpoint],
2848
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
2849
+ )
2850
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
2851
+ if g_param[OptionsDefine.Language]:
2852
+ profile.language = g_param[OptionsDefine.Language]
2853
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
2854
+ client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
2855
+ client._sdkVersion += ("_CLI_" + __version__)
2856
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
2857
+ model = models.DescribeShipperTasksRequest()
2858
+ model.from_json_string(json.dumps(args))
2859
+ start_time = time.time()
2860
+ while True:
2861
+ rsp = client.DescribeShipperTasks(model)
2654
2862
  result = rsp.to_json_string()
2655
2863
  try:
2656
2864
  json_obj = json.loads(result)
@@ -2825,6 +3033,58 @@ def doDescribeKafkaConsumer(args, parsed_globals):
2825
3033
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2826
3034
 
2827
3035
 
3036
+ def doDeleteDashboardSubscribe(args, parsed_globals):
3037
+ g_param = parse_global_arg(parsed_globals)
3038
+
3039
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
3040
+ cred = credential.CVMRoleCredential()
3041
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
3042
+ cred = credential.STSAssumeRoleCredential(
3043
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
3044
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
3045
+ )
3046
+ 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):
3047
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
3048
+ else:
3049
+ cred = credential.Credential(
3050
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
3051
+ )
3052
+ http_profile = HttpProfile(
3053
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
3054
+ reqMethod="POST",
3055
+ endpoint=g_param[OptionsDefine.Endpoint],
3056
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
3057
+ )
3058
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
3059
+ if g_param[OptionsDefine.Language]:
3060
+ profile.language = g_param[OptionsDefine.Language]
3061
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
3062
+ client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
3063
+ client._sdkVersion += ("_CLI_" + __version__)
3064
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
3065
+ model = models.DeleteDashboardSubscribeRequest()
3066
+ model.from_json_string(json.dumps(args))
3067
+ start_time = time.time()
3068
+ while True:
3069
+ rsp = client.DeleteDashboardSubscribe(model)
3070
+ result = rsp.to_json_string()
3071
+ try:
3072
+ json_obj = json.loads(result)
3073
+ except TypeError as e:
3074
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
3075
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
3076
+ break
3077
+ cur_time = time.time()
3078
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
3079
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
3080
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
3081
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
3082
+ else:
3083
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
3084
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
3085
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3086
+
3087
+
2828
3088
  def doCreateDataTransform(args, parsed_globals):
2829
3089
  g_param = parse_global_arg(parsed_globals)
2830
3090
 
@@ -3189,7 +3449,7 @@ def doCheckFunction(args, parsed_globals):
3189
3449
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3190
3450
 
3191
3451
 
3192
- def doSearchLog(args, parsed_globals):
3452
+ def doDeleteAlarm(args, parsed_globals):
3193
3453
  g_param = parse_global_arg(parsed_globals)
3194
3454
 
3195
3455
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3218,11 +3478,11 @@ def doSearchLog(args, parsed_globals):
3218
3478
  client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
3219
3479
  client._sdkVersion += ("_CLI_" + __version__)
3220
3480
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
3221
- model = models.SearchLogRequest()
3481
+ model = models.DeleteAlarmRequest()
3222
3482
  model.from_json_string(json.dumps(args))
3223
3483
  start_time = time.time()
3224
3484
  while True:
3225
- rsp = client.SearchLog(model)
3485
+ rsp = client.DeleteAlarm(model)
3226
3486
  result = rsp.to_json_string()
3227
3487
  try:
3228
3488
  json_obj = json.loads(result)
@@ -3657,7 +3917,7 @@ def doModifyTopic(args, parsed_globals):
3657
3917
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3658
3918
 
3659
3919
 
3660
- def doModifyMachineGroup(args, parsed_globals):
3920
+ def doDescribeDashboardSubscribes(args, parsed_globals):
3661
3921
  g_param = parse_global_arg(parsed_globals)
3662
3922
 
3663
3923
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3686,11 +3946,11 @@ def doModifyMachineGroup(args, parsed_globals):
3686
3946
  client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
3687
3947
  client._sdkVersion += ("_CLI_" + __version__)
3688
3948
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
3689
- model = models.ModifyMachineGroupRequest()
3949
+ model = models.DescribeDashboardSubscribesRequest()
3690
3950
  model.from_json_string(json.dumps(args))
3691
3951
  start_time = time.time()
3692
3952
  while True:
3693
- rsp = client.ModifyMachineGroup(model)
3953
+ rsp = client.DescribeDashboardSubscribes(model)
3694
3954
  result = rsp.to_json_string()
3695
3955
  try:
3696
3956
  json_obj = json.loads(result)
@@ -3709,7 +3969,7 @@ def doModifyMachineGroup(args, parsed_globals):
3709
3969
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3710
3970
 
3711
3971
 
3712
- def doDescribeScheduledSqlInfo(args, parsed_globals):
3972
+ def doModifyMachineGroup(args, parsed_globals):
3713
3973
  g_param = parse_global_arg(parsed_globals)
3714
3974
 
3715
3975
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3738,11 +3998,11 @@ def doDescribeScheduledSqlInfo(args, parsed_globals):
3738
3998
  client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
3739
3999
  client._sdkVersion += ("_CLI_" + __version__)
3740
4000
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
3741
- model = models.DescribeScheduledSqlInfoRequest()
4001
+ model = models.ModifyMachineGroupRequest()
3742
4002
  model.from_json_string(json.dumps(args))
3743
4003
  start_time = time.time()
3744
4004
  while True:
3745
- rsp = client.DescribeScheduledSqlInfo(model)
4005
+ rsp = client.ModifyMachineGroup(model)
3746
4006
  result = rsp.to_json_string()
3747
4007
  try:
3748
4008
  json_obj = json.loads(result)
@@ -3761,7 +4021,7 @@ def doDescribeScheduledSqlInfo(args, parsed_globals):
3761
4021
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3762
4022
 
3763
4023
 
3764
- def doDeleteConfig(args, parsed_globals):
4024
+ def doDescribeScheduledSqlInfo(args, parsed_globals):
3765
4025
  g_param = parse_global_arg(parsed_globals)
3766
4026
 
3767
4027
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3790,11 +4050,11 @@ def doDeleteConfig(args, parsed_globals):
3790
4050
  client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
3791
4051
  client._sdkVersion += ("_CLI_" + __version__)
3792
4052
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
3793
- model = models.DeleteConfigRequest()
4053
+ model = models.DescribeScheduledSqlInfoRequest()
3794
4054
  model.from_json_string(json.dumps(args))
3795
4055
  start_time = time.time()
3796
4056
  while True:
3797
- rsp = client.DeleteConfig(model)
4057
+ rsp = client.DescribeScheduledSqlInfo(model)
3798
4058
  result = rsp.to_json_string()
3799
4059
  try:
3800
4060
  json_obj = json.loads(result)
@@ -3813,7 +4073,7 @@ def doDeleteConfig(args, parsed_globals):
3813
4073
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3814
4074
 
3815
4075
 
3816
- def doDescribeConfigExtras(args, parsed_globals):
4076
+ def doDeleteConfig(args, parsed_globals):
3817
4077
  g_param = parse_global_arg(parsed_globals)
3818
4078
 
3819
4079
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3842,11 +4102,11 @@ def doDescribeConfigExtras(args, parsed_globals):
3842
4102
  client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
3843
4103
  client._sdkVersion += ("_CLI_" + __version__)
3844
4104
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
3845
- model = models.DescribeConfigExtrasRequest()
4105
+ model = models.DeleteConfigRequest()
3846
4106
  model.from_json_string(json.dumps(args))
3847
4107
  start_time = time.time()
3848
4108
  while True:
3849
- rsp = client.DescribeConfigExtras(model)
4109
+ rsp = client.DeleteConfig(model)
3850
4110
  result = rsp.to_json_string()
3851
4111
  try:
3852
4112
  json_obj = json.loads(result)
@@ -3865,7 +4125,7 @@ def doDescribeConfigExtras(args, parsed_globals):
3865
4125
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3866
4126
 
3867
4127
 
3868
- def doCheckRechargeKafkaServer(args, parsed_globals):
4128
+ def doDescribeConfigExtras(args, parsed_globals):
3869
4129
  g_param = parse_global_arg(parsed_globals)
3870
4130
 
3871
4131
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3894,11 +4154,11 @@ def doCheckRechargeKafkaServer(args, parsed_globals):
3894
4154
  client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
3895
4155
  client._sdkVersion += ("_CLI_" + __version__)
3896
4156
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
3897
- model = models.CheckRechargeKafkaServerRequest()
4157
+ model = models.DescribeConfigExtrasRequest()
3898
4158
  model.from_json_string(json.dumps(args))
3899
4159
  start_time = time.time()
3900
4160
  while True:
3901
- rsp = client.CheckRechargeKafkaServer(model)
4161
+ rsp = client.DescribeConfigExtras(model)
3902
4162
  result = rsp.to_json_string()
3903
4163
  try:
3904
4164
  json_obj = json.loads(result)
@@ -3917,7 +4177,7 @@ def doCheckRechargeKafkaServer(args, parsed_globals):
3917
4177
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3918
4178
 
3919
4179
 
3920
- def doModifyAlarm(args, parsed_globals):
4180
+ def doCheckRechargeKafkaServer(args, parsed_globals):
3921
4181
  g_param = parse_global_arg(parsed_globals)
3922
4182
 
3923
4183
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3946,11 +4206,11 @@ def doModifyAlarm(args, parsed_globals):
3946
4206
  client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
3947
4207
  client._sdkVersion += ("_CLI_" + __version__)
3948
4208
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
3949
- model = models.ModifyAlarmRequest()
4209
+ model = models.CheckRechargeKafkaServerRequest()
3950
4210
  model.from_json_string(json.dumps(args))
3951
4211
  start_time = time.time()
3952
4212
  while True:
3953
- rsp = client.ModifyAlarm(model)
4213
+ rsp = client.CheckRechargeKafkaServer(model)
3954
4214
  result = rsp.to_json_string()
3955
4215
  try:
3956
4216
  json_obj = json.loads(result)
@@ -3969,7 +4229,7 @@ def doModifyAlarm(args, parsed_globals):
3969
4229
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3970
4230
 
3971
4231
 
3972
- def doDescribeShippers(args, parsed_globals):
4232
+ def doModifyAlarm(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 doDescribeShippers(args, parsed_globals):
3998
4258
  client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
3999
4259
  client._sdkVersion += ("_CLI_" + __version__)
4000
4260
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
4001
- model = models.DescribeShippersRequest()
4261
+ model = models.ModifyAlarmRequest()
4002
4262
  model.from_json_string(json.dumps(args))
4003
4263
  start_time = time.time()
4004
4264
  while True:
4005
- rsp = client.DescribeShippers(model)
4265
+ rsp = client.ModifyAlarm(model)
4006
4266
  result = rsp.to_json_string()
4007
4267
  try:
4008
4268
  json_obj = json.loads(result)
@@ -4021,7 +4281,7 @@ def doDescribeShippers(args, parsed_globals):
4021
4281
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4022
4282
 
4023
4283
 
4024
- def doDescribeDashboards(args, parsed_globals):
4284
+ def doDescribeShippers(args, parsed_globals):
4025
4285
  g_param = parse_global_arg(parsed_globals)
4026
4286
 
4027
4287
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -4050,11 +4310,11 @@ def doDescribeDashboards(args, parsed_globals):
4050
4310
  client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
4051
4311
  client._sdkVersion += ("_CLI_" + __version__)
4052
4312
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
4053
- model = models.DescribeDashboardsRequest()
4313
+ model = models.DescribeShippersRequest()
4054
4314
  model.from_json_string(json.dumps(args))
4055
4315
  start_time = time.time()
4056
4316
  while True:
4057
- rsp = client.DescribeDashboards(model)
4317
+ rsp = client.DescribeShippers(model)
4058
4318
  result = rsp.to_json_string()
4059
4319
  try:
4060
4320
  json_obj = json.loads(result)
@@ -4073,7 +4333,7 @@ def doDescribeDashboards(args, parsed_globals):
4073
4333
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4074
4334
 
4075
4335
 
4076
- def doModifyCosRecharge(args, parsed_globals):
4336
+ def doDescribeDashboards(args, parsed_globals):
4077
4337
  g_param = parse_global_arg(parsed_globals)
4078
4338
 
4079
4339
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -4102,11 +4362,11 @@ def doModifyCosRecharge(args, parsed_globals):
4102
4362
  client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
4103
4363
  client._sdkVersion += ("_CLI_" + __version__)
4104
4364
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
4105
- model = models.ModifyCosRechargeRequest()
4365
+ model = models.DescribeDashboardsRequest()
4106
4366
  model.from_json_string(json.dumps(args))
4107
4367
  start_time = time.time()
4108
4368
  while True:
4109
- rsp = client.ModifyCosRecharge(model)
4369
+ rsp = client.DescribeDashboards(model)
4110
4370
  result = rsp.to_json_string()
4111
4371
  try:
4112
4372
  json_obj = json.loads(result)
@@ -4125,7 +4385,7 @@ def doModifyCosRecharge(args, parsed_globals):
4125
4385
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4126
4386
 
4127
4387
 
4128
- def doModifyConfig(args, parsed_globals):
4388
+ def doModifyCosRecharge(args, parsed_globals):
4129
4389
  g_param = parse_global_arg(parsed_globals)
4130
4390
 
4131
4391
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -4154,11 +4414,11 @@ def doModifyConfig(args, parsed_globals):
4154
4414
  client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
4155
4415
  client._sdkVersion += ("_CLI_" + __version__)
4156
4416
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
4157
- model = models.ModifyConfigRequest()
4417
+ model = models.ModifyCosRechargeRequest()
4158
4418
  model.from_json_string(json.dumps(args))
4159
4419
  start_time = time.time()
4160
4420
  while True:
4161
- rsp = client.ModifyConfig(model)
4421
+ rsp = client.ModifyCosRecharge(model)
4162
4422
  result = rsp.to_json_string()
4163
4423
  try:
4164
4424
  json_obj = json.loads(result)
@@ -4177,7 +4437,7 @@ def doModifyConfig(args, parsed_globals):
4177
4437
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4178
4438
 
4179
4439
 
4180
- def doUploadLog(args, parsed_globals):
4440
+ def doModifyConfig(args, parsed_globals):
4181
4441
  g_param = parse_global_arg(parsed_globals)
4182
4442
 
4183
4443
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -4199,25 +4459,18 @@ def doUploadLog(args, parsed_globals):
4199
4459
  endpoint=g_param[OptionsDefine.Endpoint],
4200
4460
  proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
4201
4461
  )
4202
- profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
4462
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
4203
4463
  if g_param[OptionsDefine.Language]:
4204
4464
  profile.language = g_param[OptionsDefine.Language]
4205
4465
  mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
4206
4466
  client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
4207
4467
  client._sdkVersion += ("_CLI_" + __version__)
4208
4468
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
4209
- model = models.UploadLogRequest()
4469
+ model = models.ModifyConfigRequest()
4210
4470
  model.from_json_string(json.dumps(args))
4211
- if not sys.stdin.isatty():
4212
- if six.PY2:
4213
- body = sys.stdin.read()
4214
- else:
4215
- body = sys.stdin.buffer.read()
4216
- else:
4217
- raise ParamError("Missing required input, you can use `< /path/to/file` to input your binary file.")
4218
4471
  start_time = time.time()
4219
4472
  while True:
4220
- rsp = client.UploadLog(model, body)
4473
+ rsp = client.ModifyConfig(model)
4221
4474
  result = rsp.to_json_string()
4222
4475
  try:
4223
4476
  json_obj = json.loads(result)
@@ -4236,7 +4489,7 @@ def doUploadLog(args, parsed_globals):
4236
4489
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4237
4490
 
4238
4491
 
4239
- def doDeleteTopic(args, parsed_globals):
4492
+ def doUploadLog(args, parsed_globals):
4240
4493
  g_param = parse_global_arg(parsed_globals)
4241
4494
 
4242
4495
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -4258,18 +4511,25 @@ def doDeleteTopic(args, parsed_globals):
4258
4511
  endpoint=g_param[OptionsDefine.Endpoint],
4259
4512
  proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
4260
4513
  )
4261
- profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
4514
+ profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
4262
4515
  if g_param[OptionsDefine.Language]:
4263
4516
  profile.language = g_param[OptionsDefine.Language]
4264
4517
  mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
4265
4518
  client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
4266
4519
  client._sdkVersion += ("_CLI_" + __version__)
4267
4520
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
4268
- model = models.DeleteTopicRequest()
4521
+ model = models.UploadLogRequest()
4269
4522
  model.from_json_string(json.dumps(args))
4523
+ if not sys.stdin.isatty():
4524
+ if six.PY2:
4525
+ body = sys.stdin.read()
4526
+ else:
4527
+ body = sys.stdin.buffer.read()
4528
+ else:
4529
+ raise ParamError("Missing required input, you can use `< /path/to/file` to input your binary file.")
4270
4530
  start_time = time.time()
4271
4531
  while True:
4272
- rsp = client.DeleteTopic(model)
4532
+ rsp = client.UploadLog(model, body)
4273
4533
  result = rsp.to_json_string()
4274
4534
  try:
4275
4535
  json_obj = json.loads(result)
@@ -4288,7 +4548,7 @@ def doDeleteTopic(args, parsed_globals):
4288
4548
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4289
4549
 
4290
4550
 
4291
- def doModifyLogset(args, parsed_globals):
4551
+ def doDeleteTopic(args, parsed_globals):
4292
4552
  g_param = parse_global_arg(parsed_globals)
4293
4553
 
4294
4554
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -4317,11 +4577,11 @@ def doModifyLogset(args, parsed_globals):
4317
4577
  client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
4318
4578
  client._sdkVersion += ("_CLI_" + __version__)
4319
4579
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
4320
- model = models.ModifyLogsetRequest()
4580
+ model = models.DeleteTopicRequest()
4321
4581
  model.from_json_string(json.dumps(args))
4322
4582
  start_time = time.time()
4323
4583
  while True:
4324
- rsp = client.ModifyLogset(model)
4584
+ rsp = client.DeleteTopic(model)
4325
4585
  result = rsp.to_json_string()
4326
4586
  try:
4327
4587
  json_obj = json.loads(result)
@@ -4340,7 +4600,7 @@ def doModifyLogset(args, parsed_globals):
4340
4600
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4341
4601
 
4342
4602
 
4343
- def doDescribeMachineGroupConfigs(args, parsed_globals):
4603
+ def doModifyLogset(args, parsed_globals):
4344
4604
  g_param = parse_global_arg(parsed_globals)
4345
4605
 
4346
4606
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -4369,11 +4629,11 @@ def doDescribeMachineGroupConfigs(args, parsed_globals):
4369
4629
  client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
4370
4630
  client._sdkVersion += ("_CLI_" + __version__)
4371
4631
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
4372
- model = models.DescribeMachineGroupConfigsRequest()
4632
+ model = models.ModifyLogsetRequest()
4373
4633
  model.from_json_string(json.dumps(args))
4374
4634
  start_time = time.time()
4375
4635
  while True:
4376
- rsp = client.DescribeMachineGroupConfigs(model)
4636
+ rsp = client.ModifyLogset(model)
4377
4637
  result = rsp.to_json_string()
4378
4638
  try:
4379
4639
  json_obj = json.loads(result)
@@ -4444,7 +4704,7 @@ def doModifyDataTransform(args, parsed_globals):
4444
4704
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4445
4705
 
4446
4706
 
4447
- def doDeleteAlarm(args, parsed_globals):
4707
+ def doSearchLog(args, parsed_globals):
4448
4708
  g_param = parse_global_arg(parsed_globals)
4449
4709
 
4450
4710
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -4473,11 +4733,11 @@ def doDeleteAlarm(args, parsed_globals):
4473
4733
  client = mod.ClsClient(cred, g_param[OptionsDefine.Region], profile)
4474
4734
  client._sdkVersion += ("_CLI_" + __version__)
4475
4735
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
4476
- model = models.DeleteAlarmRequest()
4736
+ model = models.SearchLogRequest()
4477
4737
  model.from_json_string(json.dumps(args))
4478
4738
  start_time = time.time()
4479
4739
  while True:
4480
- rsp = client.DeleteAlarm(model)
4740
+ rsp = client.SearchLog(model)
4481
4741
  result = rsp.to_json_string()
4482
4742
  try:
4483
4743
  json_obj = json.loads(result)
@@ -4823,6 +5083,7 @@ ACTION_MAP = {
4823
5083
  "CreateKafkaRecharge": doCreateKafkaRecharge,
4824
5084
  "DescribeExports": doDescribeExports,
4825
5085
  "CreateIndex": doCreateIndex,
5086
+ "QueryMetric": doQueryMetric,
4826
5087
  "ModifyShipper": doModifyShipper,
4827
5088
  "DescribeConfigs": doDescribeConfigs,
4828
5089
  "CreateDeliverCloudFunction": doCreateDeliverCloudFunction,
@@ -4835,7 +5096,7 @@ ACTION_MAP = {
4835
5096
  "DescribeAlertRecordHistory": doDescribeAlertRecordHistory,
4836
5097
  "DeleteKafkaRecharge": doDeleteKafkaRecharge,
4837
5098
  "CreateConfig": doCreateConfig,
4838
- "QueryMetric": doQueryMetric,
5099
+ "DescribeLogsets": doDescribeLogsets,
4839
5100
  "DescribeTopics": doDescribeTopics,
4840
5101
  "CreateCosRecharge": doCreateCosRecharge,
4841
5102
  "MergePartition": doMergePartition,
@@ -4857,22 +5118,26 @@ ACTION_MAP = {
4857
5118
  "DescribeLogHistogram": doDescribeLogHistogram,
4858
5119
  "DeleteScheduledSql": doDeleteScheduledSql,
4859
5120
  "OpenKafkaConsumer": doOpenKafkaConsumer,
4860
- "DescribeShipperTasks": doDescribeShipperTasks,
5121
+ "CreateDashboardSubscribe": doCreateDashboardSubscribe,
5122
+ "ModifyDashboardSubscribe": doModifyDashboardSubscribe,
4861
5123
  "DeleteIndex": doDeleteIndex,
4862
5124
  "CreateAlarmNotice": doCreateAlarmNotice,
4863
5125
  "PreviewKafkaRecharge": doPreviewKafkaRecharge,
4864
5126
  "ModifyConfigExtra": doModifyConfigExtra,
4865
5127
  "ModifyAlarmShield": doModifyAlarmShield,
5128
+ "SearchDashboardSubscribe": doSearchDashboardSubscribe,
4866
5129
  "CreateConfigExtra": doCreateConfigExtra,
4867
5130
  "DescribeAlarmShields": doDescribeAlarmShields,
4868
5131
  "ModifyScheduledSql": doModifyScheduledSql,
4869
5132
  "CreateMachineGroup": doCreateMachineGroup,
4870
5133
  "DeleteMachineGroupInfo": doDeleteMachineGroupInfo,
4871
5134
  "GetAlarmLog": doGetAlarmLog,
4872
- "DescribeLogsets": doDescribeLogsets,
5135
+ "DescribeMachineGroupConfigs": doDescribeMachineGroupConfigs,
5136
+ "DescribeShipperTasks": doDescribeShipperTasks,
4873
5137
  "SearchCosRechargeInfo": doSearchCosRechargeInfo,
4874
5138
  "ModifyKafkaRecharge": doModifyKafkaRecharge,
4875
5139
  "DescribeKafkaConsumer": doDescribeKafkaConsumer,
5140
+ "DeleteDashboardSubscribe": doDeleteDashboardSubscribe,
4876
5141
  "CreateDataTransform": doCreateDataTransform,
4877
5142
  "AddMachineGroupInfo": doAddMachineGroupInfo,
4878
5143
  "DescribeDataTransformInfo": doDescribeDataTransformInfo,
@@ -4880,7 +5145,7 @@ ACTION_MAP = {
4880
5145
  "DescribePartitions": doDescribePartitions,
4881
5146
  "DeleteConfigExtra": doDeleteConfigExtra,
4882
5147
  "CheckFunction": doCheckFunction,
4883
- "SearchLog": doSearchLog,
5148
+ "DeleteAlarm": doDeleteAlarm,
4884
5149
  "DeleteShipper": doDeleteShipper,
4885
5150
  "QueryRangeMetric": doQueryRangeMetric,
4886
5151
  "DescribeConfigMachineGroups": doDescribeConfigMachineGroups,
@@ -4889,6 +5154,7 @@ ACTION_MAP = {
4889
5154
  "DescribeMachineGroups": doDescribeMachineGroups,
4890
5155
  "CreateConsumer": doCreateConsumer,
4891
5156
  "ModifyTopic": doModifyTopic,
5157
+ "DescribeDashboardSubscribes": doDescribeDashboardSubscribes,
4892
5158
  "ModifyMachineGroup": doModifyMachineGroup,
4893
5159
  "DescribeScheduledSqlInfo": doDescribeScheduledSqlInfo,
4894
5160
  "DeleteConfig": doDeleteConfig,
@@ -4902,9 +5168,8 @@ ACTION_MAP = {
4902
5168
  "UploadLog": doUploadLog,
4903
5169
  "DeleteTopic": doDeleteTopic,
4904
5170
  "ModifyLogset": doModifyLogset,
4905
- "DescribeMachineGroupConfigs": doDescribeMachineGroupConfigs,
4906
5171
  "ModifyDataTransform": doModifyDataTransform,
4907
- "DeleteAlarm": doDeleteAlarm,
5172
+ "SearchLog": doSearchLog,
4908
5173
  "DescribeLogContext": doDescribeLogContext,
4909
5174
  "DescribeConsumer": doDescribeConsumer,
4910
5175
  "DescribeMachines": doDescribeMachines,