tccli 3.0.1135.1__py2.py3-none-any.whl → 3.0.1136.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/__init__.py +3 -0
- tccli/services/asr/asr_client.py +53 -0
- tccli/services/asr/v20190614/api.json +193 -1
- tccli/services/asr/v20190614/examples.json +8 -0
- tccli/services/batch/v20170312/api.json +8 -5
- tccli/services/batch/v20170312/examples.json +1 -1
- tccli/services/ckafka/v20190819/api.json +1 -1
- tccli/services/dlc/dlc_client.py +53 -0
- tccli/services/dlc/v20210125/api.json +134 -0
- tccli/services/dlc/v20210125/examples.json +8 -0
- tccli/services/dsgc/v20190723/api.json +35 -35
- tccli/services/eiam/v20210420/api.json +4 -4
- tccli/services/eiam/v20210420/examples.json +4 -4
- tccli/services/ess/v20201111/api.json +1 -1
- tccli/services/essbasic/v20210526/api.json +2 -2
- tccli/services/iotexplorer/iotexplorer_client.py +53 -0
- tccli/services/iotexplorer/v20190423/api.json +133 -0
- tccli/services/iotexplorer/v20190423/examples.json +8 -0
- tccli/services/lighthouse/v20200324/api.json +14 -14
- tccli/services/lighthouse/v20200324/examples.json +7 -7
- tccli/services/lke/lke_client.py +175 -16
- tccli/services/lke/v20231130/api.json +429 -4
- tccli/services/lke/v20231130/examples.json +24 -0
- tccli/services/ocr/v20181119/api.json +1 -1
- tccli/services/tdmq/tdmq_client.py +53 -0
- tccli/services/tdmq/v20200217/api.json +301 -0
- tccli/services/tdmq/v20200217/examples.json +8 -0
- tccli/services/tem/v20210701/api.json +8 -5
- tccli/services/tem/v20210701/examples.json +2 -2
- tccli/services/trocket/trocket_client.py +65 -12
- tccli/services/trocket/v20230308/api.json +196 -0
- tccli/services/trocket/v20230308/examples.json +8 -0
- tccli/services/trtc/v20190722/api.json +45 -63
- tccli/services/tsi/__init__.py +4 -0
- tccli/services/tsi/tsi_client.py +301 -0
- tccli/services/tsi/v20210325/api.json +373 -0
- tccli/services/tsi/v20210325/examples.json +29 -0
- tccli/services/vpc/v20170312/api.json +36 -16
- tccli/services/vpc/v20170312/examples.json +9 -3
- tccli/services/waf/v20180125/api.json +70 -0
- tccli/services/waf/v20180125/examples.json +8 -0
- tccli/services/waf/waf_client.py +53 -0
- {tccli-3.0.1135.1.dist-info → tccli-3.0.1136.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1135.1.dist-info → tccli-3.0.1136.1.dist-info}/RECORD +48 -44
- {tccli-3.0.1135.1.dist-info → tccli-3.0.1136.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1135.1.dist-info → tccli-3.0.1136.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1135.1.dist-info → tccli-3.0.1136.1.dist-info}/license_files/LICENSE +0 -0
tccli/__init__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = '3.0.
|
1
|
+
__version__ = '3.0.1136.1'
|
tccli/services/__init__.py
CHANGED
tccli/services/asr/asr_client.py
CHANGED
@@ -537,6 +537,58 @@ def doCreateCustomization(args, parsed_globals):
|
|
537
537
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
538
538
|
|
539
539
|
|
540
|
+
def doVoicePrintGroupVerify(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.AsrClient(cred, g_param[OptionsDefine.Region], profile)
|
567
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
568
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
569
|
+
model = models.VoicePrintGroupVerifyRequest()
|
570
|
+
model.from_json_string(json.dumps(args))
|
571
|
+
start_time = time.time()
|
572
|
+
while True:
|
573
|
+
rsp = client.VoicePrintGroupVerify(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 doDeleteAsrVocab(args, parsed_globals):
|
541
593
|
g_param = parse_global_arg(parsed_globals)
|
542
594
|
|
@@ -1390,6 +1442,7 @@ ACTION_MAP = {
|
|
1390
1442
|
"SetVocabState": doSetVocabState,
|
1391
1443
|
"DownloadAsrVocab": doDownloadAsrVocab,
|
1392
1444
|
"CreateCustomization": doCreateCustomization,
|
1445
|
+
"VoicePrintGroupVerify": doVoicePrintGroupVerify,
|
1393
1446
|
"DeleteAsrVocab": doDeleteAsrVocab,
|
1394
1447
|
"SentenceRecognition": doSentenceRecognition,
|
1395
1448
|
"CreateRecTask": doCreateRecTask,
|
@@ -168,6 +168,13 @@
|
|
168
168
|
"output": "VoicePrintEnrollResponse",
|
169
169
|
"status": "online"
|
170
170
|
},
|
171
|
+
"VoicePrintGroupVerify": {
|
172
|
+
"document": "说话人验证1:N接口,可以通过传入一段说话人音频,并且指定已存在的groupId, 和返回topN, 接口返回groupId内所有声纹和传入音频声纹比对打分TopN的结果。",
|
173
|
+
"input": "VoicePrintGroupVerifyRequest",
|
174
|
+
"name": "说话人验证1:N",
|
175
|
+
"output": "VoicePrintGroupVerifyResponse",
|
176
|
+
"status": "online"
|
177
|
+
},
|
171
178
|
"VoicePrintUpdate": {
|
172
179
|
"document": "本接口用于更新和覆盖已注册的音频数据和说话人昵称,更新后原有的音频数据将失效。",
|
173
180
|
"input": "VoicePrintUpdateRequest",
|
@@ -2048,6 +2055,62 @@
|
|
2048
2055
|
],
|
2049
2056
|
"type": "object"
|
2050
2057
|
},
|
2058
|
+
"VerifyTop": {
|
2059
|
+
"document": "声纹组对比结果top数据",
|
2060
|
+
"members": [
|
2061
|
+
{
|
2062
|
+
"disabled": false,
|
2063
|
+
"document": "相似度打分\n注意:此字段可能返回 null,表示取不到有效值。",
|
2064
|
+
"example": "0.70",
|
2065
|
+
"member": "string",
|
2066
|
+
"name": "Score",
|
2067
|
+
"output_required": false,
|
2068
|
+
"required": false,
|
2069
|
+
"type": "string",
|
2070
|
+
"value_allowed_null": true
|
2071
|
+
},
|
2072
|
+
{
|
2073
|
+
"disabled": false,
|
2074
|
+
"document": "说话人id\n注意:此字段可能返回 null,表示取不到有效值。",
|
2075
|
+
"example": "dsadcsds-dsads-dsadasd",
|
2076
|
+
"member": "string",
|
2077
|
+
"name": "VoicePrintId",
|
2078
|
+
"output_required": false,
|
2079
|
+
"required": false,
|
2080
|
+
"type": "string",
|
2081
|
+
"value_allowed_null": true
|
2082
|
+
},
|
2083
|
+
{
|
2084
|
+
"disabled": false,
|
2085
|
+
"document": "说话人昵称\n注意:此字段可能返回 null,表示取不到有效值。",
|
2086
|
+
"example": "小明",
|
2087
|
+
"member": "string",
|
2088
|
+
"name": "SpeakerId",
|
2089
|
+
"output_required": false,
|
2090
|
+
"required": false,
|
2091
|
+
"type": "string",
|
2092
|
+
"value_allowed_null": true
|
2093
|
+
}
|
2094
|
+
],
|
2095
|
+
"usage": "both"
|
2096
|
+
},
|
2097
|
+
"VerifyTopResult": {
|
2098
|
+
"document": "说话人验证1:N返回结果",
|
2099
|
+
"members": [
|
2100
|
+
{
|
2101
|
+
"disabled": false,
|
2102
|
+
"document": "对比打分结果,按照打分降序排列返回\n注意:此字段可能返回 null,表示取不到有效值。",
|
2103
|
+
"example": "无",
|
2104
|
+
"member": "VerifyTop",
|
2105
|
+
"name": "VerifyTops",
|
2106
|
+
"output_required": false,
|
2107
|
+
"required": false,
|
2108
|
+
"type": "list",
|
2109
|
+
"value_allowed_null": true
|
2110
|
+
}
|
2111
|
+
],
|
2112
|
+
"usage": "both"
|
2113
|
+
},
|
2051
2114
|
"Vocab": {
|
2052
2115
|
"document": "[词表内容](https://cloud.tencent.com/document/product/1093/41484#3.-.E8.BE.93.E5.87.BA.E5.8F.82.E6.95.B0)",
|
2053
2116
|
"members": [
|
@@ -2262,13 +2325,42 @@
|
|
2262
2325
|
"output_required": false,
|
2263
2326
|
"type": "int",
|
2264
2327
|
"value_allowed_null": true
|
2328
|
+
},
|
2329
|
+
{
|
2330
|
+
"disabled": false,
|
2331
|
+
"document": "说话人id列表\n注意:此字段可能返回 null,表示取不到有效值。",
|
2332
|
+
"example": "无",
|
2333
|
+
"member": "VoicePrintBaseData",
|
2334
|
+
"name": "VoicePrintList",
|
2335
|
+
"output_required": false,
|
2336
|
+
"type": "list",
|
2337
|
+
"value_allowed_null": true
|
2265
2338
|
}
|
2266
2339
|
],
|
2267
2340
|
"usage": "out"
|
2268
2341
|
},
|
2269
2342
|
"VoicePrintCountRequest": {
|
2270
2343
|
"document": "VoicePrintCount请求参数结构体",
|
2271
|
-
"members": [
|
2344
|
+
"members": [
|
2345
|
+
{
|
2346
|
+
"disabled": false,
|
2347
|
+
"document": "分组ID,仅支持大小写字母和下划线的组合,不超过128个字符",
|
2348
|
+
"example": "无",
|
2349
|
+
"member": "string",
|
2350
|
+
"name": "GroupId",
|
2351
|
+
"required": false,
|
2352
|
+
"type": "string"
|
2353
|
+
},
|
2354
|
+
{
|
2355
|
+
"disabled": false,
|
2356
|
+
"document": "统计模式\n0: 统计所有声纹数量\n1: 统计指定分组下的声纹数量",
|
2357
|
+
"example": "0",
|
2358
|
+
"member": "int64",
|
2359
|
+
"name": "CountMod",
|
2360
|
+
"required": false,
|
2361
|
+
"type": "int"
|
2362
|
+
}
|
2363
|
+
],
|
2272
2364
|
"type": "object"
|
2273
2365
|
},
|
2274
2366
|
"VoicePrintCountResponse": {
|
@@ -2304,6 +2396,24 @@
|
|
2304
2396
|
"name": "VoicePrintId",
|
2305
2397
|
"required": false,
|
2306
2398
|
"type": "string"
|
2399
|
+
},
|
2400
|
+
{
|
2401
|
+
"disabled": false,
|
2402
|
+
"document": "说话人分组ID,仅支持大小写字母和下划线的组合,不超过128个字符",
|
2403
|
+
"example": "无",
|
2404
|
+
"member": "string",
|
2405
|
+
"name": "GroupId",
|
2406
|
+
"required": false,
|
2407
|
+
"type": "string"
|
2408
|
+
},
|
2409
|
+
{
|
2410
|
+
"disabled": false,
|
2411
|
+
"document": "删除模式: \n0.默认值,删除该条声纹\n1.从分组中删除该条声纹,声纹本身不删除\n2.从声纹库中删除分组,仅删除分组信息,不会真正删除分组中的声纹",
|
2412
|
+
"example": "0",
|
2413
|
+
"member": "int64",
|
2414
|
+
"name": "DelMod",
|
2415
|
+
"required": false,
|
2416
|
+
"type": "int"
|
2307
2417
|
}
|
2308
2418
|
],
|
2309
2419
|
"type": "object"
|
@@ -2368,6 +2478,15 @@
|
|
2368
2478
|
"name": "SpeakerNick",
|
2369
2479
|
"required": false,
|
2370
2480
|
"type": "string"
|
2481
|
+
},
|
2482
|
+
{
|
2483
|
+
"disabled": false,
|
2484
|
+
"document": "分组id, 仅支持大小写字母和下划线的组合,不超过128个字符",
|
2485
|
+
"example": "无",
|
2486
|
+
"member": "string",
|
2487
|
+
"name": "GroupId",
|
2488
|
+
"required": false,
|
2489
|
+
"type": "string"
|
2371
2490
|
}
|
2372
2491
|
],
|
2373
2492
|
"type": "object"
|
@@ -2394,6 +2513,79 @@
|
|
2394
2513
|
],
|
2395
2514
|
"type": "object"
|
2396
2515
|
},
|
2516
|
+
"VoicePrintGroupVerifyRequest": {
|
2517
|
+
"document": "VoicePrintGroupVerify请求参数结构体",
|
2518
|
+
"members": [
|
2519
|
+
{
|
2520
|
+
"disabled": false,
|
2521
|
+
"document": "音频格式 0: pcm, 1: wav",
|
2522
|
+
"example": "0",
|
2523
|
+
"member": "int64",
|
2524
|
+
"name": "VoiceFormat",
|
2525
|
+
"required": true,
|
2526
|
+
"type": "int"
|
2527
|
+
},
|
2528
|
+
{
|
2529
|
+
"disabled": false,
|
2530
|
+
"document": "音频采样率,目前支持16000,单位:Hz,必填",
|
2531
|
+
"example": "16000",
|
2532
|
+
"member": "int64",
|
2533
|
+
"name": "SampleRate",
|
2534
|
+
"required": true,
|
2535
|
+
"type": "int"
|
2536
|
+
},
|
2537
|
+
{
|
2538
|
+
"disabled": false,
|
2539
|
+
"document": "音频数据, base64 编码, 音频时长不能超过30s,数据大小不超过2M",
|
2540
|
+
"example": "无",
|
2541
|
+
"member": "string",
|
2542
|
+
"name": "Data",
|
2543
|
+
"required": true,
|
2544
|
+
"type": "string"
|
2545
|
+
},
|
2546
|
+
{
|
2547
|
+
"disabled": false,
|
2548
|
+
"document": "分组id, 支持数字,字母,下划线,长度不超过128",
|
2549
|
+
"example": "test_group",
|
2550
|
+
"member": "string",
|
2551
|
+
"name": "GroupId",
|
2552
|
+
"required": true,
|
2553
|
+
"type": "string"
|
2554
|
+
},
|
2555
|
+
{
|
2556
|
+
"disabled": false,
|
2557
|
+
"document": "返回打分结果降序排列topN, TopN大于0, 小于可创建声纹最大数量",
|
2558
|
+
"example": "1",
|
2559
|
+
"member": "uint64",
|
2560
|
+
"name": "TopN",
|
2561
|
+
"required": true,
|
2562
|
+
"type": "int"
|
2563
|
+
}
|
2564
|
+
],
|
2565
|
+
"type": "object"
|
2566
|
+
},
|
2567
|
+
"VoicePrintGroupVerifyResponse": {
|
2568
|
+
"document": "VoicePrintGroupVerify返回参数结构体",
|
2569
|
+
"members": [
|
2570
|
+
{
|
2571
|
+
"disabled": false,
|
2572
|
+
"document": "TopN 返回结果;系统建议打分70分以上为同一个人音色,评分也取决于音频质量、长度等其他原因影响,您可以按照业务需求适当提高或降低分数要求",
|
2573
|
+
"example": "无",
|
2574
|
+
"member": "VerifyTopResult",
|
2575
|
+
"name": "Data",
|
2576
|
+
"output_required": false,
|
2577
|
+
"type": "object",
|
2578
|
+
"value_allowed_null": false
|
2579
|
+
},
|
2580
|
+
{
|
2581
|
+
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
2582
|
+
"member": "string",
|
2583
|
+
"name": "RequestId",
|
2584
|
+
"type": "string"
|
2585
|
+
}
|
2586
|
+
],
|
2587
|
+
"type": "object"
|
2588
|
+
},
|
2397
2589
|
"VoicePrintUpdateRequest": {
|
2398
2590
|
"document": "VoicePrintUpdate请求参数结构体",
|
2399
2591
|
"members": [
|
@@ -222,6 +222,14 @@
|
|
222
222
|
"title": "注册说话人"
|
223
223
|
}
|
224
224
|
],
|
225
|
+
"VoicePrintGroupVerify": [
|
226
|
+
{
|
227
|
+
"document": "提供一段音频数据和提前注册的一组说话人数据进行比对, 返回topN",
|
228
|
+
"input": "POST / HTTP/1.1\nHost: asr.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: VoicePrintGroupVerify\n<公共请求参数>\n\n{\n \"VoiceFormat\": 1,\n \"SampleRate\": 16000,\n \"Data\": \"UklGRsb7AQBXQVZFZm10IBAAAAAB\",\n \"GroupId\": \"test\",\n \"TopN\": 2\n}",
|
229
|
+
"output": "{\n \"Response\": {\n \"Data\": {\n \"VerifyTops\": [\n {\n \"Score\": \"100.0\",\n \"SpeakerId\": \"张三\",\n \"VoicePrintId\": \"03c7c4-34e1-4cc2-97d4-f031bc6538d0\"\n },\n {\n \"Score\": \"89.0\",\n \"SpeakerId\": \"李四\",\n \"VoicePrintId\": \"16a936-c0c9-44b8-81e6-19515a9515ef\"\n }\n ]\n },\n \"RequestId\": \"affe4cc1-7158-ad-aefc-371fce09c092\"\n }\n}",
|
230
|
+
"title": "说话人验证1:N"
|
231
|
+
}
|
232
|
+
],
|
225
233
|
"VoicePrintUpdate": [
|
226
234
|
{
|
227
235
|
"document": "更新说话人的音频和昵称",
|
@@ -1434,7 +1434,7 @@
|
|
1434
1434
|
{
|
1435
1435
|
"disabled": false,
|
1436
1436
|
"document": "过滤条件。\n<li> zone - String - 是否必填:否 -(过滤条件)按照可用区过滤。</li>\n<li> instance-family String - 是否必填:否 -(过滤条件)按照机型系列过滤。实例机型系列形如:S1、I1、M1等。</li>",
|
1437
|
-
"example": "",
|
1437
|
+
"example": "\t[{\"Name\":\"zone\",\"Values\":[\"ap-guangzhou-1\"]}]",
|
1438
1438
|
"member": "Filter",
|
1439
1439
|
"name": "Filters",
|
1440
1440
|
"required": false,
|
@@ -1449,9 +1449,10 @@
|
|
1449
1449
|
{
|
1450
1450
|
"disabled": false,
|
1451
1451
|
"document": "机型配置数组",
|
1452
|
-
"example": "",
|
1452
|
+
"example": "无",
|
1453
1453
|
"member": "InstanceTypeConfig",
|
1454
1454
|
"name": "InstanceTypeConfigSet",
|
1455
|
+
"output_required": true,
|
1455
1456
|
"type": "list",
|
1456
1457
|
"value_allowed_null": false
|
1457
1458
|
},
|
@@ -2013,7 +2014,7 @@
|
|
2013
2014
|
{
|
2014
2015
|
"disabled": false,
|
2015
2016
|
"document": "过滤条件。\n<li> zone - String - 是否必填:否 -(过滤条件)按照可用区过滤。</li>\n<li> instance-family String - 是否必填:否 -(过滤条件)按照机型系列过滤。实例机型系列形如:S1、I1、M1等。</li>\n<li> instance-type - String - 是否必填:否 - (过滤条件)按照机型过滤。</li>\n<li> instance-charge-type - String - 是否必填:否 -(过滤条件)按照实例计费模式过滤。 ( POSTPAID_BY_HOUR:表示后付费,即按量计费机型 | SPOTPAID:表示竞价付费机型。 ) </li>",
|
2016
|
-
"example": "",
|
2017
|
+
"example": "[{\"Name\":\"zone\",\"Values\":[\"ap-guangzhou-1\"]}]",
|
2017
2018
|
"member": "Filter",
|
2018
2019
|
"name": "Filters",
|
2019
2020
|
"required": false,
|
@@ -2028,9 +2029,10 @@
|
|
2028
2029
|
{
|
2029
2030
|
"disabled": false,
|
2030
2031
|
"document": "可用区机型配置列表。",
|
2031
|
-
"example": "",
|
2032
|
+
"example": "无",
|
2032
2033
|
"member": "InstanceTypeQuotaItem",
|
2033
2034
|
"name": "InstanceTypeQuotaSet",
|
2035
|
+
"output_required": true,
|
2034
2036
|
"type": "list",
|
2035
2037
|
"value_allowed_null": false
|
2036
2038
|
},
|
@@ -2054,9 +2056,10 @@
|
|
2054
2056
|
{
|
2055
2057
|
"disabled": false,
|
2056
2058
|
"document": "CVM实例分类列表",
|
2057
|
-
"example": "",
|
2059
|
+
"example": "[{\"InstanceFamilySet\": [\"C3\",\"CN3\"],\"InstanceCategory\": \"COMPUTE_3\"}",
|
2058
2060
|
"member": "InstanceCategoryItem",
|
2059
2061
|
"name": "InstanceCategorySet",
|
2062
|
+
"output_required": true,
|
2060
2063
|
"type": "list",
|
2061
2064
|
"value_allowed_null": false
|
2062
2065
|
},
|
@@ -116,7 +116,7 @@
|
|
116
116
|
{
|
117
117
|
"document": "",
|
118
118
|
"input": "https://batch.tencentcloudapi.com/?Action=DescribeCvmZoneInstanceConfigInfos\r\n&Filters.0.Name=zone\r\n&Filters.0.Values.0=ap-chongqing-1\r\n&Filters.1.Name=instance-charge-type\r\n&Filters.1.Values.0=POSTPAID_BY_HOUR\r\n&<公共请求参数>",
|
119
|
-
"output": "{\n \"Response\": {\n \"InstanceTypeQuotaSet\": [\n {\n \"Status\": \"SELL\",\n \"Zone\": \"ap-
|
119
|
+
"output": "{\n \"Response\": {\n \"InstanceTypeQuotaSet\": [\n {\n \"Status\": \"SELL\",\n \"Zone\": \"ap-guangzhou-2\",\n \"NetworkCard\": 0,\n \"Price\": {\n \"DiscountPrice\": 59,\n \"OriginalPriceThreeYear\": 0,\n \"DiscountOneYear\": 0,\n \"UnitPrice\": 0,\n \"UnitPriceThirdStep\": 0,\n \"OriginalPriceFiveYear\": 0,\n \"Discount\": 0,\n \"DiscountFiveYear\": 0,\n \"UnitPriceDiscountThirdStep\": 0,\n \"UnitPriceSecondStep\": 0,\n \"OriginalPrice\": 59,\n \"DiscountThreeYear\": 0,\n \"UnitPriceDiscountSecondStep\": 0,\n \"UnitPriceDiscount\": 0,\n \"DiscountPriceFiveYear\": 0,\n \"OriginalPriceOneYear\": 708,\n \"ChargeUnit\": \"HOUR\",\n \"DiscountPriceThreeYear\": 0,\n \"DiscountPriceOneYear\": 587.64\n },\n \"InstanceFamily\": \"S2\",\n \"Externals\": {},\n \"InstanceType\": \"S2.SMALL1\",\n \"TypeName\": \"Standard S2\",\n \"InstanceChargeType\": \"POSTPAID_BY_HOUR\",\n \"Memory\": 1,\n \"LocalDiskTypeList\": [],\n \"Cpu\": 1,\n \"SoldOutReason\": \"\",\n \"StorageBlockAmount\": 0,\n \"CpuType\": \"Intel Xeon E5-2680 v4\",\n \"InstancePps\": 20,\n \"InstanceBandwidth\": 1.5,\n \"Gpu\": 0,\n \"GpuCount\": 0,\n \"Fpga\": 0,\n \"Remark\": \"\",\n \"Frequency\": \"2.4GHz\",\n \"StatusCategory\": \"EnoughStock\"\n }\n ],\n \"RequestId\": \"c28559ca-d3cf-40f0-9664-2ab303484efa\"\n }\n}",
|
120
120
|
"title": "查看重庆一区按量计费机型配置信息"
|
121
121
|
}
|
122
122
|
],
|
tccli/services/dlc/dlc_client.py
CHANGED
@@ -2825,6 +2825,58 @@ def doAttachWorkGroupPolicy(args, parsed_globals):
|
|
2825
2825
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2826
2826
|
|
2827
2827
|
|
2828
|
+
def doDescribeDataEnginesScaleDetail(args, parsed_globals):
|
2829
|
+
g_param = parse_global_arg(parsed_globals)
|
2830
|
+
|
2831
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
2832
|
+
cred = credential.CVMRoleCredential()
|
2833
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2834
|
+
cred = credential.STSAssumeRoleCredential(
|
2835
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2836
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2837
|
+
)
|
2838
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
2839
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
2840
|
+
else:
|
2841
|
+
cred = credential.Credential(
|
2842
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
2843
|
+
)
|
2844
|
+
http_profile = HttpProfile(
|
2845
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
2846
|
+
reqMethod="POST",
|
2847
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
2848
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
2849
|
+
)
|
2850
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
2851
|
+
if g_param[OptionsDefine.Language]:
|
2852
|
+
profile.language = g_param[OptionsDefine.Language]
|
2853
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
2854
|
+
client = mod.DlcClient(cred, g_param[OptionsDefine.Region], profile)
|
2855
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
2856
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2857
|
+
model = models.DescribeDataEnginesScaleDetailRequest()
|
2858
|
+
model.from_json_string(json.dumps(args))
|
2859
|
+
start_time = time.time()
|
2860
|
+
while True:
|
2861
|
+
rsp = client.DescribeDataEnginesScaleDetail(model)
|
2862
|
+
result = rsp.to_json_string()
|
2863
|
+
try:
|
2864
|
+
json_obj = json.loads(result)
|
2865
|
+
except TypeError as e:
|
2866
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
2867
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
2868
|
+
break
|
2869
|
+
cur_time = time.time()
|
2870
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
2871
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
2872
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
2873
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
2874
|
+
else:
|
2875
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
2876
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
2877
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2878
|
+
|
2879
|
+
|
2828
2880
|
def doCreateSparkApp(args, parsed_globals):
|
2829
2881
|
g_param = parse_global_arg(parsed_globals)
|
2830
2882
|
|
@@ -7362,6 +7414,7 @@ ACTION_MAP = {
|
|
7362
7414
|
"CreateInternalTable": doCreateInternalTable,
|
7363
7415
|
"GenerateCreateMangedTableSql": doGenerateCreateMangedTableSql,
|
7364
7416
|
"AttachWorkGroupPolicy": doAttachWorkGroupPolicy,
|
7417
|
+
"DescribeDataEnginesScaleDetail": doDescribeDataEnginesScaleDetail,
|
7365
7418
|
"CreateSparkApp": doCreateSparkApp,
|
7366
7419
|
"DescribeThirdPartyAccessUser": doDescribeThirdPartyAccessUser,
|
7367
7420
|
"RollbackDataEngineImage": doRollbackDataEngineImage,
|
@@ -427,6 +427,13 @@
|
|
427
427
|
"output": "DescribeDataEnginesResponse",
|
428
428
|
"status": "online"
|
429
429
|
},
|
430
|
+
"DescribeDataEnginesScaleDetail": {
|
431
|
+
"document": "查询引擎规格详情",
|
432
|
+
"input": "DescribeDataEnginesScaleDetailRequest",
|
433
|
+
"name": "查看引擎的规格明细",
|
434
|
+
"output": "DescribeDataEnginesScaleDetailResponse",
|
435
|
+
"status": "online"
|
436
|
+
},
|
430
437
|
"DescribeDatabases": {
|
431
438
|
"document": "本接口(DescribeDatabases)用于查询数据库列表。",
|
432
439
|
"input": "DescribeDatabasesRequest",
|
@@ -6230,6 +6237,78 @@
|
|
6230
6237
|
],
|
6231
6238
|
"usage": "both"
|
6232
6239
|
},
|
6240
|
+
"DataEngineScaleInfo": {
|
6241
|
+
"document": "引擎规格详情",
|
6242
|
+
"members": [
|
6243
|
+
{
|
6244
|
+
"disabled": false,
|
6245
|
+
"document": "引擎ID\n注意:此字段可能返回 null,表示取不到有效值。",
|
6246
|
+
"example": "dataengine-abc",
|
6247
|
+
"member": "string",
|
6248
|
+
"name": "DataEngineId",
|
6249
|
+
"output_required": false,
|
6250
|
+
"type": "string",
|
6251
|
+
"value_allowed_null": true
|
6252
|
+
},
|
6253
|
+
{
|
6254
|
+
"disabled": false,
|
6255
|
+
"document": "引擎名称\n注意:此字段可能返回 null,表示取不到有效值。",
|
6256
|
+
"example": "abc",
|
6257
|
+
"member": "string",
|
6258
|
+
"name": "DataEngineName",
|
6259
|
+
"output_required": false,
|
6260
|
+
"type": "string",
|
6261
|
+
"value_allowed_null": true
|
6262
|
+
},
|
6263
|
+
{
|
6264
|
+
"disabled": false,
|
6265
|
+
"document": "引擎规格详情\n注意:此字段可能返回 null,表示取不到有效值。",
|
6266
|
+
"example": " [ { \"StartTime\": \"2024-06-06 12:00:00\", \"EndTime\": \"2024-06-06 13:00:00\", \"CU\": 0 } ]",
|
6267
|
+
"member": "DataEngineScaleInfoDetail",
|
6268
|
+
"name": "ScaleDetail",
|
6269
|
+
"output_required": false,
|
6270
|
+
"type": "list",
|
6271
|
+
"value_allowed_null": true
|
6272
|
+
}
|
6273
|
+
],
|
6274
|
+
"usage": "out"
|
6275
|
+
},
|
6276
|
+
"DataEngineScaleInfoDetail": {
|
6277
|
+
"document": "引擎规格详情",
|
6278
|
+
"members": [
|
6279
|
+
{
|
6280
|
+
"disabled": false,
|
6281
|
+
"document": "统计开始时间,格式为:yyyy-MM-dd HH:mm:ss\n注意:此字段可能返回 null,表示取不到有效值。",
|
6282
|
+
"example": "2024-06-06 12:00:00",
|
6283
|
+
"member": "string",
|
6284
|
+
"name": "StartTime",
|
6285
|
+
"output_required": false,
|
6286
|
+
"type": "string",
|
6287
|
+
"value_allowed_null": true
|
6288
|
+
},
|
6289
|
+
{
|
6290
|
+
"disabled": false,
|
6291
|
+
"document": "统计结束时间,格式为:yyyy-MM-dd HH:mm:ss\n注意:此字段可能返回 null,表示取不到有效值。",
|
6292
|
+
"example": "2024-06-06 13:00:00",
|
6293
|
+
"member": "string",
|
6294
|
+
"name": "EndTime",
|
6295
|
+
"output_required": false,
|
6296
|
+
"type": "string",
|
6297
|
+
"value_allowed_null": true
|
6298
|
+
},
|
6299
|
+
{
|
6300
|
+
"disabled": false,
|
6301
|
+
"document": "当前统计时间段,引擎规格\n注意:此字段可能返回 null,表示取不到有效值。",
|
6302
|
+
"example": "16",
|
6303
|
+
"member": "int64",
|
6304
|
+
"name": "CU",
|
6305
|
+
"output_required": false,
|
6306
|
+
"type": "int",
|
6307
|
+
"value_allowed_null": true
|
6308
|
+
}
|
6309
|
+
],
|
6310
|
+
"usage": "out"
|
6311
|
+
},
|
6233
6312
|
"DataFormat": {
|
6234
6313
|
"document": "数据表数据格式。",
|
6235
6314
|
"members": [
|
@@ -8312,6 +8391,61 @@
|
|
8312
8391
|
],
|
8313
8392
|
"type": "object"
|
8314
8393
|
},
|
8394
|
+
"DescribeDataEnginesScaleDetailRequest": {
|
8395
|
+
"document": "DescribeDataEnginesScaleDetail请求参数结构体",
|
8396
|
+
"members": [
|
8397
|
+
{
|
8398
|
+
"disabled": false,
|
8399
|
+
"document": "引擎名称列表",
|
8400
|
+
"example": "[\"test\"]",
|
8401
|
+
"member": "string",
|
8402
|
+
"name": "DataEngineNames",
|
8403
|
+
"required": false,
|
8404
|
+
"type": "list"
|
8405
|
+
},
|
8406
|
+
{
|
8407
|
+
"disabled": false,
|
8408
|
+
"document": "开始时间,时间格式:yyyy-MM-dd HH:mm:ss,最长查询一个月内的记录",
|
8409
|
+
"example": "2024-06-07 00:00:00",
|
8410
|
+
"member": "string",
|
8411
|
+
"name": "StartTime",
|
8412
|
+
"required": false,
|
8413
|
+
"type": "string"
|
8414
|
+
},
|
8415
|
+
{
|
8416
|
+
"disabled": false,
|
8417
|
+
"document": "结束时间,时间格式:yyyy-MM-dd HH:mm:ss,最长查询一个月内的记录",
|
8418
|
+
"example": "2024-06-08 00:00:00",
|
8419
|
+
"member": "string",
|
8420
|
+
"name": "EndTime",
|
8421
|
+
"required": false,
|
8422
|
+
"type": "string"
|
8423
|
+
}
|
8424
|
+
],
|
8425
|
+
"type": "object"
|
8426
|
+
},
|
8427
|
+
"DescribeDataEnginesScaleDetailResponse": {
|
8428
|
+
"document": "DescribeDataEnginesScaleDetail返回参数结构体",
|
8429
|
+
"members": [
|
8430
|
+
{
|
8431
|
+
"disabled": false,
|
8432
|
+
"document": "引擎规格统计详细信息\n注意:此字段可能返回 null,表示取不到有效值。",
|
8433
|
+
"example": "无",
|
8434
|
+
"member": "DataEngineScaleInfo",
|
8435
|
+
"name": "Scales",
|
8436
|
+
"output_required": false,
|
8437
|
+
"type": "list",
|
8438
|
+
"value_allowed_null": true
|
8439
|
+
},
|
8440
|
+
{
|
8441
|
+
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
8442
|
+
"member": "string",
|
8443
|
+
"name": "RequestId",
|
8444
|
+
"type": "string"
|
8445
|
+
}
|
8446
|
+
],
|
8447
|
+
"type": "object"
|
8448
|
+
},
|
8315
8449
|
"DescribeDatabasesRequest": {
|
8316
8450
|
"document": "DescribeDatabases请求参数结构体",
|
8317
8451
|
"members": [
|
@@ -494,6 +494,14 @@
|
|
494
494
|
"title": "查询DataEngines信息列表"
|
495
495
|
}
|
496
496
|
],
|
497
|
+
"DescribeDataEnginesScaleDetail": [
|
498
|
+
{
|
499
|
+
"document": "",
|
500
|
+
"input": "POST / HTTP/1.1\nHost: dlc.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeDataEnginesScaleDetail\n<公共请求参数>\n\n{\n \"StartTime\": \"2024-06-06 12:00:00\",\n \"EndTime\": \"2024-06-06 13:00:00\",\n \"DataEngineNames\": [\n \"dataengine-abc\"\n ]\n}",
|
501
|
+
"output": "{\n \"Response\": {\n \"Scales\": [\n {\n \"DataEngineId\": \"abc\",\n \"DataEngineName\": \"abc\",\n \"ScaleDetail\": [\n {\n \"StartTime\": \"abc\",\n \"EndTime\": \"abc\",\n \"CU\": 0\n }\n ]\n }\n ],\n \"RequestId\": \"abc\"\n }\n}",
|
502
|
+
"title": "查询引擎规格详情"
|
503
|
+
}
|
504
|
+
],
|
497
505
|
"DescribeDatabases": [
|
498
506
|
{
|
499
507
|
"document": "查询数据库列表",
|