tccli 3.0.1133.1__py2.py3-none-any.whl → 3.0.1134.1__py2.py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/asr/v20190614/api.json +2 -2
  3. tccli/services/billing/v20180709/api.json +10 -0
  4. tccli/services/cam/v20190116/api.json +41 -12
  5. tccli/services/cls/v20201016/api.json +1 -1
  6. tccli/services/cls/v20201016/examples.json +1 -1
  7. tccli/services/cmq/v20190304/api.json +53 -49
  8. tccli/services/cmq/v20190304/examples.json +2 -2
  9. tccli/services/cynosdb/cynosdb_client.py +57 -4
  10. tccli/services/cynosdb/v20190107/api.json +111 -0
  11. tccli/services/cynosdb/v20190107/examples.json +8 -0
  12. tccli/services/dlc/dlc_client.py +53 -0
  13. tccli/services/dlc/v20210125/api.json +149 -2
  14. tccli/services/dlc/v20210125/examples.json +9 -1
  15. tccli/services/dsgc/v20190723/api.json +45 -40
  16. tccli/services/dts/dts_client.py +0 -53
  17. tccli/services/dts/v20180330/api.json +0 -98
  18. tccli/services/dts/v20180330/examples.json +0 -8
  19. tccli/services/emr/v20190103/api.json +4 -4
  20. tccli/services/ess/ess_client.py +411 -305
  21. tccli/services/ess/v20201111/api.json +144 -0
  22. tccli/services/ess/v20201111/examples.json +16 -0
  23. tccli/services/essbasic/essbasic_client.py +110 -4
  24. tccli/services/essbasic/v20210526/api.json +137 -2
  25. tccli/services/essbasic/v20210526/examples.json +16 -0
  26. tccli/services/mongodb/mongodb_client.py +57 -4
  27. tccli/services/mongodb/v20190725/api.json +96 -0
  28. tccli/services/mongodb/v20190725/examples.json +8 -0
  29. tccli/services/mps/v20190612/api.json +57 -7
  30. tccli/services/mps/v20190612/examples.json +1 -1
  31. tccli/services/ocr/v20181119/api.json +373 -3
  32. tccli/services/organization/organization_client.py +118 -12
  33. tccli/services/organization/v20210331/api.json +68 -0
  34. tccli/services/organization/v20210331/examples.json +16 -0
  35. tccli/services/tdmq/tdmq_client.py +443 -19
  36. tccli/services/tdmq/v20200217/api.json +570 -0
  37. tccli/services/tdmq/v20200217/examples.json +64 -0
  38. tccli/services/trro/v20220325/api.json +6 -6
  39. tccli/services/trtc/v20190722/api.json +1 -1
  40. tccli/services/tsf/v20180326/api.json +37 -27
  41. tccli/services/tsf/v20180326/examples.json +1 -1
  42. {tccli-3.0.1133.1.dist-info → tccli-3.0.1134.1.dist-info}/METADATA +2 -2
  43. {tccli-3.0.1133.1.dist-info → tccli-3.0.1134.1.dist-info}/RECORD +46 -46
  44. {tccli-3.0.1133.1.dist-info → tccli-3.0.1134.1.dist-info}/WHEEL +0 -0
  45. {tccli-3.0.1133.1.dist-info → tccli-3.0.1134.1.dist-info}/entry_points.txt +0 -0
  46. {tccli-3.0.1133.1.dist-info → tccli-3.0.1134.1.dist-info}/license_files/LICENSE +0 -0
tccli/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = '3.0.1133.1'
1
+ __version__ = '3.0.1134.1'
@@ -832,7 +832,7 @@
832
832
  {
833
833
  "disabled": false,
834
834
  "document": "录音文件识别的请求返回结果。",
835
- "example": "{ \"Response\": { \"RequestId\": \"8824366f-0e8f-4bd4-8924-af5e84127caa\"",
835
+ "example": "",
836
836
  "member": "TaskStatus",
837
837
  "name": "Data",
838
838
  "output_required": true,
@@ -2302,7 +2302,7 @@
2302
2302
  "example": "无",
2303
2303
  "member": "string",
2304
2304
  "name": "VoicePrintId",
2305
- "required": true,
2305
+ "required": false,
2306
2306
  "type": "string"
2307
2307
  }
