tccli 3.0.1159.1__py2.py3-none-any.whl → 3.0.1161.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 (52) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/aiart/v20221229/api.json +12 -15
  3. tccli/services/apm/v20210622/api.json +9 -0
  4. tccli/services/cdb/v20170320/api.json +3 -1
  5. tccli/services/cdwdoris/cdwdoris_client.py +1056 -49
  6. tccli/services/cdwdoris/v20211228/api.json +3192 -1014
  7. tccli/services/cdwdoris/v20211228/examples.json +152 -0
  8. tccli/services/cfg/cfg_client.py +224 -12
  9. tccli/services/cfg/v20210820/api.json +897 -32
  10. tccli/services/cfg/v20210820/examples.json +32 -0
  11. tccli/services/cfw/v20190904/api.json +12 -2
  12. tccli/services/cls/v20201016/api.json +11 -1
  13. tccli/services/cme/v20191029/api.json +9 -9
  14. tccli/services/cme/v20191029/examples.json +1 -1
  15. tccli/services/csip/csip_client.py +53 -0
  16. tccli/services/csip/v20221121/api.json +136 -2
  17. tccli/services/csip/v20221121/examples.json +8 -0
  18. tccli/services/cwp/v20180228/api.json +66 -46
  19. tccli/services/cwp/v20180228/examples.json +1 -1
  20. tccli/services/dlc/v20210125/api.json +31 -2
  21. tccli/services/dnspod/v20210323/api.json +1 -1
  22. tccli/services/domain/v20180808/api.json +1 -1
  23. tccli/services/ess/v20201111/api.json +4 -4
  24. tccli/services/ess/v20201111/examples.json +6 -6
  25. tccli/services/essbasic/v20210526/api.json +21 -12
  26. tccli/services/essbasic/v20210526/examples.json +7 -1
  27. tccli/services/faceid/v20180301/api.json +1 -1
  28. tccli/services/iotexplorer/v20190423/api.json +25 -25
  29. tccli/services/iotexplorer/v20190423/examples.json +10 -4
  30. tccli/services/lcic/lcic_client.py +57 -4
  31. tccli/services/lcic/v20220817/api.json +52 -0
  32. tccli/services/lcic/v20220817/examples.json +8 -0
  33. tccli/services/live/v20180801/api.json +1 -1
  34. tccli/services/lke/v20231130/api.json +563 -9
  35. tccli/services/ocr/v20181119/api.json +10 -0
  36. tccli/services/trro/v20220325/api.json +181 -6
  37. tccli/services/trro/v20220325/examples.json +3 -3
  38. tccli/services/trtc/trtc_client.py +53 -0
  39. tccli/services/trtc/v20190722/api.json +83 -10
  40. tccli/services/trtc/v20190722/examples.json +27 -13
  41. tccli/services/tsf/v20180326/api.json +8 -7
  42. tccli/services/tsf/v20180326/examples.json +1 -1
  43. tccli/services/vclm/v20240523/api.json +137 -1
  44. tccli/services/vclm/v20240523/examples.json +46 -0
  45. tccli/services/vclm/vclm_client.py +106 -0
  46. tccli/services/vpc/v20170312/api.json +1 -1
  47. tccli/services/vtc/v20240223/api.json +1 -1
  48. {tccli-3.0.1159.1.dist-info → tccli-3.0.1161.1.dist-info}/METADATA +2 -2
  49. {tccli-3.0.1159.1.dist-info → tccli-3.0.1161.1.dist-info}/RECORD +52 -52
  50. {tccli-3.0.1159.1.dist-info → tccli-3.0.1161.1.dist-info}/WHEEL +0 -0
  51. {tccli-3.0.1159.1.dist-info → tccli-3.0.1161.1.dist-info}/entry_points.txt +0 -0
  52. {tccli-3.0.1159.1.dist-info → tccli-3.0.1161.1.dist-info}/license_files/LICENSE +0 -0
@@ -8,6 +8,22 @@
8
8
  "title": "集群创建示例"
9
9
  }
10
10
  ],
