tccli 3.0.1091.1__py2.py3-none-any.whl → 3.0.1093.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/cdb/v20170320/CheckMigrateCluster.md +18 -0
- tccli/examples/cdb/v20170320/DescribeClusterInfo.md +59 -0
- tccli/examples/domain/v20180808/BidPreDomains.md +21 -0
- tccli/examples/domain/v20180808/DescribeReservedBidInfo.md +43 -0
- tccli/examples/domain/v20180808/DescribeReservedPreDomainInfo.md +31 -0
- tccli/examples/es/v20180416/UpdateInstance.md +27 -27
- tccli/examples/es/v20180416/UpdatePlugins.md +6 -6
- tccli/examples/ess/v20201111/CreateBatchOrganizationRegistrationTasks.md +146 -0
- tccli/examples/ess/v20201111/CreateOrganizationAuthUrl.md +28 -0
- tccli/examples/ess/v20201111/CreateOrganizationBatchSignUrl.md +28 -0
- tccli/examples/hunyuan/v20230901/ChatPro.md +69 -31
- tccli/examples/hunyuan/v20230901/ChatStd.md +40 -1
- tccli/examples/lke/v20231130/CheckAttributeLabelExist.md +24 -0
- tccli/examples/lke/v20231130/CheckAttributeLabelRefer.md +23 -0
- tccli/examples/lke/v20231130/CreateApp.md +24 -0
- tccli/examples/lke/v20231130/CreateAttributeLabel.md +24 -0
- tccli/examples/lke/v20231130/CreateCorp.md +24 -0
- tccli/examples/lke/v20231130/CreateQA.md +24 -0
- tccli/examples/lke/v20231130/CreateQACate.md +26 -0
- tccli/examples/lke/v20231130/CreateRejectedQuestion.md +22 -0
- tccli/examples/lke/v20231130/CreateRelease.md +21 -0
- tccli/examples/lke/v20231130/DeleteApp.md +21 -0
- tccli/examples/lke/v20231130/DeleteAttributeLabel.md +21 -0
- tccli/examples/lke/v20231130/DeleteDoc.md +21 -0
- tccli/examples/lke/v20231130/DeleteQA.md +21 -0
- tccli/examples/lke/v20231130/DeleteQACate.md +21 -0
- tccli/examples/lke/v20231130/DeleteRejectedQuestion.md +21 -0
- tccli/examples/lke/v20231130/DescribeApp.md +29 -0
- tccli/examples/lke/v20231130/DescribeAttributeLabel.md +28 -0
- tccli/examples/lke/v20231130/DescribeCorp.md +21 -0
- tccli/examples/lke/v20231130/DescribeDoc.md +44 -0
- tccli/examples/lke/v20231130/DescribeQA.md +42 -0
- tccli/examples/lke/v20231130/DescribeRefer.md +35 -0
- tccli/examples/lke/v20231130/DescribeRelease.md +25 -0
- tccli/examples/lke/v20231130/DescribeReleaseInfo.md +24 -0
- tccli/examples/lke/v20231130/DescribeRobotBizIDByAppKey.md +21 -0
- tccli/examples/lke/v20231130/DescribeStorageCredential.md +32 -0
- tccli/examples/lke/v20231130/DescribeUnsatisfiedReplyContext.md +121 -0
- tccli/examples/lke/v20231130/ExportAttributeLabel.md +21 -0
- tccli/examples/lke/v20231130/ExportQAList.md +21 -0
- tccli/examples/lke/v20231130/ExportUnsatisfiedReply.md +21 -0
- tccli/examples/lke/v20231130/GenerateQA.md +21 -0
- tccli/examples/lke/v20231130/GetAppKnowledgeCount.md +22 -0
- tccli/examples/lke/v20231130/GetAppSecret.md +24 -0
- tccli/examples/lke/v20231130/GetDocPreview.md +26 -0
- tccli/examples/lke/v20231130/GetEmbedding.md +29 -0
- tccli/examples/lke/v20231130/GetMsgRecord.md +51 -0
- tccli/examples/lke/v20231130/GetTaskStatus.md +0 -0
- tccli/examples/lke/v20231130/GetWsToken.md +44 -0
- tccli/examples/lke/v20231130/GroupQA.md +44 -0
- tccli/examples/lke/v20231130/IgnoreUnsatisfiedReply.md +21 -0
- tccli/examples/lke/v20231130/IsTransferIntent.md +22 -0
- tccli/examples/lke/v20231130/ListApp.md +36 -0
- tccli/examples/lke/v20231130/ListAppCategory.md +25 -0
- tccli/examples/lke/v20231130/ListAttributeLabel.md +33 -0
- tccli/examples/lke/v20231130/ListDoc.md +52 -0
- tccli/examples/lke/v20231130/ListModel.md +31 -0
- tccli/examples/lke/v20231130/ListQA.md +66 -0
- tccli/examples/lke/v20231130/ListQACate.md +41 -0
- tccli/examples/lke/v20231130/ListRejectedQuestion.md +52 -0
- tccli/examples/lke/v20231130/ListRejectedQuestionPreview.md +37 -0
- tccli/examples/lke/v20231130/ListRelease.md +36 -0
- tccli/examples/lke/v20231130/ListReleaseConfigPreview.md +129 -0
- tccli/examples/lke/v20231130/ListReleaseDocPreview.md +38 -0
- tccli/examples/lke/v20231130/ListReleaseQAPreview.md +107 -0
- tccli/examples/lke/v20231130/ListSelectDoc.md +27 -0
- tccli/examples/lke/v20231130/ListUnsatisfiedReply.md +24 -0
- tccli/examples/lke/v20231130/ModifyApp.md +25 -0
- tccli/examples/lke/v20231130/ModifyAttributeLabel.md +23 -0
- tccli/examples/lke/v20231130/ModifyDoc.md +25 -0
- tccli/examples/lke/v20231130/ModifyDocAttrRange.md +25 -0
- tccli/examples/lke/v20231130/ModifyQA.md +24 -0
- tccli/examples/lke/v20231130/ModifyQAAttrRange.md +25 -0
- tccli/examples/lke/v20231130/ModifyQACate.md +22 -0
- tccli/examples/lke/v20231130/ModifyRejectedQuestion.md +22 -0
- tccli/examples/lke/v20231130/ParseDoc.md +25 -0
- tccli/examples/lke/v20231130/QueryParseDocResult.md +24 -0
- tccli/examples/lke/v20231130/QueryRewrite.md +25 -0
- tccli/examples/lke/v20231130/RateMsgRecord.md +22 -0
- tccli/examples/lke/v20231130/ResetSession.md +20 -0
- tccli/examples/lke/v20231130/RetryDocAudit.md +21 -0
- tccli/examples/lke/v20231130/RetryDocParse.md +21 -0
- tccli/examples/lke/v20231130/RetryRelease.md +21 -0
- tccli/examples/lke/v20231130/SaveDoc.md +34 -0
- tccli/examples/lke/v20231130/StopDocParse.md +21 -0
- tccli/examples/lke/v20231130/UploadAttributeLabel.md +27 -0
- tccli/examples/lke/v20231130/VerifyQA.md +27 -0
- tccli/examples/mna/v20210119/GetFlowPackages.md +3 -1
- tccli/examples/mna/v20210119/GetFlowStatistic.md +42 -0
- tccli/examples/ocr/v20181119/GeneralBasicOCR.md +0 -1
- tccli/examples/rce/v20201103/ManageMarketingRisk.md +19 -56
- tccli/examples/sqlserver/v20180328/DescribeRestoreTimeRange.md +23 -0
- tccli/examples/svp/v20240125/CreateSavingPlanOrder.md +1 -1
- tccli/examples/tke/v20180525/DescribeSupportedRuntime.md +25 -0
- tccli/examples/tke/v20180525/ModifyClusterRuntimeConfig.md +27 -0
- tccli/examples/vod/v20180717/CreateSubAppId.md +1 -1
- tccli/examples/vod/v20180717/DescribeAdaptiveDynamicStreamingTemplates.md +5 -1
- tccli/examples/vod/v20180717/DescribeSubAppIds.md +8 -8
- tccli/examples/vod/v20180717/ModifySubAppIdInfo.md +3 -3
- tccli/examples/vod/v20180717/ModifySubAppIdStatus.md +1 -1
- tccli/services/__init__.py +3 -0
- tccli/services/aiart/v20221229/api.json +25 -6
- tccli/services/antiddos/v20200309/api.json +10 -0
- tccli/services/asr/v20190614/api.json +4 -4
- tccli/services/bsca/v20210811/api.json +19 -1
- tccli/services/ccc/v20200210/api.json +12 -12
- tccli/services/cdb/cdb_client.py +106 -0
- tccli/services/cdb/v20170320/api.json +255 -0
- tccli/services/cdb/v20170320/examples.json +16 -0
- tccli/services/cdn/v20180606/api.json +4 -4
- tccli/services/ckafka/v20190819/api.json +29 -24
- tccli/services/domain/domain_client.py +114 -8
- tccli/services/domain/v20180808/api.json +177 -4
- tccli/services/domain/v20180808/examples.json +22 -0
- tccli/services/dts/v20211206/api.json +2 -2
- tccli/services/es/v20180416/api.json +12 -12
- tccli/services/es/v20180416/examples.json +21 -21
- tccli/services/ess/ess_client.py +149 -43
- tccli/services/ess/v20201111/api.json +406 -4
- tccli/services/ess/v20201111/examples.json +34 -0
- tccli/services/essbasic/v20210526/api.json +2 -2
- tccli/services/faceid/v20180301/api.json +10 -1
- tccli/services/hunyuan/v20230901/api.json +67 -21
- tccli/services/hunyuan/v20230901/examples.json +17 -5
- tccli/services/iai/v20180301/api.json +19 -19
- tccli/services/lcic/v20220817/api.json +49 -0
- tccli/services/lke/__init__.py +4 -0
- tccli/services/lke/lke_client.py +4117 -0
- tccli/services/lke/v20231130/api.json +9020 -0
- tccli/services/lke/v20231130/examples.json +617 -0
- tccli/services/mna/v20210119/api.json +249 -29
- tccli/services/mna/v20210119/examples.json +7 -1
- tccli/services/monitor/v20180724/api.json +30 -10
- tccli/services/ocr/v20181119/api.json +29 -15
- tccli/services/ocr/v20181119/examples.json +1 -1
- tccli/services/rce/v20201103/api.json +4 -4
- tccli/services/rce/v20201103/examples.json +3 -3
- tccli/services/redis/v20180412/api.json +1 -1
- tccli/services/scf/v20180416/api.json +18 -9
- tccli/services/sms/v20210111/api.json +1 -1
- tccli/services/sqlserver/sqlserver_client.py +110 -57
- tccli/services/sqlserver/v20180328/api.json +63 -0
- tccli/services/sqlserver/v20180328/examples.json +8 -0
- tccli/services/svp/v20240125/examples.json +1 -1
- tccli/services/tat/v20201028/api.json +3 -3
- tccli/services/tione/v20211111/api.json +25 -1
- tccli/services/tke/tke_client.py +106 -0
- tccli/services/tke/v20180525/api.json +229 -17
- tccli/services/tke/v20180525/examples.json +17 -1
- tccli/services/trtc/v20190722/api.json +46 -4
- tccli/services/vod/v20180717/api.json +24 -24
- tccli/services/vod/v20180717/examples.json +8 -8
- tccli/services/wedata/v20210820/api.json +295 -1437
- tccli/services/wedata/v20210820/examples.json +0 -88
- tccli/services/wedata/wedata_client.py +33 -616
- {tccli-3.0.1091.1.dist-info → tccli-3.0.1093.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1091.1.dist-info → tccli-3.0.1093.1.dist-info}/RECORD +161 -73
- {tccli-3.0.1091.1.dist-info → tccli-3.0.1093.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1091.1.dist-info → tccli-3.0.1093.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1091.1.dist-info → tccli-3.0.1093.1.dist-info}/license_files/LICENSE +0 -0
@@ -574,6 +574,13 @@
|
|
574
574
|
"output": "DescribeRestoreTaskResponse",
|
575
575
|
"status": "online"
|
576
576
|
},
|
577
|
+
"DescribeRestoreTimeRange": {
|
578
|
+
"document": "本接口(DescribeRestoreTimeRange)用于查询按照时间点可回档的时间范围。",
|
579
|
+
"input": "DescribeRestoreTimeRangeRequest",
|
580
|
+
"name": "查询按照时间点可回档的时间范围",
|
581
|
+
"output": "DescribeRestoreTimeRangeResponse",
|
582
|
+
"status": "online"
|
583
|
+
},
|
577
584
|
"DescribeRollbackTime": {
|
578
585
|
"document": "本接口(DescribeRollbackTime)用于查询实例可回档时间范围",
|
579
586
|
"input": "DescribeRollbackTimeRequest",
|
@@ -10644,6 +10651,62 @@
|
|
10644
10651
|
],
|
10645
10652
|
"type": "object"
|
10646
10653
|
},
|
10654
|
+
"DescribeRestoreTimeRangeRequest": {
|
10655
|
+
"document": "DescribeRestoreTimeRange请求参数结构体",
|
10656
|
+
"members": [
|
10657
|
+
{
|
10658
|
+
"disabled": false,
|
10659
|
+
"document": "实例ID",
|
10660
|
+
"example": "mssql-j8kv137v",
|
10661
|
+
"member": "string",
|
10662
|
+
"name": "InstanceId",
|
10663
|
+
"required": true,
|
10664
|
+
"type": "string"
|
10665
|
+
},
|
10666
|
+
{
|
10667
|
+
"disabled": false,
|
10668
|
+
"document": "回档的目标实例ID,不填默认回档到原实例",
|
10669
|
+
"example": "mssql-dj5i29c5n",
|
10670
|
+
"member": "string",
|
10671
|
+
"name": "TargetInstanceId",
|
10672
|
+
"required": false,
|
10673
|
+
"type": "string"
|
10674
|
+
}
|
10675
|
+
],
|
10676
|
+
"type": "object"
|
10677
|
+
},
|
10678
|
+
"DescribeRestoreTimeRangeResponse": {
|
10679
|
+
"document": "DescribeRestoreTimeRange返回参数结构体",
|
10680
|
+
"members": [
|
10681
|
+
{
|
10682
|
+
"disabled": false,
|
10683
|
+
"document": "按照时间点可回档的最小时间",
|
10684
|
+
"example": "2024-01-01 00:00:00",
|
10685
|
+
"member": "string",
|
10686
|
+
"name": "MinTime",
|
10687
|
+
"output_required": true,
|
10688
|
+
"type": "string",
|
10689
|
+
"value_allowed_null": false
|
10690
|
+
},
|
10691
|
+
{
|
10692
|
+
"disabled": false,
|
10693
|
+
"document": "按照时间点可回档的最大时间",
|
10694
|
+
"example": "2024-01-07 00:00:00",
|
10695
|
+
"member": "string",
|
10696
|
+
"name": "MaxTime",
|
10697
|
+
"output_required": true,
|
10698
|
+
"type": "string",
|
10699
|
+
"value_allowed_null": false
|
10700
|
+
},
|
10701
|
+
{
|
10702
|
+
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
10703
|
+
"member": "string",
|
10704
|
+
"name": "RequestId",
|
10705
|
+
"type": "string"
|
10706
|
+
}
|
10707
|
+
],
|
10708
|
+
"type": "object"
|
10709
|
+
},
|
10647
10710
|
"DescribeRollbackTimeRequest": {
|
10648
10711
|
"document": "DescribeRollbackTime请求参数结构体",
|
10649
10712
|
"members": [
|
@@ -680,6 +680,14 @@
|
|
680
680
|
"title": "查询回档任务列表"
|
681
681
|
}
|
682
682
|
],
|
683
|
+
"DescribeRestoreTimeRange": [
|
684
|
+
{
|
685
|
+
"document": "本接口(DescribeRestoreTimeRange)用于查询按照时间点可回档的时间范围。",
|
686
|
+
"input": "POST / HTTP/1.1\nHost: sqlserver.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeRestoreTimeRange\n<公共请求参数>\n\n{\n \"InstanceId\": \"mssql-aj89iq78\",\n \"TargetInstanceId\": \"mssql-jkoa09sf\"\n}",
|
687
|
+
"output": "{\n \"Response\": {\n \"MinTime\": \"2024-01-01 00:00:00\",\n \"MaxTime\": \"2024-01-07 00:00:00\",\n \"RequestId\": \"cd7a35be-2fbf-f3a6-210a-ea9afe158817\"\n }\n}",
|
688
|
+
"title": "查询按照时间点可回档的时间范围。"
|
689
|
+
}
|
690
|
+
],
|
683
691
|
"DescribeRollbackTime": [
|
684
692
|
{
|
685
693
|
"document": "",
|
@@ -3,7 +3,7 @@
|
|
3
3
|
"CreateSavingPlanOrder": [
|
4
4
|
{
|
5
5
|
"document": "",
|
6
|
-
"input": "POST / HTTP/1.1\nHost: svp.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateSavingPlanOrder\n<公共请求参数>\n\n{\n \"RegionId\": 47,\n \"ZoneId\": 470004,\n \"PrePayType\": \"1\",\n \"SpecifyEffectTime\": \"2023-10-21 00:00:00\",\n \"TimeSpan\": 1,\n \"TimeUnit\": \"y\",\n \"CommodityCode\": \"svp_common_CYq7cGNk3FaV\",\n \"PromiseUseAmount\": 10000,\n \"ClientToken\": \"sp-856f5555
|
6
|
+
"input": "POST / HTTP/1.1\nHost: svp.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateSavingPlanOrder\n<公共请求参数>\n\n{\n \"RegionId\": 47,\n \"ZoneId\": 470004,\n \"PrePayType\": \"1\",\n \"SpecifyEffectTime\": \"2023-10-21 00:00:00\",\n \"TimeSpan\": 1,\n \"TimeUnit\": \"y\",\n \"CommodityCode\": \"svp_common_CYq7cGNk3FaV\",\n \"PromiseUseAmount\": 10000,\n \"ClientToken\": \"sp-856f5555\"\n}",
|
7
7
|
"output": "{\n \"Response\": {\n \"BigDealId\": \"20231020400000764159521\",\n \"RequestId\": \"7525ef6b-ac63-4fa6-9bd4-d8c3c8b96220\"\n }\n}",
|
8
8
|
"title": "节省计划下单"
|
9
9
|
}
|
@@ -1798,12 +1798,12 @@
|
|
1798
1798
|
"type": "object"
|
1799
1799
|
},
|
1800
1800
|
"Filter": {
|
1801
|
-
"document": "
|
1801
|
+
"document": "> 描述键值对过滤器,用于条件过滤查询。例如过滤ID、名称、状态等\n> - 若存在多个`Filter`时,`Filter`间的关系为逻辑与(`AND`)关系。\n> - 若同一个`Filter`存在多个`Values`,同一`Filter`下`Values`间的关系为逻辑或(`OR`)关系。\n> \n> 以[DescribeCommands](https://cloud.tencent.com/document/api/1340/52681)接口的`Filters`为例。若我们需要查询命令名称(`command-name`)为 “打印工作目录” ***并且*** 命令类型(`command-type`)为 “POWERSHELL” ***或者*** “BAT” 时,可如下实现:\n```\nFilters.0.Name=command-name\n&Filters.0.Values.0=打印工作目录\n\n&Filters.1.Name=command-type\n&Filters.1.Values.0=POWERSHELL\n&Filters.1.Values.1=BAT\n```",
|
1802
1802
|
"members": [
|
1803
1803
|
{
|
1804
1804
|
"disabled": false,
|
1805
1805
|
"document": "需要过滤的字段。",
|
1806
|
-
"example": "
|
1806
|
+
"example": "command-type",
|
1807
1807
|
"member": "string",
|
1808
1808
|
"name": "Name",
|
1809
1809
|
"required": true,
|
@@ -1812,7 +1812,7 @@
|
|
1812
1812
|
{
|
1813
1813
|
"disabled": false,
|
1814
1814
|
"document": "字段的过滤值。",
|
1815
|
-
"example": "
|
1815
|
+
"example": "[\"POWERSHELL\", \"BAT\"]",
|
1816
1816
|
"member": "string",
|
1817
1817
|
"name": "Values",
|
1818
1818
|
"required": true,
|
@@ -3211,7 +3211,7 @@
|
|
3211
3211
|
},
|
3212
3212
|
{
|
3213
3213
|
"disabled": false,
|
3214
|
-
"document": "
|
3214
|
+
"document": "任务的启动命令,按任务训练模式输入,如遇特殊字符导致配置失败,可使用EncodedStartCmdInfo参数",
|
3215
3215
|
"example": "无",
|
3216
3216
|
"member": "StartCmdInfo",
|
3217
3217
|
"name": "StartCmdInfo",
|
@@ -3325,6 +3325,15 @@
|
|
3325
3325
|
"name": "PreTrainModel",
|
3326
3326
|
"required": false,
|
3327
3327
|
"type": "object"
|
3328
|
+
},
|
3329
|
+
{
|
3330
|
+
"disabled": false,
|
3331
|
+
"document": "编码后的任务启动命令,与StartCmdInfo同时配置时,仅当前参数生效",
|
3332
|
+
"example": "无",
|
3333
|
+
"member": "EncodedStartCmdInfo",
|
3334
|
+
"name": "EncodedStartCmdInfo",
|
3335
|
+
"required": false,
|
3336
|
+
"type": "object"
|
3328
3337
|
}
|
3329
3338
|
],
|
3330
3339
|
"type": "object"
|
@@ -7318,6 +7327,21 @@
|
|
7318
7327
|
],
|
7319
7328
|
"usage": "out"
|
7320
7329
|
},
|
7330
|
+
"EncodedStartCmdInfo": {
|
7331
|
+
"document": "编码后的启动命令信息",
|
7332
|
+
"members": [
|
7333
|
+
{
|
7334
|
+
"disabled": false,
|
7335
|
+
"document": "任务的启动命令,以base64格式输入,注意转换时需要完整输入{\"StartCmd\":\"\",\"PsStartCmd\":\"\",\"WorkerStartCmd\":\"\"}",
|
7336
|
+
"example": "无",
|
7337
|
+
"member": "string",
|
7338
|
+
"name": "StartCmdInfo",
|
7339
|
+
"required": false,
|
7340
|
+
"type": "string"
|
7341
|
+
}
|
7342
|
+
],
|
7343
|
+
"usage": "in"
|
7344
|
+
},
|
7321
7345
|
"EngineVersion": {
|
7322
7346
|
"document": "引擎版本",
|
7323
7347
|
"members": [
|
tccli/services/tke/tke_client.py
CHANGED
@@ -227,6 +227,58 @@ def doCreateCluster(args, parsed_globals):
|
|
227
227
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
228
228
|
|
229
229
|
|
230
|
+
def doDescribeSupportedRuntime(args, parsed_globals):
|
231
|
+
g_param = parse_global_arg(parsed_globals)
|
232
|
+
|
233
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
234
|
+
cred = credential.CVMRoleCredential()
|
235
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
236
|
+
cred = credential.STSAssumeRoleCredential(
|
237
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
238
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
239
|
+
)
|
240
|
+
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):
|
241
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
242
|
+
else:
|
243
|
+
cred = credential.Credential(
|
244
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
245
|
+
)
|
246
|
+
http_profile = HttpProfile(
|
247
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
248
|
+
reqMethod="POST",
|
249
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
250
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
251
|
+
)
|
252
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
253
|
+
if g_param[OptionsDefine.Language]:
|
254
|
+
profile.language = g_param[OptionsDefine.Language]
|
255
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
256
|
+
client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
|
257
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
258
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
259
|
+
model = models.DescribeSupportedRuntimeRequest()
|
260
|
+
model.from_json_string(json.dumps(args))
|
261
|
+
start_time = time.time()
|
262
|
+
while True:
|
263
|
+
rsp = client.DescribeSupportedRuntime(model)
|
264
|
+
result = rsp.to_json_string()
|
265
|
+
try:
|
266
|
+
json_obj = json.loads(result)
|
267
|
+
except TypeError as e:
|
268
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
269
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
270
|
+
break
|
271
|
+
cur_time = time.time()
|
272
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
273
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
274
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
275
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
276
|
+
else:
|
277
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
278
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
279
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
280
|
+
|
281
|
+
|
230
282
|
def doCreateClusterVirtualNodePool(args, parsed_globals):
|
231
283
|
g_param = parse_global_arg(parsed_globals)
|
232
284
|
|
@@ -11355,6 +11407,58 @@ def doCreateClusterEndpointVip(args, parsed_globals):
|
|
11355
11407
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
11356
11408
|
|
11357
11409
|
|
11410
|
+
def doModifyClusterRuntimeConfig(args, parsed_globals):
|
11411
|
+
g_param = parse_global_arg(parsed_globals)
|
11412
|
+
|
11413
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
11414
|
+
cred = credential.CVMRoleCredential()
|
11415
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
11416
|
+
cred = credential.STSAssumeRoleCredential(
|
11417
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
11418
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
11419
|
+
)
|
11420
|
+
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):
|
11421
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
11422
|
+
else:
|
11423
|
+
cred = credential.Credential(
|
11424
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
11425
|
+
)
|
11426
|
+
http_profile = HttpProfile(
|
11427
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
11428
|
+
reqMethod="POST",
|
11429
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
11430
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
11431
|
+
)
|
11432
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
11433
|
+
if g_param[OptionsDefine.Language]:
|
11434
|
+
profile.language = g_param[OptionsDefine.Language]
|
11435
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
11436
|
+
client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
|
11437
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
11438
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
11439
|
+
model = models.ModifyClusterRuntimeConfigRequest()
|
11440
|
+
model.from_json_string(json.dumps(args))
|
11441
|
+
start_time = time.time()
|
11442
|
+
while True:
|
11443
|
+
rsp = client.ModifyClusterRuntimeConfig(model)
|
11444
|
+
result = rsp.to_json_string()
|
11445
|
+
try:
|
11446
|
+
json_obj = json.loads(result)
|
11447
|
+
except TypeError as e:
|
11448
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
11449
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
11450
|
+
break
|
11451
|
+
cur_time = time.time()
|
11452
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
11453
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
11454
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
11455
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
11456
|
+
else:
|
11457
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
11458
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
11459
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
11460
|
+
|
11461
|
+
|
11358
11462
|
def doDescribeRouteTableConflicts(args, parsed_globals):
|
11359
11463
|
g_param = parse_global_arg(parsed_globals)
|
11360
11464
|
|
@@ -11424,6 +11528,7 @@ ACTION_MAP = {
|
|
11424
11528
|
"CreateECMInstances": doCreateECMInstances,
|
11425
11529
|
"DescribeClusterVirtualNode": doDescribeClusterVirtualNode,
|
11426
11530
|
"CreateCluster": doCreateCluster,
|
11531
|
+
"DescribeSupportedRuntime": doDescribeSupportedRuntime,
|
11427
11532
|
"CreateClusterVirtualNodePool": doCreateClusterVirtualNodePool,
|
11428
11533
|
"GetTkeAppChartList": doGetTkeAppChartList,
|
11429
11534
|
"ModifyClusterAsGroupOptionAttribute": doModifyClusterAsGroupOptionAttribute,
|
@@ -11638,6 +11743,7 @@ ACTION_MAP = {
|
|
11638
11743
|
"InstallLogAgent": doInstallLogAgent,
|
11639
11744
|
"CheckEdgeClusterCIDR": doCheckEdgeClusterCIDR,
|
11640
11745
|
"CreateClusterEndpointVip": doCreateClusterEndpointVip,
|
11746
|
+
"ModifyClusterRuntimeConfig": doModifyClusterRuntimeConfig,
|
11641
11747
|
"DescribeRouteTableConflicts": doDescribeRouteTableConflicts,
|
11642
11748
|
|
11643
11749
|
}
|