2308
2308
  ],
@@ -7038,6 +7038,16 @@
7038
7038
  "output_required": false,
7039
7039
  "type": "string",
7040
7040
  "value_allowed_null": true
7041
+ },
7042
+ {
7043
+ "disabled": false,
7044
+ "document": "标签信息\n注意:此字段可能返回 null,表示取不到有效值。",
7045
+ "example": "无",
7046
+ "member": "string",
7047
+ "name": "Tags",
7048
+ "output_required": false,
7049
+ "type": "string",
7050
+ "value_allowed_null": true
7041
7051
  }
7042
7052
  ],
7043
7053
  "usage": "out"
@@ -633,7 +633,7 @@
633
633
  "example": "AccessKeyId",
634
634
  "member": "string",
635
635
  "name": "AccessKeyId",
636
- "required": true,
636
+ "output_required": true,
637
637
  "type": "string",
638
638
  "value_allowed_null": false
639
639
  },
@@ -643,7 +643,7 @@
643
643
  "example": "Active",
644
644
  "member": "string",
645
645
  "name": "Status",
646
- "required": true,
646
+ "output_required": true,
647
647
  "type": "string",
648
648
  "value_allowed_null": false
649
649
  },
@@ -653,9 +653,19 @@
653
653
  "example": "2021-03-20 00:00:00",
654
654
  "member": "datetime",
655
655
  "name": "CreateTime",
656
- "required": true,
656
+ "output_required": true,
657
657
  "type": "string",
658
658
  "value_allowed_null": false
659
+ },
660
+ {
661
+ "disabled": false,
662
+ "document": "密钥描述\n注意:此字段可能返回 null,表示取不到有效值。",
663
+ "example": "备注",
664
+ "member": "string",
665
+ "name": "Description",
666
+ "output_required": false,
667
+ "type": "string",
668
+ "value_allowed_null": true
659
669
  }
660
670
  ],
661
671
  "usage": "out"
@@ -666,42 +676,52 @@
666
676
  {
667
677
  "disabled": false,
668
678
  "document": "访问密钥标识",
669
- "example": "",
679
+ "example": "",
670
680
  "member": "string",
671
681
  "name": "AccessKeyId",
672
- "required": true,
682
+ "output_required": true,
673
683
  "type": "string",
674
684
  "value_allowed_null": false
675
685
  },
676
686
  {
677
687
  "disabled": false,
678
688
  "document": "访问密钥(密钥仅创建时可见,请妥善保存)",
679
- "example": "",
689
+ "example": "",
680
690
  "member": "string",
681
691
  "name": "SecretAccessKey",
682
- "required": true,
692
+ "output_required": true,
683
693
  "type": "string",
684
694
  "value_allowed_null": false
685
695
  },
686
696
  {
687
697
  "disabled": false,
688
698
  "document": "密钥状态,激活(Active)或未激活(Inactive)",
689
- "example": "",
699
+ "example": "",
690
700
  "member": "string",
691
701
  "name": "Status",
692
- "required": true,
702
+ "output_required": true,
693
703
  "type": "string",
694
704
  "value_allowed_null": false
695
705
  },
696
706
  {
697
707
  "disabled": false,
698
708
  "document": "创建时间",
699
- "example": "",
709
+ "example": "",
700
710
  "member": "datetime",
701
711
  "name": "CreateTime",
702
- "required": true,
712
+ "output_required": true,
703
713
  "type": "string",
704
714
  "value_allowed_null": false
715
+ },
716
+ {
717
+ "disabled": false,
718
+ "document": "描述\n注意:此字段可能返回 null,表示取不到有效值。",
719
+ "example": "无",
720
+ "member": "string",
721
+ "name": "Description",
722
+ "output_required": false,
723
+ "type": "string",
724
+ "value_allowed_null": true
705
725
  }
706
726
  ],
707
727
  "usage": "out"
@@ -1551,6 +1571,15 @@
1551
1571
  "name": "TargetUin",
1552
1572
  "required": false,
1553
1573
  "type": "int"