11
+ "CreateWorkloadGroup": [
12
+ {
13
+ "document": "",
14
+ "input": "POST / HTTP/1.1\nHost: cdwdoris.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateWorkloadGroup\n<公共请求参数>\n\n{\n \"InstanceId\": \"cdwdoris-xxx\",\n \"WorkloadGroup\": {\n \"WorkloadGroupName\": \"test\",\n \"CpuShare\": 10,\n \"MemoryLimit\": 20,\n \"EnableMemoryOverCommit\": true\n }\n}",
15
+ "output": "{\n \"Response\": {\n \"RequestId\": \"abc\"\n }\n}",
16
+ "title": "创建资源组"
17
+ }
18
+ ],
19
+ "DeleteWorkloadGroup": [
20
+ {
21
+ "document": "",
22
+ "input": "POST / HTTP/1.1\nHost: cdwdoris.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DeleteWorkloadGroup\n<公共请求参数>\n\n{\n \"InstanceId\": \"cdwdoris-xxx\",\n \"WorkloadGroupName\": \"test\"\n}",
23
+ "output": "{\n \"Response\": {\n \"RequestId\": \"abc\"\n }\n}",
24
+ "title": "删除资源组"
25
+ }
26
+ ],
11
27
  "DescribeClusterConfigs": [
12
28
  {
13
29
  "document": "在xml方式下修改配置文件内容时,获取集群配置文件内容",
@@ -32,6 +48,22 @@
32
48
  "title": "DescribeDatabaseAuditRecords"
33
49
  }
34
50
  ],
51
+ "DescribeFederationToken": [
52
+ {
53
+ "document": "",
54
+ "input": "POST / HTTP/1.1\nHost: cdwdoris.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeFederationToken\n<公共请求参数>\n\n{}",
55
+ "output": "{\n \"Response\": {\n \"RequestId\": \"abc\"\n }\n}",
56
+ "title": "获取联合临时密钥"
57
+ }
58
+ ],
59
+ "DescribeGoodsDetail": [
60
+ {
61
+ "document": "生成计费相关接口的GoodsDetail结构",
62
+ "input": "https://cdwdoris.tencentcloudapi.com/\n?Action=DescribeGoodsDetail\n&Zone=ap-chongqing-1\n&HaFlag=true\n&UserVPCId=vpc-xxx\n&UserSubnetId=subnet-xxxx\n&ProductVersion=20.7.2.30\n&Case=CREATE\n&ChargeProperties.ChargeType=\"PREPAID\"\n&ChargeProperties.RenewFlag=1\n&ChargeProperties.TimeSpan=1\n&ChargeProperties.TimeUnit=m\n&<公共请求参数>",
63
+ "output": "{\n \"Response\": {\n \"Type\": \"sp_cdwch_standard\",\n \"GoodsCategoryId\": 1,\n \"GoodsDetail\": \"{\\\"context\\\":{\\\"AppID\\\":1258469122,\\\"AutoRenewFlag\\\":0,\\\"Case\\\":\\\"CREATE\\\",\\\"Channel\\\":0,\\\"ChargeProperties\\\":{\\\"ChargeType\\\":\\\"PREPAID\\\",\\\"RenewFlag\\\":1,\\\"TimeSpan\\\":1,\\\"TimeUnit\\\":\\\"m\\\"},\\\"Components\\\":[\\\"clickhouse-20.7.2.30\\\",\\\"zookeeper-3.4.9\\\"],\\\"DealName\\\":\\\"\\\",\\\"EMRInstanceID\\\":\\\"\\\",\\\"EMRInstanceNo\\\":0,\\\"ExpiredTime\\\":\\\"\\\",\\\"HAInstance\\\":true,\\\"ImageID\\\":\\\"\\\",\\\"InstanceName\\\":\\\"\\\",\\\"InstanceType\\\":\\\"\\\",\\\"ModifyConfigItems\\\":null,\\\"OperateUin\\\":\\\"\\\",\\\"Password\\\":\\\"\\\",\\\"ProductID\\\":0,\\\"Region\\\":\\\"ap-guangzhou\\\",\\\"RenewPeriod\\\":0,\\\"ResourceAppID\\\":0,\\\"ResourceOperateUin\\\":\\\"\\\",\\\"ResourceUin\\\":\\\"\\\",\\\"Resources\\\":[{\\\"Count\\\":2,\\\"DiskSpec\\\":{\\\"DiskCount\\\":0,\\\"DiskSize\\\":0,\\\"DiskType\\\":\\\"\\\"},\\\"SpecName\\\":\\\"CVM.S2\\\",\\\"Type\\\":\\\"DATA\\\"},{\\\"Count\\\":1,\\\"DiskSpec\\\":{\\\"DiskCount\\\":0,\\\"DiskSize\\\":0,\\\"DiskType\\\":\\\"\\\"},\\\"SpecName\\\":\\\"CVM.S2\\\",\\\"Type\\\":\\\"COMMON\\\"}],\\\"SecurityGroupID\\\":\\\"\\\",\\\"ServiceName\\\":\\\"ClickHouse\\\",\\\"StackID\\\":\\\"\\\",\\\"Tags\\\":{\\\"ResourceType\\\":\\\"\\\",\\\"Tags\\\":null},\\\"TimeSpan\\\":1,\\\"TimeUnit\\\":\\\"m\\\",\\\"Topology\\\":\\\"\\\",\\\"TraceID\\\":\\\"trace-vudbhcyqe15awen3\\\",\\\"Uin\\\":\\\"100010640219\\\",\\\"UserSubnetID\\\":\\\"subnet-xx111\\\",\\\"UserVPCID\\\":\\\"vpc-xxx\\\",\\\"VIPType\\\":0,\\\"Version\\\":\\\"20.7.2.30\\\",\\\"Zone\\\":\\\"ap-guangzhou-4\\\",\\\"instanceId\\\":\\\"cdwch-bbi1k4he\\\",\\\"modifySpec\\\":null},\\\"curDeadline\\\":\\\"\\\",\\\"goodsNum\\\":1,\\\"pid\\\":123,\\\"productCode\\\":\\\"p_cdwch\\\",\\\"productInfo\\\":{\\\"可用区\\\":\\\"ap-guangzhou-4\\\",\\\"地域\\\":\\\"ap-guangzhou\\\",\\\"集群\\\":\\\"cdwch-bbi1k4he\\\"},\\\"sa2_cpu2_mem4\\\":\\\"3\\\",\\\"subProductCode\\\":\\\"p_sub_iaas\\\",\\\"timeSpan\\\":1,\\\"timeUnit\\\":\\\"m\\\"}\",\n \"GoodsNum\": 1,\n \"PayMode\": 1,\n \"RegionId\": 1,\n \"ZoneId\": 100004,\n \"ResourceId\": \"cdwch-bbi1k4he\",\n \"RequestId\": \"xxx-xxx-xxx-xxx\"\n }\n}",
64
+ "title": "生成GoodsDetail"
65
+ }
66
+ ],
35
67
  "DescribeInstance": [
36
68
  {
37
69
  "document": "根据集群ID查询某个集群的具体信息",
@@ -70,6 +102,14 @@
70
102
  "title": "获取集群状态"
71
103
  }
72
104
  ],
