tccli 3.0.1331.1__py2.py3-none-any.whl → 3.0.1333.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/cfw/v20190904/api.json +1 -1
- tccli/services/ckafka/v20190819/api.json +11 -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 +61 -0
- tccli/services/ess/v20201111/examples.json +8 -0
- tccli/services/essbasic/v20210526/api.json +1 -1
- tccli/services/goosefs/v20220519/api.json +2 -2
- tccli/services/gs/gs_client.py +163 -4
- tccli/services/gs/v20191118/api.json +216 -0
- tccli/services/gs/v20191118/examples.json +24 -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/tke/tke_client.py +106 -0
- tccli/services/tke/v20180525/api.json +124 -0
- tccli/services/tke/v20180525/examples.json +16 -0
- 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.1333.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1331.1.dist-info → tccli-3.0.1333.1.dist-info}/RECORD +46 -46
- {tccli-3.0.1331.1.dist-info → tccli-3.0.1333.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1331.1.dist-info → tccli-3.0.1333.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1331.1.dist-info → tccli-3.0.1333.1.dist-info}/license_files/LICENSE +0 -0
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,
|