1574
+ },
1575
+ {
1576
+ "disabled": false,
1577
+ "document": "密钥描述,长度在1到1024之间,可包含大小写字符,数字以及特殊字符:=,.@:/-。 正则为:[\\w+=,.@:/-]*。",
1578
+ "example": "备注",
1579
+ "member": "string",
1580
+ "name": "Description",
1581
+ "required": false,
1582
+ "type": "string"
1554
1583
  }
1555
1584
  ],
1556
1585
  "type": "object"
@@ -1564,7 +1593,7 @@
1564
1593
  "example": "无",
1565
1594
  "member": "AccessKeyDetail",
1566
1595
  "name": "AccessKey",
1567
- "required": true,
1596
+ "output_required": true,
1568
1597
  "type": "object",
1569
1598
  "value_allowed_null": true
1570
1599
  },
@@ -7587,7 +7587,7 @@
7587
7587
  "members": [
7588
7588
  {
7589
7589
  "disabled": false,
7590
- "document": "<li> topicName按照【日志主题名称】进行过滤,默认为模糊匹配,可使用PreciseSearch参数设置为精确匹配。类型:String必选:否<br><li> logsetName按照【日志集名称】进行过滤,默认为模糊匹配,可使用PreciseSearch参数设置为精确匹配。类型:String必选:否<br><li> topicId按照【日志主题ID】进行过滤。类型:String必选:否<br><li> logsetId按照【日志集ID】进行过滤,可通过调用DescribeLogsets查询已创建的日志集列表或登录控制台进行查看;也可以调用CreateLogset创建新的日志集。类型:String必选:否<br><li> tagKey按照【标签键】进行过滤。类型:String必选:否<br><li> tag:tagKey按照【标签键值对】进行过滤。tagKey使用具体的标签键进行替换,例如tag:exampleKey。类型:String必选:否<br><li> storageType按照【日志主题的存储类型】进行过滤。可选值 hot(标准存储),cold(低频存储)类型:String必选:否每次请求的Filters的上限为10,Filter.Values的上限为100。",
7590
+ "document": "* topicName 按照【日志主题名称】进行过滤,默认为模糊匹配,可使用PreciseSearch参数设置为精确匹配。类型:String。必选:否\n* logsetName 按照【日志集名称】进行过滤,默认为模糊匹配,可使用PreciseSearch参数设置为精确匹配。类型:String。必选:否\n* topicId 按照【日志主题ID】进行过滤。类型:String。必选:否\n* logsetId 按照【日志集ID】进行过滤,可通过调用DescribeLogsets查询已创建的日志集列表或登录控制台进行查看;也可以调用CreateLogset创建新的日志集。类型:String。必选:否\n* tagKey 按照【标签键】进行过滤。类型:String。必选:否\n* tag:tagKey 按照【标签键值对】进行过滤。tagKey使用具体的标签键进行替换,例如tag:exampleKey。类型:String。必选:否\n* storageType 按照【日志主题的存储类型】进行过滤。可选值 hot(标准存储),cold(低频存储)类型:String。必选:否\n\n注意:每次请求的Filters的上限为10,Filter.Values的上限为100。",
7591
7591
  "example": "无",
7592
7592
  "member": "Filter",
7593
7593
  "name": "Filters",
@@ -564,7 +564,7 @@
564
564
  {
565
565
  "document": "获取日志主题列表",
566
566
  "input": "POST / HTTP/1.1\nHost: cls.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeTopics\n<公共请求参数>\n\n{\n \"Filters\": [],\n \"Offset\": 10,\n \"Limit\": 30\n}",
567
- "output": "{\n \"Response\": {\n \"TotalCount\": 1,\n \"Topics\": [\n {\n \"Index\": true,\n \"PartitionCount\": 1,\n \"Describes\": \"x1\",\n \"Status\": true,\n \"Tags\": [\n {\n \"Value\": \"x10\",\n \"Key\": \"x11\"\n }\n ],\n \"AssumerName\": \"x12\",\n \"SubAssumerName\": \"x13\",\n \"MaxSplitPartitions\": 0,\n \"LogsetId\": \"x15\",\n \"TopicId\": \"x16\",\n \"HotPeriod\": 1,\n \"StorageType\": \"x17\",\n \"Period\": 0,\n \"AutoSplit\": true,\n \"CreateTime\": \"x18\",\n \"TopicName\": \"x19\"\n }\n ],\n \"RequestId\": \"x20\"\n }\n}",
567
+ "output": "{\n \"Response\": {\n \"Topics\": [\n {\n \"LogsetId\": \"46c34030-f7fd-xxxx-91ee-053215c2bf9c\",\n \"TopicId\": \"305f8be8-25a9-xxxx-8f05-361dafab39fe\",\n \"TopicName\": \"test\",\n \"PartitionCount\": 1,\n \"Index\": true,\n \"AssumerName\": \"\",\n \"SubAssumerName\": \"\",\n \"CreateTime\": \"2022-12-30 16:02:52\",\n \"Status\": true,\n \"Tags\": [],\n \"AutoSplit\": true,\n \"MaxSplitPartitions\": 50,\n \"StorageType\": \"hot\",\n \"Period\": 27,\n \"Describes\": \"\",\n \"HotPeriod\": 0,\n \"BizType\": 0,\n \"IsWebTracking\": false\n }\n ],\n \"RequestId\": \"cdb48d76-9be0-xxxx-8654-56290de7442e\",\n \"TotalCount\": 1\n }\n}",
568
568
  "title": "获取日志主题列表"
569
569
  }
570
570
  ],
@@ -64,7 +64,7 @@
64
64
  "status": "online"
65
65
  },
