tccli 3.0.1158.1__py2.py3-none-any.whl → 3.0.1159.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/services/ams/v20201229/api.json +314 -56
- tccli/services/ams/v20201229/examples.json +2 -2
- tccli/services/bi/v20220105/api.json +1 -1
- tccli/services/cat/v20180409/api.json +9 -0
- tccli/services/cdb/v20170320/api.json +30 -3
- tccli/services/cdn/v20180606/api.json +86 -0
- tccli/services/cfw/cfw_client.py +53 -0
- tccli/services/cfw/v20190904/api.json +243 -0
- tccli/services/cfw/v20190904/examples.json +8 -0
- tccli/services/cynosdb/v20190107/api.json +91 -0
- tccli/services/ecm/v20190719/api.json +23 -5
- tccli/services/emr/emr_client.py +53 -0
- tccli/services/emr/v20190103/api.json +351 -98
- tccli/services/emr/v20190103/examples.json +11 -3
- tccli/services/hunyuan/v20230901/api.json +114 -3
- tccli/services/tke/tke_client.py +53 -0
- tccli/services/tke/v20180525/api.json +188 -0
- tccli/services/tke/v20180525/examples.json +8 -0
- tccli/services/vm/v20201229/api.json +209 -45
- tccli/services/vm/v20201229/examples.json +1 -1
- tccli/services/vm/v20210922/api.json +25 -25
- {tccli-3.0.1158.1.dist-info → tccli-3.0.1159.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1158.1.dist-info → tccli-3.0.1159.1.dist-info}/RECORD +27 -27
- {tccli-3.0.1158.1.dist-info → tccli-3.0.1159.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1158.1.dist-info → tccli-3.0.1159.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1158.1.dist-info → tccli-3.0.1159.1.dist-info}/license_files/LICENSE +0 -0
@@ -3,7 +3,7 @@
|
|
3
3
|
"AddMetricScaleStrategy": [
|
4
4
|
{
|
5
5
|
"document": "",
|
6
|
-
"input": "POST / HTTP/1.1\nHost: emr.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: AddMetricScaleStrategy\n<公共请求参数>\n\n{\n \"InstanceId\": \"abc\",\n \"StrategyType\": 0,\n \"LoadAutoScaleStrategy\": {\n \"StrategyId\": 0,\n \"StrategyName\": \"abc\",\n \"CalmDownTime\": 0,\n \"ScaleAction\": 0,\n \"ScaleNum\": 0,\n \"
|
6
|
+
"input": "POST / HTTP/1.1\nHost: emr.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: AddMetricScaleStrategy\n<公共请求参数>\n\n{\n \"InstanceId\": \"abc\",\n \"StrategyType\": 0,\n \"LoadAutoScaleStrategy\": {\n \"StrategyId\": 0,\n \"StrategyName\": \"abc\",\n \"CalmDownTime\": 0,\n \"ScaleAction\": 0,\n \"ScaleNum\": 0,\n \"ProcessMethod\": 0,\n \"Priority\": 0,\n \"StrategyStatus\": 0,\n \"YarnNodeLabel\": \"abc\",\n \"PeriodValid\": \"abc\",\n \"GraceDownFlag\": true,\n \"GraceDownTime\": 0,\n \"Tags\": [\n {\n \"TagKey\": \"abc\",\n \"TagValue\": \"abc\"\n }\n ],\n \"ConfigGroupAssigned\": \"abc\",\n \"MeasureMethod\": \"abc\",\n \"LoadMetricsConditions\": {\n \"LoadMetrics\": [\n {\n \"StatisticPeriod\": 0,\n \"TriggerThreshold\": 0,\n \"LoadMetrics\": \"abc\",\n \"MetricId\": 0,\n \"Conditions\": [\n {\n \"CompareMethod\": 0,\n \"Threshold\": 0\n }\n ]\n }\n ]\n }\n },\n \"TimeAutoScaleStrategy\": {\n \"StrategyId\": 1,\n \"StrategyName\": \"abc\",\n \"IntervalTime\": 1,\n \"ScaleAction\": 1,\n \"ScaleNum\": 1,\n \"StrategyStatus\": 1,\n \"Priority\": 1,\n \"RetryValidTime\": 1,\n \"RepeatStrategy\": {\n \"RepeatType\": \"abc\",\n \"DayRepeat\": {\n \"ExecuteAtTimeOfDay\": \"abc\",\n \"Step\": 1\n },\n \"WeekRepeat\": {\n \"ExecuteAtTimeOfDay\": \"abc\",\n \"DaysOfWeek\": [\n 1\n ]\n },\n \"MonthRepeat\": {\n \"ExecuteAtTimeOfDay\": \"abc\",\n \"DaysOfMonthRange\": [\n 1\n ]\n },\n \"NotRepeat\": {\n \"ExecuteAt\": \"abc\"\n },\n \"Expire\": \"abc\"\n },\n \"GraceDownFlag\": true,\n \"GraceDownTime\": 0,\n \"Tags\": [\n {\n \"TagKey\": \"abc\",\n \"TagValue\": \"abc\"\n }\n ],\n \"ConfigGroupAssigned\": \"abc\",\n \"MeasureMethod\": \"abc\",\n \"TerminatePolicy\": \"abc\",\n \"MaxUse\": 0,\n \"SoftDeployInfo\": [\n 0\n ],\n \"ServiceNodeInfo\": [\n 0\n ],\n \"CompensateFlag\": 0,\n \"GroupId\": 0\n }\n}",
|
7
7
|
"output": "{\n \"Response\": {\n \"RequestId\": \"41ac1575-64fa-4e23-b6df-6c1f509dd528\"\n }\n}",
|
8
8
|
"title": "添加扩缩容规则成功示例"
|
9
9
|
}
|
@@ -68,7 +68,7 @@
|
|
68
68
|
{
|
69
69
|
"document": "",
|
70
70
|
"input": "POST / HTTP/1.1\nHost: emr.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeAutoScaleStrategies\n<公共请求参数>\n\n{\n \"InstanceId\": \"abc\",\n \"GroupId\": 0\n}",
|
71
|
-
"output": "{\n \"Response\": {\n \"LoadAutoScaleStrategies\": [\n {\n \"StrategyId\": 0,\n \"StrategyName\": \"abc\",\n \"CalmDownTime\": 0,\n \"ScaleAction\": 0,\n \"ScaleNum\": 0,\n \"
|
71
|
+
"output": "{\n \"Response\": {\n \"LoadAutoScaleStrategies\": [\n {\n \"StrategyId\": 0,\n \"StrategyName\": \"abc\",\n \"CalmDownTime\": 0,\n \"ScaleAction\": 0,\n \"ScaleNum\": 0,\n \"ProcessMethod\": 0,\n \"Priority\": 0,\n \"StrategyStatus\": 0,\n \"YarnNodeLabel\": \"abc\",\n \"PeriodValid\": \"abc\",\n \"GraceDownFlag\": true,\n \"GraceDownTime\": 0,\n \"Tags\": [\n {\n \"TagKey\": \"abc\",\n \"TagValue\": \"abc\"\n }\n ],\n \"ConfigGroupAssigned\": \"abc\",\n \"MeasureMethod\": \"abc\",\n \"LoadMetricsConditions\": {\n \"LoadMetrics\": [\n {\n \"StatisticPeriod\": 0,\n \"TriggerThreshold\": 0,\n \"LoadMetrics\": \"abc\",\n \"MetricId\": 0,\n \"Conditions\": [\n {\n \"CompareMethod\": 0,\n \"Threshold\": 0\n }\n ]\n }\n ]\n }\n }\n ],\n \"TimeBasedAutoScaleStrategies\": [\n {\n \"StrategyId\": 1,\n \"StrategyName\": \"abc\",\n \"IntervalTime\": 1,\n \"ScaleAction\": 1,\n \"ScaleNum\": 1,\n \"StrategyStatus\": 1,\n \"Priority\": 1,\n \"RetryValidTime\": 1,\n \"RepeatStrategy\": {\n \"RepeatType\": \"abc\",\n \"DayRepeat\": {\n \"ExecuteAtTimeOfDay\": \"abc\",\n \"Step\": 1\n },\n \"WeekRepeat\": {\n \"ExecuteAtTimeOfDay\": \"abc\",\n \"DaysOfWeek\": [\n 1\n ]\n },\n \"MonthRepeat\": {\n \"ExecuteAtTimeOfDay\": \"abc\",\n \"DaysOfMonthRange\": [\n 1\n ]\n },\n \"NotRepeat\": {\n \"ExecuteAt\": \"abc\"\n },\n \"Expire\": \"abc\"\n },\n \"GraceDownFlag\": true,\n \"GraceDownTime\": 0,\n \"Tags\": [\n {\n \"TagKey\": \"abc\",\n \"TagValue\": \"abc\"\n }\n ],\n \"ConfigGroupAssigned\": \"abc\",\n \"MeasureMethod\": \"abc\",\n \"TerminatePolicy\": \"abc\",\n \"MaxUse\": 0,\n \"SoftDeployInfo\": [\n 0\n ],\n \"ServiceNodeInfo\": [\n 0\n ],\n \"CompensateFlag\": 0,\n \"GroupId\": 0\n }\n ],\n \"RequestId\": \"abc\"\n }\n}",
|
72
72
|
"title": "获取自动扩缩容规则"
|
73
73
|
}
|
74
74
|
],
|
@@ -184,6 +184,14 @@
|
|
184
184
|
"title": "test"
|
185
185
|
}
|
186
186
|
],
|
187
|
+
"DescribeTrinoQueryInfo": [
|
188
|
+
{
|
189
|
+
"document": "",
|
190
|
+
"input": "POST / HTTP/1.1\nHost: emr.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeInsightList\n<公共请求参数>\n\n{\n \"InstanceId\": \"emr-d82w3t9p\",\n \"PageSize\": 10,\n \"StartTime\": 1701792000,\n \"EndTime\": 1701878399,\n \"Page\": 1\n}",
|
191
|
+
"output": "{\n \"Response\": {\n \"QueryInfoList\": [\n {\n \"Catalog\": \"hive\",\n \"ClientIpAddr\": \"10.0.1.104\",\n \"CompletedSplits\": \"\",\n \"CpuTime\": 0,\n \"CumulativeMemory\": 0,\n \"DurationMillis\": 0,\n \"EndTime\": 0,\n \"Id\": \"20240708_111543_00007_lcmdbi8z\",\n \"InternalNetworkBytes\": 0,\n \"OutputBytes\": 0,\n \"PeakUserMemoryBytes\": 0,\n \"PhysicalInputBytes\": 0,\n \"ProcessedInputBytes\": 0,\n \"SqlCompileTime\": 0,\n \"StartTime\": 0,\n \"State\": \"QUEUED\",\n \"Statement\": \"create table impala_ranger\",\n \"User\": \"hadoop\",\n \"WrittenBytes\": 0\n }\n ],\n \"RequestId\": \"cfbbbe0f-5d30-4bf7-b87b-428b14ac3ws22\",\n \"TotalCount\": 18\n }\n}",
|
192
|
+
"title": "获取trino查询结果"
|
193
|
+
}
|
194
|
+
],
|
187
195
|
"DescribeUsersForUserManager": [
|
188
196
|
{
|
189
197
|
"document": "",
|
@@ -249,7 +257,7 @@
|
|
249
257
|
"ModifyAutoScaleStrategy": [
|
250
258
|
{
|
251
259
|
"document": "修改扩缩容规则",
|
252
|
-
"input": "POST / HTTP/1.1\nHost: emr.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifyAutoScaleStrategy\n<公共请求参数>\n\n{\n \"InstanceId\": \"abc\",\n \"StrategyType\": 0,\n \"LoadAutoScaleStrategies\": [\n {\n \"StrategyId\": 0,\n \"StrategyName\": \"abc\",\n \"CalmDownTime\": 0,\n \"ScaleAction\": 0,\n \"ScaleNum\": 0,\n \"
|
260
|
+
"input": "POST / HTTP/1.1\nHost: emr.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifyAutoScaleStrategy\n<公共请求参数>\n\n{\n \"InstanceId\": \"abc\",\n \"StrategyType\": 0,\n \"LoadAutoScaleStrategies\": [\n {\n \"StrategyId\": 0,\n \"StrategyName\": \"abc\",\n \"CalmDownTime\": 0,\n \"ScaleAction\": 0,\n \"ScaleNum\": 0,\n \"ProcessMethod\": 0,\n \"Priority\": 0,\n \"StrategyStatus\": 0,\n \"YarnNodeLabel\": \"abc\",\n \"PeriodValid\": \"abc\",\n \"GraceDownFlag\": true,\n \"GraceDownTime\": 0,\n \"Tags\": [\n {\n \"TagKey\": \"abc\",\n \"TagValue\": \"abc\"\n }\n ],\n \"ConfigGroupAssigned\": \"abc\",\n \"MeasureMethod\": \"abc\",\n \"LoadMetricsConditions\": {\n \"LoadMetrics\": [\n {\n \"StatisticPeriod\": 0,\n \"TriggerThreshold\": 0,\n \"LoadMetrics\": \"abc\",\n \"MetricId\": 0,\n \"Conditions\": [\n {\n \"CompareMethod\": 0,\n \"Threshold\": 0\n }\n ]\n }\n ]\n }\n }\n ],\n \"TimeAutoScaleStrategies\": [\n {\n \"StrategyId\": 1,\n \"StrategyName\": \"abc\",\n \"IntervalTime\": 1,\n \"ScaleAction\": 1,\n \"ScaleNum\": 1,\n \"StrategyStatus\": 1,\n \"Priority\": 1,\n \"RetryValidTime\": 1,\n \"RepeatStrategy\": {\n \"RepeatType\": \"abc\",\n \"DayRepeat\": {\n \"ExecuteAtTimeOfDay\": \"abc\",\n \"Step\": 1\n },\n \"WeekRepeat\": {\n \"ExecuteAtTimeOfDay\": \"abc\",\n \"DaysOfWeek\": [\n 1\n ]\n },\n \"MonthRepeat\": {\n \"ExecuteAtTimeOfDay\": \"abc\",\n \"DaysOfMonthRange\": [\n 1\n ]\n },\n \"NotRepeat\": {\n \"ExecuteAt\": \"abc\"\n },\n \"Expire\": \"abc\"\n },\n \"GraceDownFlag\": true,\n \"GraceDownTime\": 0,\n \"Tags\": [\n {\n \"TagKey\": \"abc\",\n \"TagValue\": \"abc\"\n }\n ],\n \"ConfigGroupAssigned\": \"abc\",\n \"MeasureMethod\": \"abc\",\n \"TerminatePolicy\": \"abc\",\n \"MaxUse\": 0,\n \"SoftDeployInfo\": [\n 0\n ],\n \"ServiceNodeInfo\": [\n 0\n ],\n \"CompensateFlag\": 0\n }\n ]\n}",
|
253
261
|
"output": "{\n \"Response\": {\n \"RequestId\": \"abc\"\n }\n}",
|
254
262
|
"title": "修改扩缩容规则"
|
255
263
|
},
|
@@ -310,7 +310,7 @@
|
|
310
310
|
},
|
311
311
|
{
|
312
312
|
"disabled": false,
|
313
|
-
"document": "图片的url,当 Type 为 image_url 时使用,表示具体的图片内容\n如\"https://example.com/1.png\" 或 图片的base64(注意 \"data:image/jpeg;base64
|
313
|
+
"document": "图片的url,当 Type 为 image_url 时使用,表示具体的图片内容\n如\"https://example.com/1.png\" 或 图片的base64(注意 \"data:image/jpeg;base64,\" 为必要部分):\"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAA......\"\n注意:此字段可能返回 null,表示取不到有效值。",
|
314
314
|
"example": "无",
|
315
315
|
"member": "ImageUrl",
|
316
316
|
"name": "ImageUrl",
|
@@ -567,6 +567,81 @@
|
|
567
567
|
],
|
568
568
|
"usage": "both"
|
569
569
|
},
|
570
|
+
"LogoParam": {
|
571
|
+
"document": "logo参数",
|
572
|
+
"members": [
|
573
|
+
{
|
574
|
+
"disabled": false,
|
575
|
+
"document": "水印url",
|
576
|
+
"example": "无",
|
577
|
+
"member": "string",
|
578
|
+
"name": "LogoUrl",
|
579
|
+
"required": false,
|
580
|
+
"type": "string"
|
581
|
+
},
|
582
|
+
{
|
583
|
+
"disabled": false,
|
584
|
+
"document": "水印base64,url和base64二选一传入",
|
585
|
+
"example": "无",
|
586
|
+
"member": "string",
|
587
|
+
"name": "LogoImage",
|
588
|
+
"required": false,
|
589
|
+
"type": "string"
|
590
|
+
},
|
591
|
+
{
|
592
|
+
"disabled": false,
|
593
|
+
"document": "水印图片位于融合结果图中的坐标,将按照坐标对标识图片进行位置和大小的拉伸匹配",
|
594
|
+
"example": "无",
|
595
|
+
"member": "LogoRect",
|
596
|
+
"name": "LogoRect",
|
597
|
+
"required": false,
|
598
|
+
"type": "object"
|
599
|
+
}
|
600
|
+
],
|
601
|
+
"usage": "in"
|
602
|
+
},
|
603
|
+
"LogoRect": {
|
604
|
+
"document": "输入框",
|
605
|
+
"members": [
|
606
|
+
{
|
607
|
+
"disabled": false,
|
608
|
+
"document": "左上角X坐标",
|
609
|
+
"example": "无",
|
610
|
+
"member": "int64",
|
611
|
+
"name": "X",
|
612
|
+
"required": false,
|
613
|
+
"type": "int"
|
614
|
+
},
|
615
|
+
{
|
616
|
+
"disabled": false,
|
617
|
+
"document": "左上角Y坐标",
|
618
|
+
"example": "无",
|
619
|
+
"member": "int64",
|
620
|
+
"name": "Y",
|
621
|
+
"required": false,
|
622
|
+
"type": "int"
|
623
|
+
},
|
624
|
+
{
|
625
|
+
"disabled": false,
|
626
|
+
"document": "方框宽度",
|
627
|
+
"example": "无",
|
628
|
+
"member": "int64",
|
629
|
+
"name": "Width",
|
630
|
+
"required": false,
|
631
|
+
"type": "int"
|
632
|
+
},
|
633
|
+
{
|
634
|
+
"disabled": false,
|
635
|
+
"document": "方框高度",
|
636
|
+
"example": "无",
|
637
|
+
"member": "int64",
|
638
|
+
"name": "Height",
|
639
|
+
"required": false,
|
640
|
+
"type": "int"
|
641
|
+
}
|
642
|
+
],
|
643
|
+
"usage": "in"
|
644
|
+
},
|
570
645
|
"Message": {
|
571
646
|
"document": "会话内容",
|
572
647
|
"members": [
|
@@ -813,10 +888,19 @@
|
|
813
888
|
},
|
814
889
|
{
|
815
890
|
"disabled": false,
|
816
|
-
"document": "
|
891
|
+
"document": "图片生成数量。\n支持1 ~ 4张,默认生成1张。",
|
817
892
|
"example": "无",
|
818
893
|
"member": "int64",
|
819
|
-
"name": "
|
894
|
+
"name": "Num",
|
895
|
+
"required": false,
|
896
|
+
"type": "int"
|
897
|
+
},
|
898
|
+
{
|
899
|
+
"disabled": false,
|
900
|
+
"document": "随机种子,默认随机。\n不传:随机种子生成。\n正数:固定种子生成。",
|
901
|
+
"example": "无",
|
902
|
+
"member": "int64",
|
903
|
+
"name": "Seed",
|
820
904
|
"required": false,
|
821
905
|
"type": "int"
|
822
906
|
},
|
@@ -828,6 +912,24 @@
|
|
828
912
|
"name": "Revise",
|
829
913
|
"required": false,
|
830
914
|
"type": "int"
|
915
|
+
},
|
916
|
+
{
|
917
|
+
"disabled": false,
|
918
|
+
"document": "为生成结果图添加显式水印标识的开关,默认为1。 \n1:添加。 \n0:不添加。 \n其他数值:默认按1处理。 \n建议您使用显著标识来提示结果图使用了 AI 绘画技术,是 AI 生成的图片。",
|
919
|
+
"example": "无",
|
920
|
+
"member": "int64",
|
921
|
+
"name": "LogoAdd",
|
922
|
+
"required": false,
|
923
|
+
"type": "int"
|
924
|
+
},
|
925
|
+
{
|
926
|
+
"disabled": false,
|
927
|
+
"document": "标识内容设置。\n默认在生成结果图右下角添加“图片由 AI 生成”字样,您可根据自身需要替换为其他的标识图片。",
|
928
|
+
"example": "无",
|
929
|
+
"member": "LogoParam",
|
930
|
+
"name": "LogoParam",
|
931
|
+
"required": false,
|
932
|
+
"type": "object"
|
831
933
|
}
|
832
934
|
],
|
833
935
|
"type": "object"
|
@@ -902,6 +1004,15 @@
|
|
902
1004
|
"required": false,
|
903
1005
|
"type": "int"
|
904
1006
|
},
|
1007
|
+
{
|
1008
|
+
"disabled": false,
|
1009
|
+
"document": "标识内容设置。\n默认在生成结果图右下角添加“图片由 AI 生成”字样,您可根据自身需要替换为其他的标识图片。",
|
1010
|
+
"example": "无",
|
1011
|
+
"member": "LogoParam",
|
1012
|
+
"name": "LogoParam",
|
1013
|
+
"required": false,
|
1014
|
+
"type": "object"
|
1015
|
+
},
|
905
1016
|
{
|
906
1017
|
"disabled": false,
|
907
1018
|
"document": "返回图像方式(base64 或 url) ,二选一,默认为 base64。url 有效期为1小时。",
|
tccli/services/tke/tke_client.py
CHANGED
@@ -4231,6 +4231,58 @@ def doDescribeRegions(args, parsed_globals):
|
|
4231
4231
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4232
4232
|
|
4233
4233
|
|
4234
|
+
def doDescribeReservedInstanceUtilizationRate(args, parsed_globals):
|
4235
|
+
g_param = parse_global_arg(parsed_globals)
|
4236
|
+
|
4237
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
4238
|
+
cred = credential.CVMRoleCredential()
|
4239
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
4240
|
+
cred = credential.STSAssumeRoleCredential(
|
4241
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
4242
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
4243
|
+
)
|
4244
|
+
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):
|
4245
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
4246
|
+
else:
|
4247
|
+
cred = credential.Credential(
|
4248
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
4249
|
+
)
|
4250
|
+
http_profile = HttpProfile(
|
4251
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
4252
|
+
reqMethod="POST",
|
4253
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
4254
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
4255
|
+
)
|
4256
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
4257
|
+
if g_param[OptionsDefine.Language]:
|
4258
|
+
profile.language = g_param[OptionsDefine.Language]
|
4259
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
4260
|
+
client = mod.TkeClient(cred, g_param[OptionsDefine.Region], profile)
|
4261
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
4262
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4263
|
+
model = models.DescribeReservedInstanceUtilizationRateRequest()
|
4264
|
+
model.from_json_string(json.dumps(args))
|
4265
|
+
start_time = time.time()
|
4266
|
+
while True:
|
4267
|
+
rsp = client.DescribeReservedInstanceUtilizationRate(model)
|
4268
|
+
result = rsp.to_json_string()
|
4269
|
+
try:
|
4270
|
+
json_obj = json.loads(result)
|
4271
|
+
except TypeError as e:
|
4272
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
4273
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
4274
|
+
break
|
4275
|
+
cur_time = time.time()
|
4276
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
4277
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
4278
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
4279
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
4280
|
+
else:
|
4281
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
4282
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
4283
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4284
|
+
|
4285
|
+
|
4234
4286
|
def doAddExistedInstances(args, parsed_globals):
|
4235
4287
|
g_param = parse_global_arg(parsed_globals)
|
4236
4288
|
|
@@ -11813,6 +11865,7 @@ ACTION_MAP = {
|
|
11813
11865
|
"DeleteReservedInstances": doDeleteReservedInstances,
|
11814
11866
|
"DeletePrometheusTemplate": doDeletePrometheusTemplate,
|
11815
11867
|
"DescribeRegions": doDescribeRegions,
|
11868
|
+
"DescribeReservedInstanceUtilizationRate": doDescribeReservedInstanceUtilizationRate,
|
11816
11869
|
"AddExistedInstances": doAddExistedInstances,
|
11817
11870
|
"CreateEdgeCVMInstances": doCreateEdgeCVMInstances,
|
11818
11871
|
"DisableClusterDeletionProtection": doDisableClusterDeletionProtection,
|
@@ -1022,6 +1022,13 @@
|
|
1022
1022
|
"output": "DescribeRegionsResponse",
|
1023
1023
|
"status": "online"
|
1024
1024
|
},
|
1025
|
+
"DescribeReservedInstanceUtilizationRate": {
|
1026
|
+
"document": "查询各种规格类型的预留券使用率",
|
1027
|
+
"input": "DescribeReservedInstanceUtilizationRateRequest",
|
1028
|
+
"name": "查询预留券使用率",
|
1029
|
+
"output": "DescribeReservedInstanceUtilizationRateResponse",
|
1030
|
+
"status": "online"
|
1031
|
+
},
|
1025
1032
|
"DescribeReservedInstances": {
|
1026
1033
|
"document": "查询预留实例列表",
|
1027
1034
|
"input": "DescribeReservedInstancesRequest",
|
@@ -13292,6 +13299,81 @@
|
|
13292
13299
|
],
|
13293
13300
|
"type": "object"
|
13294
13301
|
},
|
13302
|
+
"DescribeReservedInstanceUtilizationRateRequest": {
|
13303
|
+
"document": "DescribeReservedInstanceUtilizationRate请求参数结构体",
|
13304
|
+
"members": [
|
13305
|
+
{
|
13306
|
+
"disabled": false,
|
13307
|
+
"document": "可用区",
|
13308
|
+
"example": "ap-guangzhou-2",
|
13309
|
+
"member": "string",
|
13310
|
+
"name": "Zone",
|
13311
|
+
"required": false,
|
13312
|
+
"type": "string"
|
13313
|
+
},
|
13314
|
+
{
|
13315
|
+
"disabled": false,
|
13316
|
+
"document": "集群 ID",
|
13317
|
+
"example": "cls-12345678",
|
13318
|
+
"member": "string",
|
13319
|
+
"name": "ClusterId",
|
13320
|
+
"required": false,
|
13321
|
+
"type": "string"
|
13322
|
+
},
|
13323
|
+
{
|
13324
|
+
"disabled": false,
|
13325
|
+
"document": " 节点名称",
|
13326
|
+
"example": "eklet-subnet-0j105iya",
|
13327
|
+
"member": "string",
|
13328
|
+
"name": "NodeName",
|
13329
|
+
"required": false,
|
13330
|
+
"type": "string"
|
13331
|
+
}
|
13332
|
+
],
|
13333
|
+
"type": "object"
|
13334
|
+
},
|
13335
|
+
"DescribeReservedInstanceUtilizationRateResponse": {
|
13336
|
+
"document": "DescribeReservedInstanceUtilizationRate返回参数结构体",
|
13337
|
+
"members": [
|
13338
|
+
{
|
13339
|
+
"disabled": false,
|
13340
|
+
"document": "预留券使用率",
|
13341
|
+
"example": "无",
|
13342
|
+
"member": "ReservedInstanceUtilizationRate",
|
13343
|
+
"name": "UtilizationRateSet",
|
13344
|
+
"output_required": true,
|
13345
|
+
"type": "list",
|
13346
|
+
"value_allowed_null": false
|
13347
|
+
},
|
13348
|
+
{
|
13349
|
+
"disabled": false,
|
13350
|
+
"document": "按量计费的 Pod 总数",
|
13351
|
+
"example": "1",
|
13352
|
+
"member": "uint64",
|
13353
|
+
"name": "PodNum",
|
13354
|
+
"output_required": true,
|
13355
|
+
"type": "int",
|
13356
|
+
"value_allowed_null": false
|
13357
|
+
},
|
13358
|
+
{
|
13359
|
+
"disabled": false,
|
13360
|
+
"document": " Pod 被预留券抵扣的抵扣率",
|
13361
|
+
"example": "0.5",
|
13362
|
+
"member": "float",
|
13363
|
+
"name": "PodRate",
|
13364
|
+
"output_required": true,
|
13365
|
+
"type": "float",
|
13366
|
+
"value_allowed_null": false
|
13367
|
+
},
|
13368
|
+
{
|
13369
|
+
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
13370
|
+
"member": "string",
|
13371
|
+
"name": "RequestId",
|
13372
|
+
"type": "string"
|
13373
|
+
}
|
13374
|
+
],
|
13375
|
+
"type": "object"
|
13376
|
+
},
|
13295
13377
|
"DescribeReservedInstancesRequest": {
|
13296
13378
|
"document": "DescribeReservedInstances请求参数结构体",
|
13297
13379
|
"members": [
|
@@ -22978,6 +23060,112 @@
|
|
22978
23060
|
],
|
22979
23061
|
"usage": "in"
|
22980
23062
|
},
|
23063
|
+
"ReservedInstanceUtilizationRate": {
|
23064
|
+
"document": "预留券的使用率信息",
|
23065
|
+
"members": [
|
23066
|
+
{
|
23067
|
+
"disabled": false,
|
23068
|
+
"document": "使用率\n注意:此字段可能返回 null,表示取不到有效值。",
|
23069
|
+
"example": "1.0",
|
23070
|
+
"member": "float",
|
23071
|
+
"name": "Rate",
|
23072
|
+
"required": false,
|
23073
|
+
"type": "float",
|
23074
|
+
"value_allowed_null": true
|
23075
|
+
},
|
23076
|
+
{
|
23077
|
+
"disabled": false,
|
23078
|
+
"document": "预留券数量\n注意:此字段可能返回 null,表示取不到有效值。",
|
23079
|
+
"example": "1",
|
23080
|
+
"member": "uint64",
|
23081
|
+
"name": "Num",
|
23082
|
+
"required": false,
|
23083
|
+
"type": "int",
|
23084
|
+
"value_allowed_null": true
|
23085
|
+
},
|
23086
|
+
{
|
23087
|
+
"disabled": false,
|
23088
|
+
"document": "核数\n注意:此字段可能返回 null,表示取不到有效值。",
|
23089
|
+
"example": "0.5",
|
23090
|
+
"member": "float",
|
23091
|
+
"name": "CPU",
|
23092
|
+
"required": false,
|
23093
|
+
"type": "float",
|
23094
|
+
"value_allowed_null": true
|
23095
|
+
},
|
23096
|
+
{
|
23097
|
+
"disabled": false,
|
23098
|
+
"document": "内存\n注意:此字段可能返回 null,表示取不到有效值。",
|
23099
|
+
"example": "1.0",
|
23100
|
+
"member": "float",
|
23101
|
+
"name": "Memory",
|
23102
|
+
"required": false,
|
23103
|
+
"type": "float",
|
23104
|
+
"value_allowed_null": true
|
23105
|
+
},
|
23106
|
+
{
|
23107
|
+
"disabled": false,
|
23108
|
+
"document": " 预留券类型\n注意:此字段可能返回 null,表示取不到有效值。",
|
23109
|
+
"example": "common",
|
23110
|
+
"member": "string",
|
23111
|
+
"name": "Type",
|
23112
|
+
"required": false,
|
23113
|
+
"type": "string",
|
23114
|
+
"value_allowed_null": true
|
23115
|
+
},
|
23116
|
+
{
|
23117
|
+
"disabled": false,
|
23118
|
+
"document": "GPU 卡数\n注意:此字段可能返回 null,表示取不到有效值。",
|
23119
|
+
"example": "0.5",
|
23120
|
+
"member": "string",
|
23121
|
+
"name": "GpuNum",
|
23122
|
+
"required": false,
|
23123
|
+
"type": "string",
|
23124
|
+
"value_allowed_null": true
|
23125
|
+
},
|
23126
|
+
{
|
23127
|
+
"disabled": false,
|
23128
|
+
"document": "可用区\n注意:此字段可能返回 null,表示取不到有效值。",
|
23129
|
+
"example": "ap-guangzhou-2",
|
23130
|
+
"member": "string",
|
23131
|
+
"name": "Zone",
|
23132
|
+
"required": false,
|
23133
|
+
"type": "string",
|
23134
|
+
"value_allowed_null": true
|
23135
|
+
},
|
23136
|
+
{
|
23137
|
+
"disabled": false,
|
23138
|
+
"document": "集群 ID\n注意:此字段可能返回 null,表示取不到有效值。",
|
23139
|
+
"example": "cls-12345678",
|
23140
|
+
"member": "string",
|
23141
|
+
"name": "ClusterId",
|
23142
|
+
"required": false,
|
23143
|
+
"type": "string",
|
23144
|
+
"value_allowed_null": true
|
23145
|
+
},
|
23146
|
+
{
|
23147
|
+
"disabled": false,
|
23148
|
+
"document": "节点名称\n注意:此字段可能返回 null,表示取不到有效值。",
|
23149
|
+
"example": "eklet-subnet-12345678",
|
23150
|
+
"member": "string",
|
23151
|
+
"name": "NodeName",
|
23152
|
+
"required": false,
|
23153
|
+
"type": "string",
|
23154
|
+
"value_allowed_null": true
|
23155
|
+
},
|
23156
|
+
{
|
23157
|
+
"disabled": false,
|
23158
|
+
"document": "Pod 数量\n注意:此字段可能返回 null,表示取不到有效值。",
|
23159
|
+
"example": "1",
|
23160
|
+
"member": "uint64",
|
23161
|
+
"name": "PodNum",
|
23162
|
+
"required": false,
|
23163
|
+
"type": "int",
|
23164
|
+
"value_allowed_null": true
|
23165
|
+
}
|
23166
|
+
],
|
23167
|
+
"usage": "out"
|
23168
|
+
},
|
22981
23169
|
"ResourceDeleteOption": {
|
22982
23170
|
"document": "资源删除选项",
|
22983
23171
|
"members": [
|
@@ -1258,6 +1258,14 @@
|
|
1258
1258
|
"title": "获取地域列表"
|
1259
1259
|
}
|
1260
1260
|
],
|
1261
|
+
"DescribeReservedInstanceUtilizationRate": [
|
1262
|
+
{
|
1263
|
+
"document": "预留券使用率",
|
1264
|
+
"input": "POST / HTTP/1.1\nHost: tke.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeReservedInstanceUtilizationRate\n<公共请求参数>\n\n{}",
|
1265
|
+
"output": "{\n \"Response\": {\n \"PodNum\": 1,\n \"PodRate\": 0,\n \"UtilizationRateSet\": [\n {\n \"Rate\": 0,\n \"Num\": 1,\n \"PodNum\": 1,\n \"CPU\": 1,\n \"Memory\": 2,\n \"Type\": \"common\",\n \"GpuNum\": \"\",\n \"Zone\": \"\",\n \"ClusterId\": \"\",\n \"NodeName\": \"\"\n }\n ],\n \"RequestId\": \"0be873cf-014f-408b-8527-03c25c32725b\"\n }\n}",
|
1266
|
+
"title": "查询预留券使用率"
|
1267
|
+
}
|
1268
|
+
],
|
1261
1269
|
"DescribeReservedInstances": [
|
1262
1270
|
{
|
1263
1271
|
"document": "Filter Name只支持文档中的示例值",
|