105
+ "DescribeInstanceUsedSubnets": [
106
+ {
107
+ "document": "",
108
+ "input": "POST / HTTP/1.1\nHost: cdwdoris.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeInstanceUsedSubnets\n<公共请求参数>\n\n{\n \"InstanceId\": \"abc\"\n}",
109
+ "output": "{\n \"Response\": {\n \"VpcId\": \"abc\",\n \"UsedSubnets\": [\n \"abc\"\n ],\n \"RequestId\": \"abc\"\n }\n}",
110
+ "title": "获取集群已使用子网信息"
111
+ }
112
+ ],
73
113
  "DescribeInstances": [
74
114
  {
75
115
  "document": "获取某个用户下所有的集群列表信息",
@@ -78,6 +118,30 @@
78
118
  "title": "获取实例列表"
79
119
  }
80
120
  ],
121
+ "DescribeRegionZone": [
122
+ {
123
+ "document": "购买页获取地域及可用区列表、内核版本、网络规则等",
124
+ "input": "POST / HTTP/1.1\nHost: cdwdoris.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeRegionZone\n<公共请求参数>\n\n{}",
125
+ "output": "{\n \"Response\": {\n \"Items\": [\n {\n \"Name\": \"abc\",\n \"Desc\": \"abc\",\n \"Regions\": [\n {\n \"Name\": \"abc\",\n \"Desc\": \"abc\",\n \"RegionId\": 0,\n \"Zones\": [\n {\n \"Name\": \"abc\",\n \"Desc\": \"abc\",\n \"ZoneId\": 0,\n \"Encrypt\": 0\n }\n ],\n \"Count\": 0,\n \"IsInternationalSite\": 1,\n \"Bucket\": \"abc\"\n }\n ]\n }\n ],\n \"Versions\": [\n \"abc\"\n ],\n \"VpcRule\": \"abc\",\n \"RequestId\": \"abc\"\n }\n}",
126
+ "title": "购买页获取地域及可用区列表"
127
+ }
128
+ ],
129
+ "DescribeReplicaVersion": [
130
+ {
131
+ "document": "",
132
+ "input": "POST / HTTP/1.1\nHost: cdwdoris.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeReplicaVersion\n<公共请求参数>\n\n{\n \"InstanceId\": \"xx\"\n}",
133
+ "output": "{\n \"Response\": {\n \"ReplicaFlagItem\": {\n \"ReplicaFlag\": 0,\n \"ErrorMsg\": \"xx\"\n },\n \"RequestId\": \"xx\"\n }\n}",
134
+ "title": "DescribeReplicaVersion"
135
+ }
136
+ ],
137
+ "DescribeRestoreTaskDetail": [
138
+ {
139
+ "document": "",
140
+ "input": "POST / HTTP/1.1\nHost: cdwdoris.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeRestoreTaskDetail\n<公共请求参数>\n\n{\n \"InstanceId\": \"xx\",\n \"BackUpJobId\": 0\n}",
141
+ "output": "{\n \"Response\": {\n \"RestoreStatus\": [\n {\n \"Status\": \"xx\",\n \"FinishedTime\": \"xx\",\n \"MetaPreparedTime\": \"xx\",\n \"RestoreObjects\": \"xx\",\n \"Timestamp\": \"xx\",\n \"ReplicaAllocation\": \"xx\",\n \"TaskErrMsg\": \"xx\",\n \"JobId\": 0,\n \"CreateTime\": \"xx\",\n \"State\": \"xx\",\n \"SnapshotFinishedTime\": \"xx\",\n \"Timeout\": 0,\n \"DownloadFinishedTime\": \"xx\",\n \"UnfinishedTasks\": \"xx\",\n \"Progress\": \"xx\",\n \"Label\": \"xx\",\n \"ReplicationNum\": \"xx\",\n \"DbName\": \"xx\",\n \"AllowLoad\": true\n }\n ],\n \"RequestId\": \"xx\",\n \"ErrorMsg\": \"xx\"\n }\n}",
142
+ "title": "示例"
143
+ }
144
+ ],
81
145
  "DescribeSlowQueryRecords": [
82
146
  {
83
147
  "document": "慢查询",
@@ -94,6 +158,30 @@
94
158
  "title": "DescribeSlowQueryRecordsDownload"
95
159
  }
96
160
  ],
