tccli 3.0.1004.1__py2.py3-none-any.whl → 3.0.1005.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/cvm/v20170312/CreateLaunchTemplate.md +1 -1
- tccli/examples/cvm/v20170312/RenewInstances.md +2 -2
- tccli/examples/cvm/v20170312/ResetInstancesPassword.md +1 -1
- tccli/examples/cvm/v20170312/StopInstances.md +1 -1
- tccli/examples/cwp/v20180228/DescribeMachineInfo.md +20 -20
- tccli/examples/cynosdb/v20190107/CreateClusterDatabase.md +9 -9
- tccli/examples/cynosdb/v20190107/DescribeClusterParams.md +18 -28
- tccli/examples/cynosdb/v20190107/DescribeClusters.md +70 -77
- tccli/examples/cynosdb/v20190107/DescribeZones.md +27 -29
- tccli/examples/cynosdb/v20190107/ModifyAccountHost.md +5 -5
- tccli/examples/cynosdb/v20190107/ModifyProxyDesc.md +4 -4
- tccli/examples/cynosdb/v20190107/ReloadBalanceProxyNode.md +5 -5
- tccli/examples/essbasic/v20210526/OperateChannelTemplate.md +22 -22
- tccli/examples/hai/v20230812/DescribeApplications.md +2 -1
- tccli/examples/sqlserver/v20180328/BalanceReadOnlyGroup.md +21 -0
- tccli/examples/sqlserver/v20180328/DeleteRestoreTask.md +21 -0
- tccli/examples/sqlserver/v20180328/DescribeAccountPrivilegeByDB.md +31 -0
- tccli/examples/sqlserver/v20180328/DescribeCollationTimeZone.md +24 -0
- tccli/examples/sqlserver/v20180328/DescribeCrossRegions.md +27 -0
- tccli/examples/sqlserver/v20180328/DescribeDBPrivilegeByAccount.md +46 -0
- tccli/examples/sqlserver/v20180328/DescribeDBRestoreTime.md +31 -0
- tccli/examples/sqlserver/v20180328/DescribeDatabaseNames.md +27 -0
- tccli/examples/sqlserver/v20180328/DescribeInquiryPriceParameter.md +30 -0
- tccli/examples/sqlserver/v20180328/DescribeInstanceTasks.md +36 -0
- tccli/examples/sqlserver/v20180328/DescribeInstanceTradeParameter.md +37 -0
- tccli/examples/sqlserver/v20180328/DescribeProductSpec.md +81 -0
- tccli/examples/sqlserver/v20180328/DescribeReadOnlyGroupAutoWeight.md +60 -0
- tccli/examples/sqlserver/v20180328/DescribeRestoreTask.md +46 -0
- tccli/examples/sqlserver/v20180328/DescribeSpecSellStatus.md +124 -0
- tccli/examples/sqlserver/v20180328/DescribeUpgradeInstanceCheck.md +71 -0
- tccli/examples/sqlserver/v20180328/ModifyCloseWanIp.md +21 -0
- tccli/examples/sqlserver/v20180328/ModifyDBInstanceNote.md +21 -0
- tccli/examples/sqlserver/v20180328/ModifyOpenWanIp.md +21 -0
- tccli/examples/sqlserver/v20180328/ModifyPublishSubscribe.md +51 -0
- tccli/examples/tbaas/v20180416/DescribeFabricBlock.md +37 -0
- tccli/examples/tbaas/v20180416/DescribeFabricTransaction.md +33 -0
- tccli/examples/tbaas/v20180416/InvokeFabricChaincode.md +28 -0
- tccli/examples/tbaas/v20180416/QueryFabricChaincode.md +27 -0
- tccli/examples/tcss/v20201101/AddEditImageAutoAuthorizedRule.md +1 -1
- tccli/examples/tcss/v20201101/CreateAssetImageScanSetting.md +4 -4
- tccli/examples/tcss/v20201101/DescribeAssetImageDetail.md +28 -27
- tccli/examples/tcss/v20201101/DescribeImageAutoAuthorizedRule.md +2 -2
- tccli/examples/tcss/v20201101/RenewImageAuthorizeState.md +2 -2
- tccli/examples/tke/v20180525/DescribeClusterEndpoints.md +1 -0
- tccli/examples/tke/v20180525/DescribeClusterExtraArgs.md +31 -0
- tccli/examples/tke/v20180525/DescribeExternalNodeSupportConfig.md +81 -0
- tccli/examples/tke/v20180525/DescribeIPAMD.md +26 -0
- tccli/examples/trocket/v20230308/ImportSourceClusterConsumerGroups.md +23 -0
- tccli/examples/trocket/v20230308/ImportSourceClusterTopics.md +25 -0
- tccli/examples/wedata/v20210820/DescribeApproveList.md +43 -161
- tccli/examples/wedata/v20210820/DescribeApproveTypeList.md +64 -0
- tccli/services/__init__.py +1 -5
- tccli/services/billing/v20180709/api.json +10 -10
- tccli/services/cdb/v20170320/api.json +10 -1
- tccli/services/cloudstudio/cloudstudio_client.py +30 -1042
- tccli/services/cvm/v20170312/api.json +68 -68
- tccli/services/cvm/v20170312/examples.json +4 -4
- tccli/services/cwp/v20180228/api.json +20 -0
- tccli/services/cwp/v20180228/examples.json +1 -1
- tccli/services/cynosdb/v20190107/api.json +10 -11
- tccli/services/cynosdb/v20190107/examples.json +14 -14
- tccli/services/dsgc/v20190723/api.json +48 -41
- tccli/services/ess/v20201111/api.json +9 -9
- tccli/services/essbasic/v20210526/api.json +10 -10
- tccli/services/essbasic/v20210526/examples.json +6 -6
- tccli/services/hai/v20230812/api.json +69 -69
- tccli/services/hai/v20230812/examples.json +1 -1
- tccli/services/sqlserver/sqlserver_client.py +1418 -358
- tccli/services/sqlserver/v20180328/api.json +2426 -172
- tccli/services/sqlserver/v20180328/examples.json +166 -0
- tccli/services/tbaas/tbaas_client.py +273 -61
- tccli/services/tbaas/v20180416/api.json +539 -0
- tccli/services/tbaas/v20180416/examples.json +32 -0
- tccli/services/tchd/v20230306/api.json +1 -1
- tccli/services/tcss/v20201101/api.json +443 -87
- tccli/services/tcss/v20201101/examples.json +7 -7
- tccli/services/tdmq/v20200217/api.json +9 -9
- tccli/services/tke/tke_client.py +159 -0
- tccli/services/tke/v20180525/api.json +375 -0
- tccli/services/tke/v20180525/examples.json +25 -1
- tccli/services/trocket/trocket_client.py +171 -65
- tccli/services/trocket/v20230308/api.json +230 -0
- tccli/services/trocket/v20230308/examples.json +16 -0
- tccli/services/tse/v20201207/api.json +57 -35
- tccli/services/vrs/v20200824/api.json +10 -0
- tccli/services/waf/v20180125/api.json +201 -54
- tccli/services/wedata/v20210820/api.json +144 -14
- tccli/services/wedata/v20210820/examples.json +16 -2
- tccli/services/wedata/wedata_client.py +53 -0
- tccli/services/weilingwith/v20230427/api.json +13 -13
- {tccli-3.0.1004.1.dist-info → tccli-3.0.1005.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1004.1.dist-info → tccli-3.0.1005.1.dist-info}/RECORD +96 -72
- tccli/services/casb/__init__.py +0 -4
- tccli/services/casb/casb_client.py +0 -194
- tccli/services/casb/v20200507/api.json +0 -110
- tccli/services/casb/v20200507/examples.json +0 -19
- tccli/services/cloudstudio/v20210524/api.json +0 -2604
- tccli/services/cloudstudio/v20210524/examples.json +0 -205
- {tccli-3.0.1004.1.dist-info → tccli-3.0.1005.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1004.1.dist-info → tccli-3.0.1005.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1004.1.dist-info → tccli-3.0.1005.1.dist-info}/license_files/LICENSE +0 -0
@@ -86,7 +86,7 @@
|
|
86
86
|
{
|
87
87
|
"document": "",
|
88
88
|
"input": "https://tcss.tencentcloudapi.com/?Action=AddEditImageAutoAuthorizedRule\n&RangeType=\"MANUAL\"\n&HostIdSet.0=\"xx\"\n&MaxDailyCount=1\n&RuleId=1\n&IsEnabled=1\n&<公共请求参数>",
|
89
|
-
"output": "{\n \"Response\": {\n \"RequestId\": \"
|
89
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"aaa\"\n }\n}",
|
90
90
|
"title": "新增或编辑本地镜像自动授权规则"
|
91
91
|
}
|
92
92
|
],
|
@@ -211,8 +211,8 @@
|
|
211
211
|
"CreateAssetImageScanSetting": [
|
212
212
|
{
|
213
213
|
"document": "添加容器安全镜像扫描设置",
|
214
|
-
"input": "POST / HTTP/1.1\nHost: tcss.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateAssetImageScanSetting\n<公共请求参数>\n\n{\n \"Enable\": true,\n \"ScanTime\": \"
|
215
|
-
"output": "{\n \"Response\": {\n \"RequestId\": \"
|
214
|
+
"input": "POST / HTTP/1.1\nHost: tcss.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateAssetImageScanSetting\n<公共请求参数>\n\n{\n \"Enable\": true,\n \"ScanTime\": \"00:00\",\n \"ScanPeriod\": 1,\n \"ScanVirus\": true,\n \"ScanRisk\": true,\n \"ScanVul\": true,\n \"ScanEndTime\": \"02:00\"\n}",
|
215
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"e3526ac5-6a37-46c4-8f65-c722973f4f65\"\n }\n}",
|
216
216
|
"title": "添加容器安全镜像扫描设置"
|
217
217
|
}
|
218
218
|
],
|
@@ -888,7 +888,7 @@
|
|
888
888
|
{
|
889
889
|
"document": "查询镜像详细信息",
|
890
890
|
"input": "POST / HTTP/1.1\nHost: tcss.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeAssetImageDetail\n<公共请求参数>\n\n{\n \"ImageID\": \"dskaldjskld\"\n}",
|
891
|
-
"output": "{\n \"Response\": {\n \"
|
891
|
+
"output": "{\n \"Response\": {\n \"ImageID\": \"abc\",\n \"ImageName\": \"abc\",\n \"CreateTime\": \"abc\",\n \"Size\": 1,\n \"HostCnt\": 1,\n \"ContainerCnt\": 1,\n \"ScanTime\": \"abc\",\n \"VulCnt\": 1,\n \"RiskCnt\": 1,\n \"SensitiveInfoCnt\": 1,\n \"IsTrustImage\": true,\n \"OsName\": \"abc\",\n \"AgentError\": \"abc\",\n \"ScanError\": \"abc\",\n \"Architecture\": \"abc\",\n \"Author\": \"abc\",\n \"BuildHistory\": \"abc\",\n \"ScanVirusProgress\": 1,\n \"ScanVulProgress\": 1,\n \"ScanRiskProgress\": 1,\n \"ScanVirusError\": \"abc\",\n \"ScanVulError\": \"abc\",\n \"ScanRiskError\": \"abc\",\n \"ScanStatus\": \"abc\",\n \"VirusCnt\": 1,\n \"Status\": 1,\n \"RemainScanTime\": 1,\n \"IsAuthorized\": 0,\n \"ImageDigest\": \"abc\",\n \"RequestId\": \"abc\"\n }\n}",
|
892
892
|
"title": "查询镜像详细信息"
|
893
893
|
}
|
894
894
|
],
|
@@ -1426,7 +1426,7 @@
|
|
1426
1426
|
{
|
1427
1427
|
"document": "",
|
1428
1428
|
"input": "https://tcss.tencentcloudapi.com/?Action=DescribeImageAutoAuthorizedRule\n&<公共请求参数>",
|
1429
|
-
"output": "{\n \"Response\": {\n \"MaxDailyCount\": 0,\n \"RangeType\": \"
|
1429
|
+
"output": "{\n \"Response\": {\n \"MaxDailyCount\": 0,\n \"RangeType\": \"ALL\",\n \"RuleId\": 1,\n \"HostCount\": 0,\n \"RequestId\": \"abc\",\n \"IsEnabled\": 0\n }\n}",
|
1430
1430
|
"title": "查询本地镜像自动授权规则"
|
1431
1431
|
}
|
1432
1432
|
],
|
@@ -2633,8 +2633,8 @@
|
|
2633
2633
|
"RenewImageAuthorizeState": [
|
2634
2634
|
{
|
2635
2635
|
"document": "",
|
2636
|
-
"input": "https://tcss.tencentcloudapi.com/?Action=RenewImageAuthorizeState\n&AllImages=false\n&ImageIds.0=
|
2637
|
-
"output": "{\n \"Response\": {\n \"RequestId\": \"
|
2636
|
+
"input": "https://tcss.tencentcloudapi.com/?Action=RenewImageAuthorizeState\n&AllImages=false\n&ImageIds.0=aaa\n&<公共请求参数>",
|
2637
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"aaa\"\n }\n}",
|
2638
2638
|
"title": "授权镜像扫描"
|
2639
2639
|
}
|
2640
2640
|
],
|
@@ -3219,15 +3219,6 @@
|
|
3219
3219
|
"required": true,
|
3220
3220
|
"type": "int"
|
3221
3221
|
},
|
3222
|
-
{
|
3223
|
-
"disabled": false,
|
3224
|
-
"document": "集群的标签列表(已废弃)",
|
3225
|
-
"example": "NULL",
|
3226
|
-
"member": "Tag",
|
3227
|
-
"name": "Tags",
|
3228
|
-
"required": true,
|
3229
|
-
"type": "list"
|
3230
|
-
},
|
3231
3222
|
{
|
3232
3223
|
"disabled": false,
|
3233
3224
|
"document": "集群名称,不支持中字以及除了短线和下划线外的特殊字符且不超过64个字符。",
|
@@ -3254,6 +3245,15 @@
|
|
3254
3245
|
"name": "Vpcs",
|
3255
3246
|
"required": false,
|
3256
3247
|
"type": "object"
|
3248
|
+
},
|
3249
|
+
{
|
3250
|
+
"disabled": false,
|
3251
|
+
"document": "集群的标签列表(已废弃)",
|
3252
|
+
"example": "NULL",
|
3253
|
+
"member": "Tag",
|
3254
|
+
"name": "Tags",
|
3255
|
+
"required": false,
|
3256
|
+
"type": "list"
|
3257
3257
|
}
|
3258
3258
|
],
|
3259
3259
|
"type": "object"
|
tccli/services/tke/tke_client.py
CHANGED
@@ -537,6 +537,58 @@ def doUpdateEdgeClusterVersion(args, parsed_globals):
|
|
537
537
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
538
538
|
|
539
539
|
|
540
|
+
def doDescribeExternalNodeSupportConfig(args, parsed_globals):
|
541
|
+
g_param = parse_global_arg(parsed_globals)
|
542
|
+
|
543
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
544
|
+
cred = credential.CVMRoleCredential()
|
545
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
546
|
+
cred = credential.STSAssumeRoleCredential(
|
547
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
548
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
549
|
+
)
|
550
|
+
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):
|
551
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
552
|
+
else:
|
553
|
+
cred = credential.Credential(
|
554
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
555
|
+
)
|
556
|
+
http_profile = HttpProfile(
|
557
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
558
|
+
reqMethod="POST",
|
559
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
560
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
561
|
+
)
|
562
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
563
|
+
if g_param[OptionsDefine.Language]:
|
564
|
+
profile.language = g_param[OptionsDefine.Language]
|
565
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
566
|
+
client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
|
567
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
568
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
569
|
+
model = models.DescribeExternalNodeSupportConfigRequest()
|
570
|
+
model.from_json_string(json.dumps(args))
|
571
|
+
start_time = time.time()
|
572
|
+
while True:
|
573
|
+
rsp = client.DescribeExternalNodeSupportConfig(model)
|
574
|
+
result = rsp.to_json_string()
|
575
|
+
try:
|
576
|
+
json_obj = json.loads(result)
|
577
|
+
except TypeError as e:
|
578
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
579
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
580
|
+
break
|
581
|
+
cur_time = time.time()
|
582
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
583
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
584
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
585
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
586
|
+
else:
|
587
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
588
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
589
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
590
|
+
|
591
|
+
|
540
592
|
def doDeleteEdgeClusterInstances(args, parsed_globals):
|
541
593
|
g_param = parse_global_arg(parsed_globals)
|
542
594
|
|
@@ -1005,6 +1057,58 @@ def doDescribeClusterAsGroups(args, parsed_globals):
|
|
1005
1057
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1006
1058
|
|
1007
1059
|
|
1060
|
+
def doDescribeIPAMD(args, parsed_globals):
|
1061
|
+
g_param = parse_global_arg(parsed_globals)
|
1062
|
+
|
1063
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1064
|
+
cred = credential.CVMRoleCredential()
|
1065
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1066
|
+
cred = credential.STSAssumeRoleCredential(
|
1067
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1068
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
1069
|
+
)
|
1070
|
+
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):
|
1071
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1072
|
+
else:
|
1073
|
+
cred = credential.Credential(
|
1074
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1075
|
+
)
|
1076
|
+
http_profile = HttpProfile(
|
1077
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1078
|
+
reqMethod="POST",
|
1079
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
1080
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1081
|
+
)
|
1082
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1083
|
+
if g_param[OptionsDefine.Language]:
|
1084
|
+
profile.language = g_param[OptionsDefine.Language]
|
1085
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1086
|
+
client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
|
1087
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1088
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1089
|
+
model = models.DescribeIPAMDRequest()
|
1090
|
+
model.from_json_string(json.dumps(args))
|
1091
|
+
start_time = time.time()
|
1092
|
+
while True:
|
1093
|
+
rsp = client.DescribeIPAMD(model)
|
1094
|
+
result = rsp.to_json_string()
|
1095
|
+
try:
|
1096
|
+
json_obj = json.loads(result)
|
1097
|
+
except TypeError as e:
|
1098
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1099
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1100
|
+
break
|
1101
|
+
cur_time = time.time()
|
1102
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1103
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1104
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1105
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1106
|
+
else:
|
1107
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1108
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1109
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1110
|
+
|
1111
|
+
|
1008
1112
|
def doCreateClusterRouteTable(args, parsed_globals):
|
1009
1113
|
g_param = parse_global_arg(parsed_globals)
|
1010
1114
|
|
@@ -5165,6 +5269,58 @@ def doCreateEKSCluster(args, parsed_globals):
|
|
5165
5269
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
5166
5270
|
|
5167
5271
|
|
5272
|
+
def doDescribeClusterExtraArgs(args, parsed_globals):
|
5273
|
+
g_param = parse_global_arg(parsed_globals)
|
5274
|
+
|
5275
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
5276
|
+
cred = credential.CVMRoleCredential()
|
5277
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
5278
|
+
cred = credential.STSAssumeRoleCredential(
|
5279
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
5280
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
5281
|
+
)
|
5282
|
+
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):
|
5283
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
5284
|
+
else:
|
5285
|
+
cred = credential.Credential(
|
5286
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
5287
|
+
)
|
5288
|
+
http_profile = HttpProfile(
|
5289
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
5290
|
+
reqMethod="POST",
|
5291
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
5292
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
5293
|
+
)
|
5294
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
5295
|
+
if g_param[OptionsDefine.Language]:
|
5296
|
+
profile.language = g_param[OptionsDefine.Language]
|
5297
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
5298
|
+
client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
|
5299
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
5300
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
5301
|
+
model = models.DescribeClusterExtraArgsRequest()
|
5302
|
+
model.from_json_string(json.dumps(args))
|
5303
|
+
start_time = time.time()
|
5304
|
+
while True:
|
5305
|
+
rsp = client.DescribeClusterExtraArgs(model)
|
5306
|
+
result = rsp.to_json_string()
|
5307
|
+
try:
|
5308
|
+
json_obj = json.loads(result)
|
5309
|
+
except TypeError as e:
|
5310
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
5311
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
5312
|
+
break
|
5313
|
+
cur_time = time.time()
|
5314
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
5315
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
5316
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
5317
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
5318
|
+
else:
|
5319
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
5320
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
5321
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
5322
|
+
|
5323
|
+
|
5168
5324
|
def doUpdateClusterKubeconfig(args, parsed_globals):
|
5169
5325
|
g_param = parse_global_arg(parsed_globals)
|
5170
5326
|
|
@@ -11062,6 +11218,7 @@ ACTION_MAP = {
|
|
11062
11218
|
"EnableVpcCniNetworkType": doEnableVpcCniNetworkType,
|
11063
11219
|
"DeleteCluster": doDeleteCluster,
|
11064
11220
|
"UpdateEdgeClusterVersion": doUpdateEdgeClusterVersion,
|
11221
|
+
"DescribeExternalNodeSupportConfig": doDescribeExternalNodeSupportConfig,
|
11065
11222
|
"DeleteEdgeClusterInstances": doDeleteEdgeClusterInstances,
|
11066
11223
|
"ModifyPrometheusAlertRule": doModifyPrometheusAlertRule,
|
11067
11224
|
"SetNodePoolNodeProtection": doSetNodePoolNodeProtection,
|
@@ -11071,6 +11228,7 @@ ACTION_MAP = {
|
|
11071
11228
|
"EnableEventPersistence": doEnableEventPersistence,
|
11072
11229
|
"DescribePrometheusAlertHistory": doDescribePrometheusAlertHistory,
|
11073
11230
|
"DescribeClusterAsGroups": doDescribeClusterAsGroups,
|
11231
|
+
"DescribeIPAMD": doDescribeIPAMD,
|
11074
11232
|
"CreateClusterRouteTable": doCreateClusterRouteTable,
|
11075
11233
|
"GetUpgradeInstanceProgress": doGetUpgradeInstanceProgress,
|
11076
11234
|
"ModifyPrometheusAgentExternalLabels": doModifyPrometheusAgentExternalLabels,
|
@@ -11151,6 +11309,7 @@ ACTION_MAP = {
|
|
11151
11309
|
"ModifyPrometheusTemplate": doModifyPrometheusTemplate,
|
11152
11310
|
"ModifyNodePoolDesiredCapacityAboutAsg": doModifyNodePoolDesiredCapacityAboutAsg,
|
11153
11311
|
"CreateEKSCluster": doCreateEKSCluster,
|
11312
|
+
"DescribeClusterExtraArgs": doDescribeClusterExtraArgs,
|
11154
11313
|
"UpdateClusterKubeconfig": doUpdateClusterKubeconfig,
|
11155
11314
|
"DescribeVpcCniPodLimits": doDescribeVpcCniPodLimits,
|
11156
11315
|
"DescribeImageCaches": doDescribeImageCaches,
|