66
66
  "DescribeQueueDetail": {
67
- "document": "枚举队列",
67
+ "document": "枚举队列列表",
68
68
  "input": "DescribeQueueDetailRequest",
69
69
  "name": "枚举队列",
70
70
  "output": "DescribeQueueDetailResponse",
@@ -78,9 +78,9 @@
78
78
  "status": "online"
79
79
  },
80
80
  "DescribeTopicDetail": {
81
- "document": "查询主题详情 ",
81
+ "document": "查询主题详情",
82
82
  "input": "DescribeTopicDetailRequest",
83
- "name": "查询主题详情",
83
+ "name": "查询主题列表",
84
84
  "output": "DescribeTopicDetailResponse",
85
85
  "status": "online"
86
86
  },
@@ -772,17 +772,17 @@
772
772
  "members": [
773
773
  {
774
774
  "disabled": false,
775
- "document": "分页时本页获取队列列表的起始位置。如果填写了该值,必须也要填写 limit 。该值缺省时,后台取默认值 0",
776
- "example": "",
777
- "member": "uint64",
778
- "name": "Offset",
775
+ "document": "标签搜索",
776
+ "example": "tag",
777
+ "member": "string",
778
+ "name": "TagKey",
779
779
  "required": false,
780
- "type": "int"
780
+ "type": "string"
781
781
  },
782
782
  {
783
783
  "disabled": false,
784
784
  "document": "分页时本页获取队列的个数,如果不传递该参数,则该参数默认为20,最大值为50。",
785
- "example": "",
785
+ "example": "20",
786
786
  "member": "uint64",
787
787
  "name": "Limit",
788
788
  "required": false,
@@ -790,30 +790,30 @@
790
790
  },
791
791
  {
792
792
  "disabled": false,
793
- "document": "筛选参数,目前支持QueueName筛选,且仅支持一个关键字",
794
- "example": "",
795
- "member": "Filter",
796
- "name": "Filters",
793
+ "document": "精确匹配QueueName",
794
+ "example": "test",
795
+ "member": "string",
796
+ "name": "QueueName",
797
797
  "required": false,
798
- "type": "list"
798
+ "type": "string"
799
799
  },
800
800
  {
801
801
  "disabled": false,
802
- "document": "标签搜索",
803
- "example": "",
804
- "member": "string",
805
- "name": "TagKey",
802
+ "document": "筛选参数,目前支持QueueName筛选,且仅支持一个关键字",
803
+ "example": "name",
804
+ "member": "Filter",
805
+ "name": "Filters",
806
806
  "required": false,
807
- "type": "string"
807
+ "type": "list"
808
808
  },
809
809
  {
810
810
  "disabled": false,
811
- "document": "精确匹配QueueName",
812
- "example": "",
813
- "member": "string",
814
- "name": "QueueName",
811
+ "document": "分页时本页获取队列列表的起始位置。如果填写了该值,必须也要填写 limit 。该值缺省时,后台取默认值 0",
812
+ "example": "20",
813
+ "member": "uint64",
814
+ "name": "Offset",
815
815
  "required": false,
816
- "type": "string"
816
+ "type": "int"
817
817
  }
818
818
  ],