161
+ "DescribeSqlApis": [
162
+ {
163
+ "document": "查询ck集群信息",
164
+ "input": "POST / HTTP/1.1\nHost: cdwdoris.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeSqlApis\n<公共请求参数>\n\n{}",
165
+ "output": "{\n \"Response\": {\n \"RequestId\": \"abc\"\n }\n}",
166
+ "title": "查询ck集群信息"
167
+ }
168
+ ],
169
+ "DescribeUserBindWorkloadGroup": [
170
+ {
171
+ "document": "",
172
+ "input": "POST / HTTP/1.1\nHost: cdwdoris.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeUserBindWorkloadGroup\n<公共请求参数>\n\n{\n \"InstanceId\": \"cdwdoris-xxx\"\n}",
173
+ "output": "{\n \"Response\": {\n \"RequestId\": \"abc\",\n \"UserBindInfos\": [\n {\n \"UserName\": \"test\",\n \"WorkloadGroupName\": \"g1\"\n },\n {\n \"UserName\": \"admin\",\n \"WorkloadGroupName\": \"normal\"\n }\n ]\n }\n}",
174
+ "title": "获取当前集群各用户绑定的资源信息"
175
+ }
176
+ ],
177
+ "DescribeWorkloadGroup": [
178
+ {
179
+ "document": "",
180
+ "input": "POST / HTTP/1.1\nHost: cdwdoris.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeWorkloadGroup\n<公共请求参数>\n\n{\n \"InstanceId\": \"abc\"\n}",
181
+ "output": "{\n \"Response\": {\n \"WorkloadGroups\": [\n {\n \"WorkloadGroupName\": \"abc\",\n \"CpuShare\": 10,\n \"MemoryLimit\": 10,\n \"EnableMemoryOverCommit\": true\n }\n ],\n \"Status\": \"abc\",\n \"ErrorMsg\": \"abc\",\n \"RequestId\": \"abc\"\n }\n}",
182
+ "title": "获取资源组信息"
183
+ }
184
+ ],
97
185
  "DestroyInstance": [
98
186
  {
99
187
  "document": "",
@@ -102,6 +190,14 @@
102
190
  "title": "集群销毁示例"
103
191
  }
104
192
  ],
