tccli-intl-en 3.0.1279.1__py2.py3-none-any.whl → 3.0.1280.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/cynosdb/cynosdb_client.py +858 -169
- tccli/services/cynosdb/v20190107/api.json +11544 -8343
- tccli/services/cynosdb/v20190107/examples.json +104 -0
- tccli/services/teo/teo_client.py +166 -7
- tccli/services/teo/v20220901/api.json +285 -0
- tccli/services/teo/v20220901/examples.json +24 -0
- tccli/services/trtc/v20190722/api.json +6 -6
- tccli/services/trtc/v20190722/examples.json +7 -7
- {tccli_intl_en-3.0.1279.1.dist-info → tccli_intl_en-3.0.1280.1.dist-info}/METADATA +2 -2
- {tccli_intl_en-3.0.1279.1.dist-info → tccli_intl_en-3.0.1280.1.dist-info}/RECORD +15 -15
- {tccli_intl_en-3.0.1279.1.dist-info → tccli_intl_en-3.0.1280.1.dist-info}/LICENSE +0 -0
- {tccli_intl_en-3.0.1279.1.dist-info → tccli_intl_en-3.0.1280.1.dist-info}/WHEEL +0 -0
- {tccli_intl_en-3.0.1279.1.dist-info → tccli_intl_en-3.0.1280.1.dist-info}/entry_points.txt +0 -0
- {tccli_intl_en-3.0.1279.1.dist-info → tccli_intl_en-3.0.1280.1.dist-info}/top_level.txt +0 -0
|
@@ -69,7 +69,7 @@ def doResumeServerless(args, parsed_globals):
|
|
|
69
69
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
70
70
|
|
|
71
71
|
|
|
72
|
-
def
|
|
72
|
+
def doDescribeBackupConfig(args, parsed_globals):
|
|
73
73
|
g_param = parse_global_arg(parsed_globals)
|
|
74
74
|
|
|
75
75
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -98,11 +98,11 @@ def doDescribeInstanceSpecs(args, parsed_globals):
|
|
|
98
98
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
99
99
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
100
100
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
101
|
-
model = models.
|
|
101
|
+
model = models.DescribeBackupConfigRequest()
|
|
102
102
|
model.from_json_string(json.dumps(args))
|
|
103
103
|
start_time = time.time()
|
|
104
104
|
while True:
|
|
105
|
-
rsp = client.
|
|
105
|
+
rsp = client.DescribeBackupConfig(model)
|
|
106
106
|
result = rsp.to_json_string()
|
|
107
107
|
try:
|
|
108
108
|
json_obj = json.loads(result)
|
|
@@ -433,6 +433,58 @@ def doCreateAuditRuleTemplate(args, parsed_globals):
|
|
|
433
433
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
434
434
|
|
|
435
435
|
|
|
436
|
+
def doRollbackToNewCluster(args, parsed_globals):
|
|
437
|
+
g_param = parse_global_arg(parsed_globals)
|
|
438
|
+
|
|
439
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
440
|
+
cred = credential.CVMRoleCredential()
|
|
441
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
442
|
+
cred = credential.STSAssumeRoleCredential(
|
|
443
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
444
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
445
|
+
)
|
|
446
|
+
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):
|
|
447
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
448
|
+
else:
|
|
449
|
+
cred = credential.Credential(
|
|
450
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
451
|
+
)
|
|
452
|
+
http_profile = HttpProfile(
|
|
453
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
454
|
+
reqMethod="POST",
|
|
455
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
456
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
457
|
+
)
|
|
458
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
|
459
|
+
if g_param[OptionsDefine.Language]:
|
|
460
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
461
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
462
|
+
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
463
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
464
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
465
|
+
model = models.RollbackToNewClusterRequest()
|
|
466
|
+
model.from_json_string(json.dumps(args))
|
|
467
|
+
start_time = time.time()
|
|
468
|
+
while True:
|
|
469
|
+
rsp = client.RollbackToNewCluster(model)
|
|
470
|
+
result = rsp.to_json_string()
|
|
471
|
+
try:
|
|
472
|
+
json_obj = json.loads(result)
|
|
473
|
+
except TypeError as e:
|
|
474
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
475
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
476
|
+
break
|
|
477
|
+
cur_time = time.time()
|
|
478
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
479
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
480
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
481
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
482
|
+
else:
|
|
483
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
484
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
485
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
486
|
+
|
|
487
|
+
|
|
436
488
|
def doModifyMaintainPeriodConfig(args, parsed_globals):
|
|
437
489
|
g_param = parse_global_arg(parsed_globals)
|
|
438
490
|
|
|
@@ -953,7 +1005,7 @@ def doInquirePriceModify(args, parsed_globals):
|
|
|
953
1005
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
954
1006
|
|
|
955
1007
|
|
|
956
|
-
def
|
|
1008
|
+
def doModifyDBInstanceSecurityGroups(args, parsed_globals):
|
|
957
1009
|
g_param = parse_global_arg(parsed_globals)
|
|
958
1010
|
|
|
959
1011
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -982,11 +1034,11 @@ def doDescribeClusterDetail(args, parsed_globals):
|
|
|
982
1034
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
983
1035
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
984
1036
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
985
|
-
model = models.
|
|
1037
|
+
model = models.ModifyDBInstanceSecurityGroupsRequest()
|
|
986
1038
|
model.from_json_string(json.dumps(args))
|
|
987
1039
|
start_time = time.time()
|
|
988
1040
|
while True:
|
|
989
|
-
rsp = client.
|
|
1041
|
+
rsp = client.ModifyDBInstanceSecurityGroups(model)
|
|
990
1042
|
result = rsp.to_json_string()
|
|
991
1043
|
try:
|
|
992
1044
|
json_obj = json.loads(result)
|
|
@@ -1005,7 +1057,7 @@ def doDescribeClusterDetail(args, parsed_globals):
|
|
|
1005
1057
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1006
1058
|
|
|
1007
1059
|
|
|
1008
|
-
def
|
|
1060
|
+
def doDescribeTasks(args, parsed_globals):
|
|
1009
1061
|
g_param = parse_global_arg(parsed_globals)
|
|
1010
1062
|
|
|
1011
1063
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1034,11 +1086,11 @@ def doDescribeBackupConfig(args, parsed_globals):
|
|
|
1034
1086
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1035
1087
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1036
1088
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1037
|
-
model = models.
|
|
1089
|
+
model = models.DescribeTasksRequest()
|
|
1038
1090
|
model.from_json_string(json.dumps(args))
|
|
1039
1091
|
start_time = time.time()
|
|
1040
1092
|
while True:
|
|
1041
|
-
rsp = client.
|
|
1093
|
+
rsp = client.DescribeTasks(model)
|
|
1042
1094
|
result = rsp.to_json_string()
|
|
1043
1095
|
try:
|
|
1044
1096
|
json_obj = json.loads(result)
|
|
@@ -1057,7 +1109,7 @@ def doDescribeBackupConfig(args, parsed_globals):
|
|
|
1057
1109
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1058
1110
|
|
|
1059
1111
|
|
|
1060
|
-
def
|
|
1112
|
+
def doDescribeInstanceSpecs(args, parsed_globals):
|
|
1061
1113
|
g_param = parse_global_arg(parsed_globals)
|
|
1062
1114
|
|
|
1063
1115
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1086,11 +1138,11 @@ def doDescribeBinlogDownloadUrl(args, parsed_globals):
|
|
|
1086
1138
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1087
1139
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1088
1140
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1089
|
-
model = models.
|
|
1141
|
+
model = models.DescribeInstanceSpecsRequest()
|
|
1090
1142
|
model.from_json_string(json.dumps(args))
|
|
1091
1143
|
start_time = time.time()
|
|
1092
1144
|
while True:
|
|
1093
|
-
rsp = client.
|
|
1145
|
+
rsp = client.DescribeInstanceSpecs(model)
|
|
1094
1146
|
result = rsp.to_json_string()
|
|
1095
1147
|
try:
|
|
1096
1148
|
json_obj = json.loads(result)
|
|
@@ -1109,7 +1161,7 @@ def doDescribeBinlogDownloadUrl(args, parsed_globals):
|
|
|
1109
1161
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1110
1162
|
|
|
1111
1163
|
|
|
1112
|
-
def
|
|
1164
|
+
def doDescribeBinlogDownloadUrl(args, parsed_globals):
|
|
1113
1165
|
g_param = parse_global_arg(parsed_globals)
|
|
1114
1166
|
|
|
1115
1167
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1138,11 +1190,11 @@ def doDescribeResourcesByDealName(args, parsed_globals):
|
|
|
1138
1190
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1139
1191
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1140
1192
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1141
|
-
model = models.
|
|
1193
|
+
model = models.DescribeBinlogDownloadUrlRequest()
|
|
1142
1194
|
model.from_json_string(json.dumps(args))
|
|
1143
1195
|
start_time = time.time()
|
|
1144
1196
|
while True:
|
|
1145
|
-
rsp = client.
|
|
1197
|
+
rsp = client.DescribeBinlogDownloadUrl(model)
|
|
1146
1198
|
result = rsp.to_json_string()
|
|
1147
1199
|
try:
|
|
1148
1200
|
json_obj = json.loads(result)
|
|
@@ -1161,7 +1213,7 @@ def doDescribeResourcesByDealName(args, parsed_globals):
|
|
|
1161
1213
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1162
1214
|
|
|
1163
1215
|
|
|
1164
|
-
def
|
|
1216
|
+
def doDescribeResourcesByDealName(args, parsed_globals):
|
|
1165
1217
|
g_param = parse_global_arg(parsed_globals)
|
|
1166
1218
|
|
|
1167
1219
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1190,11 +1242,11 @@ def doDescribeBinlogConfig(args, parsed_globals):
|
|
|
1190
1242
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1191
1243
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1192
1244
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1193
|
-
model = models.
|
|
1245
|
+
model = models.DescribeResourcesByDealNameRequest()
|
|
1194
1246
|
model.from_json_string(json.dumps(args))
|
|
1195
1247
|
start_time = time.time()
|
|
1196
1248
|
while True:
|
|
1197
|
-
rsp = client.
|
|
1249
|
+
rsp = client.DescribeResourcesByDealName(model)
|
|
1198
1250
|
result = rsp.to_json_string()
|
|
1199
1251
|
try:
|
|
1200
1252
|
json_obj = json.loads(result)
|
|
@@ -1213,7 +1265,7 @@ def doDescribeBinlogConfig(args, parsed_globals):
|
|
|
1213
1265
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1214
1266
|
|
|
1215
1267
|
|
|
1216
|
-
def
|
|
1268
|
+
def doDescribeBinlogConfig(args, parsed_globals):
|
|
1217
1269
|
g_param = parse_global_arg(parsed_globals)
|
|
1218
1270
|
|
|
1219
1271
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1242,11 +1294,11 @@ def doActivateInstance(args, parsed_globals):
|
|
|
1242
1294
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1243
1295
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1244
1296
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1245
|
-
model = models.
|
|
1297
|
+
model = models.DescribeBinlogConfigRequest()
|
|
1246
1298
|
model.from_json_string(json.dumps(args))
|
|
1247
1299
|
start_time = time.time()
|
|
1248
1300
|
while True:
|
|
1249
|
-
rsp = client.
|
|
1301
|
+
rsp = client.DescribeBinlogConfig(model)
|
|
1250
1302
|
result = rsp.to_json_string()
|
|
1251
1303
|
try:
|
|
1252
1304
|
json_obj = json.loads(result)
|
|
@@ -1265,7 +1317,7 @@ def doActivateInstance(args, parsed_globals):
|
|
|
1265
1317
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1266
1318
|
|
|
1267
1319
|
|
|
1268
|
-
def
|
|
1320
|
+
def doActivateInstance(args, parsed_globals):
|
|
1269
1321
|
g_param = parse_global_arg(parsed_globals)
|
|
1270
1322
|
|
|
1271
1323
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1294,11 +1346,11 @@ def doDescribeProxyNodes(args, parsed_globals):
|
|
|
1294
1346
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1295
1347
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1296
1348
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1297
|
-
model = models.
|
|
1349
|
+
model = models.ActivateInstanceRequest()
|
|
1298
1350
|
model.from_json_string(json.dumps(args))
|
|
1299
1351
|
start_time = time.time()
|
|
1300
1352
|
while True:
|
|
1301
|
-
rsp = client.
|
|
1353
|
+
rsp = client.ActivateInstance(model)
|
|
1302
1354
|
result = rsp.to_json_string()
|
|
1303
1355
|
try:
|
|
1304
1356
|
json_obj = json.loads(result)
|
|
@@ -1317,7 +1369,7 @@ def doDescribeProxyNodes(args, parsed_globals):
|
|
|
1317
1369
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1318
1370
|
|
|
1319
1371
|
|
|
1320
|
-
def
|
|
1372
|
+
def doDescribeProxyNodes(args, parsed_globals):
|
|
1321
1373
|
g_param = parse_global_arg(parsed_globals)
|
|
1322
1374
|
|
|
1323
1375
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1346,11 +1398,11 @@ def doDescribeClusterTransparentEncryptInfo(args, parsed_globals):
|
|
|
1346
1398
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1347
1399
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1348
1400
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1349
|
-
model = models.
|
|
1401
|
+
model = models.DescribeProxyNodesRequest()
|
|
1350
1402
|
model.from_json_string(json.dumps(args))
|
|
1351
1403
|
start_time = time.time()
|
|
1352
1404
|
while True:
|
|
1353
|
-
rsp = client.
|
|
1405
|
+
rsp = client.DescribeProxyNodes(model)
|
|
1354
1406
|
result = rsp.to_json_string()
|
|
1355
1407
|
try:
|
|
1356
1408
|
json_obj = json.loads(result)
|
|
@@ -1369,7 +1421,7 @@ def doDescribeClusterTransparentEncryptInfo(args, parsed_globals):
|
|
|
1369
1421
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1370
1422
|
|
|
1371
1423
|
|
|
1372
|
-
def
|
|
1424
|
+
def doDescribeClusterTransparentEncryptInfo(args, parsed_globals):
|
|
1373
1425
|
g_param = parse_global_arg(parsed_globals)
|
|
1374
1426
|
|
|
1375
1427
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1398,11 +1450,11 @@ def doExportInstanceSlowQueries(args, parsed_globals):
|
|
|
1398
1450
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1399
1451
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1400
1452
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1401
|
-
model = models.
|
|
1453
|
+
model = models.DescribeClusterTransparentEncryptInfoRequest()
|
|
1402
1454
|
model.from_json_string(json.dumps(args))
|
|
1403
1455
|
start_time = time.time()
|
|
1404
1456
|
while True:
|
|
1405
|
-
rsp = client.
|
|
1457
|
+
rsp = client.DescribeClusterTransparentEncryptInfo(model)
|
|
1406
1458
|
result = rsp.to_json_string()
|
|
1407
1459
|
try:
|
|
1408
1460
|
json_obj = json.loads(result)
|
|
@@ -1421,7 +1473,7 @@ def doExportInstanceSlowQueries(args, parsed_globals):
|
|
|
1421
1473
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1422
1474
|
|
|
1423
1475
|
|
|
1424
|
-
def
|
|
1476
|
+
def doExportInstanceSlowQueries(args, parsed_globals):
|
|
1425
1477
|
g_param = parse_global_arg(parsed_globals)
|
|
1426
1478
|
|
|
1427
1479
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1450,11 +1502,11 @@ def doDescribeAccountPrivileges(args, parsed_globals):
|
|
|
1450
1502
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1451
1503
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1452
1504
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1453
|
-
model = models.
|
|
1505
|
+
model = models.ExportInstanceSlowQueriesRequest()
|
|
1454
1506
|
model.from_json_string(json.dumps(args))
|
|
1455
1507
|
start_time = time.time()
|
|
1456
1508
|
while True:
|
|
1457
|
-
rsp = client.
|
|
1509
|
+
rsp = client.ExportInstanceSlowQueries(model)
|
|
1458
1510
|
result = rsp.to_json_string()
|
|
1459
1511
|
try:
|
|
1460
1512
|
json_obj = json.loads(result)
|
|
@@ -1473,7 +1525,7 @@ def doDescribeAccountPrivileges(args, parsed_globals):
|
|
|
1473
1525
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1474
1526
|
|
|
1475
1527
|
|
|
1476
|
-
def
|
|
1528
|
+
def doDeleteCLSDelivery(args, parsed_globals):
|
|
1477
1529
|
g_param = parse_global_arg(parsed_globals)
|
|
1478
1530
|
|
|
1479
1531
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1502,11 +1554,11 @@ def doCloseClusterPasswordComplexity(args, parsed_globals):
|
|
|
1502
1554
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1503
1555
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1504
1556
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1505
|
-
model = models.
|
|
1557
|
+
model = models.DeleteCLSDeliveryRequest()
|
|
1506
1558
|
model.from_json_string(json.dumps(args))
|
|
1507
1559
|
start_time = time.time()
|
|
1508
1560
|
while True:
|
|
1509
|
-
rsp = client.
|
|
1561
|
+
rsp = client.DeleteCLSDelivery(model)
|
|
1510
1562
|
result = rsp.to_json_string()
|
|
1511
1563
|
try:
|
|
1512
1564
|
json_obj = json.loads(result)
|
|
@@ -1525,7 +1577,7 @@ def doCloseClusterPasswordComplexity(args, parsed_globals):
|
|
|
1525
1577
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1526
1578
|
|
|
1527
1579
|
|
|
1528
|
-
def
|
|
1580
|
+
def doDescribeChangedParamsAfterUpgrade(args, parsed_globals):
|
|
1529
1581
|
g_param = parse_global_arg(parsed_globals)
|
|
1530
1582
|
|
|
1531
1583
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1554,11 +1606,11 @@ def doDescribeBinlogSaveDays(args, parsed_globals):
|
|
|
1554
1606
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1555
1607
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1556
1608
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1557
|
-
model = models.
|
|
1609
|
+
model = models.DescribeChangedParamsAfterUpgradeRequest()
|
|
1558
1610
|
model.from_json_string(json.dumps(args))
|
|
1559
1611
|
start_time = time.time()
|
|
1560
1612
|
while True:
|
|
1561
|
-
rsp = client.
|
|
1613
|
+
rsp = client.DescribeChangedParamsAfterUpgrade(model)
|
|
1562
1614
|
result = rsp.to_json_string()
|
|
1563
1615
|
try:
|
|
1564
1616
|
json_obj = json.loads(result)
|
|
@@ -1577,7 +1629,7 @@ def doDescribeBinlogSaveDays(args, parsed_globals):
|
|
|
1577
1629
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1578
1630
|
|
|
1579
1631
|
|
|
1580
|
-
def
|
|
1632
|
+
def doDescribeAccountPrivileges(args, parsed_globals):
|
|
1581
1633
|
g_param = parse_global_arg(parsed_globals)
|
|
1582
1634
|
|
|
1583
1635
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1606,11 +1658,11 @@ def doDescribeClusterInstanceGrps(args, parsed_globals):
|
|
|
1606
1658
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1607
1659
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1608
1660
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1609
|
-
model = models.
|
|
1661
|
+
model = models.DescribeAccountPrivilegesRequest()
|
|
1610
1662
|
model.from_json_string(json.dumps(args))
|
|
1611
1663
|
start_time = time.time()
|
|
1612
1664
|
while True:
|
|
1613
|
-
rsp = client.
|
|
1665
|
+
rsp = client.DescribeAccountPrivileges(model)
|
|
1614
1666
|
result = rsp.to_json_string()
|
|
1615
1667
|
try:
|
|
1616
1668
|
json_obj = json.loads(result)
|
|
@@ -1629,7 +1681,7 @@ def doDescribeClusterInstanceGrps(args, parsed_globals):
|
|
|
1629
1681
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1630
1682
|
|
|
1631
1683
|
|
|
1632
|
-
def
|
|
1684
|
+
def doCloseClusterPasswordComplexity(args, parsed_globals):
|
|
1633
1685
|
g_param = parse_global_arg(parsed_globals)
|
|
1634
1686
|
|
|
1635
1687
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1658,11 +1710,11 @@ def doDescribeIsolatedInstances(args, parsed_globals):
|
|
|
1658
1710
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1659
1711
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1660
1712
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1661
|
-
model = models.
|
|
1713
|
+
model = models.CloseClusterPasswordComplexityRequest()
|
|
1662
1714
|
model.from_json_string(json.dumps(args))
|
|
1663
1715
|
start_time = time.time()
|
|
1664
1716
|
while True:
|
|
1665
|
-
rsp = client.
|
|
1717
|
+
rsp = client.CloseClusterPasswordComplexity(model)
|
|
1666
1718
|
result = rsp.to_json_string()
|
|
1667
1719
|
try:
|
|
1668
1720
|
json_obj = json.loads(result)
|
|
@@ -1681,7 +1733,7 @@ def doDescribeIsolatedInstances(args, parsed_globals):
|
|
|
1681
1733
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1682
1734
|
|
|
1683
1735
|
|
|
1684
|
-
def
|
|
1736
|
+
def doRollBackCluster(args, parsed_globals):
|
|
1685
1737
|
g_param = parse_global_arg(parsed_globals)
|
|
1686
1738
|
|
|
1687
1739
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1710,11 +1762,11 @@ def doModifyClusterName(args, parsed_globals):
|
|
|
1710
1762
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1711
1763
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1712
1764
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1713
|
-
model = models.
|
|
1765
|
+
model = models.RollBackClusterRequest()
|
|
1714
1766
|
model.from_json_string(json.dumps(args))
|
|
1715
1767
|
start_time = time.time()
|
|
1716
1768
|
while True:
|
|
1717
|
-
rsp = client.
|
|
1769
|
+
rsp = client.RollBackCluster(model)
|
|
1718
1770
|
result = rsp.to_json_string()
|
|
1719
1771
|
try:
|
|
1720
1772
|
json_obj = json.loads(result)
|
|
@@ -1733,7 +1785,7 @@ def doModifyClusterName(args, parsed_globals):
|
|
|
1733
1785
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1734
1786
|
|
|
1735
1787
|
|
|
1736
|
-
def
|
|
1788
|
+
def doDescribeBinlogSaveDays(args, parsed_globals):
|
|
1737
1789
|
g_param = parse_global_arg(parsed_globals)
|
|
1738
1790
|
|
|
1739
1791
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1762,11 +1814,11 @@ def doModifyProxyRwSplit(args, parsed_globals):
|
|
|
1762
1814
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1763
1815
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1764
1816
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1765
|
-
model = models.
|
|
1817
|
+
model = models.DescribeBinlogSaveDaysRequest()
|
|
1766
1818
|
model.from_json_string(json.dumps(args))
|
|
1767
1819
|
start_time = time.time()
|
|
1768
1820
|
while True:
|
|
1769
|
-
rsp = client.
|
|
1821
|
+
rsp = client.DescribeBinlogSaveDays(model)
|
|
1770
1822
|
result = rsp.to_json_string()
|
|
1771
1823
|
try:
|
|
1772
1824
|
json_obj = json.loads(result)
|
|
@@ -1785,7 +1837,7 @@ def doModifyProxyRwSplit(args, parsed_globals):
|
|
|
1785
1837
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1786
1838
|
|
|
1787
1839
|
|
|
1788
|
-
def
|
|
1840
|
+
def doDescribeClusterInstanceGrps(args, parsed_globals):
|
|
1789
1841
|
g_param = parse_global_arg(parsed_globals)
|
|
1790
1842
|
|
|
1791
1843
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1814,11 +1866,11 @@ def doModifyVipVport(args, parsed_globals):
|
|
|
1814
1866
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1815
1867
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1816
1868
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1817
|
-
model = models.
|
|
1869
|
+
model = models.DescribeClusterInstanceGrpsRequest()
|
|
1818
1870
|
model.from_json_string(json.dumps(args))
|
|
1819
1871
|
start_time = time.time()
|
|
1820
1872
|
while True:
|
|
1821
|
-
rsp = client.
|
|
1873
|
+
rsp = client.DescribeClusterInstanceGrps(model)
|
|
1822
1874
|
result = rsp.to_json_string()
|
|
1823
1875
|
try:
|
|
1824
1876
|
json_obj = json.loads(result)
|
|
@@ -1837,7 +1889,7 @@ def doModifyVipVport(args, parsed_globals):
|
|
|
1837
1889
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1838
1890
|
|
|
1839
1891
|
|
|
1840
|
-
def
|
|
1892
|
+
def doDescribeIsolatedInstances(args, parsed_globals):
|
|
1841
1893
|
g_param = parse_global_arg(parsed_globals)
|
|
1842
1894
|
|
|
1843
1895
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1866,11 +1918,11 @@ def doDeleteAuditRuleTemplates(args, parsed_globals):
|
|
|
1866
1918
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1867
1919
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1868
1920
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1869
|
-
model = models.
|
|
1921
|
+
model = models.DescribeIsolatedInstancesRequest()
|
|
1870
1922
|
model.from_json_string(json.dumps(args))
|
|
1871
1923
|
start_time = time.time()
|
|
1872
1924
|
while True:
|
|
1873
|
-
rsp = client.
|
|
1925
|
+
rsp = client.DescribeIsolatedInstances(model)
|
|
1874
1926
|
result = rsp.to_json_string()
|
|
1875
1927
|
try:
|
|
1876
1928
|
json_obj = json.loads(result)
|
|
@@ -1889,7 +1941,7 @@ def doDeleteAuditRuleTemplates(args, parsed_globals):
|
|
|
1889
1941
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1890
1942
|
|
|
1891
1943
|
|
|
1892
|
-
def
|
|
1944
|
+
def doModifyClusterName(args, parsed_globals):
|
|
1893
1945
|
g_param = parse_global_arg(parsed_globals)
|
|
1894
1946
|
|
|
1895
1947
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1918,11 +1970,11 @@ def doModifyProxyDesc(args, parsed_globals):
|
|
|
1918
1970
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1919
1971
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1920
1972
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1921
|
-
model = models.
|
|
1973
|
+
model = models.ModifyClusterNameRequest()
|
|
1922
1974
|
model.from_json_string(json.dumps(args))
|
|
1923
1975
|
start_time = time.time()
|
|
1924
1976
|
while True:
|
|
1925
|
-
rsp = client.
|
|
1977
|
+
rsp = client.ModifyClusterName(model)
|
|
1926
1978
|
result = rsp.to_json_string()
|
|
1927
1979
|
try:
|
|
1928
1980
|
json_obj = json.loads(result)
|
|
@@ -1941,7 +1993,7 @@ def doModifyProxyDesc(args, parsed_globals):
|
|
|
1941
1993
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1942
1994
|
|
|
1943
1995
|
|
|
1944
|
-
def
|
|
1996
|
+
def doModifyProxyRwSplit(args, parsed_globals):
|
|
1945
1997
|
g_param = parse_global_arg(parsed_globals)
|
|
1946
1998
|
|
|
1947
1999
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1970,11 +2022,11 @@ def doCreateParamTemplate(args, parsed_globals):
|
|
|
1970
2022
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1971
2023
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1972
2024
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1973
|
-
model = models.
|
|
2025
|
+
model = models.ModifyProxyRwSplitRequest()
|
|
1974
2026
|
model.from_json_string(json.dumps(args))
|
|
1975
2027
|
start_time = time.time()
|
|
1976
2028
|
while True:
|
|
1977
|
-
rsp = client.
|
|
2029
|
+
rsp = client.ModifyProxyRwSplit(model)
|
|
1978
2030
|
result = rsp.to_json_string()
|
|
1979
2031
|
try:
|
|
1980
2032
|
json_obj = json.loads(result)
|
|
@@ -1993,7 +2045,7 @@ def doCreateParamTemplate(args, parsed_globals):
|
|
|
1993
2045
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1994
2046
|
|
|
1995
2047
|
|
|
1996
|
-
def
|
|
2048
|
+
def doModifyVipVport(args, parsed_globals):
|
|
1997
2049
|
g_param = parse_global_arg(parsed_globals)
|
|
1998
2050
|
|
|
1999
2051
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -2022,11 +2074,11 @@ def doModifyClusterSlaveZone(args, parsed_globals):
|
|
|
2022
2074
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2023
2075
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
2024
2076
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2025
|
-
model = models.
|
|
2077
|
+
model = models.ModifyVipVportRequest()
|
|
2026
2078
|
model.from_json_string(json.dumps(args))
|
|
2027
2079
|
start_time = time.time()
|
|
2028
2080
|
while True:
|
|
2029
|
-
rsp = client.
|
|
2081
|
+
rsp = client.ModifyVipVport(model)
|
|
2030
2082
|
result = rsp.to_json_string()
|
|
2031
2083
|
try:
|
|
2032
2084
|
json_obj = json.loads(result)
|
|
@@ -2045,7 +2097,7 @@ def doModifyClusterSlaveZone(args, parsed_globals):
|
|
|
2045
2097
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2046
2098
|
|
|
2047
2099
|
|
|
2048
|
-
def
|
|
2100
|
+
def doDeleteAuditRuleTemplates(args, parsed_globals):
|
|
2049
2101
|
g_param = parse_global_arg(parsed_globals)
|
|
2050
2102
|
|
|
2051
2103
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -2074,11 +2126,11 @@ def doModifyResourcePackageClusters(args, parsed_globals):
|
|
|
2074
2126
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2075
2127
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
2076
2128
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2077
|
-
model = models.
|
|
2129
|
+
model = models.DeleteAuditRuleTemplatesRequest()
|
|
2078
2130
|
model.from_json_string(json.dumps(args))
|
|
2079
2131
|
start_time = time.time()
|
|
2080
2132
|
while True:
|
|
2081
|
-
rsp = client.
|
|
2133
|
+
rsp = client.DeleteAuditRuleTemplates(model)
|
|
2082
2134
|
result = rsp.to_json_string()
|
|
2083
2135
|
try:
|
|
2084
2136
|
json_obj = json.loads(result)
|
|
@@ -2097,7 +2149,7 @@ def doModifyResourcePackageClusters(args, parsed_globals):
|
|
|
2097
2149
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2098
2150
|
|
|
2099
2151
|
|
|
2100
|
-
def
|
|
2152
|
+
def doModifyProxyDesc(args, parsed_globals):
|
|
2101
2153
|
g_param = parse_global_arg(parsed_globals)
|
|
2102
2154
|
|
|
2103
2155
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -2126,11 +2178,11 @@ def doModifyClusterPasswordComplexity(args, parsed_globals):
|
|
|
2126
2178
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2127
2179
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
2128
2180
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2129
|
-
model = models.
|
|
2181
|
+
model = models.ModifyProxyDescRequest()
|
|
2130
2182
|
model.from_json_string(json.dumps(args))
|
|
2131
2183
|
start_time = time.time()
|
|
2132
2184
|
while True:
|
|
2133
|
-
rsp = client.
|
|
2185
|
+
rsp = client.ModifyProxyDesc(model)
|
|
2134
2186
|
result = rsp.to_json_string()
|
|
2135
2187
|
try:
|
|
2136
2188
|
json_obj = json.loads(result)
|
|
@@ -2149,7 +2201,7 @@ def doModifyClusterPasswordComplexity(args, parsed_globals):
|
|
|
2149
2201
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2150
2202
|
|
|
2151
2203
|
|
|
2152
|
-
def
|
|
2204
|
+
def doCreateParamTemplate(args, parsed_globals):
|
|
2153
2205
|
g_param = parse_global_arg(parsed_globals)
|
|
2154
2206
|
|
|
2155
2207
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -2178,11 +2230,11 @@ def doCreateBackup(args, parsed_globals):
|
|
|
2178
2230
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2179
2231
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
2180
2232
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2181
|
-
model = models.
|
|
2233
|
+
model = models.CreateParamTemplateRequest()
|
|
2182
2234
|
model.from_json_string(json.dumps(args))
|
|
2183
2235
|
start_time = time.time()
|
|
2184
2236
|
while True:
|
|
2185
|
-
rsp = client.
|
|
2237
|
+
rsp = client.CreateParamTemplate(model)
|
|
2186
2238
|
result = rsp.to_json_string()
|
|
2187
2239
|
try:
|
|
2188
2240
|
json_obj = json.loads(result)
|
|
@@ -2201,7 +2253,7 @@ def doCreateBackup(args, parsed_globals):
|
|
|
2201
2253
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2202
2254
|
|
|
2203
2255
|
|
|
2204
|
-
def
|
|
2256
|
+
def doModifyClusterSlaveZone(args, parsed_globals):
|
|
2205
2257
|
g_param = parse_global_arg(parsed_globals)
|
|
2206
2258
|
|
|
2207
2259
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -2230,11 +2282,11 @@ def doOfflineInstance(args, parsed_globals):
|
|
|
2230
2282
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2231
2283
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
2232
2284
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2233
|
-
model = models.
|
|
2285
|
+
model = models.ModifyClusterSlaveZoneRequest()
|
|
2234
2286
|
model.from_json_string(json.dumps(args))
|
|
2235
2287
|
start_time = time.time()
|
|
2236
2288
|
while True:
|
|
2237
|
-
rsp = client.
|
|
2289
|
+
rsp = client.ModifyClusterSlaveZone(model)
|
|
2238
2290
|
result = rsp.to_json_string()
|
|
2239
2291
|
try:
|
|
2240
2292
|
json_obj = json.loads(result)
|
|
@@ -2253,7 +2305,7 @@ def doOfflineInstance(args, parsed_globals):
|
|
|
2253
2305
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2254
2306
|
|
|
2255
2307
|
|
|
2256
|
-
def
|
|
2308
|
+
def doModifyResourcePackageClusters(args, parsed_globals):
|
|
2257
2309
|
g_param = parse_global_arg(parsed_globals)
|
|
2258
2310
|
|
|
2259
2311
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -2282,11 +2334,11 @@ def doIsolateCluster(args, parsed_globals):
|
|
|
2282
2334
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2283
2335
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
2284
2336
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2285
|
-
model = models.
|
|
2337
|
+
model = models.ModifyResourcePackageClustersRequest()
|
|
2286
2338
|
model.from_json_string(json.dumps(args))
|
|
2287
2339
|
start_time = time.time()
|
|
2288
2340
|
while True:
|
|
2289
|
-
rsp = client.
|
|
2341
|
+
rsp = client.ModifyResourcePackageClusters(model)
|
|
2290
2342
|
result = rsp.to_json_string()
|
|
2291
2343
|
try:
|
|
2292
2344
|
json_obj = json.loads(result)
|
|
@@ -2305,7 +2357,7 @@ def doIsolateCluster(args, parsed_globals):
|
|
|
2305
2357
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2306
2358
|
|
|
2307
2359
|
|
|
2308
|
-
def
|
|
2360
|
+
def doModifyClusterPasswordComplexity(args, parsed_globals):
|
|
2309
2361
|
g_param = parse_global_arg(parsed_globals)
|
|
2310
2362
|
|
|
2311
2363
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -2334,11 +2386,11 @@ def doDescribeInstancesWithinSameCluster(args, parsed_globals):
|
|
|
2334
2386
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2335
2387
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
2336
2388
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2337
|
-
model = models.
|
|
2389
|
+
model = models.ModifyClusterPasswordComplexityRequest()
|
|
2338
2390
|
model.from_json_string(json.dumps(args))
|
|
2339
2391
|
start_time = time.time()
|
|
2340
2392
|
while True:
|
|
2341
|
-
rsp = client.
|
|
2393
|
+
rsp = client.ModifyClusterPasswordComplexity(model)
|
|
2342
2394
|
result = rsp.to_json_string()
|
|
2343
2395
|
try:
|
|
2344
2396
|
json_obj = json.loads(result)
|
|
@@ -2357,7 +2409,7 @@ def doDescribeInstancesWithinSameCluster(args, parsed_globals):
|
|
|
2357
2409
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2358
2410
|
|
|
2359
2411
|
|
|
2360
|
-
def
|
|
2412
|
+
def doCreateBackup(args, parsed_globals):
|
|
2361
2413
|
g_param = parse_global_arg(parsed_globals)
|
|
2362
2414
|
|
|
2363
2415
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -2386,11 +2438,11 @@ def doRestartInstance(args, parsed_globals):
|
|
|
2386
2438
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2387
2439
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
2388
2440
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2389
|
-
model = models.
|
|
2441
|
+
model = models.CreateBackupRequest()
|
|
2390
2442
|
model.from_json_string(json.dumps(args))
|
|
2391
2443
|
start_time = time.time()
|
|
2392
2444
|
while True:
|
|
2393
|
-
rsp = client.
|
|
2445
|
+
rsp = client.CreateBackup(model)
|
|
2394
2446
|
result = rsp.to_json_string()
|
|
2395
2447
|
try:
|
|
2396
2448
|
json_obj = json.loads(result)
|
|
@@ -2409,7 +2461,7 @@ def doRestartInstance(args, parsed_globals):
|
|
|
2409
2461
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2410
2462
|
|
|
2411
2463
|
|
|
2412
|
-
def
|
|
2464
|
+
def doOfflineInstance(args, parsed_globals):
|
|
2413
2465
|
g_param = parse_global_arg(parsed_globals)
|
|
2414
2466
|
|
|
2415
2467
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -2438,11 +2490,11 @@ def doUpgradeProxy(args, parsed_globals):
|
|
|
2438
2490
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2439
2491
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
2440
2492
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2441
|
-
model = models.
|
|
2493
|
+
model = models.OfflineInstanceRequest()
|
|
2442
2494
|
model.from_json_string(json.dumps(args))
|
|
2443
2495
|
start_time = time.time()
|
|
2444
2496
|
while True:
|
|
2445
|
-
rsp = client.
|
|
2497
|
+
rsp = client.OfflineInstance(model)
|
|
2446
2498
|
result = rsp.to_json_string()
|
|
2447
2499
|
try:
|
|
2448
2500
|
json_obj = json.loads(result)
|
|
@@ -2461,7 +2513,7 @@ def doUpgradeProxy(args, parsed_globals):
|
|
|
2461
2513
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2462
2514
|
|
|
2463
2515
|
|
|
2464
|
-
def
|
|
2516
|
+
def doIsolateCluster(args, parsed_globals):
|
|
2465
2517
|
g_param = parse_global_arg(parsed_globals)
|
|
2466
2518
|
|
|
2467
2519
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -2490,11 +2542,11 @@ def doInquirePriceMultiSpec(args, parsed_globals):
|
|
|
2490
2542
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2491
2543
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
2492
2544
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2493
|
-
model = models.
|
|
2545
|
+
model = models.IsolateClusterRequest()
|
|
2494
2546
|
model.from_json_string(json.dumps(args))
|
|
2495
2547
|
start_time = time.time()
|
|
2496
2548
|
while True:
|
|
2497
|
-
rsp = client.
|
|
2549
|
+
rsp = client.IsolateCluster(model)
|
|
2498
2550
|
result = rsp.to_json_string()
|
|
2499
2551
|
try:
|
|
2500
2552
|
json_obj = json.loads(result)
|
|
@@ -2513,7 +2565,7 @@ def doInquirePriceMultiSpec(args, parsed_globals):
|
|
|
2513
2565
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2514
2566
|
|
|
2515
2567
|
|
|
2516
|
-
def
|
|
2568
|
+
def doDescribeInstancesWithinSameCluster(args, parsed_globals):
|
|
2517
2569
|
g_param = parse_global_arg(parsed_globals)
|
|
2518
2570
|
|
|
2519
2571
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -2542,11 +2594,11 @@ def doDescribeClusters(args, parsed_globals):
|
|
|
2542
2594
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2543
2595
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
2544
2596
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2545
|
-
model = models.
|
|
2597
|
+
model = models.DescribeInstancesWithinSameClusterRequest()
|
|
2546
2598
|
model.from_json_string(json.dumps(args))
|
|
2547
2599
|
start_time = time.time()
|
|
2548
2600
|
while True:
|
|
2549
|
-
rsp = client.
|
|
2601
|
+
rsp = client.DescribeInstancesWithinSameCluster(model)
|
|
2550
2602
|
result = rsp.to_json_string()
|
|
2551
2603
|
try:
|
|
2552
2604
|
json_obj = json.loads(result)
|
|
@@ -2565,7 +2617,7 @@ def doDescribeClusters(args, parsed_globals):
|
|
|
2565
2617
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2566
2618
|
|
|
2567
2619
|
|
|
2568
|
-
def
|
|
2620
|
+
def doRestartInstance(args, parsed_globals):
|
|
2569
2621
|
g_param = parse_global_arg(parsed_globals)
|
|
2570
2622
|
|
|
2571
2623
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -2594,11 +2646,11 @@ def doCloseWan(args, parsed_globals):
|
|
|
2594
2646
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2595
2647
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
2596
2648
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2597
|
-
model = models.
|
|
2649
|
+
model = models.RestartInstanceRequest()
|
|
2598
2650
|
model.from_json_string(json.dumps(args))
|
|
2599
2651
|
start_time = time.time()
|
|
2600
2652
|
while True:
|
|
2601
|
-
rsp = client.
|
|
2653
|
+
rsp = client.RestartInstance(model)
|
|
2602
2654
|
result = rsp.to_json_string()
|
|
2603
2655
|
try:
|
|
2604
2656
|
json_obj = json.loads(result)
|
|
@@ -2617,7 +2669,7 @@ def doCloseWan(args, parsed_globals):
|
|
|
2617
2669
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2618
2670
|
|
|
2619
2671
|
|
|
2620
|
-
def
|
|
2672
|
+
def doUpgradeProxy(args, parsed_globals):
|
|
2621
2673
|
g_param = parse_global_arg(parsed_globals)
|
|
2622
2674
|
|
|
2623
2675
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -2646,11 +2698,11 @@ def doDescribeProjectSecurityGroups(args, parsed_globals):
|
|
|
2646
2698
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2647
2699
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
2648
2700
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2649
|
-
model = models.
|
|
2701
|
+
model = models.UpgradeProxyRequest()
|
|
2650
2702
|
model.from_json_string(json.dumps(args))
|
|
2651
2703
|
start_time = time.time()
|
|
2652
2704
|
while True:
|
|
2653
|
-
rsp = client.
|
|
2705
|
+
rsp = client.UpgradeProxy(model)
|
|
2654
2706
|
result = rsp.to_json_string()
|
|
2655
2707
|
try:
|
|
2656
2708
|
json_obj = json.loads(result)
|
|
@@ -2669,7 +2721,7 @@ def doDescribeProjectSecurityGroups(args, parsed_globals):
|
|
|
2669
2721
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2670
2722
|
|
|
2671
2723
|
|
|
2672
|
-
def
|
|
2724
|
+
def doInquirePriceMultiSpec(args, parsed_globals):
|
|
2673
2725
|
g_param = parse_global_arg(parsed_globals)
|
|
2674
2726
|
|
|
2675
2727
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -2698,11 +2750,11 @@ def doModifyClusterDatabase(args, parsed_globals):
|
|
|
2698
2750
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2699
2751
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
2700
2752
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2701
|
-
model = models.
|
|
2753
|
+
model = models.InquirePriceMultiSpecRequest()
|
|
2702
2754
|
model.from_json_string(json.dumps(args))
|
|
2703
2755
|
start_time = time.time()
|
|
2704
2756
|
while True:
|
|
2705
|
-
rsp = client.
|
|
2757
|
+
rsp = client.InquirePriceMultiSpec(model)
|
|
2706
2758
|
result = rsp.to_json_string()
|
|
2707
2759
|
try:
|
|
2708
2760
|
json_obj = json.loads(result)
|
|
@@ -2721,7 +2773,7 @@ def doModifyClusterDatabase(args, parsed_globals):
|
|
|
2721
2773
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2722
2774
|
|
|
2723
2775
|
|
|
2724
|
-
def
|
|
2776
|
+
def doDescribeClusters(args, parsed_globals):
|
|
2725
2777
|
g_param = parse_global_arg(parsed_globals)
|
|
2726
2778
|
|
|
2727
2779
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -2750,11 +2802,11 @@ def doDescribeClusterDatabaseTables(args, parsed_globals):
|
|
|
2750
2802
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2751
2803
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
2752
2804
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2753
|
-
model = models.
|
|
2805
|
+
model = models.DescribeClustersRequest()
|
|
2754
2806
|
model.from_json_string(json.dumps(args))
|
|
2755
2807
|
start_time = time.time()
|
|
2756
2808
|
while True:
|
|
2757
|
-
rsp = client.
|
|
2809
|
+
rsp = client.DescribeClusters(model)
|
|
2758
2810
|
result = rsp.to_json_string()
|
|
2759
2811
|
try:
|
|
2760
2812
|
json_obj = json.loads(result)
|
|
@@ -2773,7 +2825,7 @@ def doDescribeClusterDatabaseTables(args, parsed_globals):
|
|
|
2773
2825
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2774
2826
|
|
|
2775
2827
|
|
|
2776
|
-
def
|
|
2828
|
+
def doCloseWan(args, parsed_globals):
|
|
2777
2829
|
g_param = parse_global_arg(parsed_globals)
|
|
2778
2830
|
|
|
2779
2831
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -2802,7 +2854,215 @@ def doDescribeBackupDownloadUserRestriction(args, parsed_globals):
|
|
|
2802
2854
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2803
2855
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
2804
2856
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2805
|
-
model = models.
|
|
2857
|
+
model = models.CloseWanRequest()
|
|
2858
|
+
model.from_json_string(json.dumps(args))
|
|
2859
|
+
start_time = time.time()
|
|
2860
|
+
while True:
|
|
2861
|
+
rsp = client.CloseWan(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
|
+
|
|
2880
|
+
def doDescribeProjectSecurityGroups(args, parsed_globals):
|
|
2881
|
+
g_param = parse_global_arg(parsed_globals)
|
|
2882
|
+
|
|
2883
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
2884
|
+
cred = credential.CVMRoleCredential()
|
|
2885
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
2886
|
+
cred = credential.STSAssumeRoleCredential(
|
|
2887
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
2888
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
2889
|
+
)
|
|
2890
|
+
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):
|
|
2891
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
2892
|
+
else:
|
|
2893
|
+
cred = credential.Credential(
|
|
2894
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
2895
|
+
)
|
|
2896
|
+
http_profile = HttpProfile(
|
|
2897
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
2898
|
+
reqMethod="POST",
|
|
2899
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
2900
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
2901
|
+
)
|
|
2902
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
|
2903
|
+
if g_param[OptionsDefine.Language]:
|
|
2904
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
2905
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
2906
|
+
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2907
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
2908
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2909
|
+
model = models.DescribeProjectSecurityGroupsRequest()
|
|
2910
|
+
model.from_json_string(json.dumps(args))
|
|
2911
|
+
start_time = time.time()
|
|
2912
|
+
while True:
|
|
2913
|
+
rsp = client.DescribeProjectSecurityGroups(model)
|
|
2914
|
+
result = rsp.to_json_string()
|
|
2915
|
+
try:
|
|
2916
|
+
json_obj = json.loads(result)
|
|
2917
|
+
except TypeError as e:
|
|
2918
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
2919
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
2920
|
+
break
|
|
2921
|
+
cur_time = time.time()
|
|
2922
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
2923
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
2924
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
2925
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
2926
|
+
else:
|
|
2927
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
2928
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
2929
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2930
|
+
|
|
2931
|
+
|
|
2932
|
+
def doModifyClusterDatabase(args, parsed_globals):
|
|
2933
|
+
g_param = parse_global_arg(parsed_globals)
|
|
2934
|
+
|
|
2935
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
2936
|
+
cred = credential.CVMRoleCredential()
|
|
2937
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
2938
|
+
cred = credential.STSAssumeRoleCredential(
|
|
2939
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
2940
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
2941
|
+
)
|
|
2942
|
+
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):
|
|
2943
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
2944
|
+
else:
|
|
2945
|
+
cred = credential.Credential(
|
|
2946
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
2947
|
+
)
|
|
2948
|
+
http_profile = HttpProfile(
|
|
2949
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
2950
|
+
reqMethod="POST",
|
|
2951
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
2952
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
2953
|
+
)
|
|
2954
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
|
2955
|
+
if g_param[OptionsDefine.Language]:
|
|
2956
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
2957
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
2958
|
+
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2959
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
2960
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2961
|
+
model = models.ModifyClusterDatabaseRequest()
|
|
2962
|
+
model.from_json_string(json.dumps(args))
|
|
2963
|
+
start_time = time.time()
|
|
2964
|
+
while True:
|
|
2965
|
+
rsp = client.ModifyClusterDatabase(model)
|
|
2966
|
+
result = rsp.to_json_string()
|
|
2967
|
+
try:
|
|
2968
|
+
json_obj = json.loads(result)
|
|
2969
|
+
except TypeError as e:
|
|
2970
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
2971
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
2972
|
+
break
|
|
2973
|
+
cur_time = time.time()
|
|
2974
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
2975
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
2976
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
2977
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
2978
|
+
else:
|
|
2979
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
2980
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
2981
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2982
|
+
|
|
2983
|
+
|
|
2984
|
+
def doDescribeClusterDatabaseTables(args, parsed_globals):
|
|
2985
|
+
g_param = parse_global_arg(parsed_globals)
|
|
2986
|
+
|
|
2987
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
2988
|
+
cred = credential.CVMRoleCredential()
|
|
2989
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
2990
|
+
cred = credential.STSAssumeRoleCredential(
|
|
2991
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
2992
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
2993
|
+
)
|
|
2994
|
+
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):
|
|
2995
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
2996
|
+
else:
|
|
2997
|
+
cred = credential.Credential(
|
|
2998
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
2999
|
+
)
|
|
3000
|
+
http_profile = HttpProfile(
|
|
3001
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
3002
|
+
reqMethod="POST",
|
|
3003
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
3004
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
3005
|
+
)
|
|
3006
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
|
3007
|
+
if g_param[OptionsDefine.Language]:
|
|
3008
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
3009
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
3010
|
+
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3011
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
3012
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3013
|
+
model = models.DescribeClusterDatabaseTablesRequest()
|
|
3014
|
+
model.from_json_string(json.dumps(args))
|
|
3015
|
+
start_time = time.time()
|
|
3016
|
+
while True:
|
|
3017
|
+
rsp = client.DescribeClusterDatabaseTables(model)
|
|
3018
|
+
result = rsp.to_json_string()
|
|
3019
|
+
try:
|
|
3020
|
+
json_obj = json.loads(result)
|
|
3021
|
+
except TypeError as e:
|
|
3022
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
3023
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
3024
|
+
break
|
|
3025
|
+
cur_time = time.time()
|
|
3026
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
3027
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
3028
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
3029
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
3030
|
+
else:
|
|
3031
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
3032
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
3033
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3034
|
+
|
|
3035
|
+
|
|
3036
|
+
def doDescribeBackupDownloadUserRestriction(args, parsed_globals):
|
|
3037
|
+
g_param = parse_global_arg(parsed_globals)
|
|
3038
|
+
|
|
3039
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
3040
|
+
cred = credential.CVMRoleCredential()
|
|
3041
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
3042
|
+
cred = credential.STSAssumeRoleCredential(
|
|
3043
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3044
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3045
|
+
)
|
|
3046
|
+
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):
|
|
3047
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3048
|
+
else:
|
|
3049
|
+
cred = credential.Credential(
|
|
3050
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
3051
|
+
)
|
|
3052
|
+
http_profile = HttpProfile(
|
|
3053
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
3054
|
+
reqMethod="POST",
|
|
3055
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
3056
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
3057
|
+
)
|
|
3058
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
|
3059
|
+
if g_param[OptionsDefine.Language]:
|
|
3060
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
3061
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
3062
|
+
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3063
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
3064
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3065
|
+
model = models.DescribeBackupDownloadUserRestrictionRequest()
|
|
2806
3066
|
model.from_json_string(json.dumps(args))
|
|
2807
3067
|
start_time = time.time()
|
|
2808
3068
|
while True:
|
|
@@ -3033,6 +3293,110 @@ def doDescribeInstanceSlowQueries(args, parsed_globals):
|
|
|
3033
3293
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3034
3294
|
|
|
3035
3295
|
|
|
3296
|
+
def doDescribeParamTemplateDetail(args, parsed_globals):
|
|
3297
|
+
g_param = parse_global_arg(parsed_globals)
|
|
3298
|
+
|
|
3299
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
3300
|
+
cred = credential.CVMRoleCredential()
|
|
3301
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
3302
|
+
cred = credential.STSAssumeRoleCredential(
|
|
3303
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3304
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3305
|
+
)
|
|
3306
|
+
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):
|
|
3307
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3308
|
+
else:
|
|
3309
|
+
cred = credential.Credential(
|
|
3310
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
3311
|
+
)
|
|
3312
|
+
http_profile = HttpProfile(
|
|
3313
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
3314
|
+
reqMethod="POST",
|
|
3315
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
3316
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
3317
|
+
)
|
|
3318
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
|
3319
|
+
if g_param[OptionsDefine.Language]:
|
|
3320
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
3321
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
3322
|
+
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3323
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
3324
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3325
|
+
model = models.DescribeParamTemplateDetailRequest()
|
|
3326
|
+
model.from_json_string(json.dumps(args))
|
|
3327
|
+
start_time = time.time()
|
|
3328
|
+
while True:
|
|
3329
|
+
rsp = client.DescribeParamTemplateDetail(model)
|
|
3330
|
+
result = rsp.to_json_string()
|
|
3331
|
+
try:
|
|
3332
|
+
json_obj = json.loads(result)
|
|
3333
|
+
except TypeError as e:
|
|
3334
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
3335
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
3336
|
+
break
|
|
3337
|
+
cur_time = time.time()
|
|
3338
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
3339
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
3340
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
3341
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
3342
|
+
else:
|
|
3343
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
3344
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
3345
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3346
|
+
|
|
3347
|
+
|
|
3348
|
+
def doDescribeClusterDatabases(args, parsed_globals):
|
|
3349
|
+
g_param = parse_global_arg(parsed_globals)
|
|
3350
|
+
|
|
3351
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
3352
|
+
cred = credential.CVMRoleCredential()
|
|
3353
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
3354
|
+
cred = credential.STSAssumeRoleCredential(
|
|
3355
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3356
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3357
|
+
)
|
|
3358
|
+
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):
|
|
3359
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3360
|
+
else:
|
|
3361
|
+
cred = credential.Credential(
|
|
3362
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
3363
|
+
)
|
|
3364
|
+
http_profile = HttpProfile(
|
|
3365
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
3366
|
+
reqMethod="POST",
|
|
3367
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
3368
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
3369
|
+
)
|
|
3370
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
|
3371
|
+
if g_param[OptionsDefine.Language]:
|
|
3372
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
3373
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
3374
|
+
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3375
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
3376
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3377
|
+
model = models.DescribeClusterDatabasesRequest()
|
|
3378
|
+
model.from_json_string(json.dumps(args))
|
|
3379
|
+
start_time = time.time()
|
|
3380
|
+
while True:
|
|
3381
|
+
rsp = client.DescribeClusterDatabases(model)
|
|
3382
|
+
result = rsp.to_json_string()
|
|
3383
|
+
try:
|
|
3384
|
+
json_obj = json.loads(result)
|
|
3385
|
+
except TypeError as e:
|
|
3386
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
3387
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
3388
|
+
break
|
|
3389
|
+
cur_time = time.time()
|
|
3390
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
3391
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
3392
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
3393
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
3394
|
+
else:
|
|
3395
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
3396
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
3397
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3398
|
+
|
|
3399
|
+
|
|
3036
3400
|
def doModifyClusterParam(args, parsed_globals):
|
|
3037
3401
|
g_param = parse_global_arg(parsed_globals)
|
|
3038
3402
|
|
|
@@ -3374,11 +3738,167 @@ def doAddInstances(args, parsed_globals):
|
|
|
3374
3738
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3375
3739
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
3376
3740
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3377
|
-
model = models.AddInstancesRequest()
|
|
3741
|
+
model = models.AddInstancesRequest()
|
|
3742
|
+
model.from_json_string(json.dumps(args))
|
|
3743
|
+
start_time = time.time()
|
|
3744
|
+
while True:
|
|
3745
|
+
rsp = client.AddInstances(model)
|
|
3746
|
+
result = rsp.to_json_string()
|
|
3747
|
+
try:
|
|
3748
|
+
json_obj = json.loads(result)
|
|
3749
|
+
except TypeError as e:
|
|
3750
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
3751
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
3752
|
+
break
|
|
3753
|
+
cur_time = time.time()
|
|
3754
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
3755
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
3756
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
3757
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
3758
|
+
else:
|
|
3759
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
3760
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
3761
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3762
|
+
|
|
3763
|
+
|
|
3764
|
+
def doDescribeProxySpecs(args, parsed_globals):
|
|
3765
|
+
g_param = parse_global_arg(parsed_globals)
|
|
3766
|
+
|
|
3767
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
3768
|
+
cred = credential.CVMRoleCredential()
|
|
3769
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
3770
|
+
cred = credential.STSAssumeRoleCredential(
|
|
3771
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3772
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3773
|
+
)
|
|
3774
|
+
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):
|
|
3775
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3776
|
+
else:
|
|
3777
|
+
cred = credential.Credential(
|
|
3778
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
3779
|
+
)
|
|
3780
|
+
http_profile = HttpProfile(
|
|
3781
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
3782
|
+
reqMethod="POST",
|
|
3783
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
3784
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
3785
|
+
)
|
|
3786
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
|
3787
|
+
if g_param[OptionsDefine.Language]:
|
|
3788
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
3789
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
3790
|
+
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3791
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
3792
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3793
|
+
model = models.DescribeProxySpecsRequest()
|
|
3794
|
+
model.from_json_string(json.dumps(args))
|
|
3795
|
+
start_time = time.time()
|
|
3796
|
+
while True:
|
|
3797
|
+
rsp = client.DescribeProxySpecs(model)
|
|
3798
|
+
result = rsp.to_json_string()
|
|
3799
|
+
try:
|
|
3800
|
+
json_obj = json.loads(result)
|
|
3801
|
+
except TypeError as e:
|
|
3802
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
3803
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
3804
|
+
break
|
|
3805
|
+
cur_time = time.time()
|
|
3806
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
3807
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
3808
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
3809
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
3810
|
+
else:
|
|
3811
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
3812
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
3813
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3814
|
+
|
|
3815
|
+
|
|
3816
|
+
def doModifyInstanceUpgradeLimitDays(args, parsed_globals):
|
|
3817
|
+
g_param = parse_global_arg(parsed_globals)
|
|
3818
|
+
|
|
3819
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
3820
|
+
cred = credential.CVMRoleCredential()
|
|
3821
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
3822
|
+
cred = credential.STSAssumeRoleCredential(
|
|
3823
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3824
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3825
|
+
)
|
|
3826
|
+
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):
|
|
3827
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3828
|
+
else:
|
|
3829
|
+
cred = credential.Credential(
|
|
3830
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
3831
|
+
)
|
|
3832
|
+
http_profile = HttpProfile(
|
|
3833
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
3834
|
+
reqMethod="POST",
|
|
3835
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
3836
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
3837
|
+
)
|
|
3838
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
|
3839
|
+
if g_param[OptionsDefine.Language]:
|
|
3840
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
3841
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
3842
|
+
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3843
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
3844
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3845
|
+
model = models.ModifyInstanceUpgradeLimitDaysRequest()
|
|
3846
|
+
model.from_json_string(json.dumps(args))
|
|
3847
|
+
start_time = time.time()
|
|
3848
|
+
while True:
|
|
3849
|
+
rsp = client.ModifyInstanceUpgradeLimitDays(model)
|
|
3850
|
+
result = rsp.to_json_string()
|
|
3851
|
+
try:
|
|
3852
|
+
json_obj = json.loads(result)
|
|
3853
|
+
except TypeError as e:
|
|
3854
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
3855
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
3856
|
+
break
|
|
3857
|
+
cur_time = time.time()
|
|
3858
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
3859
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
3860
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
3861
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
3862
|
+
else:
|
|
3863
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
3864
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
3865
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3866
|
+
|
|
3867
|
+
|
|
3868
|
+
def doDeleteAccounts(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.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3895
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
3896
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3897
|
+
model = models.DeleteAccountsRequest()
|
|
3378
3898
|
model.from_json_string(json.dumps(args))
|
|
3379
3899
|
start_time = time.time()
|
|
3380
3900
|
while True:
|
|
3381
|
-
rsp = client.
|
|
3901
|
+
rsp = client.DeleteAccounts(model)
|
|
3382
3902
|
result = rsp.to_json_string()
|
|
3383
3903
|
try:
|
|
3384
3904
|
json_obj = json.loads(result)
|
|
@@ -3397,7 +3917,7 @@ def doAddInstances(args, parsed_globals):
|
|
|
3397
3917
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3398
3918
|
|
|
3399
3919
|
|
|
3400
|
-
def
|
|
3920
|
+
def doOpenClusterReadOnlyInstanceGroupAccess(args, parsed_globals):
|
|
3401
3921
|
g_param = parse_global_arg(parsed_globals)
|
|
3402
3922
|
|
|
3403
3923
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -3426,11 +3946,11 @@ def doDescribeProxySpecs(args, parsed_globals):
|
|
|
3426
3946
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3427
3947
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
3428
3948
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3429
|
-
model = models.
|
|
3949
|
+
model = models.OpenClusterReadOnlyInstanceGroupAccessRequest()
|
|
3430
3950
|
model.from_json_string(json.dumps(args))
|
|
3431
3951
|
start_time = time.time()
|
|
3432
3952
|
while True:
|
|
3433
|
-
rsp = client.
|
|
3953
|
+
rsp = client.OpenClusterReadOnlyInstanceGroupAccess(model)
|
|
3434
3954
|
result = rsp.to_json_string()
|
|
3435
3955
|
try:
|
|
3436
3956
|
json_obj = json.loads(result)
|
|
@@ -3449,7 +3969,7 @@ def doDescribeProxySpecs(args, parsed_globals):
|
|
|
3449
3969
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3450
3970
|
|
|
3451
3971
|
|
|
3452
|
-
def
|
|
3972
|
+
def doSearchClusterTables(args, parsed_globals):
|
|
3453
3973
|
g_param = parse_global_arg(parsed_globals)
|
|
3454
3974
|
|
|
3455
3975
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -3478,11 +3998,11 @@ def doDeleteAccounts(args, parsed_globals):
|
|
|
3478
3998
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3479
3999
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
3480
4000
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3481
|
-
model = models.
|
|
4001
|
+
model = models.SearchClusterTablesRequest()
|
|
3482
4002
|
model.from_json_string(json.dumps(args))
|
|
3483
4003
|
start_time = time.time()
|
|
3484
4004
|
while True:
|
|
3485
|
-
rsp = client.
|
|
4005
|
+
rsp = client.SearchClusterTables(model)
|
|
3486
4006
|
result = rsp.to_json_string()
|
|
3487
4007
|
try:
|
|
3488
4008
|
json_obj = json.loads(result)
|
|
@@ -3501,7 +4021,7 @@ def doDeleteAccounts(args, parsed_globals):
|
|
|
3501
4021
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3502
4022
|
|
|
3503
4023
|
|
|
3504
|
-
def
|
|
4024
|
+
def doDescribeParamTemplates(args, parsed_globals):
|
|
3505
4025
|
g_param = parse_global_arg(parsed_globals)
|
|
3506
4026
|
|
|
3507
4027
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -3530,11 +4050,11 @@ def doOpenClusterReadOnlyInstanceGroupAccess(args, parsed_globals):
|
|
|
3530
4050
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3531
4051
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
3532
4052
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3533
|
-
model = models.
|
|
4053
|
+
model = models.DescribeParamTemplatesRequest()
|
|
3534
4054
|
model.from_json_string(json.dumps(args))
|
|
3535
4055
|
start_time = time.time()
|
|
3536
4056
|
while True:
|
|
3537
|
-
rsp = client.
|
|
4057
|
+
rsp = client.DescribeParamTemplates(model)
|
|
3538
4058
|
result = rsp.to_json_string()
|
|
3539
4059
|
try:
|
|
3540
4060
|
json_obj = json.loads(result)
|
|
@@ -3553,7 +4073,7 @@ def doOpenClusterReadOnlyInstanceGroupAccess(args, parsed_globals):
|
|
|
3553
4073
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3554
4074
|
|
|
3555
4075
|
|
|
3556
|
-
def
|
|
4076
|
+
def doDeleteBackup(args, parsed_globals):
|
|
3557
4077
|
g_param = parse_global_arg(parsed_globals)
|
|
3558
4078
|
|
|
3559
4079
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -3582,11 +4102,11 @@ def doSearchClusterTables(args, parsed_globals):
|
|
|
3582
4102
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3583
4103
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
3584
4104
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3585
|
-
model = models.
|
|
4105
|
+
model = models.DeleteBackupRequest()
|
|
3586
4106
|
model.from_json_string(json.dumps(args))
|
|
3587
4107
|
start_time = time.time()
|
|
3588
4108
|
while True:
|
|
3589
|
-
rsp = client.
|
|
4109
|
+
rsp = client.DeleteBackup(model)
|
|
3590
4110
|
result = rsp.to_json_string()
|
|
3591
4111
|
try:
|
|
3592
4112
|
json_obj = json.loads(result)
|
|
@@ -3605,7 +4125,7 @@ def doSearchClusterTables(args, parsed_globals):
|
|
|
3605
4125
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3606
4126
|
|
|
3607
4127
|
|
|
3608
|
-
def
|
|
4128
|
+
def doDescribeServerlessStrategy(args, parsed_globals):
|
|
3609
4129
|
g_param = parse_global_arg(parsed_globals)
|
|
3610
4130
|
|
|
3611
4131
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -3634,11 +4154,11 @@ def doDescribeParamTemplates(args, parsed_globals):
|
|
|
3634
4154
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3635
4155
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
3636
4156
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3637
|
-
model = models.
|
|
4157
|
+
model = models.DescribeServerlessStrategyRequest()
|
|
3638
4158
|
model.from_json_string(json.dumps(args))
|
|
3639
4159
|
start_time = time.time()
|
|
3640
4160
|
while True:
|
|
3641
|
-
rsp = client.
|
|
4161
|
+
rsp = client.DescribeServerlessStrategy(model)
|
|
3642
4162
|
result = rsp.to_json_string()
|
|
3643
4163
|
try:
|
|
3644
4164
|
json_obj = json.loads(result)
|
|
@@ -3657,7 +4177,7 @@ def doDescribeParamTemplates(args, parsed_globals):
|
|
|
3657
4177
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3658
4178
|
|
|
3659
4179
|
|
|
3660
|
-
def
|
|
4180
|
+
def doPauseServerless(args, parsed_globals):
|
|
3661
4181
|
g_param = parse_global_arg(parsed_globals)
|
|
3662
4182
|
|
|
3663
4183
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -3686,11 +4206,11 @@ def doDeleteBackup(args, parsed_globals):
|
|
|
3686
4206
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3687
4207
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
3688
4208
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3689
|
-
model = models.
|
|
4209
|
+
model = models.PauseServerlessRequest()
|
|
3690
4210
|
model.from_json_string(json.dumps(args))
|
|
3691
4211
|
start_time = time.time()
|
|
3692
4212
|
while True:
|
|
3693
|
-
rsp = client.
|
|
4213
|
+
rsp = client.PauseServerless(model)
|
|
3694
4214
|
result = rsp.to_json_string()
|
|
3695
4215
|
try:
|
|
3696
4216
|
json_obj = json.loads(result)
|
|
@@ -3709,7 +4229,7 @@ def doDeleteBackup(args, parsed_globals):
|
|
|
3709
4229
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3710
4230
|
|
|
3711
4231
|
|
|
3712
|
-
def
|
|
4232
|
+
def doModifyAccountHost(args, parsed_globals):
|
|
3713
4233
|
g_param = parse_global_arg(parsed_globals)
|
|
3714
4234
|
|
|
3715
4235
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -3738,11 +4258,11 @@ def doDescribeServerlessStrategy(args, parsed_globals):
|
|
|
3738
4258
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3739
4259
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
3740
4260
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3741
|
-
model = models.
|
|
4261
|
+
model = models.ModifyAccountHostRequest()
|
|
3742
4262
|
model.from_json_string(json.dumps(args))
|
|
3743
4263
|
start_time = time.time()
|
|
3744
4264
|
while True:
|
|
3745
|
-
rsp = client.
|
|
4265
|
+
rsp = client.ModifyAccountHost(model)
|
|
3746
4266
|
result = rsp.to_json_string()
|
|
3747
4267
|
try:
|
|
3748
4268
|
json_obj = json.loads(result)
|
|
@@ -3761,7 +4281,7 @@ def doDescribeServerlessStrategy(args, parsed_globals):
|
|
|
3761
4281
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3762
4282
|
|
|
3763
4283
|
|
|
3764
|
-
def
|
|
4284
|
+
def doResetAccountPassword(args, parsed_globals):
|
|
3765
4285
|
g_param = parse_global_arg(parsed_globals)
|
|
3766
4286
|
|
|
3767
4287
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -3790,11 +4310,11 @@ def doPauseServerless(args, parsed_globals):
|
|
|
3790
4310
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3791
4311
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
3792
4312
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3793
|
-
model = models.
|
|
4313
|
+
model = models.ResetAccountPasswordRequest()
|
|
3794
4314
|
model.from_json_string(json.dumps(args))
|
|
3795
4315
|
start_time = time.time()
|
|
3796
4316
|
while True:
|
|
3797
|
-
rsp = client.
|
|
4317
|
+
rsp = client.ResetAccountPassword(model)
|
|
3798
4318
|
result = rsp.to_json_string()
|
|
3799
4319
|
try:
|
|
3800
4320
|
json_obj = json.loads(result)
|
|
@@ -3813,7 +4333,7 @@ def doPauseServerless(args, parsed_globals):
|
|
|
3813
4333
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3814
4334
|
|
|
3815
4335
|
|
|
3816
|
-
def
|
|
4336
|
+
def doDescribeInstanceDetail(args, parsed_globals):
|
|
3817
4337
|
g_param = parse_global_arg(parsed_globals)
|
|
3818
4338
|
|
|
3819
4339
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -3842,11 +4362,11 @@ def doModifyAccountHost(args, parsed_globals):
|
|
|
3842
4362
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3843
4363
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
3844
4364
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3845
|
-
model = models.
|
|
4365
|
+
model = models.DescribeInstanceDetailRequest()
|
|
3846
4366
|
model.from_json_string(json.dumps(args))
|
|
3847
4367
|
start_time = time.time()
|
|
3848
4368
|
while True:
|
|
3849
|
-
rsp = client.
|
|
4369
|
+
rsp = client.DescribeInstanceDetail(model)
|
|
3850
4370
|
result = rsp.to_json_string()
|
|
3851
4371
|
try:
|
|
3852
4372
|
json_obj = json.loads(result)
|
|
@@ -3865,7 +4385,7 @@ def doModifyAccountHost(args, parsed_globals):
|
|
|
3865
4385
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3866
4386
|
|
|
3867
4387
|
|
|
3868
|
-
def
|
|
4388
|
+
def doDescribeAuditInstanceList(args, parsed_globals):
|
|
3869
4389
|
g_param = parse_global_arg(parsed_globals)
|
|
3870
4390
|
|
|
3871
4391
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -3894,11 +4414,11 @@ def doResetAccountPassword(args, parsed_globals):
|
|
|
3894
4414
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3895
4415
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
3896
4416
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3897
|
-
model = models.
|
|
4417
|
+
model = models.DescribeAuditInstanceListRequest()
|
|
3898
4418
|
model.from_json_string(json.dumps(args))
|
|
3899
4419
|
start_time = time.time()
|
|
3900
4420
|
while True:
|
|
3901
|
-
rsp = client.
|
|
4421
|
+
rsp = client.DescribeAuditInstanceList(model)
|
|
3902
4422
|
result = rsp.to_json_string()
|
|
3903
4423
|
try:
|
|
3904
4424
|
json_obj = json.loads(result)
|
|
@@ -3917,7 +4437,7 @@ def doResetAccountPassword(args, parsed_globals):
|
|
|
3917
4437
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3918
4438
|
|
|
3919
4439
|
|
|
3920
|
-
def
|
|
4440
|
+
def doDescribeRollbackTimeRange(args, parsed_globals):
|
|
3921
4441
|
g_param = parse_global_arg(parsed_globals)
|
|
3922
4442
|
|
|
3923
4443
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -3946,11 +4466,11 @@ def doDescribeInstanceDetail(args, parsed_globals):
|
|
|
3946
4466
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3947
4467
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
3948
4468
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3949
|
-
model = models.
|
|
4469
|
+
model = models.DescribeRollbackTimeRangeRequest()
|
|
3950
4470
|
model.from_json_string(json.dumps(args))
|
|
3951
4471
|
start_time = time.time()
|
|
3952
4472
|
while True:
|
|
3953
|
-
rsp = client.
|
|
4473
|
+
rsp = client.DescribeRollbackTimeRange(model)
|
|
3954
4474
|
result = rsp.to_json_string()
|
|
3955
4475
|
try:
|
|
3956
4476
|
json_obj = json.loads(result)
|
|
@@ -3969,7 +4489,7 @@ def doDescribeInstanceDetail(args, parsed_globals):
|
|
|
3969
4489
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3970
4490
|
|
|
3971
4491
|
|
|
3972
|
-
def
|
|
4492
|
+
def doDescribeFlow(args, parsed_globals):
|
|
3973
4493
|
g_param = parse_global_arg(parsed_globals)
|
|
3974
4494
|
|
|
3975
4495
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -3998,11 +4518,11 @@ def doDescribeRollbackTimeRange(args, parsed_globals):
|
|
|
3998
4518
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3999
4519
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
4000
4520
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
4001
|
-
model = models.
|
|
4521
|
+
model = models.DescribeFlowRequest()
|
|
4002
4522
|
model.from_json_string(json.dumps(args))
|
|
4003
4523
|
start_time = time.time()
|
|
4004
4524
|
while True:
|
|
4005
|
-
rsp = client.
|
|
4525
|
+
rsp = client.DescribeFlow(model)
|
|
4006
4526
|
result = rsp.to_json_string()
|
|
4007
4527
|
try:
|
|
4008
4528
|
json_obj = json.loads(result)
|
|
@@ -4021,7 +4541,7 @@ def doDescribeRollbackTimeRange(args, parsed_globals):
|
|
|
4021
4541
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
4022
4542
|
|
|
4023
4543
|
|
|
4024
|
-
def
|
|
4544
|
+
def doModifyInstanceParam(args, parsed_globals):
|
|
4025
4545
|
g_param = parse_global_arg(parsed_globals)
|
|
4026
4546
|
|
|
4027
4547
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -4050,11 +4570,11 @@ def doDescribeFlow(args, parsed_globals):
|
|
|
4050
4570
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
4051
4571
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
4052
4572
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
4053
|
-
model = models.
|
|
4573
|
+
model = models.ModifyInstanceParamRequest()
|
|
4054
4574
|
model.from_json_string(json.dumps(args))
|
|
4055
4575
|
start_time = time.time()
|
|
4056
4576
|
while True:
|
|
4057
|
-
rsp = client.
|
|
4577
|
+
rsp = client.ModifyInstanceParam(model)
|
|
4058
4578
|
result = rsp.to_json_string()
|
|
4059
4579
|
try:
|
|
4060
4580
|
json_obj = json.loads(result)
|
|
@@ -4073,7 +4593,7 @@ def doDescribeFlow(args, parsed_globals):
|
|
|
4073
4593
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
4074
4594
|
|
|
4075
4595
|
|
|
4076
|
-
def
|
|
4596
|
+
def doDescribeInstanceCLSLogDelivery(args, parsed_globals):
|
|
4077
4597
|
g_param = parse_global_arg(parsed_globals)
|
|
4078
4598
|
|
|
4079
4599
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -4102,11 +4622,11 @@ def doModifyInstanceParam(args, parsed_globals):
|
|
|
4102
4622
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
4103
4623
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
4104
4624
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
4105
|
-
model = models.
|
|
4625
|
+
model = models.DescribeInstanceCLSLogDeliveryRequest()
|
|
4106
4626
|
model.from_json_string(json.dumps(args))
|
|
4107
4627
|
start_time = time.time()
|
|
4108
4628
|
while True:
|
|
4109
|
-
rsp = client.
|
|
4629
|
+
rsp = client.DescribeInstanceCLSLogDelivery(model)
|
|
4110
4630
|
result = rsp.to_json_string()
|
|
4111
4631
|
try:
|
|
4112
4632
|
json_obj = json.loads(result)
|
|
@@ -5061,6 +5581,58 @@ def doDescribeIntegrateTask(args, parsed_globals):
|
|
|
5061
5581
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
5062
5582
|
|
|
5063
5583
|
|
|
5584
|
+
def doStartCLSDelivery(args, parsed_globals):
|
|
5585
|
+
g_param = parse_global_arg(parsed_globals)
|
|
5586
|
+
|
|
5587
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
5588
|
+
cred = credential.CVMRoleCredential()
|
|
5589
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
5590
|
+
cred = credential.STSAssumeRoleCredential(
|
|
5591
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
5592
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
5593
|
+
)
|
|
5594
|
+
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):
|
|
5595
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
5596
|
+
else:
|
|
5597
|
+
cred = credential.Credential(
|
|
5598
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
5599
|
+
)
|
|
5600
|
+
http_profile = HttpProfile(
|
|
5601
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
5602
|
+
reqMethod="POST",
|
|
5603
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
5604
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
5605
|
+
)
|
|
5606
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
|
5607
|
+
if g_param[OptionsDefine.Language]:
|
|
5608
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
5609
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
5610
|
+
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
5611
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
5612
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
5613
|
+
model = models.StartCLSDeliveryRequest()
|
|
5614
|
+
model.from_json_string(json.dumps(args))
|
|
5615
|
+
start_time = time.time()
|
|
5616
|
+
while True:
|
|
5617
|
+
rsp = client.StartCLSDelivery(model)
|
|
5618
|
+
result = rsp.to_json_string()
|
|
5619
|
+
try:
|
|
5620
|
+
json_obj = json.loads(result)
|
|
5621
|
+
except TypeError as e:
|
|
5622
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
5623
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
5624
|
+
break
|
|
5625
|
+
cur_time = time.time()
|
|
5626
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
5627
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
5628
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
5629
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
5630
|
+
else:
|
|
5631
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
5632
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
5633
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
5634
|
+
|
|
5635
|
+
|
|
5064
5636
|
def doReloadBalanceProxyNode(args, parsed_globals):
|
|
5065
5637
|
g_param = parse_global_arg(parsed_globals)
|
|
5066
5638
|
|
|
@@ -5269,6 +5841,58 @@ def doModifyAuditRuleTemplates(args, parsed_globals):
|
|
|
5269
5841
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
5270
5842
|
|
|
5271
5843
|
|
|
5844
|
+
def doStopCLSDelivery(args, parsed_globals):
|
|
5845
|
+
g_param = parse_global_arg(parsed_globals)
|
|
5846
|
+
|
|
5847
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
5848
|
+
cred = credential.CVMRoleCredential()
|
|
5849
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
5850
|
+
cred = credential.STSAssumeRoleCredential(
|
|
5851
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
5852
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
5853
|
+
)
|
|
5854
|
+
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):
|
|
5855
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
5856
|
+
else:
|
|
5857
|
+
cred = credential.Credential(
|
|
5858
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
5859
|
+
)
|
|
5860
|
+
http_profile = HttpProfile(
|
|
5861
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
5862
|
+
reqMethod="POST",
|
|
5863
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
5864
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
5865
|
+
)
|
|
5866
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
|
5867
|
+
if g_param[OptionsDefine.Language]:
|
|
5868
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
5869
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
5870
|
+
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
5871
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
5872
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
5873
|
+
model = models.StopCLSDeliveryRequest()
|
|
5874
|
+
model.from_json_string(json.dumps(args))
|
|
5875
|
+
start_time = time.time()
|
|
5876
|
+
while True:
|
|
5877
|
+
rsp = client.StopCLSDelivery(model)
|
|
5878
|
+
result = rsp.to_json_string()
|
|
5879
|
+
try:
|
|
5880
|
+
json_obj = json.loads(result)
|
|
5881
|
+
except TypeError as e:
|
|
5882
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
5883
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
5884
|
+
break
|
|
5885
|
+
cur_time = time.time()
|
|
5886
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
5887
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
5888
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
5889
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
5890
|
+
else:
|
|
5891
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
5892
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
5893
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
5894
|
+
|
|
5895
|
+
|
|
5272
5896
|
def doOpenReadOnlyInstanceExclusiveAccess(args, parsed_globals):
|
|
5273
5897
|
g_param = parse_global_arg(parsed_globals)
|
|
5274
5898
|
|
|
@@ -5425,7 +6049,7 @@ def doModifyAccountDescription(args, parsed_globals):
|
|
|
5425
6049
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
5426
6050
|
|
|
5427
6051
|
|
|
5428
|
-
def
|
|
6052
|
+
def doRenewClusters(args, parsed_globals):
|
|
5429
6053
|
g_param = parse_global_arg(parsed_globals)
|
|
5430
6054
|
|
|
5431
6055
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -5454,11 +6078,11 @@ def doSwitchClusterVpc(args, parsed_globals):
|
|
|
5454
6078
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
5455
6079
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
5456
6080
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
5457
|
-
model = models.
|
|
6081
|
+
model = models.RenewClustersRequest()
|
|
5458
6082
|
model.from_json_string(json.dumps(args))
|
|
5459
6083
|
start_time = time.time()
|
|
5460
6084
|
while True:
|
|
5461
|
-
rsp = client.
|
|
6085
|
+
rsp = client.RenewClusters(model)
|
|
5462
6086
|
result = rsp.to_json_string()
|
|
5463
6087
|
try:
|
|
5464
6088
|
json_obj = json.loads(result)
|
|
@@ -6465,6 +7089,58 @@ def doDescribeBackupDownloadUrl(args, parsed_globals):
|
|
|
6465
7089
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
6466
7090
|
|
|
6467
7091
|
|
|
7092
|
+
def doSwitchClusterVpc(args, parsed_globals):
|
|
7093
|
+
g_param = parse_global_arg(parsed_globals)
|
|
7094
|
+
|
|
7095
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
7096
|
+
cred = credential.CVMRoleCredential()
|
|
7097
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
7098
|
+
cred = credential.STSAssumeRoleCredential(
|
|
7099
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
7100
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
7101
|
+
)
|
|
7102
|
+
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):
|
|
7103
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
7104
|
+
else:
|
|
7105
|
+
cred = credential.Credential(
|
|
7106
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
7107
|
+
)
|
|
7108
|
+
http_profile = HttpProfile(
|
|
7109
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
7110
|
+
reqMethod="POST",
|
|
7111
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
7112
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
7113
|
+
)
|
|
7114
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
|
7115
|
+
if g_param[OptionsDefine.Language]:
|
|
7116
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
7117
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
7118
|
+
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
7119
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
7120
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
7121
|
+
model = models.SwitchClusterVpcRequest()
|
|
7122
|
+
model.from_json_string(json.dumps(args))
|
|
7123
|
+
start_time = time.time()
|
|
7124
|
+
while True:
|
|
7125
|
+
rsp = client.SwitchClusterVpc(model)
|
|
7126
|
+
result = rsp.to_json_string()
|
|
7127
|
+
try:
|
|
7128
|
+
json_obj = json.loads(result)
|
|
7129
|
+
except TypeError as e:
|
|
7130
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
7131
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
7132
|
+
break
|
|
7133
|
+
cur_time = time.time()
|
|
7134
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
7135
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
7136
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
7137
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
7138
|
+
else:
|
|
7139
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
7140
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
7141
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
7142
|
+
|
|
7143
|
+
|
|
6468
7144
|
def doCreateProxy(args, parsed_globals):
|
|
6469
7145
|
g_param = parse_global_arg(parsed_globals)
|
|
6470
7146
|
|
|
@@ -6517,7 +7193,7 @@ def doCreateProxy(args, parsed_globals):
|
|
|
6517
7193
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
6518
7194
|
|
|
6519
7195
|
|
|
6520
|
-
def
|
|
7196
|
+
def doDescribeClusterDetail(args, parsed_globals):
|
|
6521
7197
|
g_param = parse_global_arg(parsed_globals)
|
|
6522
7198
|
|
|
6523
7199
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -6546,11 +7222,11 @@ def doModifyDBInstanceSecurityGroups(args, parsed_globals):
|
|
|
6546
7222
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
6547
7223
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
6548
7224
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
6549
|
-
model = models.
|
|
7225
|
+
model = models.DescribeClusterDetailRequest()
|
|
6550
7226
|
model.from_json_string(json.dumps(args))
|
|
6551
7227
|
start_time = time.time()
|
|
6552
7228
|
while True:
|
|
6553
|
-
rsp = client.
|
|
7229
|
+
rsp = client.DescribeClusterDetail(model)
|
|
6554
7230
|
result = rsp.to_json_string()
|
|
6555
7231
|
try:
|
|
6556
7232
|
json_obj = json.loads(result)
|
|
@@ -6569,7 +7245,7 @@ def doModifyDBInstanceSecurityGroups(args, parsed_globals):
|
|
|
6569
7245
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
6570
7246
|
|
|
6571
7247
|
|
|
6572
|
-
def
|
|
7248
|
+
def doCreateCLSDelivery(args, parsed_globals):
|
|
6573
7249
|
g_param = parse_global_arg(parsed_globals)
|
|
6574
7250
|
|
|
6575
7251
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -6598,11 +7274,11 @@ def doDescribeParamTemplateDetail(args, parsed_globals):
|
|
|
6598
7274
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
|
6599
7275
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
6600
7276
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
6601
|
-
model = models.
|
|
7277
|
+
model = models.CreateCLSDeliveryRequest()
|
|
6602
7278
|
model.from_json_string(json.dumps(args))
|
|
6603
7279
|
start_time = time.time()
|
|
6604
7280
|
while True:
|
|
6605
|
-
rsp = client.
|
|
7281
|
+
rsp = client.CreateCLSDelivery(model)
|
|
6606
7282
|
result = rsp.to_json_string()
|
|
6607
7283
|
try:
|
|
6608
7284
|
json_obj = json.loads(result)
|
|
@@ -7361,13 +8037,14 @@ MODELS_MAP = {
|
|
|
7361
8037
|
|
|
7362
8038
|
ACTION_MAP = {
|
|
7363
8039
|
"ResumeServerless": doResumeServerless,
|
|
7364
|
-
"
|
|
8040
|
+
"DescribeBackupConfig": doDescribeBackupConfig,
|
|
7365
8041
|
"ReplayInstanceAuditLog": doReplayInstanceAuditLog,
|
|
7366
8042
|
"ModifyBinlogConfig": doModifyBinlogConfig,
|
|
7367
8043
|
"CreateIntegrateCluster": doCreateIntegrateCluster,
|
|
7368
8044
|
"CreateProxyEndPoint": doCreateProxyEndPoint,
|
|
7369
8045
|
"DescribeResourcePackageList": doDescribeResourcePackageList,
|
|
7370
8046
|
"CreateAuditRuleTemplate": doCreateAuditRuleTemplate,
|
|
8047
|
+
"RollbackToNewCluster": doRollbackToNewCluster,
|
|
7371
8048
|
"ModifyMaintainPeriodConfig": doModifyMaintainPeriodConfig,
|
|
7372
8049
|
"CopyClusterPasswordComplexity": doCopyClusterPasswordComplexity,
|
|
7373
8050
|
"CloseAuditService": doCloseAuditService,
|
|
@@ -7378,8 +8055,9 @@ ACTION_MAP = {
|
|
|
7378
8055
|
"CloseProxy": doCloseProxy,
|
|
7379
8056
|
"ExportResourcePackageDeductDetails": doExportResourcePackageDeductDetails,
|
|
7380
8057
|
"InquirePriceModify": doInquirePriceModify,
|
|
7381
|
-
"
|
|
7382
|
-
"
|
|
8058
|
+
"ModifyDBInstanceSecurityGroups": doModifyDBInstanceSecurityGroups,
|
|
8059
|
+
"DescribeTasks": doDescribeTasks,
|
|
8060
|
+
"DescribeInstanceSpecs": doDescribeInstanceSpecs,
|
|
7383
8061
|
"DescribeBinlogDownloadUrl": doDescribeBinlogDownloadUrl,
|
|
7384
8062
|
"DescribeResourcesByDealName": doDescribeResourcesByDealName,
|
|
7385
8063
|
"DescribeBinlogConfig": doDescribeBinlogConfig,
|
|
@@ -7387,8 +8065,11 @@ ACTION_MAP = {
|
|
|
7387
8065
|
"DescribeProxyNodes": doDescribeProxyNodes,
|
|
7388
8066
|
"DescribeClusterTransparentEncryptInfo": doDescribeClusterTransparentEncryptInfo,
|
|
7389
8067
|
"ExportInstanceSlowQueries": doExportInstanceSlowQueries,
|
|
8068
|
+
"DeleteCLSDelivery": doDeleteCLSDelivery,
|
|
8069
|
+
"DescribeChangedParamsAfterUpgrade": doDescribeChangedParamsAfterUpgrade,
|
|
7390
8070
|
"DescribeAccountPrivileges": doDescribeAccountPrivileges,
|
|
7391
8071
|
"CloseClusterPasswordComplexity": doCloseClusterPasswordComplexity,
|
|
8072
|
+
"RollBackCluster": doRollBackCluster,
|
|
7392
8073
|
"DescribeBinlogSaveDays": doDescribeBinlogSaveDays,
|
|
7393
8074
|
"DescribeClusterInstanceGrps": doDescribeClusterInstanceGrps,
|
|
7394
8075
|
"DescribeIsolatedInstances": doDescribeIsolatedInstances,
|
|
@@ -7418,6 +8099,8 @@ ACTION_MAP = {
|
|
|
7418
8099
|
"ModifyResourcePackagesDeductionPriority": doModifyResourcePackagesDeductionPriority,
|
|
7419
8100
|
"DescribeInstanceParams": doDescribeInstanceParams,
|
|
7420
8101
|
"DescribeInstanceSlowQueries": doDescribeInstanceSlowQueries,
|
|
8102
|
+
"DescribeParamTemplateDetail": doDescribeParamTemplateDetail,
|
|
8103
|
+
"DescribeClusterDatabases": doDescribeClusterDatabases,
|
|
7421
8104
|
"ModifyClusterParam": doModifyClusterParam,
|
|
7422
8105
|
"CreateClusters": doCreateClusters,
|
|
7423
8106
|
"CreateAccounts": doCreateAccounts,
|
|
@@ -7426,6 +8109,7 @@ ACTION_MAP = {
|
|
|
7426
8109
|
"SwitchClusterZone": doSwitchClusterZone,
|
|
7427
8110
|
"AddInstances": doAddInstances,
|
|
7428
8111
|
"DescribeProxySpecs": doDescribeProxySpecs,
|
|
8112
|
+
"ModifyInstanceUpgradeLimitDays": doModifyInstanceUpgradeLimitDays,
|
|
7429
8113
|
"DeleteAccounts": doDeleteAccounts,
|
|
7430
8114
|
"OpenClusterReadOnlyInstanceGroupAccess": doOpenClusterReadOnlyInstanceGroupAccess,
|
|
7431
8115
|
"SearchClusterTables": doSearchClusterTables,
|
|
@@ -7436,9 +8120,11 @@ ACTION_MAP = {
|
|
|
7436
8120
|
"ModifyAccountHost": doModifyAccountHost,
|
|
7437
8121
|
"ResetAccountPassword": doResetAccountPassword,
|
|
7438
8122
|
"DescribeInstanceDetail": doDescribeInstanceDetail,
|
|
8123
|
+
"DescribeAuditInstanceList": doDescribeAuditInstanceList,
|
|
7439
8124
|
"DescribeRollbackTimeRange": doDescribeRollbackTimeRange,
|
|
7440
8125
|
"DescribeFlow": doDescribeFlow,
|
|
7441
8126
|
"ModifyInstanceParam": doModifyInstanceParam,
|
|
8127
|
+
"DescribeInstanceCLSLogDelivery": doDescribeInstanceCLSLogDelivery,
|
|
7442
8128
|
"BindClusterResourcePackages": doBindClusterResourcePackages,
|
|
7443
8129
|
"DescribeServerlessInstanceSpecs": doDescribeServerlessInstanceSpecs,
|
|
7444
8130
|
"UnbindClusterResourcePackages": doUnbindClusterResourcePackages,
|
|
@@ -7457,14 +8143,16 @@ ACTION_MAP = {
|
|
|
7457
8143
|
"SetRenewFlag": doSetRenewFlag,
|
|
7458
8144
|
"InquirePriceRenew": doInquirePriceRenew,
|
|
7459
8145
|
"DescribeIntegrateTask": doDescribeIntegrateTask,
|
|
8146
|
+
"StartCLSDelivery": doStartCLSDelivery,
|
|
7460
8147
|
"ReloadBalanceProxyNode": doReloadBalanceProxyNode,
|
|
7461
8148
|
"DescribeBackupDownloadRestriction": doDescribeBackupDownloadRestriction,
|
|
7462
8149
|
"UpgradeProxyVersion": doUpgradeProxyVersion,
|
|
7463
8150
|
"ModifyAuditRuleTemplates": doModifyAuditRuleTemplates,
|
|
8151
|
+
"StopCLSDelivery": doStopCLSDelivery,
|
|
7464
8152
|
"OpenReadOnlyInstanceExclusiveAccess": doOpenReadOnlyInstanceExclusiveAccess,
|
|
7465
8153
|
"DescribeBackupList": doDescribeBackupList,
|
|
7466
8154
|
"ModifyAccountDescription": doModifyAccountDescription,
|
|
7467
|
-
"
|
|
8155
|
+
"RenewClusters": doRenewClusters,
|
|
7468
8156
|
"CreateClusterDatabase": doCreateClusterDatabase,
|
|
7469
8157
|
"ModifyResourcePackageName": doModifyResourcePackageName,
|
|
7470
8158
|
"ModifyClusterReadOnly": doModifyClusterReadOnly,
|
|
@@ -7484,9 +8172,10 @@ ACTION_MAP = {
|
|
|
7484
8172
|
"ModifyAuditService": doModifyAuditService,
|
|
7485
8173
|
"DescribeZones": doDescribeZones,
|
|
7486
8174
|
"DescribeBackupDownloadUrl": doDescribeBackupDownloadUrl,
|
|
8175
|
+
"SwitchClusterVpc": doSwitchClusterVpc,
|
|
7487
8176
|
"CreateProxy": doCreateProxy,
|
|
7488
|
-
"
|
|
7489
|
-
"
|
|
8177
|
+
"DescribeClusterDetail": doDescribeClusterDetail,
|
|
8178
|
+
"CreateCLSDelivery": doCreateCLSDelivery,
|
|
7490
8179
|
"ModifyBinlogSaveDays": doModifyBinlogSaveDays,
|
|
7491
8180
|
"DescribeInstances": doDescribeInstances,
|
|
7492
8181
|
"DescribeClusterPasswordComplexity": doDescribeClusterPasswordComplexity,
|