819
819
  "type": "object"
@@ -824,18 +824,20 @@
824
824
  {
825
825
  "disabled": false,
826
826
  "document": "总队列数。",
827
- "example": "",
827
+ "example": "20",
828
828
  "member": "uint64",
829
829
  "name": "TotalCount",
830
+ "output_required": true,
830
831
  "type": "int",
831
832
  "value_allowed_null": false
832
833
  },
833
834
  {
834
835
  "disabled": false,
835
836
  "document": "队列详情列表。",
836
- "example": "",
837
+ "example": "[]",
837
838
  "member": "QueueSet",
838
839
  "name": "QueueSet",
840
+ "output_required": true,
839
841
  "type": "list",
840
842
  "value_allowed_null": false
841
843
  },
@@ -925,17 +927,17 @@
925
927
  "members": [
926
928
  {
927
929
  "disabled": false,
928
- "document": "分页时本页获取队列列表的起始位置。如果填写了该值,必须也要填写 limit 。该值缺省时,后台取默认值 0。",
929
- "example": "",
930
- "member": "uint64",
931
- "name": "Offset",
930
+ "document": "标签匹配。",
931
+ "example": "aa",
932
+ "member": "string",
933
+ "name": "TagKey",
932
934
  "required": false,
933
- "type": "int"
935
+ "type": "string"
934
936
  },
935
937
  {
936
938
  "disabled": false,
937
939
  "document": "分页时本页获取队列的个数,如果不传递该参数,则该参数默认为20,最大值为50。",
938
- "example": "",
940
+ "example": "20",
939
941
  "member": "uint64",
940
942
  "name": "Limit",
941
943
  "required": false,
@@ -943,30 +945,30 @@
943
945
  },
944
946
  {
945
947
  "disabled": false,
946
- "document": "目前只支持过滤TopicName , 且只能填一个过滤值。",
947
- "example": "",
948
- "member": "Filter",
949
- "name": "Filters",
948
+ "document": "精确匹配TopicName",
949
+ "example": "topic1",
950
+ "member": "string",
951
+ "name": "TopicName",
950
952
  "required": false,
951
- "type": "list"
953
+ "type": "string"
952
954
  },
953
955
  {
954
956
  "disabled": false,
955
- "document": "标签匹配。",
956
- "example": "",
957
- "member": "string",
958
- "name": "TagKey",
957
+ "document": "目前只支持过滤TopicName , 且只能填一个过滤值。",
958
+ "example": "[]",
959
+ "member": "Filter",
960
+ "name": "Filters",
959
961
  "required": false,
960
- "type": "string"
962
+ "type": "list"
961
963
  },
962
964
  {
963
965
  "disabled": false,
964
- "document": "精确匹配TopicName。",
965
- "example": "",
966
- "member": "string",
967
- "name": "TopicName",
966
+ "document": "分页时本页获取队列列表的起始位置。如果填写了该值,必须也要填写 limit 。该值缺省时,后台取默认值 0。",
967
+ "example": "0",
968
+ "member": "uint64",
969
+ "name": "Offset",
968
970
  "required": false,
969
- "type": "string"
971
+ "type": "int"
970
972
  }
971
973
  ],
972
974
  "type": "object"
@@ -977,18 +979,20 @@
977
979
  {
978
980
  "disabled": false,
979
981
  "document": "主题列表总数。",
980
- "example": "",
982
+ "example": "3",
981
983
  "member": "uint64",
982
984
  "name": "TotalCount",
985
+ "output_required": true,
983
986
  "type": "int",
984
987
  "value_allowed_null": false
985
988
  },
986
989
  {
987
990
  "disabled": false,
988
991
  "document": "主题详情列表。",
989
- "example": "",
992
+ "example": "[]",
990
993
  "member": "TopicSet",
991
994
  "name": "TopicSet",
995
+ "output_required": true,
992
996
  "type": "list",
993
997
  "value_allowed_null": false
994
998
  },