193
+ "FitClsLog": [
194
+ {
195
+ "document": "在集群配置页面修改集群接口",
196
+ "input": "https://cdwdoris.tencentcloudapi.com/\n?Action=FitClsLog\n&InstanceId=cdwch-xxxx\n&ClsLogSetId=xxxx\n&<公共请求参数>",
197
+ "output": "{\n \"Response\": {\n \"RequestId\": \"xxx-xxx\",\n \"FlowId\": 0,\n \"ErrorMsg\": \"\"\n }\n}",
198
+ "title": "修改集群配置接口"
199
+ }
200
+ ],
105
201
  "ModifyInstance": [
106
202
  {
107
203
  "document": "用户修改实例名称",
@@ -110,6 +206,62 @@
110
206
  "title": "修改实例信息"
111
207
  }
112
208
  ],
209
+ "ModifyInstanceKeyValConfigs": [
210
+ {
211
+ "document": "",
212
+ "input": "POST / HTTP/1.1\nHost: cdwdoris.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifyInstanceKeyValConfigs\n<公共请求参数>\n\n{\n \"InstanceId\": \"123\",\n \"DelItems\": [\n {\n \"ConfKey\": \"123\",\n \"ConfValue\": \"123\"\n }\n ],\n \"FileName\": \"123\",\n \"UpdateItems\": [\n {\n \"ConfKey\": \"123\",\n \"ConfValue\": \"123\"\n }\n ],\n \"Message\": \"123\",\n \"AddItems\": [\n {\n \"ConfKey\": \"123\",\n \"ConfValue\": \"123\"\n }\n ]\n}",
213
+ "output": "{\n \"Response\": {\n \"ErrorMsg\": \"123\",\n \"RequestId\": \"123\",\n \"FlowId\": 0\n }\n}",
214
+ "title": "示例"
215
+ }
216
+ ],
217
+ "ModifySecurityGroups": [
218
+ {
219
+ "document": "",
220
+ "input": "POST / HTTP/1.1\nHost: cdwdoris.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifySecurityGroups\n<公共请求参数>\n\n{\n \"InstanceId\": \"abc\",\n \"OldSecurityGroupIds\": [\n \"abc\"\n ],\n \"ModifySecurityGroupIds\": [\n \"abc\"\n ]\n}",
221
+ "output": "{\n \"Response\": {\n \"ErrorMsg\": \"abc\",\n \"RequestId\": \"abc\"\n }\n}",
222
+ "title": "更改安全组"
223
+ }
224
+ ],
225
+ "ModifyUserBindWorkloadGroup": [
226
+ {
227
+ "document": "",
228
+ "input": "POST / HTTP/1.1\nHost: cdwdoris.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifyUserBindWorkloadGroup\n<公共请求参数>\n\n{\n \"InstanceId\": \"abc\",\n \"BindUsers\": [\n {\n \"UserName\": \"test\",\n \"Host\": \"%\"\n },\n {\n \"UserName\": \"test\",\n \"Host\": \"127.0.0.1\"\n }\n ],\n \"OldWorkloadGroupName\": \"abc\",\n \"NewWorkloadGroupName\": \"abc1\"\n}",
229
+ "output": "{\n \"Response\": {\n \"ErrorMsg\": \"abc\",\n \"RequestId\": \"abc\"\n }\n}",
230
+ "title": "修改用户绑定的资源组"
231
+ }
232
+ ],
233
+ "ModifyUserPrivilegesV3": [
234
+ {
235
+ "document": "",
236
+ "input": "POST / HTTP/1.1\nHost: cdwdoris.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifyUserPrivilegesV3\n<公共请求参数>\n\n{\n \"InstanceId\": \"cdwdoris-xx\",\n \"UserName\": \"test\",\n \"UserPrivileges\": {\n \"IsSetGlobalCatalog\": true\n }\n}",
237
+ "output": "{\n \"Response\": {\n \"ErrorMsg\": \"abc\",\n \"InstanceId\": \"abc\",\n \"RequestId\": \"abc\"\n }\n}",
238
+ "title": "设置全局catalog权限"
239
+ }
240
+ ],
241
+ "ModifyWorkloadGroup": [
242
+ {
243
+ "document": "",
244
+ "input": "POST / HTTP/1.1\nHost: cdwdoris.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifyWorkloadGroup\n<公共请求参数>\n\n{\n \"InstanceId\": \"abc\",\n \"WorkloadGroup\": {\n \"WorkloadGroupName\": \"abc\",\n \"CpuShare\": 10,\n \"MemoryLimit\": 10,\n \"EnableMemoryOverCommit\": true\n }\n}",
245
+ "output": "{\n \"Response\": {\n \"ErrorMsg\": \"abc\",\n \"RequestId\": \"abc\"\n }\n}",
246
+ "title": "修改资源组信息"
247
+ }
248
+ ],
249
+ "ModifyWorkloadGroupStatus": [
250
+ {
251
+ "document": "",
252
+ "input": "POST / HTTP/1.1\nHost: cdwdoris.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifyWorkloadGroupStatus\n<公共请求参数>\n\n{\n \"InstanceId\": \"abc\",\n \"OperationType\": \"open\"\n}",
253
+ "output": "{\n \"Response\": {\n \"ErrorMsg\": \"abc\",\n \"RequestId\": \"abc\"\n }\n}",
254
+ "title": "开启或关闭资源组"
255
+ }
256
+ ],
257
+ "ReduceInstance": [
258
+ {
259
+ "document": "",
260
+ "input": "POST / HTTP/1.1\nHost: cdwdoris.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ReduceInstance\n<公共请求参数>\n\n{\n \"InstanceId\": \"cdwdoris-xqewrqx\",\n \"Type\": \"MASTER\",\n \"DelHosts\": [\n \"10.0.1.12\"\n ],\n \"HaType\": 1\n}",
261
+ "output": "{\n \"Response\": {\n \"FlowId\": \"1231\",\n \"InstanceId\": \"cdwdoris-xqewrqx\",\n \"ErrorMsg\": \"\",\n \"RequestId\": \"xasdfkqe2-a12q29-axdfas\"\n }\n}",
262
+ "title": "缩容API"
263
+ }
264
+ ],
113
265
  "ResizeDisk": [
114
266
  {
115
267
  "document": "",
@@ -17,6 +17,58 @@ from tencentcloud.cfg.v20210820 import models as models_v20210820
17
17
  from jmespath import search
18
18
  import time
19
19
 
20
+ def doDescribeObjectTypeList(args, parsed_globals):
21
+ g_param = parse_global_arg(parsed_globals)
22
+
23
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
24
+ cred = credential.CVMRoleCredential()
25
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
26
+ cred = credential.STSAssumeRoleCredential(
27
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
28
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
29
+ )
30
+ 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):
31
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
32
+ else:
33
+ cred = credential.Credential(
34
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
35
+ )
36
+ http_profile = HttpProfile(
37
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
38
+ reqMethod="POST",
39
+ endpoint=g_param[OptionsDefine.Endpoint],
40
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
41
+ )
42
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
43
+ if g_param[OptionsDefine.Language]:
44
+ profile.language = g_param[OptionsDefine.Language]
45
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
46
+ client = mod.CfgClient(cred, g_param[OptionsDefine.Region], profile)
47
+ client._sdkVersion += ("_CLI_" + __version__)
48
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
49
+ model = models.DescribeObjectTypeListRequest()
50
+ model.from_json_string(json.dumps(args))
51
+ start_time = time.time()
52
+ while True:
53
+ rsp = client.DescribeObjectTypeList(model)
54
+ result = rsp.to_json_string()
55
+ try:
56
+ json_obj = json.loads(result)
57
+ except TypeError as e:
58
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
59
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
60
+ break
61
+ cur_time = time.time()
62
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
63
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
64
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
65
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
66
+ else:
67
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
68
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
69
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
70
+
71
+
20
72
  def doCreateTaskFromTemplate(args, parsed_globals):
21
73
  g_param = parse_global_arg(parsed_globals)
22
74
 
@@ -173,7 +225,7 @@ def doExecuteTaskInstance(args, parsed_globals):
173
225
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
174
226
 
175
227
 
176
- def doDescribeTemplateList(args, parsed_globals):
228
+ def doModifyTaskRunStatus(args, parsed_globals):
177
229
  g_param = parse_global_arg(parsed_globals)
178
230
 
179
231
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -202,11 +254,115 @@ def doDescribeTemplateList(args, parsed_globals):
202
254
  client = mod.CfgClient(cred, g_param[OptionsDefine.Region], profile)
203
255
  client._sdkVersion += ("_CLI_" + __version__)
204
256
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
205
- model = models.DescribeTemplateListRequest()
257
+ model = models.ModifyTaskRunStatusRequest()
206
258
  model.from_json_string(json.dumps(args))
207
259
  start_time = time.time()
208
260
  while True:
209
- rsp = client.DescribeTemplateList(model)
261
+ rsp = client.ModifyTaskRunStatus(model)
262
+ result = rsp.to_json_string()
263
+ try:
264
+ json_obj = json.loads(result)
265
+ except TypeError as e:
266
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
267
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
268
+ break
269
+ cur_time = time.time()
270
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
271
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
272
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
273
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
274
+ else:
275
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
276
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
277
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
278
+
279
+
280
+ def doDescribeActionLibraryList(args, parsed_globals):
281
+ g_param = parse_global_arg(parsed_globals)
282
+
283
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
284
+ cred = credential.CVMRoleCredential()
285
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
286
+ cred = credential.STSAssumeRoleCredential(
287
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
288
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
289
+ )
290
+ 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):
291
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
292
+ else:
293
+ cred = credential.Credential(
294
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
295
+ )
296
+ http_profile = HttpProfile(
297
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
298
+ reqMethod="POST",
299
+ endpoint=g_param[OptionsDefine.Endpoint],
300
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
301
+ )
302
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
303
+ if g_param[OptionsDefine.Language]:
304
+ profile.language = g_param[OptionsDefine.Language]
305
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
306
+ client = mod.CfgClient(cred, g_param[OptionsDefine.Region], profile)
307
+ client._sdkVersion += ("_CLI_" + __version__)
308
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
309
+ model = models.DescribeActionLibraryListRequest()
310
+ model.from_json_string(json.dumps(args))
311
+ start_time = time.time()
312
+ while True:
313
+ rsp = client.DescribeActionLibraryList(model)
314
+ result = rsp.to_json_string()
315
+ try:
316
+ json_obj = json.loads(result)
317
+ except TypeError as e:
318
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
319
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
320
+ break
321
+ cur_time = time.time()
322
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
323
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
324
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
325
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
326
+ else:
327
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
328
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
329
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
330
+
331
+
332
+ def doCreateTaskFromAction(args, parsed_globals):
333
+ g_param = parse_global_arg(parsed_globals)
334
+
335
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
336
+ cred = credential.CVMRoleCredential()
337
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
338
+ cred = credential.STSAssumeRoleCredential(
339
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
340
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
341
+ )
342
+ 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):
343
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
344
+ else:
345
+ cred = credential.Credential(
346
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
347
+ )
348
+ http_profile = HttpProfile(
349
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
350
+ reqMethod="POST",
351
+ endpoint=g_param[OptionsDefine.Endpoint],
352
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
353
+ )
354
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
355
+ if g_param[OptionsDefine.Language]:
356
+ profile.language = g_param[OptionsDefine.Language]
357
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
358
+ client = mod.CfgClient(cred, g_param[OptionsDefine.Region], profile)
359
+ client._sdkVersion += ("_CLI_" + __version__)
360
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
361
+ model = models.CreateTaskFromActionRequest()
362
+ model.from_json_string(json.dumps(args))
363
+ start_time = time.time()
364
+ while True:
365
+ rsp = client.CreateTaskFromAction(model)
210
366
  result = rsp.to_json_string()
