tccli 3.0.1349.1__py2.py3-none-any.whl → 3.0.1351.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 (46) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/aiart/v20221229/api.json +1 -1
  3. tccli/services/apm/v20210622/api.json +7 -9
  4. tccli/services/batch/v20170312/api.json +2 -2
  5. tccli/services/cdn/v20180606/api.json +1 -1
  6. tccli/services/cdwch/v20200915/api.json +18 -8
  7. tccli/services/cdwch/v20200915/examples.json +2 -2
  8. tccli/services/ckafka/ckafka_client.py +0 -53
  9. tccli/services/ckafka/v20190819/api.json +0 -215
  10. tccli/services/ckafka/v20190819/examples.json +0 -8
  11. tccli/services/csip/v20221121/examples.json +15 -21
  12. tccli/services/ctem/ctem_client.py +159 -0
  13. tccli/services/ctem/v20231128/api.json +673 -89
  14. tccli/services/ctem/v20231128/examples.json +24 -0
  15. tccli/services/cvm/v20170312/api.json +2 -2
  16. tccli/services/dts/v20211206/api.json +21 -1
  17. tccli/services/emr/v20190103/api.json +2 -2
  18. tccli/services/faceid/v20180301/api.json +3 -3
  19. tccli/services/gme/v20180711/api.json +40 -0
  20. tccli/services/kms/v20190118/api.json +188 -0
  21. tccli/services/live/live_client.py +224 -65
  22. tccli/services/live/v20180801/api.json +72 -0
  23. tccli/services/live/v20180801/examples.json +24 -0
  24. tccli/services/lke/lke_client.py +12 -436
  25. tccli/services/lke/v20231130/api.json +25 -1065
  26. tccli/services/lke/v20231130/examples.json +0 -64
  27. tccli/services/monitor/monitor_client.py +53 -0
  28. tccli/services/monitor/v20180724/examples.json +2 -2
  29. tccli/services/monitor/v20230616/api.json +58 -195
  30. tccli/services/monitor/v20230616/examples.json +4 -10
  31. tccli/services/mps/v20190612/api.json +6 -6
  32. tccli/services/omics/v20221128/api.json +3 -3
  33. tccli/services/redis/v20180412/api.json +24 -5
  34. tccli/services/redis/v20180412/examples.json +1 -1
  35. tccli/services/scf/v20180416/api.json +3 -0
  36. tccli/services/ssl/v20191205/api.json +31 -1
  37. tccli/services/tke/v20180525/api.json +2 -2
  38. tccli/services/tse/tse_client.py +80 -27
  39. tccli/services/tse/v20201207/api.json +193 -0
  40. tccli/services/tse/v20201207/examples.json +8 -0
  41. tccli/services/vclm/v20240523/api.json +2 -2
  42. {tccli-3.0.1349.1.dist-info → tccli-3.0.1351.1.dist-info}/METADATA +2 -2
  43. {tccli-3.0.1349.1.dist-info → tccli-3.0.1351.1.dist-info}/RECORD +46 -46
  44. {tccli-3.0.1349.1.dist-info → tccli-3.0.1351.1.dist-info}/WHEEL +0 -0
  45. {tccli-3.0.1349.1.dist-info → tccli-3.0.1351.1.dist-info}/entry_points.txt +0 -0
  46. {tccli-3.0.1349.1.dist-info → tccli-3.0.1351.1.dist-info}/license_files/LICENSE +0 -0
@@ -277,58 +277,6 @@ def doModifyQAAttrRange(args, parsed_globals):
277
277
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
278
278
 
279
279
 