@@ -91,8 +91,8 @@
91
91
  "DescribeTopicDetail": [
92
92
  {
93
93
  "document": "",
94
- "input": "https://cmq.tencentcloudapi.com/?Action=DescribeTopicDetail\r\n&Offset=0&Limit=2\r\n&<公共请求参数>",
95
- "output": "{\n \"Response\": {\n \"TotalCount\": 2,\n \"TopicSet\": [\n {\n \"Tags\": [],\n \"TopicId\": \"topic-rga4l1o4\",\n \"TopicName\": \"ConnTopic\",\n \"CreateUin\": 20548499,\n \"MsgRetentionSeconds\": 10000,\n \"MaxMsgSize\": 20000,\n \"Qps\": 10000,\n \"FilterType\": 1,\n \"CreateTime\": 1581516588,\n \"LastModifyTime\": 1581563581,\n \"MsgCount\": 0\n },\n {\n \"Tags\": [],\n \"TopicId\": \"topic-388k6x98\",\n \"TopicName\": \"test123\",\n \"CreateUin\": 20548499,\n \"MsgRetentionSeconds\": 86400,\n \"MaxMsgSize\": 65536,\n \"Qps\": 5000,\n \"FilterType\": 1,\n \"CreateTime\": 1581493669,\n \"LastModifyTime\": 1581495310,\n \"MsgCount\": 0\n }\n ],\n \"RequestId\": \"68ebb46b-5eac-467a-9942-1a5da83a65ca\"\n }\n}",
94
+ "input": "POST / HTTP/1.1\nHost: cmq.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeTopicDetail\n<公共请求参数>\n\n{\n \"TagKey\": \"abc\",\n \"Limit\": 1,\n \"TopicName\": \"abc\",\n \"Filters\": [\n {\n \"Values\": [\n \"test123\"\n ],\n \"Name\": \"TopicName\"\n }\n ],\n \"Offset\": 1\n}",
95
+ "output": "{\n \"Response\": {\n \"TotalCount\": 2,\n \"TopicSet\": [\n {\n \"Tags\": [],\n \"TopicId\": \"topic-388k6x98\",\n \"TopicName\": \"test123\",\n \"CreateUin\": 20548499,\n \"MsgRetentionSeconds\": 86400,\n \"MaxMsgSize\": 65536,\n \"Qps\": 5000,\n \"FilterType\": 1,\n \"CreateTime\": 1581493669,\n \"LastModifyTime\": 1581495310,\n \"MsgCount\": 0\n }\n ],\n \"RequestId\": \"68ebb46b-5eac-467a-9942-1a5da83a65ca\"\n }\n}",
96
96
  "title": "查询主题详情"
97
97
  }
98
98
  ],
@@ -693,7 +693,7 @@ def doCreateAuditLogFile(args, parsed_globals):
693
693
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
694
694
 
695
695
 
696
- def doSwitchClusterVpc(args, parsed_globals):
696
+ def doRenewClusters(args, parsed_globals):
697
697
  g_param = parse_global_arg(parsed_globals)
698
698
 
699
699
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -722,11 +722,11 @@ def doSwitchClusterVpc(args, parsed_globals):
722
722
  client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
723
723
  client._sdkVersion += ("_CLI_" + __version__)
724
724
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
725
- model = models.SwitchClusterVpcRequest()
725
+ model = models.RenewClustersRequest()
726
726
  model.from_json_string(json.dumps(args))
727
727
  start_time = time.time()
728
728
  while True:
729
- rsp = client.SwitchClusterVpc(model)
729
+ rsp = client.RenewClusters(model)
730
730
  result = rsp.to_json_string()
731
731
  try:
732
732
  json_obj = json.loads(result)
@@ -5425,6 +5425,58 @@ def doModifyAccountDescription(args, parsed_globals):
5425
5425
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
5426
5426
 
5427
5427
 