211
367
  try:
212
368
  json_obj = json.loads(result)
@@ -329,7 +485,7 @@ def doDescribeTaskList(args, parsed_globals):
329
485
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
330
486
 
331
487
 
332
- def doDescribeTaskPolicyTriggerLog(args, parsed_globals):
488
+ def doDescribeActionFieldConfigList(args, parsed_globals):
333
489
  g_param = parse_global_arg(parsed_globals)
334
490
 
335
491
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -358,11 +514,11 @@ def doDescribeTaskPolicyTriggerLog(args, parsed_globals):
358
514
  client = mod.CfgClient(cred, g_param[OptionsDefine.Region], profile)
359
515
  client._sdkVersion += ("_CLI_" + __version__)
360
516
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
361
- model = models.DescribeTaskPolicyTriggerLogRequest()
517
+ model = models.DescribeActionFieldConfigListRequest()
362
518
  model.from_json_string(json.dumps(args))
363
519
  start_time = time.time()
364
520
  while True:
365
- rsp = client.DescribeTaskPolicyTriggerLog(model)
521
+ rsp = client.DescribeActionFieldConfigList(model)
366
522
  result = rsp.to_json_string()
367
523
  try:
368
524
  json_obj = json.loads(result)
@@ -433,6 +589,58 @@ def doDescribeTaskExecuteLogs(args, parsed_globals):
433
589
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
434
590
 
