tccli 3.0.1292.1__py2.py3-none-any.whl → 3.0.1293.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/advisor/v20200721/api.json +36 -36
- tccli/services/advisor/v20200721/examples.json +2 -2
- tccli/services/batch/v20170312/api.json +4 -4
- tccli/services/cam/v20190116/api.json +18 -18
- tccli/services/cdwpg/v20201230/api.json +114 -107
- tccli/services/cdwpg/v20201230/examples.json +3 -3
- tccli/services/chc/__init__.py +4 -0
- tccli/services/chc/chc_client.py +2062 -0
- tccli/services/chc/v20230418/api.json +5728 -0
- tccli/services/chc/v20230418/examples.json +293 -0
- tccli/services/ckafka/v20190819/api.json +34 -34
- tccli/services/ckafka/v20190819/examples.json +1 -1
- tccli/services/cls/v20201016/api.json +198 -198
- tccli/services/cls/v20201016/examples.json +1 -1
- tccli/services/dbbrain/dbbrain_client.py +240 -28
- tccli/services/dbbrain/v20191016/api.json +5 -5
- tccli/services/dbbrain/v20210527/api.json +473 -10
- tccli/services/dbbrain/v20210527/examples.json +32 -0
- tccli/services/domain/v20180808/api.json +2 -2
- tccli/services/ecdn/ecdn_client.py +7 -431
- tccli/services/ecdn/v20191012/api.json +0 -574
- tccli/services/ecdn/v20191012/examples.json +0 -64
- tccli/services/ess/v20201111/api.json +12 -3
- tccli/services/essbasic/v20210526/api.json +9 -0
- tccli/services/gs/gs_client.py +1778 -29
- tccli/services/gs/v20191118/api.json +2618 -163
- tccli/services/gs/v20191118/examples.json +264 -0
- tccli/services/hai/v20230812/api.json +22 -22
- tccli/services/lke/v20231130/api.json +14 -14
- tccli/services/lke/v20231130/examples.json +2 -2
- tccli/services/mmps/v20200710/api.json +12 -12
- tccli/services/mqtt/v20240516/api.json +13 -13
- tccli/services/mqtt/v20240516/examples.json +1 -1
- tccli/services/tchd/v20230306/api.json +5 -5
- tccli/services/tcr/v20190924/api.json +22 -22
- tccli/services/tdmq/v20200217/api.json +1 -1
- tccli/services/thpc/v20220401/api.json +3 -3
- tccli/services/thpc/v20230321/api.json +45 -33
- tccli/services/tione/v20211111/api.json +40 -1
- tccli/services/tke/v20180525/api.json +29 -29
- tccli/services/vpc/v20170312/api.json +1 -1
- tccli/services/wedata/v20210820/api.json +61 -1
- tccli/services/wedata/v20210820/examples.json +2 -8
- {tccli-3.0.1292.1.dist-info → tccli-3.0.1293.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1292.1.dist-info → tccli-3.0.1293.1.dist-info}/RECORD +50 -46
- {tccli-3.0.1292.1.dist-info → tccli-3.0.1293.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1292.1.dist-info → tccli-3.0.1293.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1292.1.dist-info → tccli-3.0.1293.1.dist-info}/license_files/LICENSE +0 -0
@@ -461,7 +461,7 @@
|
|
461
461
|
"document": "",
|
462
462
|
"input": "POST / HTTP/1.1\nHost: cls.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeConsoleSharingList\n<公共请求参数>\n\n{}",
|
463
463
|
"output": "{\n \"Response\": {\n \"TotalCount\": 1,\n \"RequestId\": \"714cf720-43e9-460b-bd9a-42a193ca3d94\"\n }\n}",
|
464
|
-
"title": "
|
464
|
+
"title": "批量查询控制台检索页/仪表盘免登录分享站点示例"
|
465
465
|
}
|
466
466
|
],
|
467
467
|
"DescribeConsumer": [
|
@@ -383,6 +383,58 @@ def doDescribeNoPrimaryKeyTables(args, parsed_globals):
|
|
383
383
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
384
384
|
|
385
385
|
|
386
|
+
def doDescribeDBPerfTimeSeries(args, parsed_globals):
|
387
|
+
g_param = parse_global_arg(parsed_globals)
|
388
|
+
|
389
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
390
|
+
cred = credential.CVMRoleCredential()
|
391
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
392
|
+
cred = credential.STSAssumeRoleCredential(
|
393
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
394
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
395
|
+
)
|
396
|
+
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):
|
397
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
398
|
+
else:
|
399
|
+
cred = credential.Credential(
|
400
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
401
|
+
)
|
402
|
+
http_profile = HttpProfile(
|
403
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
404
|
+
reqMethod="POST",
|
405
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
406
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
407
|
+
)
|
408
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
409
|
+
if g_param[OptionsDefine.Language]:
|
410
|
+
profile.language = g_param[OptionsDefine.Language]
|
411
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
412
|
+
client = mod.DbbrainClient(cred, g_param[OptionsDefine.Region], profile)
|
413
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
414
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
415
|
+
model = models.DescribeDBPerfTimeSeriesRequest()
|
416
|
+
model.from_json_string(json.dumps(args))
|
417
|
+
start_time = time.time()
|
418
|
+
while True:
|
419
|
+
rsp = client.DescribeDBPerfTimeSeries(model)
|
420
|
+
result = rsp.to_json_string()
|
421
|
+
try:
|
422
|
+
json_obj = json.loads(result)
|
423
|
+
except TypeError as e:
|
424
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
425
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
426
|
+
break
|
427
|
+
cur_time = time.time()
|
428
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
429
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
430
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
431
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
432
|
+
else:
|
433
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
434
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
435
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
436
|
+
|
437
|
+
|
386
438
|
def doDescribeTopSpaceSchemas(args, parsed_globals):
|
387
439
|
g_param = parse_global_arg(parsed_globals)
|
388
440
|
|
@@ -1267,7 +1319,7 @@ def doDescribeSlowLogUserHostStats(args, parsed_globals):
|
|
1267
1319
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1268
1320
|
|
1269
1321
|
|
1270
|
-
def
|
1322
|
+
def doDescribeRedisCmdPerfTimeSeries(args, parsed_globals):
|
1271
1323
|
g_param = parse_global_arg(parsed_globals)
|
1272
1324
|
|
1273
1325
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1296,11 +1348,11 @@ def doDescribeUserSqlAdvice(args, parsed_globals):
|
|
1296
1348
|
client = mod.DbbrainClient(cred, g_param[OptionsDefine.Region], profile)
|
1297
1349
|
client._sdkVersion += ("_CLI_" + __version__)
|
1298
1350
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1299
|
-
model = models.
|
1351
|
+
model = models.DescribeRedisCmdPerfTimeSeriesRequest()
|
1300
1352
|
model.from_json_string(json.dumps(args))
|
1301
1353
|
start_time = time.time()
|
1302
1354
|
while True:
|
1303
|
-
rsp = client.
|
1355
|
+
rsp = client.DescribeRedisCmdPerfTimeSeries(model)
|
1304
1356
|
result = rsp.to_json_string()
|
1305
1357
|
try:
|
1306
1358
|
json_obj = json.loads(result)
|
@@ -1943,7 +1995,7 @@ def doCreateAuditLogFile(args, parsed_globals):
|
|
1943
1995
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1944
1996
|
|
1945
1997
|
|
1946
|
-
def
|
1998
|
+
def doDescribeRedisTopBigKeys(args, parsed_globals):
|
1947
1999
|
g_param = parse_global_arg(parsed_globals)
|
1948
2000
|
|
1949
2001
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1972,11 +2024,11 @@ def doDescribeSlowLogTopSqls(args, parsed_globals):
|
|
1972
2024
|
client = mod.DbbrainClient(cred, g_param[OptionsDefine.Region], profile)
|
1973
2025
|
client._sdkVersion += ("_CLI_" + __version__)
|
1974
2026
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1975
|
-
model = models.
|
2027
|
+
model = models.DescribeRedisTopBigKeysRequest()
|
1976
2028
|
model.from_json_string(json.dumps(args))
|
1977
2029
|
start_time = time.time()
|
1978
2030
|
while True:
|
1979
|
-
rsp = client.
|
2031
|
+
rsp = client.DescribeRedisTopBigKeys(model)
|
1980
2032
|
result = rsp.to_json_string()
|
1981
2033
|
try:
|
1982
2034
|
json_obj = json.loads(result)
|
@@ -2047,6 +2099,58 @@ def doDescribeSecurityAuditLogExportTasks(args, parsed_globals):
|
|
2047
2099
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2048
2100
|
|
2049
2101
|
|
2102
|
+
def doDescribeSlowLogTopSqls(args, parsed_globals):
|
2103
|
+
g_param = parse_global_arg(parsed_globals)
|
2104
|
+
|
2105
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
2106
|
+
cred = credential.CVMRoleCredential()
|
2107
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2108
|
+
cred = credential.STSAssumeRoleCredential(
|
2109
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2110
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2111
|
+
)
|
2112
|
+
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):
|
2113
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
2114
|
+
else:
|
2115
|
+
cred = credential.Credential(
|
2116
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
2117
|
+
)
|
2118
|
+
http_profile = HttpProfile(
|
2119
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
2120
|
+
reqMethod="POST",
|
2121
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
2122
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
2123
|
+
)
|
2124
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
2125
|
+
if g_param[OptionsDefine.Language]:
|
2126
|
+
profile.language = g_param[OptionsDefine.Language]
|
2127
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
2128
|
+
client = mod.DbbrainClient(cred, g_param[OptionsDefine.Region], profile)
|
2129
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
2130
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2131
|
+
model = models.DescribeSlowLogTopSqlsRequest()
|
2132
|
+
model.from_json_string(json.dumps(args))
|
2133
|
+
start_time = time.time()
|
2134
|
+
while True:
|
2135
|
+
rsp = client.DescribeSlowLogTopSqls(model)
|
2136
|
+
result = rsp.to_json_string()
|
2137
|
+
try:
|
2138
|
+
json_obj = json.loads(result)
|
2139
|
+
except TypeError as e:
|
2140
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
2141
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
2142
|
+
break
|
2143
|
+
cur_time = time.time()
|
2144
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
2145
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
2146
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
2147
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
2148
|
+
else:
|
2149
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
2150
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
2151
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2152
|
+
|
2153
|
+
|
2050
2154
|
def doDescribeAllUserContact(args, parsed_globals):
|
2051
2155
|
g_param = parse_global_arg(parsed_globals)
|
2052
2156
|
|
@@ -2203,7 +2307,7 @@ def doDescribeSlowLogs(args, parsed_globals):
|
|
2203
2307
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2204
2308
|
|
2205
2309
|
|
2206
|
-
def
|
2310
|
+
def doDescribeRedisCommandOverview(args, parsed_globals):
|
2207
2311
|
g_param = parse_global_arg(parsed_globals)
|
2208
2312
|
|
2209
2313
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2232,11 +2336,11 @@ def doDescribeUserAutonomyProfile(args, parsed_globals):
|
|
2232
2336
|
client = mod.DbbrainClient(cred, g_param[OptionsDefine.Region], profile)
|
2233
2337
|
client._sdkVersion += ("_CLI_" + __version__)
|
2234
2338
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2235
|
-
model = models.
|
2339
|
+
model = models.DescribeRedisCommandOverviewRequest()
|
2236
2340
|
model.from_json_string(json.dumps(args))
|
2237
2341
|
start_time = time.time()
|
2238
2342
|
while True:
|
2239
|
-
rsp = client.
|
2343
|
+
rsp = client.DescribeRedisCommandOverview(model)
|
2240
2344
|
result = rsp.to_json_string()
|
2241
2345
|
try:
|
2242
2346
|
json_obj = json.loads(result)
|
@@ -2307,6 +2411,58 @@ def doDescribeDBDiagEvent(args, parsed_globals):
|
|
2307
2411
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2308
2412
|
|
2309
2413
|
|
2414
|
+
def doDescribeUserAutonomyProfile(args, parsed_globals):
|
2415
|
+
g_param = parse_global_arg(parsed_globals)
|
2416
|
+
|
2417
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
2418
|
+
cred = credential.CVMRoleCredential()
|
2419
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2420
|
+
cred = credential.STSAssumeRoleCredential(
|
2421
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2422
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2423
|
+
)
|
2424
|
+
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):
|
2425
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
2426
|
+
else:
|
2427
|
+
cred = credential.Credential(
|
2428
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
2429
|
+
)
|
2430
|
+
http_profile = HttpProfile(
|
2431
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
2432
|
+
reqMethod="POST",
|
2433
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
2434
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
2435
|
+
)
|
2436
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
2437
|
+
if g_param[OptionsDefine.Language]:
|
2438
|
+
profile.language = g_param[OptionsDefine.Language]
|
2439
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
2440
|
+
client = mod.DbbrainClient(cred, g_param[OptionsDefine.Region], profile)
|
2441
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
2442
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2443
|
+
model = models.DescribeUserAutonomyProfileRequest()
|
2444
|
+
model.from_json_string(json.dumps(args))
|
2445
|
+
start_time = time.time()
|
2446
|
+
while True:
|
2447
|
+
rsp = client.DescribeUserAutonomyProfile(model)
|
2448
|
+
result = rsp.to_json_string()
|
2449
|
+
try:
|
2450
|
+
json_obj = json.loads(result)
|
2451
|
+
except TypeError as e:
|
2452
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
2453
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
2454
|
+
break
|
2455
|
+
cur_time = time.time()
|
2456
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
2457
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
2458
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
2459
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
2460
|
+
else:
|
2461
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
2462
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
2463
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2464
|
+
|
2465
|
+
|
2310
2466
|
def doDescribeDBDiagHistory(args, parsed_globals):
|
2311
2467
|
g_param = parse_global_arg(parsed_globals)
|
2312
2468
|
|
@@ -3139,7 +3295,7 @@ def doUpdateMonitorSwitch(args, parsed_globals):
|
|
3139
3295
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3140
3296
|
|
3141
3297
|
|
3142
|
-
def
|
3298
|
+
def doDescribeUserSqlAdvice(args, parsed_globals):
|
3143
3299
|
g_param = parse_global_arg(parsed_globals)
|
3144
3300
|
|
3145
3301
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3168,11 +3324,11 @@ def doDescribeTopSpaceTables(args, parsed_globals):
|
|
3168
3324
|
client = mod.DbbrainClient(cred, g_param[OptionsDefine.Region], profile)
|
3169
3325
|
client._sdkVersion += ("_CLI_" + __version__)
|
3170
3326
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3171
|
-
model = models.
|
3327
|
+
model = models.DescribeUserSqlAdviceRequest()
|
3172
3328
|
model.from_json_string(json.dumps(args))
|
3173
3329
|
start_time = time.time()
|
3174
3330
|
while True:
|
3175
|
-
rsp = client.
|
3331
|
+
rsp = client.DescribeUserSqlAdvice(model)
|
3176
3332
|
result = rsp.to_json_string()
|
3177
3333
|
try:
|
3178
3334
|
json_obj = json.loads(result)
|
@@ -3243,7 +3399,7 @@ def doDescribeSqlFilters(args, parsed_globals):
|
|
3243
3399
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3244
3400
|
|
3245
3401
|
|
3246
|
-
def
|
3402
|
+
def doDescribeTopSpaceTables(args, parsed_globals):
|
3247
3403
|
g_param = parse_global_arg(parsed_globals)
|
3248
3404
|
|
3249
3405
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3272,11 +3428,11 @@ def doDescribeAlarmTemplate(args, parsed_globals):
|
|
3272
3428
|
client = mod.DbbrainClient(cred, g_param[OptionsDefine.Region], profile)
|
3273
3429
|
client._sdkVersion += ("_CLI_" + __version__)
|
3274
3430
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3275
|
-
model = models.
|
3431
|
+
model = models.DescribeTopSpaceTablesRequest()
|
3276
3432
|
model.from_json_string(json.dumps(args))
|
3277
3433
|
start_time = time.time()
|
3278
3434
|
while True:
|
3279
|
-
rsp = client.
|
3435
|
+
rsp = client.DescribeTopSpaceTables(model)
|
3280
3436
|
result = rsp.to_json_string()
|
3281
3437
|
try:
|
3282
3438
|
json_obj = json.loads(result)
|
@@ -3399,7 +3555,7 @@ def doKillMySqlThreads(args, parsed_globals):
|
|
3399
3555
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3400
3556
|
|
3401
3557
|
|
3402
|
-
def
|
3558
|
+
def doCreateDBDiagReportUrl(args, parsed_globals):
|
3403
3559
|
g_param = parse_global_arg(parsed_globals)
|
3404
3560
|
|
3405
3561
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3428,11 +3584,11 @@ def doDescribeRedisTopBigKeys(args, parsed_globals):
|
|
3428
3584
|
client = mod.DbbrainClient(cred, g_param[OptionsDefine.Region], profile)
|
3429
3585
|
client._sdkVersion += ("_CLI_" + __version__)
|
3430
3586
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3431
|
-
model = models.
|
3587
|
+
model = models.CreateDBDiagReportUrlRequest()
|
3432
3588
|
model.from_json_string(json.dumps(args))
|
3433
3589
|
start_time = time.time()
|
3434
3590
|
while True:
|
3435
|
-
rsp = client.
|
3591
|
+
rsp = client.CreateDBDiagReportUrl(model)
|
3436
3592
|
result = rsp.to_json_string()
|
3437
3593
|
try:
|
3438
3594
|
json_obj = json.loads(result)
|
@@ -3503,7 +3659,7 @@ def doVerifyUserAccount(args, parsed_globals):
|
|
3503
3659
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3504
3660
|
|
3505
3661
|
|
3506
|
-
def
|
3662
|
+
def doDescribeRedisCommandCostStatistics(args, parsed_globals):
|
3507
3663
|
g_param = parse_global_arg(parsed_globals)
|
3508
3664
|
|
3509
3665
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3532,11 +3688,11 @@ def doCreateDBDiagReportUrl(args, parsed_globals):
|
|
3532
3688
|
client = mod.DbbrainClient(cred, g_param[OptionsDefine.Region], profile)
|
3533
3689
|
client._sdkVersion += ("_CLI_" + __version__)
|
3534
3690
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3535
|
-
model = models.
|
3691
|
+
model = models.DescribeRedisCommandCostStatisticsRequest()
|
3536
3692
|
model.from_json_string(json.dumps(args))
|
3537
3693
|
start_time = time.time()
|
3538
3694
|
while True:
|
3539
|
-
rsp = client.
|
3695
|
+
rsp = client.DescribeRedisCommandCostStatistics(model)
|
3540
3696
|
result = rsp.to_json_string()
|
3541
3697
|
try:
|
3542
3698
|
json_obj = json.loads(result)
|
@@ -3711,6 +3867,58 @@ def doModifyUserAutonomyProfile(args, parsed_globals):
|
|
3711
3867
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3712
3868
|
|
3713
3869
|
|
3870
|
+
def doDescribeAlarmTemplate(args, parsed_globals):
|
3871
|
+
g_param = parse_global_arg(parsed_globals)
|
3872
|
+
|
3873
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
3874
|
+
cred = credential.CVMRoleCredential()
|
3875
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3876
|
+
cred = credential.STSAssumeRoleCredential(
|
3877
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3878
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3879
|
+
)
|
3880
|
+
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):
|
3881
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
3882
|
+
else:
|
3883
|
+
cred = credential.Credential(
|
3884
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
3885
|
+
)
|
3886
|
+
http_profile = HttpProfile(
|
3887
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
3888
|
+
reqMethod="POST",
|
3889
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
3890
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
3891
|
+
)
|
3892
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
3893
|
+
if g_param[OptionsDefine.Language]:
|
3894
|
+
profile.language = g_param[OptionsDefine.Language]
|
3895
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
3896
|
+
client = mod.DbbrainClient(cred, g_param[OptionsDefine.Region], profile)
|
3897
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
3898
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3899
|
+
model = models.DescribeAlarmTemplateRequest()
|
3900
|
+
model.from_json_string(json.dumps(args))
|
3901
|
+
start_time = time.time()
|
3902
|
+
while True:
|
3903
|
+
rsp = client.DescribeAlarmTemplate(model)
|
3904
|
+
result = rsp.to_json_string()
|
3905
|
+
try:
|
3906
|
+
json_obj = json.loads(result)
|
3907
|
+
except TypeError as e:
|
3908
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
3909
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
3910
|
+
break
|
3911
|
+
cur_time = time.time()
|
3912
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
3913
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
3914
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
3915
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
3916
|
+
else:
|
3917
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
3918
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
3919
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3920
|
+
|
3921
|
+
|
3714
3922
|
CLIENT_MAP = {
|
3715
3923
|
"v20210527": dbbrain_client_v20210527,
|
3716
3924
|
"v20191016": dbbrain_client_v20191016,
|
@@ -3731,6 +3939,7 @@ ACTION_MAP = {
|
|
3731
3939
|
"CreateSchedulerMailProfile": doCreateSchedulerMailProfile,
|
3732
3940
|
"DescribeSqlTemplate": doDescribeSqlTemplate,
|
3733
3941
|
"DescribeNoPrimaryKeyTables": doDescribeNoPrimaryKeyTables,
|
3942
|
+
"DescribeDBPerfTimeSeries": doDescribeDBPerfTimeSeries,
|
3734
3943
|
"DescribeTopSpaceSchemas": doDescribeTopSpaceSchemas,
|
3735
3944
|
"DescribeMySqlProcessList": doDescribeMySqlProcessList,
|
3736
3945
|
"CreateMailProfile": doCreateMailProfile,
|
@@ -3748,7 +3957,7 @@ ACTION_MAP = {
|
|
3748
3957
|
"CreateDBDiagReportTask": doCreateDBDiagReportTask,
|
3749
3958
|
"DescribeRedisProcessList": doDescribeRedisProcessList,
|
3750
3959
|
"DescribeSlowLogUserHostStats": doDescribeSlowLogUserHostStats,
|
3751
|
-
"
|
3960
|
+
"DescribeRedisCmdPerfTimeSeries": doDescribeRedisCmdPerfTimeSeries,
|
3752
3961
|
"CreateSqlFilter": doCreateSqlFilter,
|
3753
3962
|
"DescribeDBSpaceStatus": doDescribeDBSpaceStatus,
|
3754
3963
|
"CreateProxySessionKillTask": doCreateProxySessionKillTask,
|
@@ -3761,13 +3970,15 @@ ACTION_MAP = {
|
|
3761
3970
|
"DescribeDBAutonomyActions": doDescribeDBAutonomyActions,
|
3762
3971
|
"ModifyAuditService": doModifyAuditService,
|
3763
3972
|
"CreateAuditLogFile": doCreateAuditLogFile,
|
3764
|
-
"
|
3973
|
+
"DescribeRedisTopBigKeys": doDescribeRedisTopBigKeys,
|
3765
3974
|
"DescribeSecurityAuditLogExportTasks": doDescribeSecurityAuditLogExportTasks,
|
3975
|
+
"DescribeSlowLogTopSqls": doDescribeSlowLogTopSqls,
|
3766
3976
|
"DescribeAllUserContact": doDescribeAllUserContact,
|
3767
3977
|
"DescribeRedisBigKeyAnalysisTasks": doDescribeRedisBigKeyAnalysisTasks,
|
3768
3978
|
"DescribeSlowLogs": doDescribeSlowLogs,
|
3769
|
-
"
|
3979
|
+
"DescribeRedisCommandOverview": doDescribeRedisCommandOverview,
|
3770
3980
|
"DescribeDBDiagEvent": doDescribeDBDiagEvent,
|
3981
|
+
"DescribeUserAutonomyProfile": doDescribeUserAutonomyProfile,
|
3771
3982
|
"DescribeDBDiagHistory": doDescribeDBDiagHistory,
|
3772
3983
|
"DescribeProxyProcessStatistics": doDescribeProxyProcessStatistics,
|
3773
3984
|
"DescribeSlowLogTimeSeriesStats": doDescribeSlowLogTimeSeriesStats,
|
@@ -3784,17 +3995,18 @@ ACTION_MAP = {
|
|
3784
3995
|
"CreateKillTask": doCreateKillTask,
|
3785
3996
|
"UpdateAgentSwitch": doUpdateAgentSwitch,
|
3786
3997
|
"UpdateMonitorSwitch": doUpdateMonitorSwitch,
|
3787
|
-
"
|
3998
|
+
"DescribeUserSqlAdvice": doDescribeUserSqlAdvice,
|
3788
3999
|
"DescribeSqlFilters": doDescribeSqlFilters,
|
3789
|
-
"
|
4000
|
+
"DescribeTopSpaceTables": doDescribeTopSpaceTables,
|
3790
4001
|
"OpenAuditService": doOpenAuditService,
|
3791
4002
|
"KillMySqlThreads": doKillMySqlThreads,
|
3792
|
-
"DescribeRedisTopBigKeys": doDescribeRedisTopBigKeys,
|
3793
|
-
"VerifyUserAccount": doVerifyUserAccount,
|
3794
4003
|
"CreateDBDiagReportUrl": doCreateDBDiagReportUrl,
|
4004
|
+
"VerifyUserAccount": doVerifyUserAccount,
|
4005
|
+
"DescribeRedisCommandCostStatistics": doDescribeRedisCommandCostStatistics,
|
3795
4006
|
"ModifySqlFilters": doModifySqlFilters,
|
3796
4007
|
"DescribeProxySessionKillTasks": doDescribeProxySessionKillTasks,
|
3797
4008
|
"ModifyUserAutonomyProfile": doModifyUserAutonomyProfile,
|
4009
|
+
"DescribeAlarmTemplate": doDescribeAlarmTemplate,
|
3798
4010
|
|
3799
4011
|
}
|
3800
4012
|
|
@@ -1440,23 +1440,23 @@
|
|
1440
1440
|
"members": [
|
1441
1441
|
{
|
1442
1442
|
"disabled": false,
|
1443
|
-
"document": "
|
1444
|
-
"example": "
|
1443
|
+
"document": "邮件配置详情。",
|
1444
|
+
"example": "无",
|
1445
1445
|
"member": "UserProfile",
|
1446
1446
|
"name": "ProfileList",
|
1447
1447
|
"output_required": true,
|
1448
1448
|
"type": "list",
|
1449
|
-
"value_allowed_null":
|
1449
|
+
"value_allowed_null": false
|
1450
1450
|
},
|
1451
1451
|
{
|
1452
1452
|
"disabled": false,
|
1453
|
-
"document": "
|
1453
|
+
"document": "邮件模板总数。",
|
1454
1454
|
"example": "1",
|
1455
1455
|
"member": "int64",
|
1456
1456
|
"name": "TotalCount",
|
1457
1457
|
"output_required": true,
|
1458
1458
|
"type": "int",
|
1459
|
-
"value_allowed_null":
|
1459
|
+
"value_allowed_null": false
|
1460
1460
|
},
|
1461
1461
|
{
|
1462
1462
|
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|