5428
+ def doSwitchClusterVpc(args, parsed_globals):
5429
+ g_param = parse_global_arg(parsed_globals)
5430
+
5431
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
5432
+ cred = credential.CVMRoleCredential()
5433
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
5434
+ cred = credential.STSAssumeRoleCredential(
5435
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
5436
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
5437
+ )
5438
+ 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):
5439
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
5440
+ else:
5441
+ cred = credential.Credential(
5442
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
5443
+ )
5444
+ http_profile = HttpProfile(
5445
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
5446
+ reqMethod="POST",
5447
+ endpoint=g_param[OptionsDefine.Endpoint],
5448
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
5449
+ )
5450
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
5451
+ if g_param[OptionsDefine.Language]:
5452
+ profile.language = g_param[OptionsDefine.Language]
5453
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
5454
+ client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
5455
+ client._sdkVersion += ("_CLI_" + __version__)
5456
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
5457
+ model = models.SwitchClusterVpcRequest()
5458
+ model.from_json_string(json.dumps(args))
5459
+ start_time = time.time()
5460
+ while True:
5461
+ rsp = client.SwitchClusterVpc(model)
5462
+ result = rsp.to_json_string()
5463
+ try:
5464
+ json_obj = json.loads(result)
5465
+ except TypeError as e:
5466
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
5467
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
5468
+ break
5469
+ cur_time = time.time()
5470
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
5471
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
5472
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
5473
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
5474
+ else:
5475
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
5476
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
5477
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
5478
+
5479
+
5428
5480
  def doCreateClusterDatabase(args, parsed_globals):
5429
5481
  g_param = parse_global_arg(parsed_globals)
5430
5482
 
@@ -7373,7 +7425,7 @@ ACTION_MAP = {
7373
7425
  "DescribeResourcePackageList": doDescribeResourcePackageList,
7374
7426
  "DescribeSupportProxyVersion": doDescribeSupportProxyVersion,
7375
7427
  "CreateAuditLogFile": doCreateAuditLogFile,
7376
- "SwitchClusterVpc": doSwitchClusterVpc,
7428
+ "RenewClusters": doRenewClusters,
7377
7429
  "CloseProxy": doCloseProxy,
7378
7430
  "DescribeProxySpecs": doDescribeProxySpecs,
7379
7431
  "DescribeClusterDetail": doDescribeClusterDetail,
@@ -7464,6 +7516,7 @@ ACTION_MAP = {
7464
7516
  "StopCLSDelivery": doStopCLSDelivery,
7465
7517
  "DescribeBackupList": doDescribeBackupList,
7466
7518
  "ModifyAccountDescription": doModifyAccountDescription,
7519
+ "SwitchClusterVpc": doSwitchClusterVpc,
7467
7520
  "CreateClusterDatabase": doCreateClusterDatabase,
7468
7521
  "ModifyResourcePackageName": doModifyResourcePackageName,
7469
7522
  "DeleteAuditLogFile": doDeleteAuditLogFile,
@@ -854,6 +854,13 @@
854
854
  "output": "RemoveClusterSlaveZoneResponse",
855
855
  "status": "online"
856
856
  },
857
+ "RenewClusters": {
858
+ "document": "续费集群",
859
+ "input": "RenewClustersRequest",
860
+ "name": "续费集群",
861
+ "output": "RenewClustersResponse",
862
+ "status": "online"
863
+ },
857
864
  "ResetAccountPassword": {
858
865
  "document": "本接口(ResetAccountPassword)用于修改数据库账号密码",
859
866
  "input": "ResetAccountPasswordRequest",
@@ -17297,6 +17304,110 @@
17297
17304
  ],
17298
17305
  "type": "object"
17299
17306
  },