280
- def doGetReconstructDocumentResult(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.LkeClient(cred, g_param[OptionsDefine.Region], profile)
307
- client._sdkVersion += ("_CLI_" + __version__)
308
- models = MODELS_MAP[g_param[OptionsDefine.Version]]
309
- model = models.GetReconstructDocumentResultRequest()
310
- model.from_json_string(json.dumps(args))
311
- start_time = time.time()
312
- while True:
313
- rsp = client.GetReconstructDocumentResult(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
-
332
280
  def doListSelectDoc(args, parsed_globals):
333
281
  g_param = parse_global_arg(parsed_globals)
334
282
 
@@ -745,58 +693,6 @@ def doListDocCate(args, parsed_globals):
745
693
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
746
694
 
747
695
 
748
- def doConvertDocument(args, parsed_globals):
749
- g_param = parse_global_arg(parsed_globals)
750
-
751
- if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
752
- cred = credential.CVMRoleCredential()
753
- elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
754
- cred = credential.STSAssumeRoleCredential(
755
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
756
- g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
757
- )
758
- 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):
759
- cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
760
- else:
761
- cred = credential.Credential(
762
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
763
- )
764
- http_profile = HttpProfile(
765
- reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
766
- reqMethod="POST",
767
- endpoint=g_param[OptionsDefine.Endpoint],
768
- proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
769
- )
770
- profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
771
- if g_param[OptionsDefine.Language]:
772
- profile.language = g_param[OptionsDefine.Language]
773
- mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
774
- client = mod.LkeClient(cred, g_param[OptionsDefine.Region], profile)
775
- client._sdkVersion += ("_CLI_" + __version__)
776
- models = MODELS_MAP[g_param[OptionsDefine.Version]]
777
- model = models.ConvertDocumentRequest()
778
- model.from_json_string(json.dumps(args))
779
- start_time = time.time()
780
- while True:
781
- rsp = client.ConvertDocument(model)
782
- result = rsp.to_json_string()
783
- try:
784
- json_obj = json.loads(result)
785
- except TypeError as e:
786
- json_obj = json.loads(result.decode('utf-8')) # python3.3
787
- if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
788
- break
789
- cur_time = time.time()
790
- if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
791
- raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
792
- (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
793
- search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
794
- else:
795
- print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
796
- time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
797
- FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
798
-
799
-
800
696
  def doListSharedKnowledge(args, parsed_globals):
801
697
  g_param = parse_global_arg(parsed_globals)
802
698
 
@@ -1525,7 +1421,7 @@ def doDescribeSearchStatsGraph(args, parsed_globals):
1525
1421
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1526
1422
 
1527
1423
 
1528
- def doListWorkflowRuns(args, parsed_globals):
1424
+ def doDeleteDocCate(args, parsed_globals):
1529
1425
  g_param = parse_global_arg(parsed_globals)
1530
1426
 
1531
1427
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1554,11 +1450,11 @@ def doListWorkflowRuns(args, parsed_globals):
1554
1450
  client = mod.LkeClient(cred, g_param[OptionsDefine.Region], profile)
1555
1451
  client._sdkVersion += ("_CLI_" + __version__)
1556
1452
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1557
- model = models.ListWorkflowRunsRequest()
1453
+ model = models.DeleteDocCateRequest()
1558
1454
  model.from_json_string(json.dumps(args))
1559
1455
  start_time = time.time()
1560
1456
  while True:
1561
- rsp = client.ListWorkflowRuns(model)
1457
+ rsp = client.DeleteDocCate(model)
1562
1458
  result = rsp.to_json_string()
1563
1459
  try:
1564
1460
  json_obj = json.loads(result)
@@ -2201,58 +2097,6 @@ def doCheckAttributeLabelRefer(args, parsed_globals):
2201
2097
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2202
2098
 
2203
2099
 
2204
- def doDescribeCorp(args, parsed_globals):
2205
- g_param = parse_global_arg(parsed_globals)
2206
-
2207
- if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
2208
- cred = credential.CVMRoleCredential()
2209
- elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
2210
- cred = credential.STSAssumeRoleCredential(
2211
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
2212
- g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
2213
- )
2214
- 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):
2215
- cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
2216
- else:
2217
- cred = credential.Credential(
2218
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
2219
- )
2220
- http_profile = HttpProfile(
2221
- reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
2222
- reqMethod="POST",
2223
- endpoint=g_param[OptionsDefine.Endpoint],
2224
- proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
2225
- )
2226
- profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
2227
- if g_param[OptionsDefine.Language]:
2228
- profile.language = g_param[OptionsDefine.Language]
2229
- mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
2230
- client = mod.LkeClient(cred, g_param[OptionsDefine.Region], profile)
2231
- client._sdkVersion += ("_CLI_" + __version__)
2232
- models = MODELS_MAP[g_param[OptionsDefine.Version]]
2233
- model = models.DescribeCorpRequest()
2234
- model.from_json_string(json.dumps(args))
2235
- start_time = time.time()
2236
- while True:
2237
- rsp = client.DescribeCorp(model)
2238
- result = rsp.to_json_string()
2239
- try:
2240
- json_obj = json.loads(result)
2241
- except TypeError as e:
2242
- json_obj = json.loads(result.decode('utf-8')) # python3.3
2243
- if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
2244
- break
2245
- cur_time = time.time()
2246
- if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
2247
- raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
2248
- (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
2249
- search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
2250
- else:
2251
- print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
2252
- time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
2253
- FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2254
-
2255
-
2256
2100
  def doCreateSharedKnowledge(args, parsed_globals):
2257
2101
  g_param = parse_global_arg(parsed_globals)
2258
2102
 
@@ -2565,7 +2409,7 @@ def doDescribeNodeRun(args, parsed_globals):
2565
2409
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2566
2410
 
2567
2411
 
2568
- def doDeleteDocCate(args, parsed_globals):
2412
+ def doListWorkflowRuns(args, parsed_globals):
2569
2413
  g_param = parse_global_arg(parsed_globals)
2570
2414
 
2571
2415
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2594,11 +2438,11 @@ def doDeleteDocCate(args, parsed_globals):
2594
2438
  client = mod.LkeClient(cred, g_param[OptionsDefine.Region], profile)
2595
2439
  client._sdkVersion += ("_CLI_" + __version__)
2596
2440
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2597
- model = models.DeleteDocCateRequest()
2441
+ model = models.ListWorkflowRunsRequest()
2598
2442
  model.from_json_string(json.dumps(args))
2599
2443
  start_time = time.time()
2600
2444
  while True:
2601
- rsp = client.DeleteDocCate(model)
2445
+ rsp = client.ListWorkflowRuns(model)
2602
2446
  result = rsp.to_json_string()
2603
2447
  try:
2604
2448
  json_obj = json.loads(result)
@@ -3917,7 +3761,7 @@ def doDescribeConcurrencyUsage(args, parsed_globals):
3917
3761
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3918
3762
 
3919
3763
 
3920
- def doCreateCorp(args, parsed_globals):
3764
+ def doModifyRejectedQuestion(args, parsed_globals):
3921
3765
  g_param = parse_global_arg(parsed_globals)
3922
3766
 
3923
3767
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3946,11 +3790,11 @@ def doCreateCorp(args, parsed_globals):
3946
3790
  client = mod.LkeClient(cred, g_param[OptionsDefine.Region], profile)
3947
3791
  client._sdkVersion += ("_CLI_" + __version__)
3948
3792
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
3949
- model = models.CreateCorpRequest()
3793
+ model = models.ModifyRejectedQuestionRequest()
3950
3794
  model.from_json_string(json.dumps(args))
3951
3795
  start_time = time.time()
3952
3796
  while True:
3953
- rsp = client.CreateCorp(model)
3797
+ rsp = client.ModifyRejectedQuestion(model)
3954
3798
  result = rsp.to_json_string()
3955
3799
  try:
3956
3800
  json_obj = json.loads(result)
@@ -4697,58 +4541,6 @@ def doDeleteRejectedQuestion(args, parsed_globals):
4697
4541
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4698
4542
 
4699
4543
 
4700
- def doQueryRewrite(args, parsed_globals):
4701
- g_param = parse_global_arg(parsed_globals)
4702
-
4703
- if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
4704
- cred = credential.CVMRoleCredential()
4705
- elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
4706
- cred = credential.STSAssumeRoleCredential(
4707
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
4708
- g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
4709
- )
4710
- 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):
4711
- cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
4712
- else:
4713
- cred = credential.Credential(
4714
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
4715
- )
4716
- http_profile = HttpProfile(
4717
- reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
4718
- reqMethod="POST",
4719
- endpoint=g_param[OptionsDefine.Endpoint],
4720
- proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
4721
- )
4722
- profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
4723
- if g_param[OptionsDefine.Language]:
4724
- profile.language = g_param[OptionsDefine.Language]
4725
- mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
4726
- client = mod.LkeClient(cred, g_param[OptionsDefine.Region], profile)
4727
- client._sdkVersion += ("_CLI_" + __version__)
4728
- models = MODELS_MAP[g_param[OptionsDefine.Version]]
4729
- model = models.QueryRewriteRequest()
4730
- model.from_json_string(json.dumps(args))
4731
- start_time = time.time()
4732
- while True:
4733
- rsp = client.QueryRewrite(model)
4734
- result = rsp.to_json_string()
4735
- try:
4736
- json_obj = json.loads(result)
4737
- except TypeError as e:
4738
- json_obj = json.loads(result.decode('utf-8')) # python3.3
4739
- if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
4740
- break
4741
- cur_time = time.time()
4742
- if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
4743
- raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
4744
- (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
4745
- search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
4746
- else:
4747
- print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
4748
- time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
4749
- FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4750
-
4751
-
4752
4544
  def doDeleteVar(args, parsed_globals):
4753
4545
  g_param = parse_global_arg(parsed_globals)
4754
4546
 
@@ -4853,58 +4645,6 @@ def doModifyApp(args, parsed_globals):
4853
4645
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4854
4646
 
4855
4647
 
4856
- def doGetEmbedding(args, parsed_globals):
4857
- g_param = parse_global_arg(parsed_globals)
4858
-
4859
- if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
4860
- cred = credential.CVMRoleCredential()
4861
- elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
4862
- cred = credential.STSAssumeRoleCredential(
4863
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
4864
- g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
4865
- )
4866
- 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):
4867
- cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
4868
- else:
4869
- cred = credential.Credential(
4870
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
4871
- )
4872
- http_profile = HttpProfile(
4873
- reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
4874
- reqMethod="POST",
4875
- endpoint=g_param[OptionsDefine.Endpoint],
4876
- proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
4877
- )
4878
- profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
4879
- if g_param[OptionsDefine.Language]:
4880
- profile.language = g_param[OptionsDefine.Language]
4881
- mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
4882
- client = mod.LkeClient(cred, g_param[OptionsDefine.Region], profile)
4883
- client._sdkVersion += ("_CLI_" + __version__)
4884
- models = MODELS_MAP[g_param[OptionsDefine.Version]]
4885
- model = models.GetEmbeddingRequest()
4886
- model.from_json_string(json.dumps(args))
4887
- start_time = time.time()
4888
- while True:
4889
- rsp = client.GetEmbedding(model)
4890
- result = rsp.to_json_string()
4891
- try:
4892
- json_obj = json.loads(result)
4893
- except TypeError as e:
4894
- json_obj = json.loads(result.decode('utf-8')) # python3.3
4895
- if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
4896
- break
4897
- cur_time = time.time()
4898
- if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
4899
- raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
4900
- (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
4901
- search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
4902
- else:
4903
- print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
4904
- time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
4905
- FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4906
-
4907
-
4908
4648
  def doGetAppSecret(args, parsed_globals):
4909
4649
  g_param = parse_global_arg(parsed_globals)
4910
4650
 
@@ -5321,58 +5061,6 @@ def doDescribeRelease(args, parsed_globals):
5321
5061
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
5322
5062
 
5323
5063
 
5324
- def doModifyRejectedQuestion(args, parsed_globals):
5325
- g_param = parse_global_arg(parsed_globals)
5326
-
5327
- if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
5328
- cred = credential.CVMRoleCredential()
5329
- elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
5330
- cred = credential.STSAssumeRoleCredential(
5331
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
5332
- g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
5333
- )
5334
- 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):
5335
- cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
5336
- else:
5337
- cred = credential.Credential(
5338
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
5339
- )
5340
- http_profile = HttpProfile(
5341
- reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
5342
- reqMethod="POST",
5343
- endpoint=g_param[OptionsDefine.Endpoint],
5344
- proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
5345
- )
5346
- profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
5347
- if g_param[OptionsDefine.Language]:
5348
- profile.language = g_param[OptionsDefine.Language]
5349
- mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
5350
- client = mod.LkeClient(cred, g_param[OptionsDefine.Region], profile)
5351
- client._sdkVersion += ("_CLI_" + __version__)
5352
- models = MODELS_MAP[g_param[OptionsDefine.Version]]
5353
- model = models.ModifyRejectedQuestionRequest()
5354
- model.from_json_string(json.dumps(args))
5355
- start_time = time.time()
5356
- while True:
5357
- rsp = client.ModifyRejectedQuestion(model)
5358
- result = rsp.to_json_string()
5359
- try:
5360
- json_obj = json.loads(result)
5361
- except TypeError as e:
5362
- json_obj = json.loads(result.decode('utf-8')) # python3.3
5363
- if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
5364
- break
5365
- cur_time = time.time()
5366
- if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
5367
- raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
5368
- (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
5369
- search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
5370
- else:
5371
- print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
5372
- time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
5373
- FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
5374
-
5375
-
5376
5064
  def doGetAppKnowledgeCount(args, parsed_globals):
5377
5065
  g_param = parse_global_arg(parsed_globals)
5378
5066
 
@@ -5737,58 +5425,6 @@ def doDescribeSegments(args, parsed_globals):
5737
5425
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
5738
5426
 
5739
5427
 
5740
- def doRunReRank(args, parsed_globals):
5741
- g_param = parse_global_arg(parsed_globals)
5742
-
5743
- if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
5744
- cred = credential.CVMRoleCredential()
5745
- elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
5746
- cred = credential.STSAssumeRoleCredential(
5747
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
5748
- g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
5749
- )
5750
- 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):
5751
- cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
5752
- else:
5753
- cred = credential.Credential(
5754
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
5755
- )
5756
- http_profile = HttpProfile(
5757
- reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
5758
- reqMethod="POST",
5759
- endpoint=g_param[OptionsDefine.Endpoint],
5760
- proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
5761
- )
5762
- profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
5763
- if g_param[OptionsDefine.Language]:
5764
- profile.language = g_param[OptionsDefine.Language]
5765
- mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
5766
- client = mod.LkeClient(cred, g_param[OptionsDefine.Region], profile)
5767
- client._sdkVersion += ("_CLI_" + __version__)
5768
- models = MODELS_MAP[g_param[OptionsDefine.Version]]
5769
- model = models.RunReRankRequest()
5770
- model.from_json_string(json.dumps(args))
5771
- start_time = time.time()
5772
- while True:
5773
- rsp = client.RunReRank(model)
5774
- result = rsp.to_json_string()
5775
- try:
5776
- json_obj = json.loads(result)
5777
- except TypeError as e:
5778
- json_obj = json.loads(result.decode('utf-8')) # python3.3
5779
- if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
5780
- break
5781
- cur_time = time.time()
5782
- if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
5783
- raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
5784
- (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
5785
- search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
5786
- else:
5787
- print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
5788
- time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
5789
- FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
5790
-
5791
-
5792
5428
  def doGetTaskStatus(args, parsed_globals):
5793
5429
  g_param = parse_global_arg(parsed_globals)
5794
5430
 
@@ -5841,58 +5477,6 @@ def doGetTaskStatus(args, parsed_globals):
5841
5477
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
5842
5478
 
5843
5479
 
5844
- def doReconstructDocument(args, parsed_globals):
5845
- g_param = parse_global_arg(parsed_globals)
5846
-
5847
- if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
5848
- cred = credential.CVMRoleCredential()
5849
- elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
5850
- cred = credential.STSAssumeRoleCredential(
5851
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
5852
- g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
5853
- )
5854
- 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):
5855
- cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
5856
- else:
5857
- cred = credential.Credential(
5858
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
5859
- )
5860
- http_profile = HttpProfile(
5861
- reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
5862
- reqMethod="POST",
5863
- endpoint=g_param[OptionsDefine.Endpoint],
5864
- proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
5865
- )
5866
- profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
5867
- if g_param[OptionsDefine.Language]:
5868
- profile.language = g_param[OptionsDefine.Language]
5869
- mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
5870
- client = mod.LkeClient(cred, g_param[OptionsDefine.Region], profile)
5871
- client._sdkVersion += ("_CLI_" + __version__)
5872
- models = MODELS_MAP[g_param[OptionsDefine.Version]]
5873
- model = models.ReconstructDocumentRequest()
5874
- model.from_json_string(json.dumps(args))
5875
- start_time = time.time()
5876
- while True:
5877
- rsp = client.ReconstructDocument(model)
5878
- result = rsp.to_json_string()
5879
- try:
5880
- json_obj = json.loads(result)
5881
- except TypeError as e:
5882
- json_obj = json.loads(result.decode('utf-8')) # python3.3
5883
- if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
5884
- break
5885
- cur_time = time.time()
5886
- if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
5887
- raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
5888
- (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
5889
- search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
5890
- else:
5891
- print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
5892
- time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
5893
- FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
5894
-
5895
-
5896
5480
  def doListAppKnowledgeDetail(args, parsed_globals):
5897
5481
  g_param = parse_global_arg(parsed_globals)
5898
5482
 
@@ -6013,7 +5597,6 @@ ACTION_MAP = {
6013
5597
  "GetVarList": doGetVarList,
6014
5598
  "DescribeKnowledgeUsagePieGraph": doDescribeKnowledgeUsagePieGraph,
6015
5599
  "ModifyQAAttrRange": doModifyQAAttrRange,
6016
- "GetReconstructDocumentResult": doGetReconstructDocumentResult,
6017
5600
  "ListSelectDoc": doListSelectDoc,
6018
5601
  "ModifyDocAttrRange": doModifyDocAttrRange,
6019
5602
  "CreateRelease": doCreateRelease,
@@ -6022,7 +5605,6 @@ ACTION_MAP = {
6022
5605
  "ModifyAgent": doModifyAgent,
6023
5606
  "CreateAttributeLabel": doCreateAttributeLabel,
6024
5607
  "ListDocCate": doListDocCate,
6025
- "ConvertDocument": doConvertDocument,
6026
5608
  "ListSharedKnowledge": doListSharedKnowledge,
6027
5609
  "DescribeAttributeLabel": doDescribeAttributeLabel,
6028
5610
  "ListRejectedQuestionPreview": doListRejectedQuestionPreview,
@@ -6037,7 +5619,7 @@ ACTION_MAP = {
6037
5619
  "ListReleaseConfigPreview": doListReleaseConfigPreview,
6038
5620
  "ListReferShareKnowledge": doListReferShareKnowledge,
6039
5621
  "DescribeSearchStatsGraph": doDescribeSearchStatsGraph,
6040
- "ListWorkflowRuns": doListWorkflowRuns,
5622
+ "DeleteDocCate": doDeleteDocCate,
6041
5623
  "VerifyQA": doVerifyQA,
6042
5624
  "CreateDocCate": doCreateDocCate,
6043
5625
  "CheckAttributeLabelExist": doCheckAttributeLabelExist,
@@ -6050,14 +5632,13 @@ ACTION_MAP = {
6050
5632
  "ModifyQACate": doModifyQACate,
6051
5633
  "DeleteApp": doDeleteApp,
6052
5634
  "CheckAttributeLabelRefer": doCheckAttributeLabelRefer,
6053
- "DescribeCorp": doDescribeCorp,
6054
5635
  "CreateSharedKnowledge": doCreateSharedKnowledge,
6055
5636
  "DescribeUnsatisfiedReplyContext": doDescribeUnsatisfiedReplyContext,
6056
5637
  "GroupDoc": doGroupDoc,
6057
5638
  "ListApp": doListApp,
6058
5639
  "DescribeTokenUsage": doDescribeTokenUsage,
6059
5640
  "DescribeNodeRun": doDescribeNodeRun,
6060
- "DeleteDocCate": doDeleteDocCate,
5641
+ "ListWorkflowRuns": doListWorkflowRuns,
6061
5642
  "ListQACate": doListQACate,
6062
5643
  "ListAppCategory": doListAppCategory,
6063
5644
  "DescribeQA": doDescribeQA,
@@ -6083,7 +5664,7 @@ ACTION_MAP = {
6083
5664
  "DescribeReleaseInfo": doDescribeReleaseInfo,
6084
5665
  "GetDocPreview": doGetDocPreview,
6085
5666
  "DescribeConcurrencyUsage": doDescribeConcurrencyUsage,
6086
- "CreateCorp": doCreateCorp,
5667
+ "ModifyRejectedQuestion": doModifyRejectedQuestion,
6087
5668
  "IsTransferIntent": doIsTransferIntent,
6088
5669
  "IgnoreUnsatisfiedReply": doIgnoreUnsatisfiedReply,
6089
5670
  "UpdateVar": doUpdateVar,
@@ -6098,10 +5679,8 @@ ACTION_MAP = {
6098
5679
  "SaveDoc": doSaveDoc,
6099
5680
  "CreateRejectedQuestion": doCreateRejectedQuestion,
6100
5681
  "DeleteRejectedQuestion": doDeleteRejectedQuestion,
6101
- "QueryRewrite": doQueryRewrite,
6102
5682
  "DeleteVar": doDeleteVar,
6103
5683
  "ModifyApp": doModifyApp,
6104
- "GetEmbedding": doGetEmbedding,
6105
5684
  "GetAppSecret": doGetAppSecret,
6106
5685
  "ModifyAttributeLabel": doModifyAttributeLabel,
6107
5686
  "GetAnswerTypeDataCount": doGetAnswerTypeDataCount,
@@ -6110,7 +5689,6 @@ ACTION_MAP = {
6110
5689
  "RetryDocAudit": doRetryDocAudit,
6111
5690
  "ListReleaseDocPreview": doListReleaseDocPreview,
6112
5691
  "DescribeRelease": doDescribeRelease,
6113
- "ModifyRejectedQuestion": doModifyRejectedQuestion,
6114
5692
  "GetAppKnowledgeCount": doGetAppKnowledgeCount,
6115
5693
  "DescribeConcurrencyUsageGraph": doDescribeConcurrencyUsageGraph,
6116
5694
  "GetMsgRecord": doGetMsgRecord,
@@ -6118,9 +5696,7 @@ ACTION_MAP = {
6118
5696
  "DescribeCallStatsGraph": doDescribeCallStatsGraph,
6119
5697
  "GroupQA": doGroupQA,
6120
5698
  "DescribeSegments": doDescribeSegments,
6121
- "RunReRank": doRunReRank,
6122
5699
  "GetTaskStatus": doGetTaskStatus,
6123
- "ReconstructDocument": doReconstructDocument,
6124
5700
  "ListAppKnowledgeDetail": doListAppKnowledgeDetail,
6125
5701
  "StopDocParse": doStopDocParse,
6126
5702