tccli 3.0.1331.1__py2.py3-none-any.whl → 3.0.1334.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.
- tccli/__init__.py +1 -1
- tccli/services/asr/v20190614/api.json +1 -1
- tccli/services/autoscaling/v20180419/api.json +1 -1
- tccli/services/bmvpc/v20180625/api.json +36 -36
- tccli/services/cdb/v20170320/api.json +37 -37
- tccli/services/cdn/v20180606/api.json +2 -2
- tccli/services/cdn/v20180606/examples.json +2 -2
- tccli/services/cfs/v20190719/api.json +1 -1
- tccli/services/cfw/v20190904/api.json +1 -1
- tccli/services/ckafka/v20190819/api.json +11 -1
- tccli/services/clb/v20180317/api.json +1 -1
- tccli/services/csip/csip_client.py +53 -0
- tccli/services/csip/v20221121/api.json +466 -0
- tccli/services/csip/v20221121/examples.json +9 -1
- tccli/services/cwp/v20180228/api.json +4 -4
- tccli/services/dc/v20180410/api.json +39 -0
- tccli/services/emr/v20190103/api.json +2 -2
- tccli/services/ess/ess_client.py +57 -4
- tccli/services/ess/v20201111/api.json +94 -4
- tccli/services/ess/v20201111/examples.json +8 -0
- tccli/services/essbasic/v20210526/api.json +34 -5
- tccli/services/goosefs/goosefs_client.py +53 -0
- tccli/services/goosefs/v20220519/api.json +55 -2
- tccli/services/goosefs/v20220519/examples.json +8 -0
- tccli/services/gs/gs_client.py +163 -4
- tccli/services/gs/v20191118/api.json +227 -1
- tccli/services/gs/v20191118/examples.json +25 -1
- tccli/services/hunyuan/v20230901/api.json +64 -0
- tccli/services/ioa/ioa_client.py +114 -8
- tccli/services/ioa/v20220601/api.json +375 -0
- tccli/services/ioa/v20220601/examples.json +28 -0
- tccli/services/iotexplorer/v20190423/api.json +5 -5
- tccli/services/iotexplorer/v20190423/examples.json +1 -1
- tccli/services/live/v20180801/api.json +3 -3
- tccli/services/lke/lke_client.py +284 -19
- tccli/services/lke/v20231130/api.json +1192 -132
- tccli/services/lke/v20231130/examples.json +40 -0
- tccli/services/lkeap/v20240522/examples.json +5 -5
- tccli/services/ocr/v20181119/api.json +4 -4
- tccli/services/ssl/v20191205/api.json +4 -4
- tccli/services/ssl/v20191205/examples.json +1 -1
- tccli/services/tat/v20201028/api.json +1 -1
- tccli/services/tcss/v20201101/api.json +5 -5
- tccli/services/tcss/v20201101/examples.json +2 -2
- tccli/services/tke/tke_client.py +106 -0
- tccli/services/tke/v20180525/api.json +124 -0
- tccli/services/tke/v20180525/examples.json +16 -0
- tccli/services/trtc/v20190722/api.json +30 -2
- tccli/services/tsf/v20180326/api.json +46 -17
- tccli/services/tsf/v20180326/examples.json +10 -10
- tccli/services/vpc/v20170312/api.json +5 -5
- tccli/services/vpc/v20170312/examples.json +6 -6
- {tccli-3.0.1331.1.dist-info → tccli-3.0.1334.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1331.1.dist-info → tccli-3.0.1334.1.dist-info}/RECORD +57 -57
- {tccli-3.0.1331.1.dist-info → tccli-3.0.1334.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1331.1.dist-info → tccli-3.0.1334.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1331.1.dist-info → tccli-3.0.1334.1.dist-info}/license_files/LICENSE +0 -0
@@ -8,6 +8,20 @@
|
|
8
8
|
"title": "送检任务示例"
|
9
9
|
}
|
10
10
|
],
|
11
|
+
"CreateDeviceTask": [
|
12
|
+
{
|
13
|
+
"document": "",
|
14
|
+
"input": "POST / HTTP/1.1\nHost: ioa.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateDeviceTask\n<公共请求参数>\n\n{\n \"Mid\": \"F1AFD85EC54480393C546B99C7CD014963761895\"\n}",
|
15
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"6ae64ad9-61da-4bca-9e69-8dbae22e9090\"\n }\n}",
|
16
|
+
"title": "示例1"
|
17
|
+
},
|
18
|
+
{
|
19
|
+
"document": "测试",
|
20
|
+
"input": "POST / HTTP/1.1\nHost: ioa.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateDeviceTask\n<公共请求参数>\n\n{\n \"Mid\": \"75129D715480905B6A9C4569893C7634663C2D68\"\n}",
|
21
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"8519d47f-b0bb-488b-8db5-4b7350017223\"\n }\n}",
|
22
|
+
"title": "测试"
|
23
|
+
}
|
24
|
+
],
|
11
25
|
"CreateDeviceVirtualGroup": [
|
12
26
|
{
|
13
27
|
"document": "创建自定义分组接口",
|
@@ -66,6 +80,20 @@
|
|
66
80
|
"title": "查询终端硬件信息列表"
|
67
81
|
}
|
68
82
|
],
|
83
|
+
"DescribeDeviceInfo": [
|
84
|
+
{
|
85
|
+
"document": "",
|
86
|
+
"input": "POST / HTTP/1.1\nHost: ioa.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeDeviceInfo\n<公共请求参数>\n\n{\n \"Type\": \"process_list\",\n \"Mid\": \"60A79588CD1400107221E490335AA1BA63730928\"\n}",
|
87
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"1c67af11-9c46-42aa-af5e-28f070199e82\",\n \"Data\": {\n \"NetworkList\": null,\n \"ServiceList\": null,\n \"ProcessList\": null\n }\n }\n}",
|
88
|
+
"title": "查询终端信息"
|
89
|
+
},
|
90
|
+
{
|
91
|
+
"document": "测试",
|
92
|
+
"input": "POST / HTTP/1.1\nHost: ioa.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeDeviceInfo\n<公共请求参数>\n\n{\n \"Mid\": \"EBCDB9C9923516F3C02B42B42DA564E7653F6EBC02\",\n \"Type\": \"process_list\"\n}",
|
93
|
+
"output": "{\n \"Response\": {\n \"Data\": {\n \"NetworkList\": null,\n \"ProcessList\": null,\n \"ServiceList\": null\n },\n \"RequestId\": \"26a20612-155c-4de1-adcc-52358ff7fb36\"\n }\n}",
|
94
|
+
"title": "测试"
|
95
|
+
}
|
96
|
+
],
|
69
97
|
"DescribeDevices": [
|
70
98
|
{
|
71
99
|
"document": "获取租户满足条件:最近登录账号包含\\'cc\\'(不区分大小写)的设备列表详情",
|
@@ -1231,7 +1231,7 @@
|
|
1231
1231
|
"members": [
|
1232
1232
|
{
|
1233
1233
|
"disabled": false,
|
1234
|
-
"document": "TWecall类型:0-体验套餐;1
|
1234
|
+
"document": "TWecall类型:0-体验套餐;1-基础版;3-高级版;",
|
1235
1235
|
"example": "1",
|
1236
1236
|
"member": "int64",
|
1237
1237
|
"name": "PkgType",
|
@@ -10218,7 +10218,7 @@
|
|
10218
10218
|
{
|
10219
10219
|
"disabled": false,
|
10220
10220
|
"document": "需要绑定的设备",
|
10221
|
-
"example": "
|
10221
|
+
"example": "dev01",
|
10222
10222
|
"member": "string",
|
10223
10223
|
"name": "DeviceName",
|
10224
10224
|
"required": true,
|
@@ -10245,7 +10245,7 @@
|
|
10245
10245
|
"example": "无",
|
10246
10246
|
"member": "DeviceSignatureInfo",
|
10247
10247
|
"name": "DeviceSignature",
|
10248
|
-
"
|
10248
|
+
"output_required": true,
|
10249
10249
|
"type": "object",
|
10250
10250
|
"value_allowed_null": false
|
10251
10251
|
},
|
@@ -10679,7 +10679,7 @@
|
|
10679
10679
|
{
|
10680
10680
|
"disabled": false,
|
10681
10681
|
"document": "设备名",
|
10682
|
-
"example": "
|
10682
|
+
"example": "dev01",
|
10683
10683
|
"member": "string",
|
10684
10684
|
"name": "DeviceName",
|
10685
10685
|
"required": true,
|
@@ -10724,7 +10724,7 @@
|
|
10724
10724
|
"example": "[{\"CreateTime\":1608882530000,\"Longitude\":113.9709,\"Latitude\":22.",
|
10725
10725
|
"member": "PositionItem",
|
10726
10726
|
"name": "Positions",
|
10727
|
-
"
|
10727
|
+
"output_required": true,
|
10728
10728
|
"type": "list",
|
10729
10729
|
"value_allowed_null": false
|
10730
10730
|
},
|
@@ -952,7 +952,7 @@
|
|
952
952
|
{
|
953
953
|
"document": "获取设备历史位置",
|
954
954
|
"input": "POST / HTTP/1.1\nHost: iotexplorer.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: GetDeviceLocationHistory\n<公共请求参数>\n\n{\n \"ProductId\": \"X4912BAIVR\",\n \"DeviceName\": \"dev1\",\n \"StartTime\": 1604890314000,\n \"EndTime\": 1609890353000\n}",
|
955
|
-
"output": "{\n \"Response\": {\n \"Positions\": [\n {\n \"CreateTime\": 1608882530000,\n \"Longitude\": 113.9709,\n \"Latitude\": 22.562782
|
955
|
+
"output": "{\n \"Response\": {\n \"Positions\": [\n {\n \"CreateTime\": 1608882530000,\n \"Longitude\": 113.9709,\n \"Latitude\": 22.562782,\n \"LocationType\": \"\",\n \"Accuracy\": 42.3\n }\n ],\n \"RequestId\": \"1e99faaf-a0f0-4c49-9d85-7f09f2b7f74e\"\n }\n}",
|
956
956
|
"title": "GetDeviceLocationHistory"
|
957
957
|
}
|
958
958
|
],
|
@@ -995,7 +995,7 @@
|
|
995
995
|
"status": "online"
|
996
996
|
},
|
997
997
|
"DescribeRecordTask": {
|
998
|
-
"document": "查询指定时间段范围内启动和结束的录制任务列表。\n- 使用前提\n1. 仅用于查询由 CreateRecordTask 接口创建的录制任务。\n2. 不能查询被 DeleteRecordTask 接口删除以及已过期(平台侧保留3
|
998
|
+
"document": "查询指定时间段范围内启动和结束的录制任务列表。\n- 使用前提\n1. 仅用于查询由 CreateRecordTask 接口创建的录制任务。\n2. 不能查询被 DeleteRecordTask 接口删除以及已过期(平台侧保留3个月)的录制任务。",
|
999
999
|
"input": "DescribeRecordTaskRequest",
|
1000
1000
|
"name": "查询录制任务列表(新)",
|
1001
1001
|
"output": "DescribeRecordTaskResponse",
|
@@ -12514,7 +12514,7 @@
|
|
12514
12514
|
"example": "RF1bV9tRVVEW=",
|
12515
12515
|
"member": "string",
|
12516
12516
|
"name": "ScrollToken",
|
12517
|
-
"
|
12517
|
+
"output_required": true,
|
12518
12518
|
"type": "string",
|
12519
12519
|
"value_allowed_null": false
|
12520
12520
|
},
|
@@ -12524,7 +12524,7 @@
|
|
12524
12524
|
"example": "无",
|
12525
12525
|
"member": "RecordTask",
|
12526
12526
|
"name": "TaskList",
|
12527
|
-
"
|
12527
|
+
"output_required": true,
|
12528
12528
|
"type": "list",
|
12529
12529
|
"value_allowed_null": false
|
12530
12530
|
},
|
tccli/services/lke/lke_client.py
CHANGED
@@ -537,6 +537,58 @@ def doDeleteQA(args, parsed_globals):
|
|
537
537
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
538
538
|
|
539
539
|
|
540
|
+
def doStopWorkflowRun(args, parsed_globals):
|
541
|
+
g_param = parse_global_arg(parsed_globals)
|
542
|
+
|
543
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
544
|
+
cred = credential.CVMRoleCredential()
|
545
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
546
|
+
cred = credential.STSAssumeRoleCredential(
|
547
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
548
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
549
|
+
)
|
550
|
+
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):
|
551
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
552
|
+
else:
|
553
|
+
cred = credential.Credential(
|
554
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
555
|
+
)
|
556
|
+
http_profile = HttpProfile(
|
557
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
558
|
+
reqMethod="POST",
|
559
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
560
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
561
|
+
)
|
562
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
563
|
+
if g_param[OptionsDefine.Language]:
|
564
|
+
profile.language = g_param[OptionsDefine.Language]
|
565
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
566
|
+
client = mod.LkeClient(cred, g_param[OptionsDefine.Region], profile)
|
567
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
568
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
569
|
+
model = models.StopWorkflowRunRequest()
|
570
|
+
model.from_json_string(json.dumps(args))
|
571
|
+
start_time = time.time()
|
572
|
+
while True:
|
573
|
+
rsp = client.StopWorkflowRun(model)
|
574
|
+
result = rsp.to_json_string()
|
575
|
+
try:
|
576
|
+
json_obj = json.loads(result)
|
577
|
+
except TypeError as e:
|
578
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
579
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
580
|
+
break
|
581
|
+
cur_time = time.time()
|
582
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
583
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
584
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
585
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
586
|
+
else:
|
587
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
588
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
589
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
590
|
+
|
591
|
+
|
540
592
|
def doCreateAttributeLabel(args, parsed_globals):
|
541
593
|
g_param = parse_global_arg(parsed_globals)
|
542
594
|
|
@@ -589,7 +641,7 @@ def doCreateAttributeLabel(args, parsed_globals):
|
|
589
641
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
590
642
|
|
591
643
|
|
592
|
-
def
|
644
|
+
def doListDocCate(args, parsed_globals):
|
593
645
|
g_param = parse_global_arg(parsed_globals)
|
594
646
|
|
595
647
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -618,11 +670,11 @@ def doRetryDocAudit(args, parsed_globals):
|
|
618
670
|
client = mod.LkeClient(cred, g_param[OptionsDefine.Region], profile)
|
619
671
|
client._sdkVersion += ("_CLI_" + __version__)
|
620
672
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
621
|
-
model = models.
|
673
|
+
model = models.ListDocCateRequest()
|
622
674
|
model.from_json_string(json.dumps(args))
|
623
675
|
start_time = time.time()
|
624
676
|
while True:
|
625
|
-
rsp = client.
|
677
|
+
rsp = client.ListDocCate(model)
|
626
678
|
result = rsp.to_json_string()
|
627
679
|
try:
|
628
680
|
json_obj = json.loads(result)
|
@@ -2409,6 +2461,110 @@ def doDescribeTokenUsage(args, parsed_globals):
|
|
2409
2461
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2410
2462
|
|
2411
2463
|
|
2464
|
+
def doDescribeNodeRun(args, parsed_globals):
|
2465
|
+
g_param = parse_global_arg(parsed_globals)
|
2466
|
+
|
2467
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
2468
|
+
cred = credential.CVMRoleCredential()
|
2469
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2470
|
+
cred = credential.STSAssumeRoleCredential(
|
2471
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2472
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2473
|
+
)
|
2474
|
+
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):
|
2475
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
2476
|
+
else:
|
2477
|
+
cred = credential.Credential(
|
2478
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
2479
|
+
)
|
2480
|
+
http_profile = HttpProfile(
|
2481
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
2482
|
+
reqMethod="POST",
|
2483
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
2484
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
2485
|
+
)
|
2486
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
2487
|
+
if g_param[OptionsDefine.Language]:
|
2488
|
+
profile.language = g_param[OptionsDefine.Language]
|
2489
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
2490
|
+
client = mod.LkeClient(cred, g_param[OptionsDefine.Region], profile)
|
2491
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
2492
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2493
|
+
model = models.DescribeNodeRunRequest()
|
2494
|
+
model.from_json_string(json.dumps(args))
|
2495
|
+
start_time = time.time()
|
2496
|
+
while True:
|
2497
|
+
rsp = client.DescribeNodeRun(model)
|
2498
|
+
result = rsp.to_json_string()
|
2499
|
+
try:
|
2500
|
+
json_obj = json.loads(result)
|
2501
|
+
except TypeError as e:
|
2502
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
2503
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
2504
|
+
break
|
2505
|
+
cur_time = time.time()
|
2506
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
2507
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
2508
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
2509
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
2510
|
+
else:
|
2511
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
2512
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
2513
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2514
|
+
|
2515
|
+
|
2516
|
+
def doListWorkflowRuns(args, parsed_globals):
|
2517
|
+
g_param = parse_global_arg(parsed_globals)
|
2518
|
+
|
2519
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
2520
|
+
cred = credential.CVMRoleCredential()
|
2521
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2522
|
+
cred = credential.STSAssumeRoleCredential(
|
2523
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2524
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2525
|
+
)
|
2526
|
+
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):
|
2527
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
2528
|
+
else:
|
2529
|
+
cred = credential.Credential(
|
2530
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
2531
|
+
)
|
2532
|
+
http_profile = HttpProfile(
|
2533
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
2534
|
+
reqMethod="POST",
|
2535
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
2536
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
2537
|
+
)
|
2538
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
2539
|
+
if g_param[OptionsDefine.Language]:
|
2540
|
+
profile.language = g_param[OptionsDefine.Language]
|
2541
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
2542
|
+
client = mod.LkeClient(cred, g_param[OptionsDefine.Region], profile)
|
2543
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
2544
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2545
|
+
model = models.ListWorkflowRunsRequest()
|
2546
|
+
model.from_json_string(json.dumps(args))
|
2547
|
+
start_time = time.time()
|
2548
|
+
while True:
|
2549
|
+
rsp = client.ListWorkflowRuns(model)
|
2550
|
+
result = rsp.to_json_string()
|
2551
|
+
try:
|
2552
|
+
json_obj = json.loads(result)
|
2553
|
+
except TypeError as e:
|
2554
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
2555
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
2556
|
+
break
|
2557
|
+
cur_time = time.time()
|
2558
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
2559
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
2560
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
2561
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
2562
|
+
else:
|
2563
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
2564
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
2565
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2566
|
+
|
2567
|
+
|
2412
2568
|
def doListQACate(args, parsed_globals):
|
2413
2569
|
g_param = parse_global_arg(parsed_globals)
|
2414
2570
|
|
@@ -3085,6 +3241,58 @@ def doListDoc(args, parsed_globals):
|
|
3085
3241
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3086
3242
|
|
3087
3243
|
|
3244
|
+
def doCreateWorkflowRun(args, parsed_globals):
|
3245
|
+
g_param = parse_global_arg(parsed_globals)
|
3246
|
+
|
3247
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
3248
|
+
cred = credential.CVMRoleCredential()
|
3249
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3250
|
+
cred = credential.STSAssumeRoleCredential(
|
3251
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3252
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3253
|
+
)
|
3254
|
+
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):
|
3255
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
3256
|
+
else:
|
3257
|
+
cred = credential.Credential(
|
3258
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
3259
|
+
)
|
3260
|
+
http_profile = HttpProfile(
|
3261
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
3262
|
+
reqMethod="POST",
|
3263
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
3264
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
3265
|
+
)
|
3266
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
3267
|
+
if g_param[OptionsDefine.Language]:
|
3268
|
+
profile.language = g_param[OptionsDefine.Language]
|
3269
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
3270
|
+
client = mod.LkeClient(cred, g_param[OptionsDefine.Region], profile)
|
3271
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
3272
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3273
|
+
model = models.CreateWorkflowRunRequest()
|
3274
|
+
model.from_json_string(json.dumps(args))
|
3275
|
+
start_time = time.time()
|
3276
|
+
while True:
|
3277
|
+
rsp = client.CreateWorkflowRun(model)
|
3278
|
+
result = rsp.to_json_string()
|
3279
|
+
try:
|
3280
|
+
json_obj = json.loads(result)
|
3281
|
+
except TypeError as e:
|
3282
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
3283
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
3284
|
+
break
|
3285
|
+
cur_time = time.time()
|
3286
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
3287
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
3288
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
3289
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
3290
|
+
else:
|
3291
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
3292
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
3293
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3294
|
+
|
3295
|
+
|
3088
3296
|
def doListQA(args, parsed_globals):
|
3089
3297
|
g_param = parse_global_arg(parsed_globals)
|
3090
3298
|
|
@@ -3345,7 +3553,7 @@ def doExportQAList(args, parsed_globals):
|
|
3345
3553
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3346
3554
|
|
3347
3555
|
|
3348
|
-
def
|
3556
|
+
def doUploadAttributeLabel(args, parsed_globals):
|
3349
3557
|
g_param = parse_global_arg(parsed_globals)
|
3350
3558
|
|
3351
3559
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3374,11 +3582,11 @@ def doIgnoreUnsatisfiedReply(args, parsed_globals):
|
|
3374
3582
|
client = mod.LkeClient(cred, g_param[OptionsDefine.Region], profile)
|
3375
3583
|
client._sdkVersion += ("_CLI_" + __version__)
|
3376
3584
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3377
|
-
model = models.
|
3585
|
+
model = models.UploadAttributeLabelRequest()
|
3378
3586
|
model.from_json_string(json.dumps(args))
|
3379
3587
|
start_time = time.time()
|
3380
3588
|
while True:
|
3381
|
-
rsp = client.
|
3589
|
+
rsp = client.UploadAttributeLabel(model)
|
3382
3590
|
result = rsp.to_json_string()
|
3383
3591
|
try:
|
3384
3592
|
json_obj = json.loads(result)
|
@@ -3397,7 +3605,7 @@ def doIgnoreUnsatisfiedReply(args, parsed_globals):
|
|
3397
3605
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3398
3606
|
|
3399
3607
|
|
3400
|
-
def
|
3608
|
+
def doDescribeReleaseInfo(args, parsed_globals):
|
3401
3609
|
g_param = parse_global_arg(parsed_globals)
|
3402
3610
|
|
3403
3611
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3426,11 +3634,11 @@ def doUploadAttributeLabel(args, parsed_globals):
|
|
3426
3634
|
client = mod.LkeClient(cred, g_param[OptionsDefine.Region], profile)
|
3427
3635
|
client._sdkVersion += ("_CLI_" + __version__)
|
3428
3636
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3429
|
-
model = models.
|
3637
|
+
model = models.DescribeReleaseInfoRequest()
|
3430
3638
|
model.from_json_string(json.dumps(args))
|
3431
3639
|
start_time = time.time()
|
3432
3640
|
while True:
|
3433
|
-
rsp = client.
|
3641
|
+
rsp = client.DescribeReleaseInfo(model)
|
3434
3642
|
result = rsp.to_json_string()
|
3435
3643
|
try:
|
3436
3644
|
json_obj = json.loads(result)
|
@@ -3657,7 +3865,7 @@ def doIsTransferIntent(args, parsed_globals):
|
|
3657
3865
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3658
3866
|
|
3659
3867
|
|
3660
|
-
def
|
3868
|
+
def doIgnoreUnsatisfiedReply(args, parsed_globals):
|
3661
3869
|
g_param = parse_global_arg(parsed_globals)
|
3662
3870
|
|
3663
3871
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3686,11 +3894,11 @@ def doDescribeReleaseInfo(args, parsed_globals):
|
|
3686
3894
|
client = mod.LkeClient(cred, g_param[OptionsDefine.Region], profile)
|
3687
3895
|
client._sdkVersion += ("_CLI_" + __version__)
|
3688
3896
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3689
|
-
model = models.
|
3897
|
+
model = models.IgnoreUnsatisfiedReplyRequest()
|
3690
3898
|
model.from_json_string(json.dumps(args))
|
3691
3899
|
start_time = time.time()
|
3692
3900
|
while True:
|
3693
|
-
rsp = client.
|
3901
|
+
rsp = client.IgnoreUnsatisfiedReply(model)
|
3694
3902
|
result = rsp.to_json_string()
|
3695
3903
|
try:
|
3696
3904
|
json_obj = json.loads(result)
|
@@ -4333,7 +4541,7 @@ def doQueryRewrite(args, parsed_globals):
|
|
4333
4541
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4334
4542
|
|
4335
4543
|
|
4336
|
-
def
|
4544
|
+
def doRetryDocAudit(args, parsed_globals):
|
4337
4545
|
g_param = parse_global_arg(parsed_globals)
|
4338
4546
|
|
4339
4547
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -4362,11 +4570,11 @@ def doListDocCate(args, parsed_globals):
|
|
4362
4570
|
client = mod.LkeClient(cred, g_param[OptionsDefine.Region], profile)
|
4363
4571
|
client._sdkVersion += ("_CLI_" + __version__)
|
4364
4572
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4365
|
-
model = models.
|
4573
|
+
model = models.RetryDocAuditRequest()
|
4366
4574
|
model.from_json_string(json.dumps(args))
|
4367
4575
|
start_time = time.time()
|
4368
4576
|
while True:
|
4369
|
-
rsp = client.
|
4577
|
+
rsp = client.RetryDocAudit(model)
|
4370
4578
|
result = rsp.to_json_string()
|
4371
4579
|
try:
|
4372
4580
|
json_obj = json.loads(result)
|
@@ -4645,6 +4853,58 @@ def doGetAnswerTypeDataCount(args, parsed_globals):
|
|
4645
4853
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4646
4854
|
|
4647
4855
|
|
4856
|
+
def doDescribeWorkflowRun(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.DescribeWorkflowRunRequest()
|
4886
|
+
model.from_json_string(json.dumps(args))
|
4887
|
+
start_time = time.time()
|
4888
|
+
while True:
|
4889
|
+
rsp = client.DescribeWorkflowRun(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
|
+
|
4648
4908
|
def doListReleaseDocPreview(args, parsed_globals):
|
4649
4909
|
g_param = parse_global_arg(parsed_globals)
|
4650
4910
|
|
@@ -5446,8 +5706,9 @@ ACTION_MAP = {
|
|
5446
5706
|
"ModifyDocAttrRange": doModifyDocAttrRange,
|
5447
5707
|
"CreateRelease": doCreateRelease,
|
5448
5708
|
"DeleteQA": doDeleteQA,
|
5709
|
+
"StopWorkflowRun": doStopWorkflowRun,
|
5449
5710
|
"CreateAttributeLabel": doCreateAttributeLabel,
|
5450
|
-
"
|
5711
|
+
"ListDocCate": doListDocCate,
|
5451
5712
|
"GenerateQA": doGenerateQA,
|
5452
5713
|
"ListSharedKnowledge": doListSharedKnowledge,
|
5453
5714
|
"DescribeAttributeLabel": doDescribeAttributeLabel,
|
@@ -5482,6 +5743,8 @@ ACTION_MAP = {
|
|
5482
5743
|
"GroupDoc": doGroupDoc,
|
5483
5744
|
"ListApp": doListApp,
|
5484
5745
|
"DescribeTokenUsage": doDescribeTokenUsage,
|
5746
|
+
"DescribeNodeRun": doDescribeNodeRun,
|
5747
|
+
"ListWorkflowRuns": doListWorkflowRuns,
|
5485
5748
|
"ListQACate": doListQACate,
|
5486
5749
|
"ListAppCategory": doListAppCategory,
|
5487
5750
|
"DescribeQA": doDescribeQA,
|
@@ -5495,18 +5758,19 @@ ACTION_MAP = {
|
|
5495
5758
|
"DeleteSharedKnowledge": doDeleteSharedKnowledge,
|
5496
5759
|
"DescribeRobotBizIDByAppKey": doDescribeRobotBizIDByAppKey,
|
5497
5760
|
"ListDoc": doListDoc,
|
5761
|
+
"CreateWorkflowRun": doCreateWorkflowRun,
|
5498
5762
|
"ListQA": doListQA,
|
5499
5763
|
"CreateVar": doCreateVar,
|
5500
5764
|
"GetLikeDataCount": doGetLikeDataCount,
|
5501
5765
|
"ModifyDocCate": doModifyDocCate,
|
5502
5766
|
"ExportQAList": doExportQAList,
|
5503
|
-
"IgnoreUnsatisfiedReply": doIgnoreUnsatisfiedReply,
|
5504
5767
|
"UploadAttributeLabel": doUploadAttributeLabel,
|
5768
|
+
"DescribeReleaseInfo": doDescribeReleaseInfo,
|
5505
5769
|
"GetDocPreview": doGetDocPreview,
|
5506
5770
|
"DescribeConcurrencyUsage": doDescribeConcurrencyUsage,
|
5507
5771
|
"CreateCorp": doCreateCorp,
|
5508
5772
|
"IsTransferIntent": doIsTransferIntent,
|
5509
|
-
"
|
5773
|
+
"IgnoreUnsatisfiedReply": doIgnoreUnsatisfiedReply,
|
5510
5774
|
"ReferShareKnowledge": doReferShareKnowledge,
|
5511
5775
|
"ListRelease": doListRelease,
|
5512
5776
|
"ListModel": doListModel,
|
@@ -5519,12 +5783,13 @@ ACTION_MAP = {
|
|
5519
5783
|
"CreateRejectedQuestion": doCreateRejectedQuestion,
|
5520
5784
|
"DeleteRejectedQuestion": doDeleteRejectedQuestion,
|
5521
5785
|
"QueryRewrite": doQueryRewrite,
|
5522
|
-
"
|
5786
|
+
"RetryDocAudit": doRetryDocAudit,
|
5523
5787
|
"ModifyApp": doModifyApp,
|
5524
5788
|
"GetEmbedding": doGetEmbedding,
|
5525
5789
|
"GetAppSecret": doGetAppSecret,
|
5526
5790
|
"ModifyAttributeLabel": doModifyAttributeLabel,
|
5527
5791
|
"GetAnswerTypeDataCount": doGetAnswerTypeDataCount,
|
5792
|
+
"DescribeWorkflowRun": doDescribeWorkflowRun,
|
5528
5793
|
"ListReleaseDocPreview": doListReleaseDocPreview,
|
5529
5794
|
"DescribeRelease": doDescribeRelease,
|
5530
5795
|
"ModifyRejectedQuestion": doModifyRejectedQuestion,
|