17307
+ "RenewClustersRequest": {
17308
+ "document": "RenewClusters请求参数结构体",
17309
+ "members": [
17310
+ {
17311
+ "disabled": false,
17312
+ "document": "集群ID",
17313
+ "example": "cynosdbpg-bzxxrmtq",
17314
+ "member": "string",
17315
+ "name": "ClusterId",
17316
+ "required": true,
17317
+ "type": "string"
17318
+ },
17319
+ {
17320
+ "disabled": false,
17321
+ "document": "续费时长",
17322
+ "example": "1",
17323
+ "member": "float",
17324
+ "name": "TimeSpan",
17325
+ "required": true,
17326
+ "type": "float"
17327
+ },
17328
+ {
17329
+ "disabled": false,
17330
+ "document": "时间单位 y,m,d,h,i,s",
17331
+ "example": "m",
17332
+ "member": "string",
17333
+ "name": "TimeUnit",
17334
+ "required": true,
17335
+ "type": "string"
17336
+ },
17337
+ {
17338
+ "disabled": false,
17339
+ "document": "交易模式 0-下单并支付 1-下单",
17340
+ "example": "0",
17341
+ "member": "int64",
17342
+ "name": "DealMode",
17343
+ "required": false,
17344
+ "type": "int"
17345
+ }
17346
+ ],
17347
+ "type": "object"
17348
+ },
17349
+ "RenewClustersResponse": {
17350
+ "document": "RenewClusters返回参数结构体",
17351
+ "members": [
17352
+ {
17353
+ "disabled": false,
17354
+ "document": "预付费总订单号\n注意:此字段可能返回 null,表示取不到有效值。",
17355
+ "example": "123",
17356
+ "member": "string",
17357
+ "name": "BigDealIds",
17358
+ "required": true,
17359
+ "type": "list",
17360
+ "value_allowed_null": true
17361
+ },
17362
+ {
17363
+ "disabled": false,
17364
+ "document": "退款订单号\n注意:此字段可能返回 null,表示取不到有效值。",
17365
+ "example": "[134]",
17366
+ "member": "string",
17367
+ "name": "DealNames",
17368
+ "required": true,
17369
+ "type": "list",
17370
+ "value_allowed_null": true
17371
+ },
17372
+ {
17373
+ "disabled": false,
17374
+ "document": "冻结流水,一次开通一个冻结流水\n注意:此字段可能返回 null,表示取不到有效值。",
17375
+ "example": "0",
17376
+ "member": "string",
17377
+ "name": "TranId",
17378
+ "required": true,
17379
+ "type": "string",
17380
+ "value_allowed_null": true
17381
+ },
17382
+ {
17383
+ "disabled": false,
17384
+ "document": "每个订单号对应的发货资源id列表\n注意:此字段可能返回 null,表示取不到有效值。",
17385
+ "example": "无",
17386
+ "member": "string",
17387
+ "name": "ResourceIds",
17388
+ "required": true,
17389
+ "type": "list",
17390
+ "value_allowed_null": true
17391
+ },
17392
+ {
17393
+ "disabled": false,
17394
+ "document": "集群id列表\n注意:此字段可能返回 null,表示取不到有效值。",
17395
+ "example": "无",
17396
+ "member": "string",
17397
+ "name": "ClusterIds",
17398
+ "required": true,
17399
+ "type": "list",
17400
+ "value_allowed_null": true
17401
+ },
17402
+ {
17403
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
17404
+ "member": "string",
17405
+ "name": "RequestId",
17406
+ "type": "string"
17407
+ }
17408
+ ],
17409
+ "type": "object"
17410
+ },
17300
17411
  "ResetAccountPasswordRequest": {
17301
17412
  "document": "ResetAccountPassword请求参数结构体",
17302
17413
  "members": [
@@ -1000,6 +1000,14 @@
1000
1000
  "title": "关闭多可用区部署"
1001
1001
  }
1002
1002
  ],
1003
+ "RenewClusters": [
1004
+ {
1005
+ "document": "",
1006
+ "input": "POST / HTTP/1.1\nHost: cynosdb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: RenewClusters\n<公共请求参数>\n\n{\n \"TimeUnit\": \"xx\",\n \"DealMode\": 0,\n \"ClusterId\": \"xx\",\n \"TimeSpan\": 0.0\n}",
1007
+ "output": "{\n \"Response\": {\n \"TranId\": \"\",\n \"BigDealIds\": null,\n \"ResourceIds\": [],\n \"RequestId\": \"11b4ce54-xxxx\",\n \"ClusterIds\": [],\n \"DealNames\": [\n \"xxx\",\n \"xxx\",\n \"xxx\"\n ]\n }\n}",
1008
+ "title": "续费集群"
1009
+ }
1010
+ ],
1003
1011
  "ResetAccountPassword": [
1004
1012
  {
1005
1013
  "document": "修改数据库账号密码",