tccli 3.0.1379.1__py2.py3-none-any.whl → 3.0.1381.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/cbs/v20170312/api.json +6 -6
- tccli/services/cbs/v20170312/examples.json +6 -6
- tccli/services/dcdb/dcdb_client.py +243 -31
- tccli/services/dcdb/v20180411/api.json +348 -0
- tccli/services/dcdb/v20180411/examples.json +32 -0
- tccli/services/emr/v20190103/api.json +1 -1
- tccli/services/ioa/v20220601/api.json +22 -13
- tccli/services/iotexplorer/iotexplorer_client.py +269 -57
- tccli/services/iotexplorer/v20190423/api.json +357 -0
- tccli/services/iotexplorer/v20190423/examples.json +32 -0
- tccli/services/lke/v20231130/api.json +91 -8
- tccli/services/lkeap/v20240522/api.json +65 -19
- tccli/services/lkeap/v20240522/examples.json +6 -0
- tccli/services/mariadb/mariadb_client.py +220 -8
- tccli/services/mariadb/v20170312/api.json +330 -0
- tccli/services/mariadb/v20170312/examples.json +32 -0
- tccli/services/mna/mna_client.py +53 -0
- tccli/services/mna/v20210119/api.json +137 -0
- tccli/services/mna/v20210119/examples.json +8 -0
- tccli/services/monitor/v20180724/api.json +2 -2
- tccli/services/oceanus/v20190422/api.json +105 -17
- tccli/services/redis/v20180412/api.json +3 -3
- tccli/services/redis/v20180412/examples.json +1 -1
- tccli/services/tcb/v20180608/api.json +10 -0
- tccli/services/tcbr/v20220217/api.json +10 -0
- tccli/services/teo/v20220901/api.json +1 -1
- tccli/services/tke/v20180525/api.json +11 -11
- tccli/services/trtc/v20190722/api.json +1 -1
- tccli/services/tsf/v20180326/examples.json +1 -1
- tccli/services/vclm/v20240523/api.json +1 -1
- tccli/services/waf/v20180125/api.json +1541 -158
- tccli/services/waf/v20180125/examples.json +56 -0
- tccli/services/waf/waf_client.py +391 -20
- tccli/services/wsa/v20250508/api.json +1 -1
- {tccli-3.0.1379.1.dist-info → tccli-3.0.1381.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1379.1.dist-info → tccli-3.0.1381.1.dist-info}/RECORD +40 -40
- {tccli-3.0.1379.1.dist-info → tccli-3.0.1381.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1379.1.dist-info → tccli-3.0.1381.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1379.1.dist-info → tccli-3.0.1381.1.dist-info}/license_files/LICENSE +0 -0
@@ -169,7 +169,7 @@
|
|
169
169
|
"status": "online"
|
170
170
|
},
|
171
171
|
"RunRerank": {
|
172
|
-
"document": "基于知识引擎精调模型技术的rerank模型,支持对多路召回的结果进行重排序,根据query
|
172
|
+
"document": "基于知识引擎精调模型技术的rerank模型,支持对多路召回的结果进行重排序,根据query与切片内容的相关性,按照顺序给出每一条结果和query的相关性分数。",
|
173
173
|
"input": "RunRerankRequest",
|
174
174
|
"name": "重排序",
|
175
175
|
"output": "RunRerankResponse",
|
@@ -1295,7 +1295,7 @@
|
|
1295
1295
|
},
|
1296
1296
|
{
|
1297
1297
|
"disabled": false,
|
1298
|
-
"document": "
|
1298
|
+
"document": "文件大小,单位:字节",
|
1299
1299
|
"example": "100",
|
1300
1300
|
"member": "int64",
|
1301
1301
|
"name": "FileSize",
|
@@ -1323,6 +1323,32 @@
|
|
1323
1323
|
],
|
1324
1324
|
"usage": "both"
|
1325
1325
|
},
|
1326
|
+
"ErrorInfo": {
|
1327
|
+
"document": "错误信息",
|
1328
|
+
"members": [
|
1329
|
+
{
|
1330
|
+
"disabled": false,
|
1331
|
+
"document": "错误码",
|
1332
|
+
"example": "FailedOperation.FileParseError",
|
1333
|
+
"member": "string",
|
1334
|
+
"name": "Code",
|
1335
|
+
"output_required": false,
|
1336
|
+
"type": "string",
|
1337
|
+
"value_allowed_null": false
|
1338
|
+
},
|
1339
|
+
{
|
1340
|
+
"disabled": false,
|
1341
|
+
"document": "错误信息",
|
1342
|
+
"example": "file parse timeout",
|
1343
|
+
"member": "string",
|
1344
|
+
"name": "Message",
|
1345
|
+
"output_required": false,
|
1346
|
+
"type": "string",
|
1347
|
+
"value_allowed_null": false
|
1348
|
+
}
|
1349
|
+
],
|
1350
|
+
"usage": "out"
|
1351
|
+
},
|
1326
1352
|
"GetCharacterUsageRequest": {
|
1327
1353
|
"document": "GetCharacterUsage请求参数结构体",
|
1328
1354
|
"members": [],
|
@@ -1400,7 +1426,7 @@
|
|
1400
1426
|
{
|
1401
1427
|
"disabled": false,
|
1402
1428
|
"document": "消耗量,返回TotalToken",
|
1403
|
-
"example": "
|
1429
|
+
"example": "无",
|
1404
1430
|
"member": "Usage",
|
1405
1431
|
"name": "Usage",
|
1406
1432
|
"output_required": false,
|
@@ -1474,6 +1500,16 @@
|
|
1474
1500
|
"type": "object",
|
1475
1501
|
"value_allowed_null": false
|
1476
1502
|
},
|
1503
|
+
{
|
1504
|
+
"disabled": false,
|
1505
|
+
"document": "文档解析任务失败错误信息,当文档解析任务失败会返回具体的错误信息",
|
1506
|
+
"example": "无",
|
1507
|
+
"member": "ErrorInfo",
|
1508
|
+
"name": "Error",
|
1509
|
+
"output_required": false,
|
1510
|
+
"type": "object",
|
1511
|
+
"value_allowed_null": false
|
1512
|
+
},
|
1477
1513
|
{
|
1478
1514
|
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
1479
1515
|
"member": "string",
|
@@ -1541,6 +1577,16 @@
|
|
1541
1577
|
"type": "object",
|
1542
1578
|
"value_allowed_null": false
|
1543
1579
|
},
|
1580
|
+
{
|
1581
|
+
"disabled": false,
|
1582
|
+
"document": "文档拆分失败的错误信息,当拆分任务失败时返回该错误信息",
|
1583
|
+
"example": "无",
|
1584
|
+
"member": "ErrorInfo",
|
1585
|
+
"name": "Error",
|
1586
|
+
"output_required": false,
|
1587
|
+
"type": "object",
|
1588
|
+
"value_allowed_null": false
|
1589
|
+
},
|
1544
1590
|
{
|
1545
1591
|
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
1546
1592
|
"member": "string",
|
@@ -2076,8 +2122,8 @@
|
|
2076
2122
|
"members": [
|
2077
2123
|
{
|
2078
2124
|
"disabled": false,
|
2079
|
-
"document": "
|
2080
|
-
"example": "
|
2125
|
+
"document": "说明:需要改写的多轮历史会话,每轮历史对话需要包含user(问)和assistant(答)成对输入\n备注:由于模型字符限制,最多提供4轮对话。针对最后一轮对话进行改写。四轮对话最多包含3600个字符。",
|
2126
|
+
"example": "无",
|
2081
2127
|
"member": "Message",
|
2082
2128
|
"name": "Messages",
|
2083
2129
|
"required": true,
|
@@ -2085,7 +2131,7 @@
|
|
2085
2131
|
},
|
2086
2132
|
{
|
2087
2133
|
"disabled": false,
|
2088
|
-
"document": "
|
2134
|
+
"document": "说明:模型名称\n备注:仅一个模型可选\n默认值:lke-query-rewrite-base",
|
2089
2135
|
"example": "lke-query-rewrite-base",
|
2090
2136
|
"member": "string",
|
2091
2137
|
"name": "Model",
|
@@ -2101,7 +2147,7 @@
|
|
2101
2147
|
{
|
2102
2148
|
"disabled": false,
|
2103
2149
|
"document": "改写结果",
|
2104
|
-
"example": "
|
2150
|
+
"example": "你好",
|
2105
2151
|
"member": "string",
|
2106
2152
|
"name": "Content",
|
2107
2153
|
"output_required": true,
|
@@ -2111,7 +2157,7 @@
|
|
2111
2157
|
{
|
2112
2158
|
"disabled": false,
|
2113
2159
|
"document": "消耗量,返回输入token数,输出token数以及总token数",
|
2114
|
-
"example": "
|
2160
|
+
"example": "无",
|
2115
2161
|
"member": "Usage",
|
2116
2162
|
"name": "Usage",
|
2117
2163
|
"output_required": false,
|
@@ -2209,7 +2255,7 @@
|
|
2209
2255
|
{
|
2210
2256
|
"disabled": false,
|
2211
2257
|
"document": "文件的 URL 地址。文件存储于腾讯云的 URL 可保障更高的下载速度和稳定性,建议文件存储于腾讯云。 非腾讯云存储的 URL 速度和稳定性可能受一定影响。文件的 FileUrl、FileBase64 必须提供一个,如果都提供,只使用 FileUrl。\n参考:[腾讯云COS文档](https://cloud.tencent.com/document/product/436/7749)\n\n默认值:无",
|
2212
|
-
"example": "
|
2258
|
+
"example": "url",
|
2213
2259
|
"member": "string",
|
2214
2260
|
"name": "FileUrl",
|
2215
2261
|
"required": false,
|
@@ -2218,7 +2264,7 @@
|
|
2218
2264
|
{
|
2219
2265
|
"disabled": false,
|
2220
2266
|
"document": "说明:文件的 Base64 值。\n备注:支持的文件大小:所下载文件经Base64编码后不超过 8M。文件下载时间不超过 3 秒。\n支持的图片像素:单边介于20-10000px之间。文件的 FileUrl、FileBase64 必须提供一个,如果都提供,只使用 FileUrl。\n\n默认值:无",
|
2221
|
-
"example": "
|
2267
|
+
"example": "base64",
|
2222
2268
|
"member": "string",
|
2223
2269
|
"name": "FileBase64",
|
2224
2270
|
"required": false,
|
@@ -2260,7 +2306,7 @@
|
|
2260
2306
|
{
|
2261
2307
|
"disabled": false,
|
2262
2308
|
"document": "任务ID。本次请求的唯一标识",
|
2263
|
-
"example": "
|
2309
|
+
"example": "taskld",
|
2264
2310
|
"member": "string",
|
2265
2311
|
"name": "TaskId",
|
2266
2312
|
"output_required": false,
|
@@ -2270,7 +2316,7 @@
|
|
2270
2316
|
{
|
2271
2317
|
"disabled": false,
|
2272
2318
|
"document": "响应类型。1:返回进度信息, 2:返回解析结果",
|
2273
|
-
"example": "
|
2319
|
+
"example": "type",
|
2274
2320
|
"member": "string",
|
2275
2321
|
"name": "ResponseType",
|
2276
2322
|
"output_required": false,
|
@@ -2280,7 +2326,7 @@
|
|
2280
2326
|
{
|
2281
2327
|
"disabled": false,
|
2282
2328
|
"document": "进度。0~100",
|
2283
|
-
"example": "
|
2329
|
+
"example": "progress",
|
2284
2330
|
"member": "string",
|
2285
2331
|
"name": "Progress",
|
2286
2332
|
"output_required": false,
|
@@ -2290,7 +2336,7 @@
|
|
2290
2336
|
{
|
2291
2337
|
"disabled": false,
|
2292
2338
|
"document": "进度信息。",
|
2293
|
-
"example": "
|
2339
|
+
"example": "progressMessage",
|
2294
2340
|
"member": "string",
|
2295
2341
|
"name": "ProgressMessage",
|
2296
2342
|
"output_required": false,
|
@@ -2300,7 +2346,7 @@
|
|
2300
2346
|
{
|
2301
2347
|
"disabled": false,
|
2302
2348
|
"document": "文档解析结果的临时下载地址。文件类型为zip压缩包,下载链接有效期30分钟。压缩包内包含*.md、*.json以及images文件夹。\n",
|
2303
|
-
"example": "
|
2349
|
+
"example": "documentRecognizeResultUrl",
|
2304
2350
|
"member": "string",
|
2305
2351
|
"name": "DocumentRecognizeResultUrl",
|
2306
2352
|
"output_required": false,
|
@@ -2539,7 +2585,7 @@
|
|
2539
2585
|
"members": [
|
2540
2586
|
{
|
2541
2587
|
"disabled": false,
|
2542
|
-
"document": "
|
2588
|
+
"document": "说明:查询内容\n备注:用于匹配的query",
|
2543
2589
|
"example": "腾讯知识引擎大模型",
|
2544
2590
|
"member": "string",
|
2545
2591
|
"name": "Query",
|
@@ -2548,7 +2594,7 @@
|
|
2548
2594
|
},
|
2549
2595
|
{
|
2550
2596
|
"disabled": false,
|
2551
|
-
"document": "
|
2597
|
+
"document": "说明:文档列表\n备注:最多60个,Query字段和Docs字段的总长度上限为2000字符",
|
2552
2598
|
"example": "[\"腾讯知识引擎\",\"知识引擎大模型\"]",
|
2553
2599
|
"member": "string",
|
2554
2600
|
"name": "Docs",
|
@@ -2557,7 +2603,7 @@
|
|
2557
2603
|
},
|
2558
2604
|
{
|
2559
2605
|
"disabled": false,
|
2560
|
-
"document": "
|
2606
|
+
"document": "说明:模型名称\n备注:仅一个模型可选\n默认值:lke-reranker-base",
|
2561
2607
|
"example": "lke-reranker-base",
|
2562
2608
|
"member": "string",
|
2563
2609
|
"name": "Model",
|
@@ -2583,7 +2629,7 @@
|
|
2583
2629
|
{
|
2584
2630
|
"disabled": false,
|
2585
2631
|
"document": "消耗量,仅返回TotalToken",
|
2586
|
-
"example": "
|
2632
|
+
"example": "无",
|
2587
2633
|
"member": "Usage",
|
2588
2634
|
"name": "Usage",
|
2589
2635
|
"output_required": false,
|
@@ -122,6 +122,12 @@
|
|
122
122
|
"input": "POST / HTTP/1.1\nHost: lkeap.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: GetReconstructDocumentResult\n<公共请求参数>\n\n{\n \"TaskId\": \"25adcef61750343903609\"\n}",
|
123
123
|
"output": "{\n \"Response\": {\n \"DocumentRecognizeResultUrl\": \"https://document-restruction-1258344699.cos.ap-guangzhou.myqcloud.com/doc_parse/output_files/a9c6a9482c72412fa84445a44ss125531.zip?q-sign-algorithm=sha1&q-ak=AKIDlWFaadfHLNbidLwPqOrAKGzXrx40scL7l&q-sign-time=1715503711%3B1718804311&q-key-time=1718855711%3B1718804311&q-header-list=host&q-url-param-list=&q-signature=71b568b8632d7e45gertdc3d235ef68d41fdfe7f8\",\n \"FailedPages\": [],\n \"RequestId\": \"a37b0d0b-c3af-44bd-iuiu-632442644a80\",\n \"Status\": \"Success\",\n \"Usage\": {\n \"PageNumber\": 10,\n \"TotalTokens\": 2048\n }\n }\n}",
|
124
124
|
"title": "接口调用成功示例"
|
125
|
+
},
|
126
|
+
{
|
127
|
+
"document": "",
|
128
|
+
"input": "POST / HTTP/1.1\nHost: lkeap.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: GetReconstructDocumentResult\n<公共请求参数>\n\n{\n \"TaskId\": \"25adcef61750343903609\"\n}",
|
129
|
+
"output": "{\n \"Response\": {\n \"FailedPages\": [],\n \"RequestId\": \"a37b0d0b-c3af-44bd-iuiu-632442644a80\",\n \"Status\": \"Failed\",\n \"Error\": {\n \"Code\": \"InvalidParameter.FileURLInvalid\",\n \"Message\": \"url download failed\"\n }\n }\n}",
|
130
|
+
"title": "任务处理失败示例"
|
125
131
|
}
|
126
132
|
],
|
127
133
|
"GetSplitDocumentResult": [
|
@@ -693,6 +693,58 @@ def doDisassociateSecurityGroups(args, parsed_globals):
|
|
693
693
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
694
694
|
|
695
695
|
|
696
|
+
def doDescribeInstanceSSLAttributes(args, parsed_globals):
|
697
|
+
g_param = parse_global_arg(parsed_globals)
|
698
|
+
|
699
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
700
|
+
cred = credential.CVMRoleCredential()
|
701
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
702
|
+
cred = credential.STSAssumeRoleCredential(
|
703
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
704
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
705
|
+
)
|
706
|
+
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):
|
707
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
708
|
+
else:
|
709
|
+
cred = credential.Credential(
|
710
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
711
|
+
)
|
712
|
+
http_profile = HttpProfile(
|
713
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
714
|
+
reqMethod="POST",
|
715
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
716
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
717
|
+
)
|
718
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
719
|
+
if g_param[OptionsDefine.Language]:
|
720
|
+
profile.language = g_param[OptionsDefine.Language]
|
721
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
722
|
+
client = mod.MariadbClient(cred, g_param[OptionsDefine.Region], profile)
|
723
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
724
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
725
|
+
model = models.DescribeInstanceSSLAttributesRequest()
|
726
|
+
model.from_json_string(json.dumps(args))
|
727
|
+
start_time = time.time()
|
728
|
+
while True:
|
729
|
+
rsp = client.DescribeInstanceSSLAttributes(model)
|
730
|
+
result = rsp.to_json_string()
|
731
|
+
try:
|
732
|
+
json_obj = json.loads(result)
|
733
|
+
except TypeError as e:
|
734
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
735
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
736
|
+
break
|
737
|
+
cur_time = time.time()
|
738
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
739
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
740
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
741
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
742
|
+
else:
|
743
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
744
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
745
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
746
|
+
|
747
|
+
|
696
748
|
def doActivateHourDBInstance(args, parsed_globals):
|
697
749
|
g_param = parse_global_arg(parsed_globals)
|
698
750
|
|
@@ -1629,6 +1681,58 @@ def doModifyDBInstanceName(args, parsed_globals):
|
|
1629
1681
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1630
1682
|
|
1631
1683
|
|
1684
|
+
def doModifyInstanceProtectedProperty(args, parsed_globals):
|
1685
|
+
g_param = parse_global_arg(parsed_globals)
|
1686
|
+
|
1687
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1688
|
+
cred = credential.CVMRoleCredential()
|
1689
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1690
|
+
cred = credential.STSAssumeRoleCredential(
|
1691
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1692
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1693
|
+
)
|
1694
|
+
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):
|
1695
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1696
|
+
else:
|
1697
|
+
cred = credential.Credential(
|
1698
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1699
|
+
)
|
1700
|
+
http_profile = HttpProfile(
|
1701
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1702
|
+
reqMethod="POST",
|
1703
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
1704
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1705
|
+
)
|
1706
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1707
|
+
if g_param[OptionsDefine.Language]:
|
1708
|
+
profile.language = g_param[OptionsDefine.Language]
|
1709
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1710
|
+
client = mod.MariadbClient(cred, g_param[OptionsDefine.Region], profile)
|
1711
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1712
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1713
|
+
model = models.ModifyInstanceProtectedPropertyRequest()
|
1714
|
+
model.from_json_string(json.dumps(args))
|
1715
|
+
start_time = time.time()
|
1716
|
+
while True:
|
1717
|
+
rsp = client.ModifyInstanceProtectedProperty(model)
|
1718
|
+
result = rsp.to_json_string()
|
1719
|
+
try:
|
1720
|
+
json_obj = json.loads(result)
|
1721
|
+
except TypeError as e:
|
1722
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1723
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1724
|
+
break
|
1725
|
+
cur_time = time.time()
|
1726
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1727
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1728
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1729
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1730
|
+
else:
|
1731
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1732
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1733
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1734
|
+
|
1735
|
+
|
1632
1736
|
def doModifyInstanceNetwork(args, parsed_globals):
|
1633
1737
|
g_param = parse_global_arg(parsed_globals)
|
1634
1738
|
|
@@ -1993,6 +2097,58 @@ def doCreateDedicatedClusterDBInstance(args, parsed_globals):
|
|
1993
2097
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1994
2098
|
|
1995
2099
|
|
2100
|
+
def doIsolateHourDBInstance(args, parsed_globals):
|
2101
|
+
g_param = parse_global_arg(parsed_globals)
|
2102
|
+
|
2103
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
2104
|
+
cred = credential.CVMRoleCredential()
|
2105
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2106
|
+
cred = credential.STSAssumeRoleCredential(
|
2107
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2108
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2109
|
+
)
|
2110
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
2111
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
2112
|
+
else:
|
2113
|
+
cred = credential.Credential(
|
2114
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
2115
|
+
)
|
2116
|
+
http_profile = HttpProfile(
|
2117
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
2118
|
+
reqMethod="POST",
|
2119
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
2120
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
2121
|
+
)
|
2122
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
2123
|
+
if g_param[OptionsDefine.Language]:
|
2124
|
+
profile.language = g_param[OptionsDefine.Language]
|
2125
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
2126
|
+
client = mod.MariadbClient(cred, g_param[OptionsDefine.Region], profile)
|
2127
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
2128
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2129
|
+
model = models.IsolateHourDBInstanceRequest()
|
2130
|
+
model.from_json_string(json.dumps(args))
|
2131
|
+
start_time = time.time()
|
2132
|
+
while True:
|
2133
|
+
rsp = client.IsolateHourDBInstance(model)
|
2134
|
+
result = rsp.to_json_string()
|
2135
|
+
try:
|
2136
|
+
json_obj = json.loads(result)
|
2137
|
+
except TypeError as e:
|
2138
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
2139
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
2140
|
+
break
|
2141
|
+
cur_time = time.time()
|
2142
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
2143
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
2144
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
2145
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
2146
|
+
else:
|
2147
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
2148
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
2149
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2150
|
+
|
2151
|
+
|
1996
2152
|
def doModifySyncTaskAttribute(args, parsed_globals):
|
1997
2153
|
g_param = parse_global_arg(parsed_globals)
|
1998
2154
|
|
@@ -3033,7 +3189,7 @@ def doDescribeDBTmpInstances(args, parsed_globals):
|
|
3033
3189
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3034
3190
|
|
3035
3191
|
|
3036
|
-
def
|
3192
|
+
def doModifyInstanceSSLAttributes(args, parsed_globals):
|
3037
3193
|
g_param = parse_global_arg(parsed_globals)
|
3038
3194
|
|
3039
3195
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3062,11 +3218,11 @@ def doDescribeDBSyncMode(args, parsed_globals):
|
|
3062
3218
|
client = mod.MariadbClient(cred, g_param[OptionsDefine.Region], profile)
|
3063
3219
|
client._sdkVersion += ("_CLI_" + __version__)
|
3064
3220
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3065
|
-
model = models.
|
3221
|
+
model = models.ModifyInstanceSSLAttributesRequest()
|
3066
3222
|
model.from_json_string(json.dumps(args))
|
3067
3223
|
start_time = time.time()
|
3068
3224
|
while True:
|
3069
|
-
rsp = client.
|
3225
|
+
rsp = client.ModifyInstanceSSLAttributes(model)
|
3070
3226
|
result = rsp.to_json_string()
|
3071
3227
|
try:
|
3072
3228
|
json_obj = json.loads(result)
|
@@ -3605,7 +3761,7 @@ def doCloneAccount(args, parsed_globals):
|
|
3605
3761
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3606
3762
|
|
3607
3763
|
|
3608
|
-
def
|
3764
|
+
def doDescribeDBSyncMode(args, parsed_globals):
|
3609
3765
|
g_param = parse_global_arg(parsed_globals)
|
3610
3766
|
|
3611
3767
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3634,11 +3790,11 @@ def doIsolateHourDBInstance(args, parsed_globals):
|
|
3634
3790
|
client = mod.MariadbClient(cred, g_param[OptionsDefine.Region], profile)
|
3635
3791
|
client._sdkVersion += ("_CLI_" + __version__)
|
3636
3792
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3637
|
-
model = models.
|
3793
|
+
model = models.DescribeDBSyncModeRequest()
|
3638
3794
|
model.from_json_string(json.dumps(args))
|
3639
3795
|
start_time = time.time()
|
3640
3796
|
while True:
|
3641
|
-
rsp = client.
|
3797
|
+
rsp = client.DescribeDBSyncMode(model)
|
3642
3798
|
result = rsp.to_json_string()
|
3643
3799
|
try:
|
3644
3800
|
json_obj = json.loads(result)
|
@@ -3709,6 +3865,58 @@ def doUpgradeDBInstance(args, parsed_globals):
|
|
3709
3865
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3710
3866
|
|
3711
3867
|
|
3868
|
+
def doDescribeProcessList(args, parsed_globals):
|
3869
|
+
g_param = parse_global_arg(parsed_globals)
|
3870
|
+
|
3871
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
3872
|
+
cred = credential.CVMRoleCredential()
|
3873
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3874
|
+
cred = credential.STSAssumeRoleCredential(
|
3875
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3876
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3877
|
+
)
|
3878
|
+
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):
|
3879
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
3880
|
+
else:
|
3881
|
+
cred = credential.Credential(
|
3882
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
3883
|
+
)
|
3884
|
+
http_profile = HttpProfile(
|
3885
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
3886
|
+
reqMethod="POST",
|
3887
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
3888
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
3889
|
+
)
|
3890
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
3891
|
+
if g_param[OptionsDefine.Language]:
|
3892
|
+
profile.language = g_param[OptionsDefine.Language]
|
3893
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
3894
|
+
client = mod.MariadbClient(cred, g_param[OptionsDefine.Region], profile)
|
3895
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
3896
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3897
|
+
model = models.DescribeProcessListRequest()
|
3898
|
+
model.from_json_string(json.dumps(args))
|
3899
|
+
start_time = time.time()
|
3900
|
+
while True:
|
3901
|
+
rsp = client.DescribeProcessList(model)
|
3902
|
+
result = rsp.to_json_string()
|
3903
|
+
try:
|
3904
|
+
json_obj = json.loads(result)
|
3905
|
+
except TypeError as e:
|
3906
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
3907
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
3908
|
+
break
|
3909
|
+
cur_time = time.time()
|
3910
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
3911
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
3912
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
3913
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
3914
|
+
else:
|
3915
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
3916
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
3917
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3918
|
+
|
3919
|
+
|
3712
3920
|
def doModifyBackupConfigs(args, parsed_globals):
|
3713
3921
|
g_param = parse_global_arg(parsed_globals)
|
3714
3922
|
|
@@ -4045,6 +4253,7 @@ ACTION_MAP = {
|
|
4045
4253
|
"DescribeFileDownloadUrl": doDescribeFileDownloadUrl,
|
4046
4254
|
"DescribeBackupTime": doDescribeBackupTime,
|
4047
4255
|
"DisassociateSecurityGroups": doDisassociateSecurityGroups,
|
4256
|
+
"DescribeInstanceSSLAttributes": doDescribeInstanceSSLAttributes,
|
4048
4257
|
"ActivateHourDBInstance": doActivateHourDBInstance,
|
4049
4258
|
"ResetAccountPassword": doResetAccountPassword,
|
4050
4259
|
"ModifyDBParameters": doModifyDBParameters,
|
@@ -4063,6 +4272,7 @@ ACTION_MAP = {
|
|
4063
4272
|
"ModifyInstanceVip": doModifyInstanceVip,
|
4064
4273
|
"KillSession": doKillSession,
|
4065
4274
|
"ModifyDBInstanceName": doModifyDBInstanceName,
|
4275
|
+
"ModifyInstanceProtectedProperty": doModifyInstanceProtectedProperty,
|
4066
4276
|
"ModifyInstanceNetwork": doModifyInstanceNetwork,
|
4067
4277
|
"DestroyHourDBInstance": doDestroyHourDBInstance,
|
4068
4278
|
"DescribeDBInstanceSpecs": doDescribeDBInstanceSpecs,
|
@@ -4070,6 +4280,7 @@ ACTION_MAP = {
|
|
4070
4280
|
"RenewDBInstance": doRenewDBInstance,
|
4071
4281
|
"DescribeUpgradePrice": doDescribeUpgradePrice,
|
4072
4282
|
"CreateDedicatedClusterDBInstance": doCreateDedicatedClusterDBInstance,
|
4283
|
+
"IsolateHourDBInstance": doIsolateHourDBInstance,
|
4073
4284
|
"ModifySyncTaskAttribute": doModifySyncTaskAttribute,
|
4074
4285
|
"CreateAccount": doCreateAccount,
|
4075
4286
|
"OpenDBExtranetAccess": doOpenDBExtranetAccess,
|
@@ -4090,7 +4301,7 @@ ACTION_MAP = {
|
|
4090
4301
|
"GrantAccountPrivileges": doGrantAccountPrivileges,
|
4091
4302
|
"ModifyRealServerAccessStrategy": doModifyRealServerAccessStrategy,
|
4092
4303
|
"DescribeDBTmpInstances": doDescribeDBTmpInstances,
|
4093
|
-
"
|
4304
|
+
"ModifyInstanceSSLAttributes": doModifyInstanceSSLAttributes,
|
4094
4305
|
"DescribeDatabases": doDescribeDatabases,
|
4095
4306
|
"IsolateDedicatedDBInstance": doIsolateDedicatedDBInstance,
|
4096
4307
|
"ModifyInstanceVport": doModifyInstanceVport,
|
@@ -4101,8 +4312,9 @@ ACTION_MAP = {
|
|
4101
4312
|
"CancelDcnJob": doCancelDcnJob,
|
4102
4313
|
"TerminateDedicatedDBInstance": doTerminateDedicatedDBInstance,
|
4103
4314
|
"CloneAccount": doCloneAccount,
|
4104
|
-
"
|
4315
|
+
"DescribeDBSyncMode": doDescribeDBSyncMode,
|
4105
4316
|
"UpgradeDBInstance": doUpgradeDBInstance,
|
4317
|
+
"DescribeProcessList": doDescribeProcessList,
|
4106
4318
|
"ModifyBackupConfigs": doModifyBackupConfigs,
|
4107
4319
|
"DescribeBinlogTime": doDescribeBinlogTime,
|
4108
4320
|
"DescribeLogFileRetentionPeriod": doDescribeLogFileRetentionPeriod,
|