tccli 3.0.1323.1__py2.py3-none-any.whl → 3.0.1324.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/autoscaling/v20180419/api.json +1 -1
- tccli/services/batch/v20170312/api.json +16 -16
- tccli/services/cloudaudit/v20190319/api.json +4 -4
- tccli/services/csip/v20221121/api.json +1 -1
- tccli/services/cvm/v20170312/api.json +35 -35
- tccli/services/cvm/v20170312/examples.json +6 -6
- tccli/services/cynosdb/cynosdb_client.py +334 -16
- tccli/services/cynosdb/v20190107/api.json +558 -0
- tccli/services/cynosdb/v20190107/examples.json +48 -0
- tccli/services/emr/v20190103/api.json +4 -4
- tccli/services/lighthouse/v20200324/api.json +1 -1
- tccli/services/lke/v20231130/examples.json +1 -1
- tccli/services/lkeap/v20240522/api.json +1 -1
- tccli/services/monitor/v20180724/api.json +5 -2
- tccli/services/monitor/v20180724/examples.json +1 -1
- tccli/services/ocr/v20181119/api.json +201 -2
- tccli/services/ocr/v20181119/examples.json +1 -1
- tccli/services/ses/ses_client.py +170 -11
- tccli/services/ses/v20201002/api.json +138 -0
- tccli/services/ses/v20201002/examples.json +24 -0
- tccli/services/tcss/v20201101/api.json +3 -3
- tccli/services/tcss/v20201101/examples.json +1 -1
- tccli/services/trtc/v20190722/api.json +2 -2
- tccli/services/trtc/v20190722/examples.json +6 -0
- {tccli-3.0.1323.1.dist-info → tccli-3.0.1324.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1323.1.dist-info → tccli-3.0.1324.1.dist-info}/RECORD +30 -30
- {tccli-3.0.1323.1.dist-info → tccli-3.0.1324.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1323.1.dist-info → tccli-3.0.1324.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1323.1.dist-info → tccli-3.0.1324.1.dist-info}/license_files/LICENSE +0 -0
@@ -1005,7 +1005,7 @@ def doInquirePriceModify(args, parsed_globals):
|
|
1005
1005
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1006
1006
|
|
1007
1007
|
|
1008
|
-
def
|
1008
|
+
def doModifyDBInstanceSecurityGroups(args, parsed_globals):
|
1009
1009
|
g_param = parse_global_arg(parsed_globals)
|
1010
1010
|
|
1011
1011
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1034,11 +1034,11 @@ def doDescribeClusterDetail(args, parsed_globals):
|
|
1034
1034
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
1035
1035
|
client._sdkVersion += ("_CLI_" + __version__)
|
1036
1036
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1037
|
-
model = models.
|
1037
|
+
model = models.ModifyDBInstanceSecurityGroupsRequest()
|
1038
1038
|
model.from_json_string(json.dumps(args))
|
1039
1039
|
start_time = time.time()
|
1040
1040
|
while True:
|
1041
|
-
rsp = client.
|
1041
|
+
rsp = client.ModifyDBInstanceSecurityGroups(model)
|
1042
1042
|
result = rsp.to_json_string()
|
1043
1043
|
try:
|
1044
1044
|
json_obj = json.loads(result)
|
@@ -1317,6 +1317,58 @@ def doModifyAuditService(args, parsed_globals):
|
|
1317
1317
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1318
1318
|
|
1319
1319
|
|
1320
|
+
def doDescribeBinlogConfig(args, parsed_globals):
|
1321
|
+
g_param = parse_global_arg(parsed_globals)
|
1322
|
+
|
1323
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1324
|
+
cred = credential.CVMRoleCredential()
|
1325
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1326
|
+
cred = credential.STSAssumeRoleCredential(
|
1327
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1328
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1329
|
+
)
|
1330
|
+
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):
|
1331
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1332
|
+
else:
|
1333
|
+
cred = credential.Credential(
|
1334
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1335
|
+
)
|
1336
|
+
http_profile = HttpProfile(
|
1337
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1338
|
+
reqMethod="POST",
|
1339
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
1340
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1341
|
+
)
|
1342
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1343
|
+
if g_param[OptionsDefine.Language]:
|
1344
|
+
profile.language = g_param[OptionsDefine.Language]
|
1345
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1346
|
+
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
1347
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1348
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1349
|
+
model = models.DescribeBinlogConfigRequest()
|
1350
|
+
model.from_json_string(json.dumps(args))
|
1351
|
+
start_time = time.time()
|
1352
|
+
while True:
|
1353
|
+
rsp = client.DescribeBinlogConfig(model)
|
1354
|
+
result = rsp.to_json_string()
|
1355
|
+
try:
|
1356
|
+
json_obj = json.loads(result)
|
1357
|
+
except TypeError as e:
|
1358
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1359
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1360
|
+
break
|
1361
|
+
cur_time = time.time()
|
1362
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1363
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1364
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1365
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1366
|
+
else:
|
1367
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1368
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1369
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1370
|
+
|
1371
|
+
|
1320
1372
|
def doExportResourcePackageDeductDetails(args, parsed_globals):
|
1321
1373
|
g_param = parse_global_arg(parsed_globals)
|
1322
1374
|
|
@@ -3137,6 +3189,58 @@ def doDescribeClusterDatabaseTables(args, parsed_globals):
|
|
3137
3189
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3138
3190
|
|
3139
3191
|
|
3192
|
+
def doDescribeBackupDownloadUserRestriction(args, parsed_globals):
|
3193
|
+
g_param = parse_global_arg(parsed_globals)
|
3194
|
+
|
3195
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
3196
|
+
cred = credential.CVMRoleCredential()
|
3197
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3198
|
+
cred = credential.STSAssumeRoleCredential(
|
3199
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3200
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3201
|
+
)
|
3202
|
+
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):
|
3203
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
3204
|
+
else:
|
3205
|
+
cred = credential.Credential(
|
3206
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
3207
|
+
)
|
3208
|
+
http_profile = HttpProfile(
|
3209
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
3210
|
+
reqMethod="POST",
|
3211
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
3212
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
3213
|
+
)
|
3214
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
3215
|
+
if g_param[OptionsDefine.Language]:
|
3216
|
+
profile.language = g_param[OptionsDefine.Language]
|
3217
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
3218
|
+
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
3219
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
3220
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3221
|
+
model = models.DescribeBackupDownloadUserRestrictionRequest()
|
3222
|
+
model.from_json_string(json.dumps(args))
|
3223
|
+
start_time = time.time()
|
3224
|
+
while True:
|
3225
|
+
rsp = client.DescribeBackupDownloadUserRestriction(model)
|
3226
|
+
result = rsp.to_json_string()
|
3227
|
+
try:
|
3228
|
+
json_obj = json.loads(result)
|
3229
|
+
except TypeError as e:
|
3230
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
3231
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
3232
|
+
break
|
3233
|
+
cur_time = time.time()
|
3234
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
3235
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
3236
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
3237
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
3238
|
+
else:
|
3239
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
3240
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
3241
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3242
|
+
|
3243
|
+
|
3140
3244
|
def doModifyParamTemplate(args, parsed_globals):
|
3141
3245
|
g_param = parse_global_arg(parsed_globals)
|
3142
3246
|
|
@@ -3345,6 +3449,58 @@ def doDescribeInstanceSlowQueries(args, parsed_globals):
|
|
3345
3449
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3346
3450
|
|
3347
3451
|
|
3452
|
+
def doDescribeParamTemplateDetail(args, parsed_globals):
|
3453
|
+
g_param = parse_global_arg(parsed_globals)
|
3454
|
+
|
3455
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
3456
|
+
cred = credential.CVMRoleCredential()
|
3457
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3458
|
+
cred = credential.STSAssumeRoleCredential(
|
3459
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3460
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3461
|
+
)
|
3462
|
+
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):
|
3463
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
3464
|
+
else:
|
3465
|
+
cred = credential.Credential(
|
3466
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
3467
|
+
)
|
3468
|
+
http_profile = HttpProfile(
|
3469
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
3470
|
+
reqMethod="POST",
|
3471
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
3472
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
3473
|
+
)
|
3474
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
3475
|
+
if g_param[OptionsDefine.Language]:
|
3476
|
+
profile.language = g_param[OptionsDefine.Language]
|
3477
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
3478
|
+
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
3479
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
3480
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3481
|
+
model = models.DescribeParamTemplateDetailRequest()
|
3482
|
+
model.from_json_string(json.dumps(args))
|
3483
|
+
start_time = time.time()
|
3484
|
+
while True:
|
3485
|
+
rsp = client.DescribeParamTemplateDetail(model)
|
3486
|
+
result = rsp.to_json_string()
|
3487
|
+
try:
|
3488
|
+
json_obj = json.loads(result)
|
3489
|
+
except TypeError as e:
|
3490
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
3491
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
3492
|
+
break
|
3493
|
+
cur_time = time.time()
|
3494
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
3495
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
3496
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
3497
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
3498
|
+
else:
|
3499
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
3500
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
3501
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3502
|
+
|
3503
|
+
|
3348
3504
|
def doDescribeClusterDatabases(args, parsed_globals):
|
3349
3505
|
g_param = parse_global_arg(parsed_globals)
|
3350
3506
|
|
@@ -5217,7 +5373,7 @@ def doAssociateSecurityGroups(args, parsed_globals):
|
|
5217
5373
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
5218
5374
|
|
5219
5375
|
|
5220
|
-
def
|
5376
|
+
def doModifyBackupDownloadUserRestriction(args, parsed_globals):
|
5221
5377
|
g_param = parse_global_arg(parsed_globals)
|
5222
5378
|
|
5223
5379
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -5246,11 +5402,11 @@ def doDescribeBinlogConfig(args, parsed_globals):
|
|
5246
5402
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
5247
5403
|
client._sdkVersion += ("_CLI_" + __version__)
|
5248
5404
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
5249
|
-
model = models.
|
5405
|
+
model = models.ModifyBackupDownloadUserRestrictionRequest()
|
5250
5406
|
model.from_json_string(json.dumps(args))
|
5251
5407
|
start_time = time.time()
|
5252
5408
|
while True:
|
5253
|
-
rsp = client.
|
5409
|
+
rsp = client.ModifyBackupDownloadUserRestriction(model)
|
5254
5410
|
result = rsp.to_json_string()
|
5255
5411
|
try:
|
5256
5412
|
json_obj = json.loads(result)
|
@@ -5893,6 +6049,58 @@ def doReloadBalanceProxyNode(args, parsed_globals):
|
|
5893
6049
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
5894
6050
|
|
5895
6051
|
|
6052
|
+
def doDescribeBackupDownloadRestriction(args, parsed_globals):
|
6053
|
+
g_param = parse_global_arg(parsed_globals)
|
6054
|
+
|
6055
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
6056
|
+
cred = credential.CVMRoleCredential()
|
6057
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
6058
|
+
cred = credential.STSAssumeRoleCredential(
|
6059
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
6060
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
6061
|
+
)
|
6062
|
+
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):
|
6063
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
6064
|
+
else:
|
6065
|
+
cred = credential.Credential(
|
6066
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
6067
|
+
)
|
6068
|
+
http_profile = HttpProfile(
|
6069
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
6070
|
+
reqMethod="POST",
|
6071
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
6072
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
6073
|
+
)
|
6074
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
6075
|
+
if g_param[OptionsDefine.Language]:
|
6076
|
+
profile.language = g_param[OptionsDefine.Language]
|
6077
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
6078
|
+
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
6079
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
6080
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
6081
|
+
model = models.DescribeBackupDownloadRestrictionRequest()
|
6082
|
+
model.from_json_string(json.dumps(args))
|
6083
|
+
start_time = time.time()
|
6084
|
+
while True:
|
6085
|
+
rsp = client.DescribeBackupDownloadRestriction(model)
|
6086
|
+
result = rsp.to_json_string()
|
6087
|
+
try:
|
6088
|
+
json_obj = json.loads(result)
|
6089
|
+
except TypeError as e:
|
6090
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
6091
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
6092
|
+
break
|
6093
|
+
cur_time = time.time()
|
6094
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
6095
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
6096
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
6097
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
6098
|
+
else:
|
6099
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
6100
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
6101
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
6102
|
+
|
6103
|
+
|
5896
6104
|
def doDescribeIsolatedInstances(args, parsed_globals):
|
5897
6105
|
g_param = parse_global_arg(parsed_globals)
|
5898
6106
|
|
@@ -6361,6 +6569,58 @@ def doModifyResourcePackageName(args, parsed_globals):
|
|
6361
6569
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
6362
6570
|
|
6363
6571
|
|
6572
|
+
def doModifyClusterReadOnly(args, parsed_globals):
|
6573
|
+
g_param = parse_global_arg(parsed_globals)
|
6574
|
+
|
6575
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
6576
|
+
cred = credential.CVMRoleCredential()
|
6577
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
6578
|
+
cred = credential.STSAssumeRoleCredential(
|
6579
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
6580
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
6581
|
+
)
|
6582
|
+
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):
|
6583
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
6584
|
+
else:
|
6585
|
+
cred = credential.Credential(
|
6586
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
6587
|
+
)
|
6588
|
+
http_profile = HttpProfile(
|
6589
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
6590
|
+
reqMethod="POST",
|
6591
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
6592
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
6593
|
+
)
|
6594
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
6595
|
+
if g_param[OptionsDefine.Language]:
|
6596
|
+
profile.language = g_param[OptionsDefine.Language]
|
6597
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
6598
|
+
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
6599
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
6600
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
6601
|
+
model = models.ModifyClusterReadOnlyRequest()
|
6602
|
+
model.from_json_string(json.dumps(args))
|
6603
|
+
start_time = time.time()
|
6604
|
+
while True:
|
6605
|
+
rsp = client.ModifyClusterReadOnly(model)
|
6606
|
+
result = rsp.to_json_string()
|
6607
|
+
try:
|
6608
|
+
json_obj = json.loads(result)
|
6609
|
+
except TypeError as e:
|
6610
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
6611
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
6612
|
+
break
|
6613
|
+
cur_time = time.time()
|
6614
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
6615
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
6616
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
6617
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
6618
|
+
else:
|
6619
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
6620
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
6621
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
6622
|
+
|
6623
|
+
|
6364
6624
|
def doDeleteAuditLogFile(args, parsed_globals):
|
6365
6625
|
g_param = parse_global_arg(parsed_globals)
|
6366
6626
|
|
@@ -6621,7 +6881,7 @@ def doOfflineCluster(args, parsed_globals):
|
|
6621
6881
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
6622
6882
|
|
6623
6883
|
|
6624
|
-
def
|
6884
|
+
def doDescribeClusterReadOnly(args, parsed_globals):
|
6625
6885
|
g_param = parse_global_arg(parsed_globals)
|
6626
6886
|
|
6627
6887
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -6650,11 +6910,11 @@ def doDescribeParamTemplateDetail(args, parsed_globals):
|
|
6650
6910
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
6651
6911
|
client._sdkVersion += ("_CLI_" + __version__)
|
6652
6912
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
6653
|
-
model = models.
|
6913
|
+
model = models.DescribeClusterReadOnlyRequest()
|
6654
6914
|
model.from_json_string(json.dumps(args))
|
6655
6915
|
start_time = time.time()
|
6656
6916
|
while True:
|
6657
|
-
rsp = client.
|
6917
|
+
rsp = client.DescribeClusterReadOnly(model)
|
6658
6918
|
result = rsp.to_json_string()
|
6659
6919
|
try:
|
6660
6920
|
json_obj = json.loads(result)
|
@@ -7401,7 +7661,7 @@ def doCreateProxy(args, parsed_globals):
|
|
7401
7661
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
7402
7662
|
|
7403
7663
|
|
7404
|
-
def
|
7664
|
+
def doDescribeClusterDetail(args, parsed_globals):
|
7405
7665
|
g_param = parse_global_arg(parsed_globals)
|
7406
7666
|
|
7407
7667
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -7430,11 +7690,11 @@ def doModifyDBInstanceSecurityGroups(args, parsed_globals):
|
|
7430
7690
|
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
7431
7691
|
client._sdkVersion += ("_CLI_" + __version__)
|
7432
7692
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
7433
|
-
model = models.
|
7693
|
+
model = models.DescribeClusterDetailRequest()
|
7434
7694
|
model.from_json_string(json.dumps(args))
|
7435
7695
|
start_time = time.time()
|
7436
7696
|
while True:
|
7437
|
-
rsp = client.
|
7697
|
+
rsp = client.DescribeClusterDetail(model)
|
7438
7698
|
result = rsp.to_json_string()
|
7439
7699
|
try:
|
7440
7700
|
json_obj = json.loads(result)
|
@@ -8233,6 +8493,58 @@ def doDescribeInstanceErrorLogs(args, parsed_globals):
|
|
8233
8493
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
8234
8494
|
|
8235
8495
|
|
8496
|
+
def doModifyBackupDownloadRestriction(args, parsed_globals):
|
8497
|
+
g_param = parse_global_arg(parsed_globals)
|
8498
|
+
|
8499
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
8500
|
+
cred = credential.CVMRoleCredential()
|
8501
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
8502
|
+
cred = credential.STSAssumeRoleCredential(
|
8503
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
8504
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
8505
|
+
)
|
8506
|
+
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):
|
8507
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
8508
|
+
else:
|
8509
|
+
cred = credential.Credential(
|
8510
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
8511
|
+
)
|
8512
|
+
http_profile = HttpProfile(
|
8513
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
8514
|
+
reqMethod="POST",
|
8515
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
8516
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
8517
|
+
)
|
8518
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
8519
|
+
if g_param[OptionsDefine.Language]:
|
8520
|
+
profile.language = g_param[OptionsDefine.Language]
|
8521
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
8522
|
+
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
8523
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
8524
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
8525
|
+
model = models.ModifyBackupDownloadRestrictionRequest()
|
8526
|
+
model.from_json_string(json.dumps(args))
|
8527
|
+
start_time = time.time()
|
8528
|
+
while True:
|
8529
|
+
rsp = client.ModifyBackupDownloadRestriction(model)
|
8530
|
+
result = rsp.to_json_string()
|
8531
|
+
try:
|
8532
|
+
json_obj = json.loads(result)
|
8533
|
+
except TypeError as e:
|
8534
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
8535
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
8536
|
+
break
|
8537
|
+
cur_time = time.time()
|
8538
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
8539
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
8540
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
8541
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
8542
|
+
else:
|
8543
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
8544
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
8545
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
8546
|
+
|
8547
|
+
|
8236
8548
|
def doIsolateInstance(args, parsed_globals):
|
8237
8549
|
g_param = parse_global_arg(parsed_globals)
|
8238
8550
|
|
@@ -8315,12 +8627,13 @@ ACTION_MAP = {
|
|
8315
8627
|
"CloseProxy": doCloseProxy,
|
8316
8628
|
"DescribeProxySpecs": doDescribeProxySpecs,
|
8317
8629
|
"InquirePriceModify": doInquirePriceModify,
|
8318
|
-
"
|
8630
|
+
"ModifyDBInstanceSecurityGroups": doModifyDBInstanceSecurityGroups,
|
8319
8631
|
"DescribeTasks": doDescribeTasks,
|
8320
8632
|
"DescribeInstanceSpecs": doDescribeInstanceSpecs,
|
8321
8633
|
"DescribeBinlogDownloadUrl": doDescribeBinlogDownloadUrl,
|
8322
8634
|
"DescribeResourcesByDealName": doDescribeResourcesByDealName,
|
8323
8635
|
"ModifyAuditService": doModifyAuditService,
|
8636
|
+
"DescribeBinlogConfig": doDescribeBinlogConfig,
|
8324
8637
|
"ExportResourcePackageDeductDetails": doExportResourcePackageDeductDetails,
|
8325
8638
|
"ModifyClusterStorage": doModifyClusterStorage,
|
8326
8639
|
"ActivateInstance": doActivateInstance,
|
@@ -8356,10 +8669,12 @@ ACTION_MAP = {
|
|
8356
8669
|
"DescribeProjectSecurityGroups": doDescribeProjectSecurityGroups,
|
8357
8670
|
"ModifyClusterDatabase": doModifyClusterDatabase,
|
8358
8671
|
"DescribeClusterDatabaseTables": doDescribeClusterDatabaseTables,
|
8672
|
+
"DescribeBackupDownloadUserRestriction": doDescribeBackupDownloadUserRestriction,
|
8359
8673
|
"ModifyParamTemplate": doModifyParamTemplate,
|
8360
8674
|
"ModifyResourcePackagesDeductionPriority": doModifyResourcePackagesDeductionPriority,
|
8361
8675
|
"DescribeInstanceParams": doDescribeInstanceParams,
|
8362
8676
|
"DescribeInstanceSlowQueries": doDescribeInstanceSlowQueries,
|
8677
|
+
"DescribeParamTemplateDetail": doDescribeParamTemplateDetail,
|
8363
8678
|
"DescribeClusterDatabases": doDescribeClusterDatabases,
|
8364
8679
|
"ModifyClusterParam": doModifyClusterParam,
|
8365
8680
|
"CreateClusters": doCreateClusters,
|
@@ -8396,7 +8711,7 @@ ACTION_MAP = {
|
|
8396
8711
|
"OpenWan": doOpenWan,
|
8397
8712
|
"InquirePriceCreate": doInquirePriceCreate,
|
8398
8713
|
"AssociateSecurityGroups": doAssociateSecurityGroups,
|
8399
|
-
"
|
8714
|
+
"ModifyBackupDownloadUserRestriction": doModifyBackupDownloadUserRestriction,
|
8400
8715
|
"DescribeResourcePackageSaleSpec": doDescribeResourcePackageSaleSpec,
|
8401
8716
|
"ModifyAccountPrivileges": doModifyAccountPrivileges,
|
8402
8717
|
"DescribeAuditRuleWithInstanceIds": doDescribeAuditRuleWithInstanceIds,
|
@@ -8409,6 +8724,7 @@ ACTION_MAP = {
|
|
8409
8724
|
"InquirePriceRenew": doInquirePriceRenew,
|
8410
8725
|
"StartCLSDelivery": doStartCLSDelivery,
|
8411
8726
|
"ReloadBalanceProxyNode": doReloadBalanceProxyNode,
|
8727
|
+
"DescribeBackupDownloadRestriction": doDescribeBackupDownloadRestriction,
|
8412
8728
|
"DescribeIsolatedInstances": doDescribeIsolatedInstances,
|
8413
8729
|
"ModifyAuditRuleTemplates": doModifyAuditRuleTemplates,
|
8414
8730
|
"StopCLSDelivery": doStopCLSDelivery,
|
@@ -8418,12 +8734,13 @@ ACTION_MAP = {
|
|
8418
8734
|
"RenewClusters": doRenewClusters,
|
8419
8735
|
"CreateClusterDatabase": doCreateClusterDatabase,
|
8420
8736
|
"ModifyResourcePackageName": doModifyResourcePackageName,
|
8737
|
+
"ModifyClusterReadOnly": doModifyClusterReadOnly,
|
8421
8738
|
"DeleteAuditLogFile": doDeleteAuditLogFile,
|
8422
8739
|
"DescribeAuditRuleTemplates": doDescribeAuditRuleTemplates,
|
8423
8740
|
"DescribeResourcePackageDetail": doDescribeResourcePackageDetail,
|
8424
8741
|
"ModifyBackupConfig": doModifyBackupConfig,
|
8425
8742
|
"OfflineCluster": doOfflineCluster,
|
8426
|
-
"
|
8743
|
+
"DescribeClusterReadOnly": doDescribeClusterReadOnly,
|
8427
8744
|
"UpgradeClusterVersion": doUpgradeClusterVersion,
|
8428
8745
|
"OpenSSL": doOpenSSL,
|
8429
8746
|
"SearchClusterDatabases": doSearchClusterDatabases,
|
@@ -8438,7 +8755,7 @@ ACTION_MAP = {
|
|
8438
8755
|
"DescribeBackupDownloadUrl": doDescribeBackupDownloadUrl,
|
8439
8756
|
"SwitchClusterVpc": doSwitchClusterVpc,
|
8440
8757
|
"CreateProxy": doCreateProxy,
|
8441
|
-
"
|
8758
|
+
"DescribeClusterDetail": doDescribeClusterDetail,
|
8442
8759
|
"CreateCLSDelivery": doCreateCLSDelivery,
|
8443
8760
|
"ModifyBinlogSaveDays": doModifyBinlogSaveDays,
|
8444
8761
|
"DescribeAccountAllGrantPrivileges": doDescribeAccountAllGrantPrivileges,
|
@@ -8454,6 +8771,7 @@ ACTION_MAP = {
|
|
8454
8771
|
"RemoveClusterSlaveZone": doRemoveClusterSlaveZone,
|
8455
8772
|
"CloseSSL": doCloseSSL,
|
8456
8773
|
"DescribeInstanceErrorLogs": doDescribeInstanceErrorLogs,
|
8774
|
+
"ModifyBackupDownloadRestriction": doModifyBackupDownloadRestriction,
|
8457
8775
|
"IsolateInstance": doIsolateInstance,
|
8458
8776
|
|
8459
8777
|
}
|