435
591
 
592
+ def doDescribeTaskPolicyTriggerLog(args, parsed_globals):
593
+ g_param = parse_global_arg(parsed_globals)
594
+
595
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
596
+ cred = credential.CVMRoleCredential()
597
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
598
+ cred = credential.STSAssumeRoleCredential(
599
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
600
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
601
+ )
602
+ 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):
603
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
604
+ else:
605
+ cred = credential.Credential(
606
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
607
+ )
608
+ http_profile = HttpProfile(
609
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
610
+ reqMethod="POST",
611
+ endpoint=g_param[OptionsDefine.Endpoint],
612
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
613
+ )
614
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
615
+ if g_param[OptionsDefine.Language]:
616
+ profile.language = g_param[OptionsDefine.Language]
617
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
618
+ client = mod.CfgClient(cred, g_param[OptionsDefine.Region], profile)
619
+ client._sdkVersion += ("_CLI_" + __version__)
620
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
621
+ model = models.DescribeTaskPolicyTriggerLogRequest()
622
+ model.from_json_string(json.dumps(args))
623
+ start_time = time.time()
624
+ while True:
625
+ rsp = client.DescribeTaskPolicyTriggerLog(model)
626
+ result = rsp.to_json_string()
627
+ try:
628
+ json_obj = json.loads(result)
629
+ except TypeError as e:
630
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
631
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
632
+ break
633
+ cur_time = time.time()
634
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
635
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
636
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
637
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
638
+ else:
639
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
640
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
641
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
642
+
643
+
436
644
  def doDescribeTask(args, parsed_globals):
