tccli 3.0.1102.1__py2.py3-none-any.whl → 3.0.1104.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/examples/aiart/v20221229/ImageToImage.md +1 -1
- tccli/examples/csip/v20221121/DescribeDbAssets.md +7 -0
- tccli/examples/csip/v20221121/DescribeOrganizationUserInfo.md +12 -1
- tccli/examples/cwp/v20180228/DescribePublicProxyInstallCommand.md +4 -4
- tccli/examples/cynosdb/v20190107/CreateCLSDelivery.md +18 -0
- tccli/examples/cynosdb/v20190107/DeleteCLSDelivery.md +18 -0
- tccli/examples/cynosdb/v20190107/DescribeInstanceCLSLogDelivery.md +18 -0
- tccli/examples/cynosdb/v20190107/StartCLSDelivery.md +18 -0
- tccli/examples/cynosdb/v20190107/StopCLSDelivery.md +18 -0
- tccli/examples/ess/v20201111/CreateUserVerifyUrl.md +29 -0
- tccli/examples/ess/v20201111/DescribeUserVerifyStatus.md +23 -0
- tccli/examples/hai/v20230812/DescribeInstances.md +3 -2
- tccli/examples/hunyuan/v20230901/QueryHunyuanImageJob.md +33 -0
- tccli/examples/hunyuan/v20230901/SubmitHunyuanImageJob.md +21 -0
- tccli/examples/iotexplorer/v20190423/CreateTRTCSignaturesWithRoomId.md +30 -0
- tccli/examples/iotexplorer/v20190423/DescribeCloudStorageAIServiceTask.md +36 -0
- tccli/examples/iotexplorer/v20190423/DescribeCloudStorageAIServiceTasks.md +3 -0
- tccli/examples/iotexplorer/v20190423/DismissRoomByStrRoomIdFromTRTC.md +20 -0
- tccli/examples/iotexplorer/v20190423/GenerateCloudStorageAIServiceTaskFileURL.md +24 -0
- tccli/examples/iotexplorer/v20190423/RemoveUserByRoomIdFromTRTC.md +21 -0
- tccli/examples/lighthouse/v20200324/DescribeInstancesDeniedActions.md +11 -6
- tccli/examples/live/v20180801/DescribeLivePadProcessorList.md +25 -0
- tccli/examples/live/v20180801/StopLivePadProcessor.md +23 -0
- tccli/examples/mrs/v20200910/DrugInstructionObject.md +98 -0
- tccli/examples/ssl/v20191205/DescribeDownloadCertificateUrl.md +23 -0
- tccli/examples/tke/v20220501/CreateNodePool.md +33 -0
- tccli/examples/tke/v20220501/DeleteNodePool.md +21 -0
- tccli/examples/tke/v20220501/DescribeNodePools.md +9 -3
- tccli/examples/tke/v20220501/ModifyNodePool.md +32 -0
- tccli/examples/waf/v20180125/CreateIpAccessControl.md +27 -0
- tccli/examples/waf/v20180125/DeleteIpAccessControlV2.md +25 -0
- tccli/examples/waf/v20180125/ImportIpAccessControl.md +30 -0
- tccli/examples/waf/v20180125/ModifyIpAccessControl.md +28 -0
- tccli/services/aiart/v20221229/api.json +3 -3
- tccli/services/aiart/v20221229/examples.json +1 -1
- tccli/services/apm/v20210622/api.json +1 -1
- tccli/services/batch/v20170312/api.json +1 -1
- tccli/services/billing/v20180709/api.json +2 -2
- tccli/services/captcha/v20190722/api.json +2 -2
- tccli/services/ccc/v20200210/api.json +3 -3
- tccli/services/cdb/v20170320/api.json +2 -2
- tccli/services/clb/v20180317/api.json +2 -2
- tccli/services/cls/v20201016/api.json +2 -2
- tccli/services/csip/v20221121/api.json +80 -2
- tccli/services/csip/v20221121/examples.json +4 -4
- tccli/services/cvm/v20170312/api.json +1 -1
- tccli/services/cwp/v20180228/api.json +17 -5
- tccli/services/cwp/v20180228/examples.json +2 -2
- tccli/services/cynosdb/cynosdb_client.py +269 -4
- tccli/services/cynosdb/v20190107/api.json +131 -0
- tccli/services/cynosdb/v20190107/examples.json +40 -0
- tccli/services/dlc/v20210125/api.json +70 -1
- tccli/services/ess/ess_client.py +110 -4
- tccli/services/ess/v20201111/api.json +185 -5
- tccli/services/ess/v20201111/examples.json +16 -0
- tccli/services/essbasic/v20210526/api.json +4 -4
- tccli/services/faceid/v20180301/api.json +1 -1
- tccli/services/fmu/v20191213/api.json +1 -1
- tccli/services/hai/v20230812/api.json +2 -2
- tccli/services/hai/v20230812/examples.json +1 -1
- tccli/services/hunyuan/hunyuan_client.py +110 -4
- tccli/services/hunyuan/v20230901/api.json +188 -4
- tccli/services/hunyuan/v20230901/examples.json +16 -0
- tccli/services/iotexplorer/iotexplorer_client.py +298 -33
- tccli/services/iotexplorer/v20190423/api.json +359 -20
- tccli/services/iotexplorer/v20190423/examples.json +41 -1
- tccli/services/iss/v20230517/api.json +10 -0
- tccli/services/lighthouse/v20200324/api.json +45 -33
- tccli/services/lighthouse/v20200324/examples.json +3 -3
- tccli/services/live/live_client.py +114 -8
- tccli/services/live/v20180801/api.json +124 -0
- tccli/services/live/v20180801/examples.json +16 -0
- tccli/services/lke/v20231130/api.json +109 -3
- tccli/services/mrs/mrs_client.py +53 -0
- tccli/services/mrs/v20200910/api.json +1649 -415
- tccli/services/mrs/v20200910/examples.json +8 -0
- tccli/services/ocr/v20181119/api.json +1 -1
- tccli/services/rce/rce_client.py +0 -53
- tccli/services/rce/v20201103/api.json +0 -197
- tccli/services/rce/v20201103/examples.json +0 -8
- tccli/services/ssl/ssl_client.py +57 -4
- tccli/services/ssl/v20191205/api.json +63 -0
- tccli/services/ssl/v20191205/examples.json +8 -0
- tccli/services/ssm/v20190923/api.json +1 -1
- tccli/services/tdmq/v20200217/api.json +40 -10
- tccli/services/teo/v20220901/api.json +34 -0
- tccli/services/tke/tke_client.py +171 -12
- tccli/services/tke/v20180525/api.json +1 -1
- tccli/services/tke/v20220501/api.json +1403 -86
- tccli/services/tke/v20220501/examples.json +25 -1
- tccli/services/trtc/v20190722/api.json +6 -9
- tccli/services/tse/v20201207/api.json +2 -2
- tccli/services/vpc/v20170312/api.json +1 -0
- tccli/services/waf/v20180125/api.json +396 -0
- tccli/services/waf/v20180125/examples.json +32 -0
- tccli/services/waf/waf_client.py +216 -4
- {tccli-3.0.1102.1.dist-info → tccli-3.0.1104.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1102.1.dist-info → tccli-3.0.1104.1.dist-info}/RECORD +102 -77
- {tccli-3.0.1102.1.dist-info → tccli-3.0.1104.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1102.1.dist-info → tccli-3.0.1104.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1102.1.dist-info → tccli-3.0.1104.1.dist-info}/license_files/LICENSE +0 -0
@@ -7447,6 +7447,36 @@
|
|
7447
7447
|
"type": "int",
|
7448
7448
|
"value_allowed_null": true
|
7449
7449
|
},
|
7450
|
+
{
|
7451
|
+
"disabled": false,
|
7452
|
+
"document": "是否为独占队列\n注意:此字段可能返回 null,表示取不到有效值。",
|
7453
|
+
"example": "true",
|
7454
|
+
"member": "bool",
|
7455
|
+
"name": "Exclusive",
|
7456
|
+
"output_required": false,
|
7457
|
+
"type": "bool",
|
7458
|
+
"value_allowed_null": true
|
7459
|
+
},
|
7460
|
+
{
|
7461
|
+
"disabled": false,
|
7462
|
+
"document": "生效的策略名\n注意:此字段可能返回 null,表示取不到有效值。",
|
7463
|
+
"example": "test-policy",
|
7464
|
+
"member": "string",
|
7465
|
+
"name": "Policy",
|
7466
|
+
"output_required": false,
|
7467
|
+
"type": "string",
|
7468
|
+
"value_allowed_null": true
|
7469
|
+
},
|
7470
|
+
{
|
7471
|
+
"disabled": false,
|
7472
|
+
"document": "扩展参数 key-value\n注意:此字段可能返回 null,表示取不到有效值。",
|
7473
|
+
"example": "{}",
|
7474
|
+
"member": "string",
|
7475
|
+
"name": "Arguments",
|
7476
|
+
"output_required": false,
|
7477
|
+
"type": "string",
|
7478
|
+
"value_allowed_null": true
|
7479
|
+
},
|
7450
7480
|
{
|
7451
7481
|
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
7452
7482
|
"member": "string",
|
@@ -10453,7 +10483,7 @@
|
|
10453
10483
|
"example": "test",
|
10454
10484
|
"member": "string",
|
10455
10485
|
"name": "EnvironmentId",
|
10456
|
-
"
|
10486
|
+
"output_required": true,
|
10457
10487
|
"type": "string",
|
10458
10488
|
"value_allowed_null": false
|
10459
10489
|
},
|
@@ -10463,7 +10493,7 @@
|
|
10463
10493
|
"example": "test",
|
10464
10494
|
"member": "string",
|
10465
10495
|
"name": "Remark",
|
10466
|
-
"
|
10496
|
+
"output_required": true,
|
10467
10497
|
"type": "string",
|
10468
10498
|
"value_allowed_null": false
|
10469
10499
|
},
|
@@ -10473,7 +10503,7 @@
|
|
10473
10503
|
"example": "2",
|
10474
10504
|
"member": "int64",
|
10475
10505
|
"name": "MsgTTL",
|
10476
|
-
"
|
10506
|
+
"output_required": true,
|
10477
10507
|
"type": "int",
|
10478
10508
|
"value_allowed_null": false
|
10479
10509
|
},
|
@@ -10483,7 +10513,7 @@
|
|
10483
10513
|
"example": "2020-02-17 00:00:00",
|
10484
10514
|
"member": "datetime",
|
10485
10515
|
"name": "CreateTime",
|
10486
|
-
"
|
10516
|
+
"output_required": true,
|
10487
10517
|
"type": "string",
|
10488
10518
|
"value_allowed_null": false
|
10489
10519
|
},
|
@@ -10493,7 +10523,7 @@
|
|
10493
10523
|
"example": "2020-02-17 00:00:00",
|
10494
10524
|
"member": "datetime",
|
10495
10525
|
"name": "UpdateTime",
|
10496
|
-
"
|
10526
|
+
"output_required": true,
|
10497
10527
|
"type": "string",
|
10498
10528
|
"value_allowed_null": false
|
10499
10529
|
},
|
@@ -10503,7 +10533,7 @@
|
|
10503
10533
|
"example": "test",
|
10504
10534
|
"member": "string",
|
10505
10535
|
"name": "NamespaceId",
|
10506
|
-
"
|
10536
|
+
"output_required": true,
|
10507
10537
|
"type": "string",
|
10508
10538
|
"value_allowed_null": false
|
10509
10539
|
},
|
@@ -10513,7 +10543,7 @@
|
|
10513
10543
|
"example": "test",
|
10514
10544
|
"member": "string",
|
10515
10545
|
"name": "NamespaceName",
|
10516
|
-
"
|
10546
|
+
"output_required": true,
|
10517
10547
|
"type": "string",
|
10518
10548
|
"value_allowed_null": false
|
10519
10549
|
},
|
@@ -10523,7 +10553,7 @@
|
|
10523
10553
|
"example": "2",
|
10524
10554
|
"member": "int64",
|
10525
10555
|
"name": "TopicNum",
|
10526
|
-
"
|
10556
|
+
"output_required": true,
|
10527
10557
|
"type": "int",
|
10528
10558
|
"value_allowed_null": true
|
10529
10559
|
},
|
@@ -10533,7 +10563,7 @@
|
|
10533
10563
|
"example": "无",
|
10534
10564
|
"member": "RetentionPolicy",
|
10535
10565
|
"name": "RetentionPolicy",
|
10536
|
-
"
|
10566
|
+
"output_required": true,
|
10537
10567
|
"type": "object",
|
10538
10568
|
"value_allowed_null": true
|
10539
10569
|
},
|
@@ -10543,7 +10573,7 @@
|
|
10543
10573
|
"example": "true",
|
10544
10574
|
"member": "bool",
|
10545
10575
|
"name": "AutoSubscriptionCreation",
|
10546
|
-
"
|
10576
|
+
"output_required": true,
|
10547
10577
|
"type": "bool",
|
10548
10578
|
"value_allowed_null": true
|
10549
10579
|
}
|
@@ -2761,6 +2761,21 @@
|
|
2761
2761
|
],
|
2762
2762
|
"usage": "both"
|
2763
2763
|
},
|
2764
|
+
"CacheTag": {
|
2765
|
+
"document": "节点缓存清除类型取值为 purge_cache_tag 时附带的信息。",
|
2766
|
+
"members": [
|
2767
|
+
{
|
2768
|
+
"disabled": false,
|
2769
|
+
"document": "待清除缓存的域名列表。",
|
2770
|
+
"example": "[\"www.qq.com\"]",
|
2771
|
+
"member": "string",
|
2772
|
+
"name": "Domains",
|
2773
|
+
"required": true,
|
2774
|
+
"type": "list"
|
2775
|
+
}
|
2776
|
+
],
|
2777
|
+
"usage": "in"
|
2778
|
+
},
|
2764
2779
|
"CertificateInfo": {
|
2765
2780
|
"document": "https 服务端证书配置",
|
2766
2781
|
"members": [
|
@@ -4068,6 +4083,15 @@
|
|
4068
4083
|
"name": "EncodeUrl",
|
4069
4084
|
"required": false,
|
4070
4085
|
"type": "bool"
|
4086
|
+
},
|
4087
|
+
{
|
4088
|
+
"disabled": false,
|
4089
|
+
"document": "节点缓存清除类型取值为 purge_cache_tag 时附带的信息。",
|
4090
|
+
"example": "无",
|
4091
|
+
"member": "CacheTag",
|
4092
|
+
"name": "CacheTag",
|
4093
|
+
"required": false,
|
4094
|
+
"type": "object"
|
4071
4095
|
}
|
4072
4096
|
],
|
4073
4097
|
"type": "object"
|
@@ -15364,6 +15388,16 @@
|
|
15364
15388
|
"type": "string",
|
15365
15389
|
"value_allowed_null": false
|
15366
15390
|
},
|
15391
|
+
{
|
15392
|
+
"disabled": false,
|
15393
|
+
"document": "节点缓存清除方法,取值有:\n<li>invalidate:标记过期,用户请求时触发回源校验,即发送带有 If-None-Match 和 If-Modified-Since 头部的 HTTP 条件请求。若源站响应 200,则节点会回源拉取新的资源并更新缓存;若源站响应 304,则节点不会更新缓存;</li>\n<li>delete:直接删除节点缓存,用户请求时触发回源拉取资源。</li>\n注意:此字段可能返回 null,表示取不到有效值。",
|
15394
|
+
"example": "invalidate",
|
15395
|
+
"member": "string",
|
15396
|
+
"name": "Method",
|
15397
|
+
"output_required": false,
|
15398
|
+
"type": "string",
|
15399
|
+
"value_allowed_null": true
|
15400
|
+
},
|
15367
15401
|
{
|
15368
15402
|
"disabled": false,
|
15369
15403
|
"document": "状态。取值有:\n<li>processing:处理中;</li>\n<li>success:成功;</li>\n<li> failed:失败;</li>\n<li>timeout:超时。</li>",
|
tccli/services/tke/tke_client.py
CHANGED
@@ -2307,7 +2307,7 @@ def doModifyClusterVirtualNodePool(args, parsed_globals):
|
|
2307
2307
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2308
2308
|
|
2309
2309
|
|
2310
|
-
def
|
2310
|
+
def doUpdateImageCache(args, parsed_globals):
|
2311
2311
|
g_param = parse_global_arg(parsed_globals)
|
2312
2312
|
|
2313
2313
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2336,11 +2336,11 @@ def doInstallEdgeLogAgent(args, parsed_globals):
|
|
2336
2336
|
client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
|
2337
2337
|
client._sdkVersion += ("_CLI_" + __version__)
|
2338
2338
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2339
|
-
model = models.
|
2339
|
+
model = models.UpdateImageCacheRequest()
|
2340
2340
|
model.from_json_string(json.dumps(args))
|
2341
2341
|
start_time = time.time()
|
2342
2342
|
while True:
|
2343
|
-
rsp = client.
|
2343
|
+
rsp = client.UpdateImageCache(model)
|
2344
2344
|
result = rsp.to_json_string()
|
2345
2345
|
try:
|
2346
2346
|
json_obj = json.loads(result)
|
@@ -2463,6 +2463,58 @@ def doDescribeClusterPendingReleases(args, parsed_globals):
|
|
2463
2463
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2464
2464
|
|
2465
2465
|
|
2466
|
+
def doDescribeTKEEdgeClusterStatus(args, parsed_globals):
|
2467
|
+
g_param = parse_global_arg(parsed_globals)
|
2468
|
+
|
2469
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
2470
|
+
cred = credential.CVMRoleCredential()
|
2471
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2472
|
+
cred = credential.STSAssumeRoleCredential(
|
2473
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2474
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2475
|
+
)
|
2476
|
+
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):
|
2477
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
2478
|
+
else:
|
2479
|
+
cred = credential.Credential(
|
2480
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
2481
|
+
)
|
2482
|
+
http_profile = HttpProfile(
|
2483
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
2484
|
+
reqMethod="POST",
|
2485
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
2486
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
2487
|
+
)
|
2488
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
2489
|
+
if g_param[OptionsDefine.Language]:
|
2490
|
+
profile.language = g_param[OptionsDefine.Language]
|
2491
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
2492
|
+
client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
|
2493
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
2494
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2495
|
+
model = models.DescribeTKEEdgeClusterStatusRequest()
|
2496
|
+
model.from_json_string(json.dumps(args))
|
2497
|
+
start_time = time.time()
|
2498
|
+
while True:
|
2499
|
+
rsp = client.DescribeTKEEdgeClusterStatus(model)
|
2500
|
+
result = rsp.to_json_string()
|
2501
|
+
try:
|
2502
|
+
json_obj = json.loads(result)
|
2503
|
+
except TypeError as e:
|
2504
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
2505
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
2506
|
+
break
|
2507
|
+
cur_time = time.time()
|
2508
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
2509
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
2510
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
2511
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
2512
|
+
else:
|
2513
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
2514
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
2515
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2516
|
+
|
2517
|
+
|
2466
2518
|
def doCreateEdgeLogConfig(args, parsed_globals):
|
2467
2519
|
g_param = parse_global_arg(parsed_globals)
|
2468
2520
|
|
@@ -5687,6 +5739,58 @@ def doDescribeImageCaches(args, parsed_globals):
|
|
5687
5739
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
5688
5740
|
|
5689
5741
|
|
5742
|
+
def doCreateNodePool(args, parsed_globals):
|
5743
|
+
g_param = parse_global_arg(parsed_globals)
|
5744
|
+
|
5745
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
5746
|
+
cred = credential.CVMRoleCredential()
|
5747
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
5748
|
+
cred = credential.STSAssumeRoleCredential(
|
5749
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
5750
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
5751
|
+
)
|
5752
|
+
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):
|
5753
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
5754
|
+
else:
|
5755
|
+
cred = credential.Credential(
|
5756
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
5757
|
+
)
|
5758
|
+
http_profile = HttpProfile(
|
5759
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
5760
|
+
reqMethod="POST",
|
5761
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
5762
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
5763
|
+
)
|
5764
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
5765
|
+
if g_param[OptionsDefine.Language]:
|
5766
|
+
profile.language = g_param[OptionsDefine.Language]
|
5767
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
5768
|
+
client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
|
5769
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
5770
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
5771
|
+
model = models.CreateNodePoolRequest()
|
5772
|
+
model.from_json_string(json.dumps(args))
|
5773
|
+
start_time = time.time()
|
5774
|
+
while True:
|
5775
|
+
rsp = client.CreateNodePool(model)
|
5776
|
+
result = rsp.to_json_string()
|
5777
|
+
try:
|
5778
|
+
json_obj = json.loads(result)
|
5779
|
+
except TypeError as e:
|
5780
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
5781
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
5782
|
+
break
|
5783
|
+
cur_time = time.time()
|
5784
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
5785
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
5786
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
5787
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
5788
|
+
else:
|
5789
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
5790
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
5791
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
5792
|
+
|
5793
|
+
|
5690
5794
|
def doModifyClusterAsGroupAttribute(args, parsed_globals):
|
5691
5795
|
g_param = parse_global_arg(parsed_globals)
|
5692
5796
|
|
@@ -8859,7 +8963,7 @@ def doDescribePrometheusOverviews(args, parsed_globals):
|
|
8859
8963
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
8860
8964
|
|
8861
8965
|
|
8862
|
-
def
|
8966
|
+
def doDeleteNodePool(args, parsed_globals):
|
8863
8967
|
g_param = parse_global_arg(parsed_globals)
|
8864
8968
|
|
8865
8969
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -8888,11 +8992,11 @@ def doDescribeTKEEdgeClusterStatus(args, parsed_globals):
|
|
8888
8992
|
client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
|
8889
8993
|
client._sdkVersion += ("_CLI_" + __version__)
|
8890
8994
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
8891
|
-
model = models.
|
8995
|
+
model = models.DeleteNodePoolRequest()
|
8892
8996
|
model.from_json_string(json.dumps(args))
|
8893
8997
|
start_time = time.time()
|
8894
8998
|
while True:
|
8895
|
-
rsp = client.
|
8999
|
+
rsp = client.DeleteNodePool(model)
|
8896
9000
|
result = rsp.to_json_string()
|
8897
9001
|
try:
|
8898
9002
|
json_obj = json.loads(result)
|
@@ -9847,7 +9951,7 @@ def doRollbackClusterRelease(args, parsed_globals):
|
|
9847
9951
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
9848
9952
|
|
9849
9953
|
|
9850
|
-
def
|
9954
|
+
def doInstallEdgeLogAgent(args, parsed_globals):
|
9851
9955
|
g_param = parse_global_arg(parsed_globals)
|
9852
9956
|
|
9853
9957
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -9876,11 +9980,11 @@ def doUpdateImageCache(args, parsed_globals):
|
|
9876
9980
|
client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
|
9877
9981
|
client._sdkVersion += ("_CLI_" + __version__)
|
9878
9982
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
9879
|
-
model = models.
|
9983
|
+
model = models.InstallEdgeLogAgentRequest()
|
9880
9984
|
model.from_json_string(json.dumps(args))
|
9881
9985
|
start_time = time.time()
|
9882
9986
|
while True:
|
9883
|
-
rsp = client.
|
9987
|
+
rsp = client.InstallEdgeLogAgent(model)
|
9884
9988
|
result = rsp.to_json_string()
|
9885
9989
|
try:
|
9886
9990
|
json_obj = json.loads(result)
|
@@ -10315,6 +10419,58 @@ def doDescribePrometheusAlertRule(args, parsed_globals):
|
|
10315
10419
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
10316
10420
|
|
10317
10421
|
|
10422
|
+
def doModifyNodePool(args, parsed_globals):
|
10423
|
+
g_param = parse_global_arg(parsed_globals)
|
10424
|
+
|
10425
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
10426
|
+
cred = credential.CVMRoleCredential()
|
10427
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
10428
|
+
cred = credential.STSAssumeRoleCredential(
|
10429
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
10430
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
10431
|
+
)
|
10432
|
+
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):
|
10433
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
10434
|
+
else:
|
10435
|
+
cred = credential.Credential(
|
10436
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
10437
|
+
)
|
10438
|
+
http_profile = HttpProfile(
|
10439
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
10440
|
+
reqMethod="POST",
|
10441
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
10442
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
10443
|
+
)
|
10444
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
10445
|
+
if g_param[OptionsDefine.Language]:
|
10446
|
+
profile.language = g_param[OptionsDefine.Language]
|
10447
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
10448
|
+
client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
|
10449
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
10450
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
10451
|
+
model = models.ModifyNodePoolRequest()
|
10452
|
+
model.from_json_string(json.dumps(args))
|
10453
|
+
start_time = time.time()
|
10454
|
+
while True:
|
10455
|
+
rsp = client.ModifyNodePool(model)
|
10456
|
+
result = rsp.to_json_string()
|
10457
|
+
try:
|
10458
|
+
json_obj = json.loads(result)
|
10459
|
+
except TypeError as e:
|
10460
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
10461
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
10462
|
+
break
|
10463
|
+
cur_time = time.time()
|
10464
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
10465
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
10466
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
10467
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
10468
|
+
else:
|
10469
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
10470
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
10471
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
10472
|
+
|
10473
|
+
|
10318
10474
|
def doForwardTKEEdgeApplicationRequestV3(args, parsed_globals):
|
10319
10475
|
g_param = parse_global_arg(parsed_globals)
|
10320
10476
|
|
@@ -11568,9 +11724,10 @@ ACTION_MAP = {
|
|
11568
11724
|
"EnableClusterAudit": doEnableClusterAudit,
|
11569
11725
|
"CreateBackupStorageLocation": doCreateBackupStorageLocation,
|
11570
11726
|
"ModifyClusterVirtualNodePool": doModifyClusterVirtualNodePool,
|
11571
|
-
"
|
11727
|
+
"UpdateImageCache": doUpdateImageCache,
|
11572
11728
|
"CreateClusterNodePool": doCreateClusterNodePool,
|
11573
11729
|
"DescribeClusterPendingReleases": doDescribeClusterPendingReleases,
|
11730
|
+
"DescribeTKEEdgeClusterStatus": doDescribeTKEEdgeClusterStatus,
|
11574
11731
|
"CreateEdgeLogConfig": doCreateEdgeLogConfig,
|
11575
11732
|
"DescribeAvailableClusterVersion": doDescribeAvailableClusterVersion,
|
11576
11733
|
"DeleteImageCaches": doDeleteImageCaches,
|
@@ -11633,6 +11790,7 @@ ACTION_MAP = {
|
|
11633
11790
|
"UpdateClusterKubeconfig": doUpdateClusterKubeconfig,
|
11634
11791
|
"DescribeVpcCniPodLimits": doDescribeVpcCniPodLimits,
|
11635
11792
|
"DescribeImageCaches": doDescribeImageCaches,
|
11793
|
+
"CreateNodePool": doCreateNodePool,
|
11636
11794
|
"ModifyClusterAsGroupAttribute": doModifyClusterAsGroupAttribute,
|
11637
11795
|
"CreatePrometheusTemp": doCreatePrometheusTemp,
|
11638
11796
|
"CreateClusterRoute": doCreateClusterRoute,
|
@@ -11694,7 +11852,7 @@ ACTION_MAP = {
|
|
11694
11852
|
"CheckInstancesUpgradeAble": doCheckInstancesUpgradeAble,
|
11695
11853
|
"CreatePrometheusDashboard": doCreatePrometheusDashboard,
|
11696
11854
|
"DescribePrometheusOverviews": doDescribePrometheusOverviews,
|
11697
|
-
"
|
11855
|
+
"DeleteNodePool": doDeleteNodePool,
|
11698
11856
|
"CreatePrometheusAlertPolicy": doCreatePrometheusAlertPolicy,
|
11699
11857
|
"DescribeImages": doDescribeImages,
|
11700
11858
|
"ModifyClusterAuthenticationOptions": doModifyClusterAuthenticationOptions,
|
@@ -11713,7 +11871,7 @@ ACTION_MAP = {
|
|
11713
11871
|
"DescribeEdgeClusterInstances": doDescribeEdgeClusterInstances,
|
11714
11872
|
"DescribeClusterAsGroupOption": doDescribeClusterAsGroupOption,
|
11715
11873
|
"RollbackClusterRelease": doRollbackClusterRelease,
|
11716
|
-
"
|
11874
|
+
"InstallEdgeLogAgent": doInstallEdgeLogAgent,
|
11717
11875
|
"UpdateClusterVersion": doUpdateClusterVersion,
|
11718
11876
|
"CreatePrometheusRecordRuleYaml": doCreatePrometheusRecordRuleYaml,
|
11719
11877
|
"DescribeClusterStatus": doDescribeClusterStatus,
|
@@ -11722,6 +11880,7 @@ ACTION_MAP = {
|
|
11722
11880
|
"DeletePrometheusConfig": doDeletePrometheusConfig,
|
11723
11881
|
"DescribeEnableVpcCniProgress": doDescribeEnableVpcCniProgress,
|
11724
11882
|
"DescribePrometheusAlertRule": doDescribePrometheusAlertRule,
|
11883
|
+
"ModifyNodePool": doModifyNodePool,
|
11725
11884
|
"ForwardTKEEdgeApplicationRequestV3": doForwardTKEEdgeApplicationRequestV3,
|
11726
11885
|
"SyncPrometheusTemplate": doSyncPrometheusTemplate,
|
11727
11886
|
"DescribeClusterReleases": doDescribeClusterReleases,
|
@@ -10006,7 +10006,7 @@
|
|
10006
10006
|
},
|
10007
10007
|
{
|
10008
10008
|
"disabled": false,
|
10009
|
-
"document": "· \"Name\":\"ClusterName\",\"Values\": [\"test\"] 按照【集群名】进行过滤。 类型:String 必选:否 · \"Name\":\"ClusterType\",\"Values\": [\"MANAGED_CLUSTER\"] 按照【集群类型】进行过滤。 类型:String 必选:否 · \"Name\":\"ClusterStatus\",\"Values\": [\"Running\"] 按照【集群状态】进行过滤。 类型:String 必选:否 · \"Name\":\"
|
10009
|
+
"document": "· \"Name\":\"ClusterName\",\"Values\": [\"test\"] 按照【集群名】进行过滤。 类型:String 必选:否 · \"Name\":\"ClusterType\",\"Values\": [\"MANAGED_CLUSTER\"] 按照【集群类型】进行过滤。 类型:String 必选:否 · \"Name\":\"ClusterStatus\",\"Values\": [\"Running\"] 按照【集群状态】进行过滤。 类型:String 必选:否 · \"Name\":\"vpc-id\",\"Values\": [\"vpc-123qajzs\"] 按照【VPC】进行过滤。 类型:String 必选:否 · \"Name\":\"tag-key\",\"Values\": [\"testKey\"] 按照【标签键】进行过滤。 类型:String 必选:否 · \"Name\":\"tag-value\",\"Values\": [\"testValue\"] 按照【标签值】进行过滤。 类型:String 必选:否 · \"Name\":\"Tags\",\"Values\": [\"abc:1\"] 按照【标签键值对】进行过滤。 类型:String 必选:否",
|
10010
10010
|
"example": "无",
|
10011
10011
|
"member": "Filter",
|
10012
10012
|
"name": "Filters",
|