tccli 3.0.1189.1__py2.py3-none-any.whl → 3.0.1191.1__py2.py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- tccli/__init__.py +1 -1
- tccli/command.py +7 -1
- tccli/configure.py +11 -3
- tccli/loaders.py +43 -8
- tccli/oauth.py +115 -0
- tccli/plugin.py +30 -0
- tccli/plugins/__init__.py +0 -0
- tccli/plugins/auth/__init__.py +59 -0
- tccli/plugins/auth/browser_flow.py +88 -0
- tccli/plugins/auth/login.py +130 -0
- tccli/plugins/auth/logout.py +21 -0
- tccli/plugins/auth/texts.py +30 -0
- tccli/plugins/test/__init__.py +87 -0
- tccli/plugins/test/add.py +31 -0
- tccli/services/__init__.py +2 -1
- tccli/services/apm/v20210622/api.json +19 -0
- tccli/services/cam/cam_client.py +138 -32
- tccli/services/cam/v20190116/api.json +203 -0
- tccli/services/cam/v20190116/examples.json +16 -0
- tccli/services/cdb/v20170320/api.json +4 -4
- tccli/services/cfg/v20210820/api.json +1 -1
- tccli/services/cfw/v20190904/api.json +82 -2
- tccli/services/dasb/dasb_client.py +53 -0
- tccli/services/dasb/v20191018/api.json +168 -0
- tccli/services/dasb/v20191018/examples.json +8 -0
- tccli/services/dlc/v20210125/api.json +287 -37
- tccli/services/dlc/v20210125/examples.json +18 -18
- tccli/services/dsgc/v20190723/api.json +13 -3
- tccli/services/emr/v20190103/api.json +1 -1
- tccli/services/ess/v20201111/api.json +56 -23
- tccli/services/ess/v20201111/examples.json +7 -1
- tccli/services/essbasic/v20210526/api.json +28 -1
- tccli/services/essbasic/v20210526/examples.json +6 -0
- tccli/services/iotexplorer/v20190423/api.json +2 -2
- tccli/services/iss/iss_client.py +118 -65
- tccli/services/iss/v20230517/api.json +78 -0
- tccli/services/iss/v20230517/examples.json +8 -0
- tccli/services/mps/v20190612/api.json +257 -8
- tccli/services/ocr/v20181119/api.json +10 -0
- tccli/services/region/v20220627/api.json +11 -11
- tccli/services/region/v20220627/examples.json +1 -1
- tccli/services/sms/v20210111/api.json +9 -9
- tccli/services/ssl/v20191205/api.json +3 -3
- tccli/services/ssl/v20191205/examples.json +2 -2
- tccli/services/tat/v20201028/api.json +10 -0
- tccli/services/tcb/v20180608/api.json +2 -2
- tccli/services/tdmq/v20200217/api.json +2 -2
- tccli/services/tdmq/v20200217/examples.json +2 -2
- tccli/services/tke/tke_client.py +364 -46
- tccli/services/tke/v20180525/api.json +9 -0
- tccli/services/tke/v20220501/api.json +525 -0
- tccli/services/tke/v20220501/examples.json +54 -0
- tccli/services/tmt/v20180321/api.json +2 -2
- tccli/services/vdb/v20230616/api.json +29 -1
- tccli/services/vod/v20180717/api.json +30 -9
- tccli/services/vod/v20180717/examples.json +1 -1
- tccli/services/vod/v20240718/api.json +121 -0
- tccli/services/vod/v20240718/examples.json +31 -0
- tccli/services/vod/vod_client.py +58 -0
- tccli/services/vpc/v20170312/api.json +9 -0
- tccli/services/wedata/v20210820/api.json +1 -1
- {tccli-3.0.1189.1.dist-info → tccli-3.0.1191.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1189.1.dist-info → tccli-3.0.1191.1.dist-info}/RECORD +66 -54
- {tccli-3.0.1189.1.dist-info → tccli-3.0.1191.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1189.1.dist-info → tccli-3.0.1191.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1189.1.dist-info → tccli-3.0.1191.1.dist-info}/license_files/LICENSE +0 -0
tccli/services/tke/tke_client.py
CHANGED
@@ -435,6 +435,58 @@ def doModifyClusterAsGroupOptionAttribute(args, parsed_globals):
|
|
435
435
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
436
436
|
|
437
437
|
|
438
|
+
def doDescribeHealthCheckPolicyBindings(args, parsed_globals):
|
439
|
+
g_param = parse_global_arg(parsed_globals)
|
440
|
+
|
441
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
442
|
+
cred = credential.CVMRoleCredential()
|
443
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
444
|
+
cred = credential.STSAssumeRoleCredential(
|
445
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
446
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
447
|
+
)
|
448
|
+
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):
|
449
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
450
|
+
else:
|
451
|
+
cred = credential.Credential(
|
452
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
453
|
+
)
|
454
|
+
http_profile = HttpProfile(
|
455
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
456
|
+
reqMethod="POST",
|
457
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
458
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
459
|
+
)
|
460
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
461
|
+
if g_param[OptionsDefine.Language]:
|
462
|
+
profile.language = g_param[OptionsDefine.Language]
|
463
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
464
|
+
client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
|
465
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
466
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
467
|
+
model = models.DescribeHealthCheckPolicyBindingsRequest()
|
468
|
+
model.from_json_string(json.dumps(args))
|
469
|
+
start_time = time.time()
|
470
|
+
while True:
|
471
|
+
rsp = client.DescribeHealthCheckPolicyBindings(model)
|
472
|
+
result = rsp.to_json_string()
|
473
|
+
try:
|
474
|
+
json_obj = json.loads(result)
|
475
|
+
except TypeError as e:
|
476
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
477
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
478
|
+
break
|
479
|
+
cur_time = time.time()
|
480
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
481
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
482
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
483
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
484
|
+
else:
|
485
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
486
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
487
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
488
|
+
|
489
|
+
|
438
490
|
def doEnableVpcCniNetworkType(args, parsed_globals):
|
439
491
|
g_param = parse_global_arg(parsed_globals)
|
440
492
|
|
@@ -1423,6 +1475,58 @@ def doDescribeReservedInstances(args, parsed_globals):
|
|
1423
1475
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1424
1476
|
|
1425
1477
|
|
1478
|
+
def doModifyHealthCheckPolicy(args, parsed_globals):
|
1479
|
+
g_param = parse_global_arg(parsed_globals)
|
1480
|
+
|
1481
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1482
|
+
cred = credential.CVMRoleCredential()
|
1483
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1484
|
+
cred = credential.STSAssumeRoleCredential(
|
1485
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1486
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1487
|
+
)
|
1488
|
+
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):
|
1489
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1490
|
+
else:
|
1491
|
+
cred = credential.Credential(
|
1492
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1493
|
+
)
|
1494
|
+
http_profile = HttpProfile(
|
1495
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1496
|
+
reqMethod="POST",
|
1497
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
1498
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1499
|
+
)
|
1500
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1501
|
+
if g_param[OptionsDefine.Language]:
|
1502
|
+
profile.language = g_param[OptionsDefine.Language]
|
1503
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1504
|
+
client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
|
1505
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1506
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1507
|
+
model = models.ModifyHealthCheckPolicyRequest()
|
1508
|
+
model.from_json_string(json.dumps(args))
|
1509
|
+
start_time = time.time()
|
1510
|
+
while True:
|
1511
|
+
rsp = client.ModifyHealthCheckPolicy(model)
|
1512
|
+
result = rsp.to_json_string()
|
1513
|
+
try:
|
1514
|
+
json_obj = json.loads(result)
|
1515
|
+
except TypeError as e:
|
1516
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1517
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1518
|
+
break
|
1519
|
+
cur_time = time.time()
|
1520
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1521
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1522
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1523
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1524
|
+
else:
|
1525
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1526
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1527
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1528
|
+
|
1529
|
+
|
1426
1530
|
def doDeleteClusterVirtualNode(args, parsed_globals):
|
1427
1531
|
g_param = parse_global_arg(parsed_globals)
|
1428
1532
|
|
@@ -2359,7 +2463,7 @@ def doModifyClusterVirtualNodePool(args, parsed_globals):
|
|
2359
2463
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2360
2464
|
|
2361
2465
|
|
2362
|
-
def
|
2466
|
+
def doDescribeClusterNodePools(args, parsed_globals):
|
2363
2467
|
g_param = parse_global_arg(parsed_globals)
|
2364
2468
|
|
2365
2469
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2388,11 +2492,11 @@ def doUpdateImageCache(args, parsed_globals):
|
|
2388
2492
|
client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
|
2389
2493
|
client._sdkVersion += ("_CLI_" + __version__)
|
2390
2494
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2391
|
-
model = models.
|
2495
|
+
model = models.DescribeClusterNodePoolsRequest()
|
2392
2496
|
model.from_json_string(json.dumps(args))
|
2393
2497
|
start_time = time.time()
|
2394
2498
|
while True:
|
2395
|
-
rsp = client.
|
2499
|
+
rsp = client.DescribeClusterNodePools(model)
|
2396
2500
|
result = rsp.to_json_string()
|
2397
2501
|
try:
|
2398
2502
|
json_obj = json.loads(result)
|
@@ -3191,6 +3295,58 @@ def doDeletePrometheusTemplateSync(args, parsed_globals):
|
|
3191
3295
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3192
3296
|
|
3193
3297
|
|
3298
|
+
def doDescribeHealthCheckTemplate(args, parsed_globals):
|
3299
|
+
g_param = parse_global_arg(parsed_globals)
|
3300
|
+
|
3301
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
3302
|
+
cred = credential.CVMRoleCredential()
|
3303
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3304
|
+
cred = credential.STSAssumeRoleCredential(
|
3305
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3306
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3307
|
+
)
|
3308
|
+
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):
|
3309
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
3310
|
+
else:
|
3311
|
+
cred = credential.Credential(
|
3312
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
3313
|
+
)
|
3314
|
+
http_profile = HttpProfile(
|
3315
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
3316
|
+
reqMethod="POST",
|
3317
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
3318
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
3319
|
+
)
|
3320
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
3321
|
+
if g_param[OptionsDefine.Language]:
|
3322
|
+
profile.language = g_param[OptionsDefine.Language]
|
3323
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
3324
|
+
client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
|
3325
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
3326
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3327
|
+
model = models.DescribeHealthCheckTemplateRequest()
|
3328
|
+
model.from_json_string(json.dumps(args))
|
3329
|
+
start_time = time.time()
|
3330
|
+
while True:
|
3331
|
+
rsp = client.DescribeHealthCheckTemplate(model)
|
3332
|
+
result = rsp.to_json_string()
|
3333
|
+
try:
|
3334
|
+
json_obj = json.loads(result)
|
3335
|
+
except TypeError as e:
|
3336
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
3337
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
3338
|
+
break
|
3339
|
+
cur_time = time.time()
|
3340
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
3341
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
3342
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
3343
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
3344
|
+
else:
|
3345
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
3346
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
3347
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3348
|
+
|
3349
|
+
|
3194
3350
|
def doCreateClusterInstances(args, parsed_globals):
|
3195
3351
|
g_param = parse_global_arg(parsed_globals)
|
3196
3352
|
|
@@ -4543,7 +4699,7 @@ def doDeleteEKSContainerInstances(args, parsed_globals):
|
|
4543
4699
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4544
4700
|
|
4545
4701
|
|
4546
|
-
def
|
4702
|
+
def doUninstallEdgeLogAgent(args, parsed_globals):
|
4547
4703
|
g_param = parse_global_arg(parsed_globals)
|
4548
4704
|
|
4549
4705
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -4572,11 +4728,11 @@ def doDescribeClusterInstances(args, parsed_globals):
|
|
4572
4728
|
client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
|
4573
4729
|
client._sdkVersion += ("_CLI_" + __version__)
|
4574
4730
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4575
|
-
model = models.
|
4731
|
+
model = models.UninstallEdgeLogAgentRequest()
|
4576
4732
|
model.from_json_string(json.dumps(args))
|
4577
4733
|
start_time = time.time()
|
4578
4734
|
while True:
|
4579
|
-
rsp = client.
|
4735
|
+
rsp = client.UninstallEdgeLogAgent(model)
|
4580
4736
|
result = rsp.to_json_string()
|
4581
4737
|
try:
|
4582
4738
|
json_obj = json.loads(result)
|
@@ -5271,7 +5427,7 @@ def doDrainClusterVirtualNode(args, parsed_globals):
|
|
5271
5427
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
5272
5428
|
|
5273
5429
|
|
5274
|
-
def
|
5430
|
+
def doCreateHealthCheckPolicy(args, parsed_globals):
|
5275
5431
|
g_param = parse_global_arg(parsed_globals)
|
5276
5432
|
|
5277
5433
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -5300,11 +5456,11 @@ def doRestartEKSContainerInstances(args, parsed_globals):
|
|
5300
5456
|
client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
|
5301
5457
|
client._sdkVersion += ("_CLI_" + __version__)
|
5302
5458
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
5303
|
-
model = models.
|
5459
|
+
model = models.CreateHealthCheckPolicyRequest()
|
5304
5460
|
model.from_json_string(json.dumps(args))
|
5305
5461
|
start_time = time.time()
|
5306
5462
|
while True:
|
5307
|
-
rsp = client.
|
5463
|
+
rsp = client.CreateHealthCheckPolicy(model)
|
5308
5464
|
result = rsp.to_json_string()
|
5309
5465
|
try:
|
5310
5466
|
json_obj = json.loads(result)
|
@@ -6207,6 +6363,58 @@ def doDescribePrometheusTemplateSync(args, parsed_globals):
|
|
6207
6363
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
6208
6364
|
|
6209
6365
|
|
6366
|
+
def doDisableVpcCniNetworkType(args, parsed_globals):
|
6367
|
+
g_param = parse_global_arg(parsed_globals)
|
6368
|
+
|
6369
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
6370
|
+
cred = credential.CVMRoleCredential()
|
6371
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
6372
|
+
cred = credential.STSAssumeRoleCredential(
|
6373
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
6374
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
6375
|
+
)
|
6376
|
+
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):
|
6377
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
6378
|
+
else:
|
6379
|
+
cred = credential.Credential(
|
6380
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
6381
|
+
)
|
6382
|
+
http_profile = HttpProfile(
|
6383
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
6384
|
+
reqMethod="POST",
|
6385
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
6386
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
6387
|
+
)
|
6388
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
6389
|
+
if g_param[OptionsDefine.Language]:
|
6390
|
+
profile.language = g_param[OptionsDefine.Language]
|
6391
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
6392
|
+
client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
|
6393
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
6394
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
6395
|
+
model = models.DisableVpcCniNetworkTypeRequest()
|
6396
|
+
model.from_json_string(json.dumps(args))
|
6397
|
+
start_time = time.time()
|
6398
|
+
while True:
|
6399
|
+
rsp = client.DisableVpcCniNetworkType(model)
|
6400
|
+
result = rsp.to_json_string()
|
6401
|
+
try:
|
6402
|
+
json_obj = json.loads(result)
|
6403
|
+
except TypeError as e:
|
6404
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
6405
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
6406
|
+
break
|
6407
|
+
cur_time = time.time()
|
6408
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
6409
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
6410
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
6411
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
6412
|
+
else:
|
6413
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
6414
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
6415
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
6416
|
+
|
6417
|
+
|
6210
6418
|
def doDescribePrometheusInstance(args, parsed_globals):
|
6211
6419
|
g_param = parse_global_arg(parsed_globals)
|
6212
6420
|
|
@@ -6519,7 +6727,7 @@ def doAcquireClusterAdminRole(args, parsed_globals):
|
|
6519
6727
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
6520
6728
|
|
6521
6729
|
|
6522
|
-
def
|
6730
|
+
def doDescribeClusterInstances(args, parsed_globals):
|
6523
6731
|
g_param = parse_global_arg(parsed_globals)
|
6524
6732
|
|
6525
6733
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -6548,11 +6756,11 @@ def doUninstallEdgeLogAgent(args, parsed_globals):
|
|
6548
6756
|
client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
|
6549
6757
|
client._sdkVersion += ("_CLI_" + __version__)
|
6550
6758
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
6551
|
-
model = models.
|
6759
|
+
model = models.DescribeClusterInstancesRequest()
|
6552
6760
|
model.from_json_string(json.dumps(args))
|
6553
6761
|
start_time = time.time()
|
6554
6762
|
while True:
|
6555
|
-
rsp = client.
|
6763
|
+
rsp = client.DescribeClusterInstances(model)
|
6556
6764
|
result = rsp.to_json_string()
|
6557
6765
|
try:
|
6558
6766
|
json_obj = json.loads(result)
|
@@ -7351,6 +7559,58 @@ def doScaleOutClusterMaster(args, parsed_globals):
|
|
7351
7559
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
7352
7560
|
|
7353
7561
|
|
7562
|
+
def doDeleteHealthCheckPolicy(args, parsed_globals):
|
7563
|
+
g_param = parse_global_arg(parsed_globals)
|
7564
|
+
|
7565
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
7566
|
+
cred = credential.CVMRoleCredential()
|
7567
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
7568
|
+
cred = credential.STSAssumeRoleCredential(
|
7569
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
7570
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
7571
|
+
)
|
7572
|
+
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):
|
7573
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
7574
|
+
else:
|
7575
|
+
cred = credential.Credential(
|
7576
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
7577
|
+
)
|
7578
|
+
http_profile = HttpProfile(
|
7579
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
7580
|
+
reqMethod="POST",
|
7581
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
7582
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
7583
|
+
)
|
7584
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
7585
|
+
if g_param[OptionsDefine.Language]:
|
7586
|
+
profile.language = g_param[OptionsDefine.Language]
|
7587
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
7588
|
+
client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
|
7589
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
7590
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
7591
|
+
model = models.DeleteHealthCheckPolicyRequest()
|
7592
|
+
model.from_json_string(json.dumps(args))
|
7593
|
+
start_time = time.time()
|
7594
|
+
while True:
|
7595
|
+
rsp = client.DeleteHealthCheckPolicy(model)
|
7596
|
+
result = rsp.to_json_string()
|
7597
|
+
try:
|
7598
|
+
json_obj = json.loads(result)
|
7599
|
+
except TypeError as e:
|
7600
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
7601
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
7602
|
+
break
|
7603
|
+
cur_time = time.time()
|
7604
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
7605
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
7606
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
7607
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
7608
|
+
else:
|
7609
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
7610
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
7611
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
7612
|
+
|
7613
|
+
|
7354
7614
|
def doCreatePrometheusAlertRule(args, parsed_globals):
|
7355
7615
|
g_param = parse_global_arg(parsed_globals)
|
7356
7616
|
|
@@ -8287,7 +8547,7 @@ def doGetMostSuitableImageCache(args, parsed_globals):
|
|
8287
8547
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
8288
8548
|
|
8289
8549
|
|
8290
|
-
def
|
8550
|
+
def doDescribeClusterEndpoints(args, parsed_globals):
|
8291
8551
|
g_param = parse_global_arg(parsed_globals)
|
8292
8552
|
|
8293
8553
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -8316,11 +8576,11 @@ def doDescribeClusterNodePools(args, parsed_globals):
|
|
8316
8576
|
client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
|
8317
8577
|
client._sdkVersion += ("_CLI_" + __version__)
|
8318
8578
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
8319
|
-
model = models.
|
8579
|
+
model = models.DescribeClusterEndpointsRequest()
|
8320
8580
|
model.from_json_string(json.dumps(args))
|
8321
8581
|
start_time = time.time()
|
8322
8582
|
while True:
|
8323
|
-
rsp = client.
|
8583
|
+
rsp = client.DescribeClusterEndpoints(model)
|
8324
8584
|
result = rsp.to_json_string()
|
8325
8585
|
try:
|
8326
8586
|
json_obj = json.loads(result)
|
@@ -9119,6 +9379,58 @@ def doDeleteNodePool(args, parsed_globals):
|
|
9119
9379
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
9120
9380
|
|
9121
9381
|
|
9382
|
+
def doDescribeHealthCheckPolicies(args, parsed_globals):
|
9383
|
+
g_param = parse_global_arg(parsed_globals)
|
9384
|
+
|
9385
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
9386
|
+
cred = credential.CVMRoleCredential()
|
9387
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
9388
|
+
cred = credential.STSAssumeRoleCredential(
|
9389
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
9390
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
9391
|
+
)
|
9392
|
+
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):
|
9393
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
9394
|
+
else:
|
9395
|
+
cred = credential.Credential(
|
9396
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
9397
|
+
)
|
9398
|
+
http_profile = HttpProfile(
|
9399
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
9400
|
+
reqMethod="POST",
|
9401
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
9402
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
9403
|
+
)
|
9404
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
9405
|
+
if g_param[OptionsDefine.Language]:
|
9406
|
+
profile.language = g_param[OptionsDefine.Language]
|
9407
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
9408
|
+
client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
|
9409
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
9410
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
9411
|
+
model = models.DescribeHealthCheckPoliciesRequest()
|
9412
|
+
model.from_json_string(json.dumps(args))
|
9413
|
+
start_time = time.time()
|
9414
|
+
while True:
|
9415
|
+
rsp = client.DescribeHealthCheckPolicies(model)
|
9416
|
+
result = rsp.to_json_string()
|
9417
|
+
try:
|
9418
|
+
json_obj = json.loads(result)
|
9419
|
+
except TypeError as e:
|
9420
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
9421
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
9422
|
+
break
|
9423
|
+
cur_time = time.time()
|
9424
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
9425
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
9426
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
9427
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
9428
|
+
else:
|
9429
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
9430
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
9431
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
9432
|
+
|
9433
|
+
|
9122
9434
|
def doCreatePrometheusAlertPolicy(args, parsed_globals):
|
9123
9435
|
g_param = parse_global_arg(parsed_globals)
|
9124
9436
|
|
@@ -10939,7 +11251,7 @@ def doDescribeRIUtilizationDetail(args, parsed_globals):
|
|
10939
11251
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
10940
11252
|
|
10941
11253
|
|
10942
|
-
def
|
11254
|
+
def doUpdateImageCache(args, parsed_globals):
|
10943
11255
|
g_param = parse_global_arg(parsed_globals)
|
10944
11256
|
|
10945
11257
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -10968,11 +11280,11 @@ def doDisableVpcCniNetworkType(args, parsed_globals):
|
|
10968
11280
|
client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
|
10969
11281
|
client._sdkVersion += ("_CLI_" + __version__)
|
10970
11282
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
10971
|
-
model = models.
|
11283
|
+
model = models.UpdateImageCacheRequest()
|
10972
11284
|
model.from_json_string(json.dumps(args))
|
10973
11285
|
start_time = time.time()
|
10974
11286
|
while True:
|
10975
|
-
rsp = client.
|
11287
|
+
rsp = client.UpdateImageCache(model)
|
10976
11288
|
result = rsp.to_json_string()
|
10977
11289
|
try:
|
10978
11290
|
json_obj = json.loads(result)
|
@@ -11095,7 +11407,7 @@ def doDescribePrometheusInstancesOverview(args, parsed_globals):
|
|
11095
11407
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
11096
11408
|
|
11097
11409
|
|
11098
|
-
def
|
11410
|
+
def doRestartEKSContainerInstances(args, parsed_globals):
|
11099
11411
|
g_param = parse_global_arg(parsed_globals)
|
11100
11412
|
|
11101
11413
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -11124,11 +11436,11 @@ def doDescribeNodePools(args, parsed_globals):
|
|
11124
11436
|
client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
|
11125
11437
|
client._sdkVersion += ("_CLI_" + __version__)
|
11126
11438
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
11127
|
-
model = models.
|
11439
|
+
model = models.RestartEKSContainerInstancesRequest()
|
11128
11440
|
model.from_json_string(json.dumps(args))
|
11129
11441
|
start_time = time.time()
|
11130
11442
|
while True:
|
11131
|
-
rsp = client.
|
11443
|
+
rsp = client.RestartEKSContainerInstances(model)
|
11132
11444
|
result = rsp.to_json_string()
|
11133
11445
|
try:
|
11134
11446
|
json_obj = json.loads(result)
|
@@ -11147,7 +11459,7 @@ def doDescribeNodePools(args, parsed_globals):
|
|
11147
11459
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
11148
11460
|
|
11149
11461
|
|
11150
|
-
def
|
11462
|
+
def doDescribeNodePools(args, parsed_globals):
|
11151
11463
|
g_param = parse_global_arg(parsed_globals)
|
11152
11464
|
|
11153
11465
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -11176,11 +11488,11 @@ def doDeletePrometheusTempSync(args, parsed_globals):
|
|
11176
11488
|
client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
|
11177
11489
|
client._sdkVersion += ("_CLI_" + __version__)
|
11178
11490
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
11179
|
-
model = models.
|
11491
|
+
model = models.DescribeNodePoolsRequest()
|
11180
11492
|
model.from_json_string(json.dumps(args))
|
11181
11493
|
start_time = time.time()
|
11182
11494
|
while True:
|
11183
|
-
rsp = client.
|
11495
|
+
rsp = client.DescribeNodePools(model)
|
11184
11496
|
result = rsp.to_json_string()
|
11185
11497
|
try:
|
11186
11498
|
json_obj = json.loads(result)
|
@@ -11199,7 +11511,7 @@ def doDeletePrometheusTempSync(args, parsed_globals):
|
|
11199
11511
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
11200
11512
|
|
11201
11513
|
|
11202
|
-
def
|
11514
|
+
def doDeletePrometheusTempSync(args, parsed_globals):
|
11203
11515
|
g_param = parse_global_arg(parsed_globals)
|
11204
11516
|
|
11205
11517
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -11228,11 +11540,11 @@ def doDeletePrometheusAlertPolicy(args, parsed_globals):
|
|
11228
11540
|
client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
|
11229
11541
|
client._sdkVersion += ("_CLI_" + __version__)
|
11230
11542
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
11231
|
-
model = models.
|
11543
|
+
model = models.DeletePrometheusTempSyncRequest()
|
11232
11544
|
model.from_json_string(json.dumps(args))
|
11233
11545
|
start_time = time.time()
|
11234
11546
|
while True:
|
11235
|
-
rsp = client.
|
11547
|
+
rsp = client.DeletePrometheusTempSync(model)
|
11236
11548
|
result = rsp.to_json_string()
|
11237
11549
|
try:
|
11238
11550
|
json_obj = json.loads(result)
|
@@ -11251,7 +11563,7 @@ def doDeletePrometheusAlertPolicy(args, parsed_globals):
|
|
11251
11563
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
11252
11564
|
|
11253
11565
|
|
11254
|
-
def
|
11566
|
+
def doDeletePrometheusAlertPolicy(args, parsed_globals):
|
11255
11567
|
g_param = parse_global_arg(parsed_globals)
|
11256
11568
|
|
11257
11569
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -11280,11 +11592,11 @@ def doRunPrometheusInstance(args, parsed_globals):
|
|
11280
11592
|
client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
|
11281
11593
|
client._sdkVersion += ("_CLI_" + __version__)
|
11282
11594
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
11283
|
-
model = models.
|
11595
|
+
model = models.DeletePrometheusAlertPolicyRequest()
|
11284
11596
|
model.from_json_string(json.dumps(args))
|
11285
11597
|
start_time = time.time()
|
11286
11598
|
while True:
|
11287
|
-
rsp = client.
|
11599
|
+
rsp = client.DeletePrometheusAlertPolicy(model)
|
11288
11600
|
result = rsp.to_json_string()
|
11289
11601
|
try:
|
11290
11602
|
json_obj = json.loads(result)
|
@@ -11303,7 +11615,7 @@ def doRunPrometheusInstance(args, parsed_globals):
|
|
11303
11615
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
11304
11616
|
|
11305
11617
|
|
11306
|
-
def
|
11618
|
+
def doRunPrometheusInstance(args, parsed_globals):
|
11307
11619
|
g_param = parse_global_arg(parsed_globals)
|
11308
11620
|
|
11309
11621
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -11332,11 +11644,11 @@ def doUpdateEKSCluster(args, parsed_globals):
|
|
11332
11644
|
client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
|
11333
11645
|
client._sdkVersion += ("_CLI_" + __version__)
|
11334
11646
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
11335
|
-
model = models.
|
11647
|
+
model = models.RunPrometheusInstanceRequest()
|
11336
11648
|
model.from_json_string(json.dumps(args))
|
11337
11649
|
start_time = time.time()
|
11338
11650
|
while True:
|
11339
|
-
rsp = client.
|
11651
|
+
rsp = client.RunPrometheusInstance(model)
|
11340
11652
|
result = rsp.to_json_string()
|
11341
11653
|
try:
|
11342
11654
|
json_obj = json.loads(result)
|
@@ -11355,7 +11667,7 @@ def doUpdateEKSCluster(args, parsed_globals):
|
|
11355
11667
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
11356
11668
|
|
11357
11669
|
|
11358
|
-
def
|
11670
|
+
def doUpdateEKSCluster(args, parsed_globals):
|
11359
11671
|
g_param = parse_global_arg(parsed_globals)
|
11360
11672
|
|
11361
11673
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -11384,11 +11696,11 @@ def doModifyPrometheusConfig(args, parsed_globals):
|
|
11384
11696
|
client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
|
11385
11697
|
client._sdkVersion += ("_CLI_" + __version__)
|
11386
11698
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
11387
|
-
model = models.
|
11699
|
+
model = models.UpdateEKSClusterRequest()
|
11388
11700
|
model.from_json_string(json.dumps(args))
|
11389
11701
|
start_time = time.time()
|
11390
11702
|
while True:
|
11391
|
-
rsp = client.
|
11703
|
+
rsp = client.UpdateEKSCluster(model)
|
11392
11704
|
result = rsp.to_json_string()
|
11393
11705
|
try:
|
11394
11706
|
json_obj = json.loads(result)
|
@@ -11407,7 +11719,7 @@ def doModifyPrometheusConfig(args, parsed_globals):
|
|
11407
11719
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
11408
11720
|
|
11409
11721
|
|
11410
|
-
def
|
11722
|
+
def doModifyPrometheusConfig(args, parsed_globals):
|
11411
11723
|
g_param = parse_global_arg(parsed_globals)
|
11412
11724
|
|
11413
11725
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -11436,11 +11748,11 @@ def doDescribeClusterEndpoints(args, parsed_globals):
|
|
11436
11748
|
client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
|
11437
11749
|
client._sdkVersion += ("_CLI_" + __version__)
|
11438
11750
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
11439
|
-
model = models.
|
11751
|
+
model = models.ModifyPrometheusConfigRequest()
|
11440
11752
|
model.from_json_string(json.dumps(args))
|
11441
11753
|
start_time = time.time()
|
11442
11754
|
while True:
|
11443
|
-
rsp = client.
|
11755
|
+
rsp = client.ModifyPrometheusConfig(model)
|
11444
11756
|
result = rsp.to_json_string()
|
11445
11757
|
try:
|
11446
11758
|
json_obj = json.loads(result)
|
@@ -11792,6 +12104,7 @@ ACTION_MAP = {
|
|
11792
12104
|
"CreateClusterVirtualNodePool": doCreateClusterVirtualNodePool,
|
11793
12105
|
"GetTkeAppChartList": doGetTkeAppChartList,
|
11794
12106
|
"ModifyClusterAsGroupOptionAttribute": doModifyClusterAsGroupOptionAttribute,
|
12107
|
+
"DescribeHealthCheckPolicyBindings": doDescribeHealthCheckPolicyBindings,
|
11795
12108
|
"EnableVpcCniNetworkType": doEnableVpcCniNetworkType,
|
11796
12109
|
"DeleteCluster": doDeleteCluster,
|
11797
12110
|
"UpdateEdgeClusterVersion": doUpdateEdgeClusterVersion,
|
@@ -11811,6 +12124,7 @@ ACTION_MAP = {
|
|
11811
12124
|
"ModifyPrometheusAgentExternalLabels": doModifyPrometheusAgentExternalLabels,
|
11812
12125
|
"DescribePodsBySpec": doDescribePodsBySpec,
|
11813
12126
|
"DescribeReservedInstances": doDescribeReservedInstances,
|
12127
|
+
"ModifyHealthCheckPolicy": doModifyHealthCheckPolicy,
|
11814
12128
|
"DeleteClusterVirtualNode": doDeleteClusterVirtualNode,
|
11815
12129
|
"DeleteBackupStorageLocation": doDeleteBackupStorageLocation,
|
11816
12130
|
"DescribeAvailableTKEEdgeVersion": doDescribeAvailableTKEEdgeVersion,
|
@@ -11829,7 +12143,7 @@ ACTION_MAP = {
|
|
11829
12143
|
"EnableClusterAudit": doEnableClusterAudit,
|
11830
12144
|
"CreateBackupStorageLocation": doCreateBackupStorageLocation,
|
11831
12145
|
"ModifyClusterVirtualNodePool": doModifyClusterVirtualNodePool,
|
11832
|
-
"
|
12146
|
+
"DescribeClusterNodePools": doDescribeClusterNodePools,
|
11833
12147
|
"CreateClusterNodePool": doCreateClusterNodePool,
|
11834
12148
|
"DescribeClusterPendingReleases": doDescribeClusterPendingReleases,
|
11835
12149
|
"DescribeTKEEdgeClusterStatus": doDescribeTKEEdgeClusterStatus,
|
@@ -11845,6 +12159,7 @@ ACTION_MAP = {
|
|
11845
12159
|
"DescribeClusterNodePoolDetail": doDescribeClusterNodePoolDetail,
|
11846
12160
|
"DeletePrometheusTemp": doDeletePrometheusTemp,
|
11847
12161
|
"DeletePrometheusTemplateSync": doDeletePrometheusTemplateSync,
|
12162
|
+
"DescribeHealthCheckTemplate": doDescribeHealthCheckTemplate,
|
11848
12163
|
"CreateClusterInstances": doCreateClusterInstances,
|
11849
12164
|
"ModifyClusterAttribute": doModifyClusterAttribute,
|
11850
12165
|
"DeleteClusterAsGroups": doDeleteClusterAsGroups,
|
@@ -11871,7 +12186,7 @@ ACTION_MAP = {
|
|
11871
12186
|
"DisableClusterDeletionProtection": doDisableClusterDeletionProtection,
|
11872
12187
|
"DescribePrometheusTargets": doDescribePrometheusTargets,
|
11873
12188
|
"DeleteEKSContainerInstances": doDeleteEKSContainerInstances,
|
11874
|
-
"
|
12189
|
+
"UninstallEdgeLogAgent": doUninstallEdgeLogAgent,
|
11875
12190
|
"DescribeEdgeCVMInstances": doDescribeEdgeCVMInstances,
|
11876
12191
|
"DescribeClusterLevelAttribute": doDescribeClusterLevelAttribute,
|
11877
12192
|
"DescribeAddonValues": doDescribeAddonValues,
|
@@ -11885,7 +12200,7 @@ ACTION_MAP = {
|
|
11885
12200
|
"DeleteAddon": doDeleteAddon,
|
11886
12201
|
"CreateEksLogConfig": doCreateEksLogConfig,
|
11887
12202
|
"DrainClusterVirtualNode": doDrainClusterVirtualNode,
|
11888
|
-
"
|
12203
|
+
"CreateHealthCheckPolicy": doCreateHealthCheckPolicy,
|
11889
12204
|
"DescribeTKEEdgeScript": doDescribeTKEEdgeScript,
|
11890
12205
|
"DescribeEKSContainerInstanceRegions": doDescribeEKSContainerInstanceRegions,
|
11891
12206
|
"DescribePrometheusClusterAgents": doDescribePrometheusClusterAgents,
|
@@ -11903,13 +12218,14 @@ ACTION_MAP = {
|
|
11903
12218
|
"ListClusterInspectionResultsItems": doListClusterInspectionResultsItems,
|
11904
12219
|
"EnableEncryptionProtection": doEnableEncryptionProtection,
|
11905
12220
|
"DescribePrometheusTemplateSync": doDescribePrometheusTemplateSync,
|
12221
|
+
"DisableVpcCniNetworkType": doDisableVpcCniNetworkType,
|
11906
12222
|
"DescribePrometheusInstance": doDescribePrometheusInstance,
|
11907
12223
|
"CreatePrometheusGlobalNotification": doCreatePrometheusGlobalNotification,
|
11908
12224
|
"DescribeClusterEndpointVipStatus": doDescribeClusterEndpointVipStatus,
|
11909
12225
|
"DescribeEKSContainerInstances": doDescribeEKSContainerInstances,
|
11910
12226
|
"DescribeLogSwitches": doDescribeLogSwitches,
|
11911
12227
|
"AcquireClusterAdminRole": doAcquireClusterAdminRole,
|
11912
|
-
"
|
12228
|
+
"DescribeClusterInstances": doDescribeClusterInstances,
|
11913
12229
|
"DescribeExternalClusterSpec": doDescribeExternalClusterSpec,
|
11914
12230
|
"DescribeClusterReleaseHistory": doDescribeClusterReleaseHistory,
|
11915
12231
|
"ModifyClusterNodePool": doModifyClusterNodePool,
|
@@ -11925,6 +12241,7 @@ ACTION_MAP = {
|
|
11925
12241
|
"DeleteECMInstances": doDeleteECMInstances,
|
11926
12242
|
"DescribePrometheusAgentInstances": doDescribePrometheusAgentInstances,
|
11927
12243
|
"ScaleOutClusterMaster": doScaleOutClusterMaster,
|
12244
|
+
"DeleteHealthCheckPolicy": doDeleteHealthCheckPolicy,
|
11928
12245
|
"CreatePrometheusAlertRule": doCreatePrometheusAlertRule,
|
11929
12246
|
"DeletePrometheusRecordRuleYaml": doDeletePrometheusRecordRuleYaml,
|
11930
12247
|
"DescribeBackupStorageLocations": doDescribeBackupStorageLocations,
|
@@ -11943,7 +12260,7 @@ ACTION_MAP = {
|
|
11943
12260
|
"DescribeECMInstances": doDescribeECMInstances,
|
11944
12261
|
"DeleteTKEEdgeCluster": doDeleteTKEEdgeCluster,
|
11945
12262
|
"GetMostSuitableImageCache": doGetMostSuitableImageCache,
|
11946
|
-
"
|
12263
|
+
"DescribeClusterEndpoints": doDescribeClusterEndpoints,
|
11947
12264
|
"CreatePrometheusClusterAgent": doCreatePrometheusClusterAgent,
|
11948
12265
|
"CreatePrometheusConfig": doCreatePrometheusConfig,
|
11949
12266
|
"DescribeEKSClusterCredential": doDescribeEKSClusterCredential,
|
@@ -11959,6 +12276,7 @@ ACTION_MAP = {
|
|
11959
12276
|
"CreatePrometheusDashboard": doCreatePrometheusDashboard,
|
11960
12277
|
"DescribePrometheusOverviews": doDescribePrometheusOverviews,
|
11961
12278
|
"DeleteNodePool": doDeleteNodePool,
|
12279
|
+
"DescribeHealthCheckPolicies": doDescribeHealthCheckPolicies,
|
11962
12280
|
"CreatePrometheusAlertPolicy": doCreatePrometheusAlertPolicy,
|
11963
12281
|
"DescribeImages": doDescribeImages,
|
11964
12282
|
"ModifyClusterAuthenticationOptions": doModifyClusterAuthenticationOptions,
|
@@ -11994,16 +12312,16 @@ ACTION_MAP = {
|
|
11994
12312
|
"EnableClusterDeletionProtection": doEnableClusterDeletionProtection,
|
11995
12313
|
"UpdateTKEEdgeCluster": doUpdateTKEEdgeCluster,
|
11996
12314
|
"DescribeRIUtilizationDetail": doDescribeRIUtilizationDetail,
|
11997
|
-
"
|
12315
|
+
"UpdateImageCache": doUpdateImageCache,
|
11998
12316
|
"DescribeAddon": doDescribeAddon,
|
11999
12317
|
"DescribePrometheusInstancesOverview": doDescribePrometheusInstancesOverview,
|
12318
|
+
"RestartEKSContainerInstances": doRestartEKSContainerInstances,
|
12000
12319
|
"DescribeNodePools": doDescribeNodePools,
|
12001
12320
|
"DeletePrometheusTempSync": doDeletePrometheusTempSync,
|
12002
12321
|
"DeletePrometheusAlertPolicy": doDeletePrometheusAlertPolicy,
|
12003
12322
|
"RunPrometheusInstance": doRunPrometheusInstance,
|
12004
12323
|
"UpdateEKSCluster": doUpdateEKSCluster,
|
12005
12324
|
"ModifyPrometheusConfig": doModifyPrometheusConfig,
|
12006
|
-
"DescribeClusterEndpoints": doDescribeClusterEndpoints,
|
12007
12325
|
"DescribePostNodeResources": doDescribePostNodeResources,
|
12008
12326
|
"InstallLogAgent": doInstallLogAgent,
|
12009
12327
|
"CheckEdgeClusterCIDR": doCheckEdgeClusterCIDR,
|