437
645
  g_param = parse_global_arg(parsed_globals)
438
646
 
@@ -485,7 +693,7 @@ def doDescribeTask(args, parsed_globals):
485
693
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
486
694
 
487
695
 
488
- def doModifyTaskRunStatus(args, parsed_globals):
696
+ def doDescribeTemplateList(args, parsed_globals):
489
697
  g_param = parse_global_arg(parsed_globals)
490
698
 
491
699
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -514,11 +722,11 @@ def doModifyTaskRunStatus(args, parsed_globals):
514
722
  client = mod.CfgClient(cred, g_param[OptionsDefine.Region], profile)
515
723
  client._sdkVersion += ("_CLI_" + __version__)
516
724
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
517
- model = models.ModifyTaskRunStatusRequest()
725
+ model = models.DescribeTemplateListRequest()
518
726
  model.from_json_string(json.dumps(args))
519
727
  start_time = time.time()
520
728
  while True:
521
- rsp = client.ModifyTaskRunStatus(model)
729
+ rsp = client.DescribeTemplateList(model)
522
730
  result = rsp.to_json_string()
523
731
  try:
524
732
  json_obj = json.loads(result)
@@ -652,16 +860,20 @@ MODELS_MAP = {
652
860
  }
653
861
 
654
862
  ACTION_MAP = {
863
+ "DescribeObjectTypeList": doDescribeObjectTypeList,
655
864
  "CreateTaskFromTemplate": doCreateTaskFromTemplate,
656
865
  "DescribeTemplate": doDescribeTemplate,
657
866
  "ExecuteTaskInstance": doExecuteTaskInstance,
658
- "DescribeTemplateList": doDescribeTemplateList,
867
+ "ModifyTaskRunStatus": doModifyTaskRunStatus,
868
+ "DescribeActionLibraryList": doDescribeActionLibraryList,
869
+ "CreateTaskFromAction": doCreateTaskFromAction,
659
870
  "TriggerPolicy": doTriggerPolicy,
660
871
  "DescribeTaskList": doDescribeTaskList,
661
- "DescribeTaskPolicyTriggerLog": doDescribeTaskPolicyTriggerLog,
872
+ "DescribeActionFieldConfigList": doDescribeActionFieldConfigList,
662
873
  "DescribeTaskExecuteLogs": doDescribeTaskExecuteLogs,
874
+ "DescribeTaskPolicyTriggerLog": doDescribeTaskPolicyTriggerLog,
663
875
  "DescribeTask": doDescribeTask,
664
- "ModifyTaskRunStatus": doModifyTaskRunStatus,
876
+ "DescribeTemplateList": doDescribeTemplateList,
665
877
  "ExecuteTask": doExecuteTask,
666
878
  "DeleteTask": doDeleteTask,
667
879