tccli 3.0.1156.1__py2.py3-none-any.whl → 3.0.1158.1__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/ams/v20201229/api.json +14 -14
  3. tccli/services/ams/v20201229/examples.json +1 -1
  4. tccli/services/cam/v20190116/api.json +10 -0
  5. tccli/services/ccc/v20200210/api.json +3 -3
  6. tccli/services/cdwch/v20200915/api.json +27 -0
  7. tccli/services/cdwdoris/v20211228/api.json +27 -0
  8. tccli/services/cfw/v20190904/api.json +34 -0
  9. tccli/services/cls/v20201016/api.json +3 -3
  10. tccli/services/cls/v20201016/examples.json +1 -1
  11. tccli/services/cynosdb/v20190107/api.json +1 -1
  12. tccli/services/dbbrain/v20210527/api.json +10 -1
  13. tccli/services/dts/v20211206/api.json +9 -0
  14. tccli/services/ess/v20201111/api.json +32 -14
  15. tccli/services/ess/v20201111/examples.json +8 -2
  16. tccli/services/essbasic/v20210526/api.json +1 -1
  17. tccli/services/hunyuan/v20230901/api.json +1 -1
  18. tccli/services/mongodb/mongodb_client.py +326 -8
  19. tccli/services/mongodb/v20190725/api.json +551 -0
  20. tccli/services/mongodb/v20190725/examples.json +48 -0
  21. tccli/services/monitor/v20180724/api.json +8 -8
  22. tccli/services/mps/v20190612/api.json +2 -2
  23. tccli/services/mps/v20190612/examples.json +2 -2
  24. tccli/services/ocr/v20181119/api.json +27 -0
  25. tccli/services/redis/v20180412/api.json +3 -3
  26. tccli/services/tem/v20210701/api.json +21 -3
  27. tccli/services/tem/v20210701/examples.json +1 -7
  28. tccli/services/thpc/thpc_client.py +110 -4
  29. tccli/services/thpc/v20230321/api.json +170 -35
  30. tccli/services/thpc/v20230321/examples.json +17 -1
  31. tccli/services/tke/v20220501/api.json +10 -0
  32. tccli/services/trtc/v20190722/api.json +3 -3
  33. tccli/services/trtc/v20190722/examples.json +2 -2
  34. tccli/services/vclm/v20240523/api.json +9 -0
  35. tccli/services/vpc/v20170312/api.json +76 -16
  36. tccli/services/vpc/v20170312/examples.json +3 -3
  37. tccli/services/waf/v20180125/api.json +13 -13
  38. tccli/services/wedata/v20210820/api.json +55 -7
  39. tccli/services/wedata/v20210820/examples.json +6 -0
  40. {tccli-3.0.1156.1.dist-info → tccli-3.0.1158.1.dist-info}/METADATA +2 -2
  41. {tccli-3.0.1156.1.dist-info → tccli-3.0.1158.1.dist-info}/RECORD +44 -44
  42. {tccli-3.0.1156.1.dist-info → tccli-3.0.1158.1.dist-info}/WHEEL +0 -0
  43. {tccli-3.0.1156.1.dist-info → tccli-3.0.1158.1.dist-info}/entry_points.txt +0 -0
  44. {tccli-3.0.1156.1.dist-info → tccli-3.0.1158.1.dist-info}/license_files/LICENSE +0 -0
@@ -48,6 +48,14 @@
48
48
  "title": "创建云数据库实例(按量计费)"
49
49
  }
50
50
  ],
51
+ "CreateDBInstanceParamTpl": [
52
+ {
53
+ "document": "",
54
+ "input": "POST / HTTP/1.1\nHost: mongodb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateDBInstanceParamTpl\n<公共请求参数>\n\n{\n \"ClusterType\": \"SHARD\",\n \"MongoVersion\": \"MONGO_44_WT\",\n \"TplDesc\": \"\",\n \"TplName\": \"test-4.4\"\n}",
55
+ "output": "{\n \"Response\": {\n \"RequestId\": \"f3924f2d-6b76-4fe3-b705-1e0144049b90\",\n \"TplId\": \"tpl-bi5f78srm\"\n }\n}",
56
+ "title": "创建参数模板"
57
+ }
58
+ ],
51
59
  "DeleteAccountUser": [
52
60
  {
53
61
  "document": "刪除实例账号",
@@ -128,6 +136,22 @@
128
136
  "title": "查询实例节点信息"
129
137
  }
130
138
  ],
139
+ "DescribeDBInstanceParamTpl": [
140
+ {
141
+ "document": "",
142
+ "input": "POST / HTTP/1.1\nHost: mongodb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeDBInstanceParamTpl\n<公共请求参数>\n\n{\n \"TplIds\": [\n \"tpl-eykkk2khs\"\n ]\n}",
143
+ "output": "{\n \"Response\": {\n \"ParamTpls\": [\n {\n \"ClusterType\": \"REPLSET\",\n \"MongoVersion\": \"MONGO_42_WT\",\n \"TplDesc\": \"System predefined, forbid modify and delete.\",\n \"TplId\": \"tpl-eykkk2khs\",\n \"TplName\": \"default parameter template\",\n \"TplType\": \"DEFAULT\"\n }\n ],\n \"RequestId\": \"7878d7d7-8c80-4050-93a1-5e1785effd1a\",\n \"TotalCount\": 1\n }\n}",
144
+ "title": "根据模板ID查询参数模板"
145
+ }
146
+ ],
147
+ "DescribeDBInstanceParamTplDetail": [
148
+ {
149
+ "document": "",
150
+ "input": "POST / HTTP/1.1\nHost: mongodb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeDBInstanceParamTplDetail\n<公共请求参数>\n\n{\n \"TplId\": \"tpl-2284g3nmw\"\n}",
151
+ "output": "{\n \"Response\": {\n \"ClusterType\": \"REPLSET\",\n \"InstanceEnumParams\": [\n {\n \"CurrentValue\": \"off\",\n \"DefaultValue\": \"off\",\n \"EnumValue\": [\n \"off\",\n \"slowOp\",\n \"all\"\n ],\n \"NeedRestart\": \"0\",\n \"ParamName\": \"operationProfiling.mode\",\n \"Status\": 1,\n \"Tips\": [\n \"\",\n \"specifies which operations should be profiled.\"\n ],\n \"ValueType\": \"enum\"\n },\n {\n \"CurrentValue\": \"snappy\",\n \"DefaultValue\": \"snappy\",\n \"EnumValue\": [\n \"snappy\",\n \"zlib\",\n \"zstd\",\n \"none\"\n ],\n \"NeedRestart\": \"1\",\n \"ParamName\": \"storage.wiredTiger.collectionConfig.blockCompressor\",\n \"Status\": 1,\n \"Tips\": [\n \"\",\n \"you can uses zstd for journal compression and data compression.\"\n ],\n \"ValueType\": \"enum\"\n }\n ],\n \"InstanceIntegerParams\": [\n {\n \"CurrentValue\": \"100\",\n \"DefaultValue\": \"100\",\n \"Max\": \"65536\",\n \"Min\": \"0\",\n \"NeedRestart\": \"0\",\n \"ParamName\": \"operation.profiling.slowOpThresholdMs\",\n \"Status\": 1,\n \"Tips\": [\n \"\",\n \"the slow operation time threshold, in milliseconds.\"\n ],\n \"Unit\": \"\",\n \"ValueType\": \"integer\"\n },\n {\n \"CurrentValue\": \"600000\",\n \"DefaultValue\": \"600000\",\n \"Max\": \"2147483647\",\n \"Min\": \"1\",\n \"NeedRestart\": \"0\",\n \"ParamName\": \"setParameter.cursorTimeoutMillis\",\n \"Status\": 1,\n \"Tips\": [\n \"\",\n \"sets the expiration threshold in milliseconds for idle cursors before MongoDB removes them.\"\n ],\n \"Unit\": \"\",\n \"ValueType\": \"integer\"\n },\n {\n \"CurrentValue\": \"33554432\",\n \"DefaultValue\": \"33554432\",\n \"Max\": \"268435456\",\n \"Min\": \"33554432\",\n \"NeedRestart\": \"0\",\n \"ParamName\": \"setParameter.internalQueryMaxBlockingSortMemoryUsageBytes\",\n \"Status\": 1,\n \"Tips\": [\n \"\",\n \"internal query exec max blocking sort bytes.\"\n ],\n \"Unit\": \"\",\n \"ValueType\": \"integer\"\n },\n {\n \"CurrentValue\": \"5\",\n \"DefaultValue\": \"5\",\n \"Max\": \"60\",\n \"Min\": \"0\",\n \"NeedRestart\": \"0\",\n \"ParamName\": \"setParameter.maxTransactionLockRequestTimeoutMillis\",\n \"Status\": 1,\n \"Tips\": [\n \"\",\n \"the maximum amount of time in milliseconds that multi-document transactions should wait to acquire locks required by the operations in the transaction.\"\n ],\n \"Unit\": \"\",\n \"ValueType\": \"integer\"\n },\n {\n \"CurrentValue\": \"60\",\n \"DefaultValue\": \"60\",\n \"Max\": \"300\",\n \"Min\": \"5\",\n \"NeedRestart\": \"0\",\n \"ParamName\": \"setParameter.transactionLifetimeLimitSeconds\",\n \"Status\": 1,\n \"Tips\": [\n \"\",\n \"specifies the lifetime of multi-document transactions.\"\n ],\n \"Unit\": \"\",\n \"ValueType\": \"integer\"\n }\n ],\n \"InstanceMultiParams\": [],\n \"InstanceTextParams\": [],\n \"MongoVersion\": \"MONGO_50_WT\",\n \"RequestId\": \"5dedc31c-ee80-4a12-9ed3-6003504b5a57\",\n \"TotalCount\": 7,\n \"TplName\": \"demo\"\n }\n}",
152
+ "title": "查询参数模板详情"
153
+ }
154
+ ],
131
155
  "DescribeDBInstances": [
132
156
  {
133
157
  "document": "查询实例列表",
@@ -184,6 +208,14 @@
184
208
  "title": "获取当前实例是否已开启数据加密"
185
209
  }
186
210
  ],
211
+ "DropDBInstanceParamTpl": [
212
+ {
213
+ "document": "",
214
+ "input": "POST / HTTP/1.1\nHost: mongodb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DropDBInstanceParamTpl\n<公共请求参数>\n\n{\n \"TplId\": \"tpl-b2l1n0886\"\n}",
215
+ "output": "{\n \"Response\": {\n \"RequestId\": \"33bb57b9-4090-40d8-a608-22299973063f\"\n }\n}",
216
+ "title": "删除参数模板"
217
+ }
218
+ ],
187
219
  "EnableTransparentDataEncryption": [
188
220
  {
189
221
  "document": "",
@@ -256,6 +288,14 @@
256
288
  "title": "修改云数据库实例网络信息"
257
289
  }
258
290
  ],
291
+ "ModifyDBInstanceParamTpl": [
292
+ {
293
+ "document": "",
294
+ "input": "POST / HTTP/1.1\nHost: mongodb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifyDBInstanceParamTpl\n<公共请求参数>\n\n{\n \"Params\": [\n {\n \"Key\": \"operation.profiling.slowOpThresholdMs\",\n \"Value\": \"1001\"\n }\n ],\n \"TplId\": \"tpl-2284g3nmw\"\n}",
295
+ "output": "{\n \"Response\": {\n \"RequestId\": \"55c81522-95ae-4dc1-a8a4-15b3efd06f36\"\n }\n}",
296
+ "title": "修改参数"
297
+ }
298
+ ],
259
299
  "ModifyDBInstanceSecurityGroup": [
260
300
  {
261
301
  "document": "修改指定实例的安全组入站规则",
@@ -324,6 +364,14 @@
324
364
  "title": "修改实例用户的密码"
325
365
  }
326
366
  ],
367
+ "RestartNodes": [
368
+ {
369
+ "document": "",
370
+ "input": "POST / HTTP/1.1\nHost: mongodb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: RestartNodes\n<公共请求参数>\n\n{\n \"InstanceId\": \"cmgo-pvwp23v1\",\n \"NodeIds\": [\n \"cmgo-pvwp23v1_0-node-slave0\",\n \"cmgo-pvwp23v1_0-node-slave1\"\n ]\n}",
371
+ "output": "{\n \"Response\": {\n \"RequestId\": \"2efcf780-9970-11ec-8975-6bc44e3bfad7\",\n \"FlowId\": 19677\n }\n}",
372
+ "title": "重启Mongod节点"
373
+ }
374
+ ],
327
375
  "SetAccountUserPrivilege": [
328
376
  {
329
377
  "document": "为当前实例的指定账号设置操作权限",
@@ -12296,8 +12296,8 @@
12296
12296
  "members": [
12297
12297
  {
12298
12298
  "disabled": false,
12299
- "document": "实例ID\n\n示例值:prom-343kafd34",
12300
- "example": "prom-xxx",
12299
+ "document": "Prometheus 实例 ID",
12300
+ "example": "prom-343kafd34",
12301
12301
  "member": "string",
12302
12302
  "name": "InstanceId",
12303
12303
  "required": true,
@@ -12305,8 +12305,8 @@
12305
12305
  },
12306
12306
  {
12307
12307
  "disabled": false,
12308
- "document": "偏移量,默认为0。 示例值:1",
12309
- "example": "",
12308
+ "document": "偏移量,默认为0。",
12309
+ "example": "1",
12310
12310
  "member": "uint64",
12311
12311
  "name": "Offset",
12312
12312
  "required": false,
@@ -12314,8 +12314,8 @@
12314
12314
  },
12315
12315
  {
12316
12316
  "disabled": false,
12317
- "document": "返回数量,默认为20,最大值为100。\n示例值:1",
12318
- "example": "",
12317
+ "document": "返回数量,默认为20,最大值为100",
12318
+ "example": "20",
12319
12319
  "member": "uint64",
12320
12320
  "name": "Limit",
12321
12321
  "required": false,
@@ -12323,8 +12323,8 @@
12323
12323
  },
12324
12324
  {
12325
12325
  "disabled": false,
12326
- "document": "仅支持按Name, Values字段过滤:\n- Name = Name\n 按照给定的预聚合名称列表匹配",
12327
- "example": "",
12326
+ "document": "仅支持按Name, Values字段过滤。",
12327
+ "example": " [{\"Name\": \"name\",\"Values\": [\"test\"]}]",
12328
12328
  "member": "Filter",
12329
12329
  "name": "Filters",
12330
12330
  "required": false,
@@ -9598,7 +9598,7 @@
9598
9598
  "example": "无",
9599
9599
  "member": "DescribeOutput",
9600
9600
  "name": "Info",
9601
- "required": true,
9601
+ "output_required": true,
9602
9602
  "type": "object",
9603
9603
  "value_allowed_null": false
9604
9604
  },
@@ -13273,7 +13273,7 @@
13273
13273
  "example": "无",
13274
13274
  "member": "StreamLinkRegionInfo",
13275
13275
  "name": "Info",
13276
- "required": true,
13276
+ "output_required": true,
13277
13277
  "type": "object",
13278
13278
  "value_allowed_null": false
13279
13279
  },
@@ -187,8 +187,8 @@
187
187
  "CreateStreamLinkOutputInfo": [
188
188
  {
189
189
  "document": "",
190
- "input": "POST / HTTP/1.1\nHost: mps.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateStreamLinkOutputInfo\n<公共请求参数>\n\n{\n \"FlowId\": \"xx\",\n \"Output\": {\n \"OutputName\": \"xx\",\n \"Protocol\": \"xx\",\n \"Description\": \"xx\",\n \"RTPSettings\": {\n \"IdleTimeout\": 1000,\n \"FEC\": \"xx\",\n \"Destinations\": [\n {\n \"Ip\": \"xx\",\n \"Port\": 0\n }\n ]\n },\n \"SRTSettings\": {\n \"Latency\": 1000,\n \"PeerLatency\": 1000,\n \"PbKeyLen\": 0,\n \"RecvLatency\": 1000,\n \"Passphrase\": \"xx\",\n \"StreamId\": \"xx\",\n \"PeerIdleTimeout\": 1000,\n \"Destinations\": [\n {\n \"Ip\": \"xx\",\n \"Port\": 10000\n },\n {\n \"Ip\": \"xx\",\n \"Port\": 10000\n }\n ]\n },\n \"RTMPSettings\": {\n \"ChunkSize\": 4096,\n \"Destinations\": [\n {\n \"Url\": \"xx\",\n \"StreamKey\": \"xx\"\n },\n {\n \"Url\": \"xx\",\n \"StreamKey\": \"xx\"\n }\n ]\n },\n \"OutputRegion\": \"xx\"\n }\n}",
191
- "output": "{\n \"Response\": {\n \"Info\": {\n \"OutputId\": \"01746d03dd8c0956b92d34d30447\",\n \"OutputName\": \"bbbbaaa\",\n \"OutputType\": \"Internet\",\n \"Description\": \"description\",\n \"Protocol\": \"SRT\",\n \"OutputAddressList\": [\n {\n \"Ip\": \"1.1.1.1\"\n },\n {\n \"Ip\": \"2.2.2.2\"\n }\n ],\n \"OutputRegion\": \"ap-mumbai\",\n \"SRTSettings\": {\n \"Destinations\": [\n {\n \"Ip\": \"1.1.1.1\",\n \"Port\": 10000\n },\n {\n \"Ip\": \"1.1.1.1\",\n \"Port\": 10000\n }\n ],\n \"StreamId\": \"#!::u=johnny,t=file,m=publish,r=results.csv\",\n \"Latency\": 1000,\n \"RecvLatency\": 1000,\n \"PeerLatency\": 1000,\n \"PeerIdleTimeout\": 1000,\n \"Passphrase\": \"\",\n \"PbKeyLen\": 0\n },\n \"AllowIpList\": [\n \"test\"\n ],\n \"RTPSettings\": {\n \"Destinations\": [],\n \"FEC\": \"\",\n \"IdleTimeout\": 0\n },\n \"RTSPPullSettings\": {\n \"ServerUrls\": [\n {\n \"Url\": \"test\"\n }\n ]\n },\n \"RTMPPullSettings\": {\n \"ServerUrls\": [\n {\n \"StreamKey\": \"test\",\n \"TcUrl\": \"test\"\n }\n ]\n },\n \"RTMPSettings\": {\n \"Destinations\": [],\n \"IdleTimeout\": 0,\n \"ChunkSize\": 0\n }\n },\n \"RequestId\": \"aaaaa\"\n }\n}",
190
+ "input": "POST / HTTP/1.1\nHost: mps.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateStreamLinkOutputInfo\n<公共请求参数>\n\n{\n \"FlowId\": \"abc\",\n \"Output\": {\n \"OutputName\": \"abc\",\n \"Protocol\": \"abc\",\n \"Description\": \"abc\",\n \"RTPSettings\": {\n \"IdleTimeout\": 1000,\n \"FEC\": \"abc\",\n \"Destinations\": [\n {\n \"Ip\": \"abc\",\n \"Port\": 0\n }\n ]\n },\n \"SRTSettings\": {\n \"Latency\": 1000,\n \"PeerLatency\": 1000,\n \"PbKeyLen\": 0,\n \"RecvLatency\": 1000,\n \"Passphrase\": \"abc\",\n \"StreamId\": \"abc\",\n \"PeerIdleTimeout\": 1000,\n \"Destinations\": [\n {\n \"Ip\": \"abc\",\n \"Port\": 10000\n },\n {\n \"Ip\": \"abc\",\n \"Port\": 10000\n }\n ]\n },\n \"RTMPSettings\": {\n \"ChunkSize\": 4096,\n \"Destinations\": [\n {\n \"Url\": \"abc\",\n \"StreamKey\": \"abc\"\n },\n {\n \"Url\": \"abc\",\n \"StreamKey\": \"abc\"\n }\n ]\n },\n \"OutputRegion\": \"abc\"\n }\n}",
191
+ "output": "{\n \"Response\": {\n \"Info\": {\n \"OutputId\": \"01746d03dd8c0956b92d34d30447\",\n \"OutputName\": \"bbbbaaa\",\n \"OutputType\": \"Internet\",\n \"Description\": \"description\",\n \"Protocol\": \"SRT\",\n \"OutputAddressList\": [\n {\n \"Ip\": \"1.1.1.1\"\n },\n {\n \"Ip\": \"2.2.2.2\"\n }\n ],\n \"OutputRegion\": \"ap-mumbai\",\n \"SRTSettings\": {\n \"Destinations\": [\n {\n \"Ip\": \"1.1.1.1\",\n \"Port\": 10000\n },\n {\n \"Ip\": \"1.1.1.1\",\n \"Port\": 10000\n }\n ],\n \"StreamId\": \"#!::u=johnny,t=file,m=publish,r=results.csv\",\n \"Latency\": 1000,\n \"RecvLatency\": 1000,\n \"PeerLatency\": 1000,\n \"PeerIdleTimeout\": 1000,\n \"Passphrase\": \"\",\n \"PbKeyLen\": 0,\n \"Mode\": \"abc\",\n \"SourceAddresses\": [\n {\n \"Ip\": \"abc\",\n \"Port\": 0\n }\n ]\n },\n \"AllowIpList\": [\n \"test\"\n ],\n \"RTPSettings\": {\n \"Destinations\": [],\n \"FEC\": \"\",\n \"IdleTimeout\": 0\n },\n \"RTSPPullSettings\": {\n \"ServerUrls\": [\n {\n \"Url\": \"test\"\n }\n ]\n },\n \"RTMPPullSettings\": {\n \"ServerUrls\": [\n {\n \"StreamKey\": \"test\",\n \"TcUrl\": \"test\"\n }\n ]\n },\n \"RTMPSettings\": {\n \"Destinations\": [],\n \"IdleTimeout\": 0,\n \"ChunkSize\": 0\n },\n \"HLSPullSettings\": {\n \"ServerUrls\": [\n {\n \"Url\": \"abc\"\n }\n ]\n },\n \"MaxConcurrent\": 1,\n \"SecurityGroupIds\": [\n \"abc\"\n ],\n \"Zones\": [\n \"abc\"\n ]\n },\n \"RequestId\": \"aaaaa\"\n }\n}",
192
192
  "title": "请求示例"
193
193
  }
194
194
  ],
@@ -10275,6 +10275,15 @@
10275
10275
  "name": "ImageUrl",
10276
10276
  "required": false,
10277
10277
  "type": "string"
10278
+ },
10279
+ {
10280
+ "disabled": false,
10281
+ "document": "是否返回头像照片,默认为 false",
10282
+ "example": "false",
10283
+ "member": "bool",
10284
+ "name": "CropPortrait",
10285
+ "required": false,
10286
+ "type": "bool"
10278
10287
  }
10279
10288
  ],
10280
10289
  "type": "object"
@@ -10288,6 +10297,7 @@
10288
10297
  "example": "李明",
10289
10298
  "member": "string",
10290
10299
  "name": "Name",
10300
+ "output_required": true,
10291
10301
  "type": "string",
10292
10302
  "value_allowed_null": false
10293
10303
  },
@@ -10297,6 +10307,7 @@
10297
10307
  "example": "LIMING",
10298
10308
  "member": "string",
10299
10309
  "name": "EnglishName",
10310
+ "output_required": true,
10300
10311
  "type": "string",
10301
10312
  "value_allowed_null": false
10302
10313
  },
@@ -10306,6 +10317,7 @@
10306
10317
  "example": "C00000000",
10307
10318
  "member": "string",
10308
10319
  "name": "Number",
10320
+ "output_required": true,
10309
10321
  "type": "string",
10310
10322
  "value_allowed_null": false
10311
10323
  },
@@ -10315,6 +10327,7 @@
10315
10327
  "example": "男",
10316
10328
  "member": "string",
10317
10329
  "name": "Sex",
10330
+ "output_required": true,
10318
10331
  "type": "string",
10319
10332
  "value_allowed_null": false
10320
10333
  },
@@ -10324,6 +10337,7 @@
10324
10337
  "example": "2018.10.09-2028.10.08",
10325
10338
  "member": "string",
10326
10339
  "name": "ValidDate",
10340
+ "output_required": true,
10327
10341
  "type": "string",
10328
10342
  "value_allowed_null": false
10329
10343
  },
@@ -10333,6 +10347,7 @@
10333
10347
  "example": "公安部出入境管理局",
10334
10348
  "member": "string",
10335
10349
  "name": "IssueAuthority",
10350
+ "output_required": true,
10336
10351
  "type": "string",
10337
10352
  "value_allowed_null": false
10338
10353
  },
@@ -10342,6 +10357,7 @@
10342
10357
  "example": "广东",
10343
10358
  "member": "string",
10344
10359
  "name": "IssueAddress",
10360
+ "output_required": true,
10345
10361
  "type": "string",
10346
10362
  "value_allowed_null": false
10347
10363
  },
@@ -10351,6 +10367,17 @@
10351
10367
  "example": "1981.08.03",
10352
10368
  "member": "string",
10353
10369
  "name": "Birthday",
10370
+ "output_required": true,
10371
+ "type": "string",
10372
+ "value_allowed_null": false
10373
+ },
10374
+ {
10375
+ "disabled": false,
10376
+ "document": "头像照片的base64",
10377
+ "example": "无",
10378
+ "member": "string",
10379
+ "name": "PortraitImage",
10380
+ "output_required": false,
10354
10381
  "type": "string",
10355
10382
  "value_allowed_null": false
10356
10383
  },
@@ -5973,7 +5973,7 @@
5973
5973
  },
5974
5974
  {
5975
5975
  "disabled": false,
5976
- "document": "地域ID 。\n- 1:广州 \n- 4:上海 \n- 5:中国香港 \n- 6:多伦多 \n- 7:上海金融 \n- 8:北京 \n- 9:新加坡\n- 11:深圳金融\n- 15:美西(硅谷)\n- 16:成都 \n- 17:德国 \n- 18:韩国 \n- 19:重庆 \n- 21:印度 \n- 22:美东(弗吉尼亚)\n- 23:泰国 \n- 25:日本",
5976
+ "document": "地域ID 。\n- 1:广州 \n- 4:上海 \n- 5:中国香港 \n- 7:上海金融 \n- 8:北京 \n- 9:新加坡\n- 11:深圳金融\n- 15:美西(硅谷)\n- 16:成都 \n- 17:德国 \n- 18:韩国 \n- 19:重庆 \n- 21:印度 \n- 22:美东(弗吉尼亚)\n- 23:泰国 \n- 25:日本",
5977
5977
  "example": "1",
5978
5978
  "member": "int64",
5979
5979
  "name": "RegionId",
@@ -7158,7 +7158,7 @@
7158
7158
  },
7159
7159
  {
7160
7160
  "disabled": false,
7161
- "document": "地域 ID。<ul><li>1:广州。</li><li>4:上海。</li><li>5:中国香港。</li><li>6:多伦多。</li> <li>7:上海金融。</li> <li>8:北京。</li> <li>9:新加坡。</li> <li>11:深圳金融。</li> <li>15:美西(硅谷)。</li><li>16:成都。</li><li>17:法兰克福。</li><li>18:首尔。</li><li>19:重庆。</li><li>21:孟买。</li><li>22:美东(弗吉尼亚)。</li><li>23:曼谷。</li><li>25:东京。</li></ul>",
7161
+ "document": "地域 ID。<ul><li>1:广州。</li><li>4:上海。</li><li>5:中国香港。</li><li>7:上海金融。</li> <li>8:北京。</li> <li>9:新加坡。</li> <li>11:深圳金融。</li> <li>15:美西(硅谷)。</li><li>16:成都。</li><li>17:法兰克福。</li><li>18:首尔。</li><li>19:重庆。</li><li>21:孟买。</li><li>22:美东(弗吉尼亚)。</li><li>23:曼谷。</li><li>25:东京。</li></ul>",
7162
7162
  "example": "1",
7163
7163
  "member": "int64",
7164
7164
  "name": "RegionId",
@@ -7904,7 +7904,7 @@
7904
7904
  },
7905
7905
  {
7906
7906
  "disabled": false,
7907
- "document": "地域ID。<ul><li>1:广州。</li><li>4:上海。</li><li> 5:香港。</li> <li> 6:多伦多。</li> <li> 7:上海金融。</li> <li> 8:北京。</li> <li> 9:新加坡。</li> <li> 11:深圳金融。</li> <li> 15:美西(硅谷)。</li> </ul>",
7907
+ "document": "地域ID。<ul><li>1:广州。</li><li>4:上海。</li><li> 5:香港。</li> <li> 7:上海金融。</li> <li> 8:北京。</li> <li> 9:新加坡。</li> <li> 11:深圳金融。</li> <li> 15:美西(硅谷)。</li> </ul>",
7908
7908
  "example": "1",
7909
7909
  "member": "uint64",
7910
7910
  "name": "RegionId",
@@ -1874,8 +1874,8 @@
1874
1874
  },
1875
1875
  {
1876
1876
  "disabled": false,
1877
- "document": "包名。使用 JAR 包或者 WAR 包部署的时候必填。",
1878
- "example": "1",
1877
+ "document": "传入内容为 /jar包名字 的形式。也就是在 jar包名字前增加一个/。\n\n如上传的 jar 包名字为 demo-1.0.0.jar,那么这里传入内容为:/demo-1.0.0.jar\n\n注:jar 包需要通过 tem 页面上传过,tem 后端才能拉到该 jar 包。",
1878
+ "example": "/demo-1.0.0.jar",
1879
1879
  "member": "string",
1880
1880
  "name": "PkgName",
1881
1881
  "required": false,
@@ -2141,6 +2141,24 @@
2141
2141
  "name": "RepoType",
2142
2142
  "required": false,
2143
2143
  "type": "int"
2144
+ },
2145
+ {
2146
+ "disabled": false,
2147
+ "document": "启动后执行的脚本,base64 编码",
2148
+ "example": "无",
2149
+ "member": "string",
2150
+ "name": "PostStartEncoded",
2151
+ "required": false,
2152
+ "type": "string"
2153
+ },
2154
+ {
2155
+ "disabled": false,
2156
+ "document": "停止前执行的脚本,base64 编码",
2157
+ "example": "无",
2158
+ "member": "string",
2159
+ "name": "PreStopEncoded",
2160
+ "required": false,
2161
+ "type": "string"
2144
2162
  }
2145
2163
  ],
2146
2164
  "type": "object"
@@ -2154,7 +2172,7 @@
2154
2172
  "example": "1",
2155
2173
  "member": "string",
2156
2174
  "name": "Result",
2157
- "required": true,
2175
+ "output_required": true,
2158
2176
  "type": "string",
2159
2177
  "value_allowed_null": false
2160
2178
  },
@@ -99,15 +99,9 @@
99
99
  "DeployApplication": [
100
100
  {
101
101
  "document": "应用部署",
102
- "input": "POST / HTTP/1.1\nHost: tem.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DeployApplication\n<公共请求参数>\n\n{\n \"Service\": {\n \"ApplicationName\": \"xx\",\n \"ExternalIp\": \"xx\",\n \"Name\": \"xx\",\n \"PortMappings\": [\n {\n \"Protocol\": \"xx\",\n \"TargetPort\": 0,\n \"Port\": 0\n }\n ],\n \"Yaml\": \"xx\",\n \"LoadBalanceId\": \"xx\",\n \"VersionName\": \"xx\",\n \"ClusterIp\": [\n \"xx\"\n ],\n \"SubnetId\": \"xx\",\n \"Type\": \"xx\",\n \"Ports\": [\n 0\n ]\n },\n \"JvmOpts\": \"xx\",\n \"StorageConfs\": [\n {\n \"StorageVolName\": \"xx\",\n \"StorageVolIp\": \"xx\",\n \"StorageVolPath\": \"xx\"\n }\n ],\n \"ImgRepo\": \"xx\",\n \"EnvConf\": [\n {\n \"Value\": \"xx\",\n \"Key\": \"xx\"\n }\n ],\n \"ImageCommand\": \"xx\",\n \"Description\": \"xx\",\n \"JdkVersion\": \"xx\",\n \"ApplicationId\": \"xx\",\n \"LogOutputConf\": {\n \"ClsLogTopicId\": \"xx\",\n \"ClsLogsetName\": \"xx\",\n \"ClsLogsetId\": \"xx\",\n \"ClsLogTopicName\": \"xx\",\n \"OutputType\": \"xx\"\n },\n \"UseRegistryDefaultConfig\": true,\n \"CpuSpec\": 0.0,\n \"DeployMode\": \"xx\",\n \"SecurityGroupIds\": [\n \"xx\"\n ],\n \"SourceChannel\": 0,\n \"DeployVersion\": \"xx\",\n \"InitPodNum\": 1,\n \"VersionDesc\": \"xx\",\n \"ImageArgs\": [\n \"xx\"\n ],\n \"MemorySpec\": 0.0,\n \"EnvironmentId\": \"xx\",\n \"LogConfs\": [\n \"xx\"\n ],\n \"PkgName\": \"xx\",\n \"StorageMountConfs\": [\n {\n \"VolumeName\": \"xx\",\n \"MountPath\": \"xx\"\n }\n ],\n \"EsInfo\": {\n \"MinAliveInstances\": 0,\n \"EsStrategy\": 0,\n \"VersionId\": \"xx\",\n \"Threshold\": 1,\n \"MaxAliveInstances\": 2\n },\n \"VersionId\": \"xx\",\n \"SettingConfs\": [\n {\n \"ConfigDataName\": \"xx\",\n \"MountedPath\": \"xx\",\n \"Data\": [\n {\n \"Value\": \"xx\",\n \"Key\": \"xx\"\n }\n ]\n }\n ],\n \"OsFlavour\": \"ALPINE\"\n}",
102
+ "input": "POST / HTTP/1.1\nHost: tem.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DeployApplication\n<公共请求参数>\n\n{\n \"ApplicationId\": \"abc\",\n \"ImgRepo\": \"abc\",\n \"VersionDesc\": \"abc\",\n \"JvmOpts\": \"abc\",\n \"InitPodNum\": 1,\n \"EsInfo\": {\n \"MinAliveInstances\": 0,\n \"MaxAliveInstances\": 0,\n \"EsStrategy\": 0,\n \"VersionId\": \"abc\",\n \"Threshold\": 1\n },\n \"EnvConf\": [\n {\n \"Key\": \"abc\",\n \"Value\": \"abc\",\n \"Type\": \"abc\",\n \"Config\": \"abc\",\n \"Secret\": \"abc\"\n }\n ],\n \"LogConfs\": [\n \"abc\"\n ],\n \"StorageConfs\": [\n {\n \"StorageVolName\": \"abc\",\n \"StorageVolPath\": \"abc\",\n \"StorageVolIp\": \"abc\"\n }\n ],\n \"StorageMountConfs\": [\n {\n \"VolumeName\": \"abc\",\n \"MountPath\": \"abc\"\n }\n ],\n \"DeployMode\": \"abc\",\n \"DeployVersion\": \"abc\",\n \"PkgName\": \"abc\",\n \"CpuSpec\": 0,\n \"MemorySpec\": 0,\n \"JdkVersion\": \"abc\",\n \"SecurityGroupIds\": [\n \"abc\"\n ],\n \"LogOutputConf\": {\n \"OutputType\": \"abc\",\n \"ClsLogsetName\": \"abc\",\n \"ClsLogTopicId\": \"abc\",\n \"ClsLogsetId\": \"abc\",\n \"ClsLogTopicName\": \"abc\"\n },\n \"SourceChannel\": 0,\n \"Description\": \"abc\",\n \"EnvironmentId\": \"abc\",\n \"ImageCommand\": \"abc\",\n \"ImageArgs\": [\n \"abc\"\n ],\n \"UseRegistryDefaultConfig\": true,\n \"SettingConfs\": [\n {\n \"ConfigDataName\": \"abc\",\n \"MountedPath\": \"abc\",\n \"Data\": [\n {\n \"Key\": \"abc\",\n \"Value\": \"abc\",\n \"Type\": \"abc\",\n \"Config\": \"abc\",\n \"Secret\": \"abc\"\n }\n ],\n \"SecretDataName\": \"abc\"\n }\n ],\n \"Service\": {\n \"Name\": \"abc\",\n \"Ports\": [\n 0\n ],\n \"Yaml\": \"abc\",\n \"ApplicationName\": \"abc\",\n \"VersionName\": \"abc\",\n \"ClusterIp\": [\n \"abc\"\n ],\n \"ExternalIp\": \"abc\",\n \"Type\": \"abc\",\n \"SubnetId\": \"abc\",\n \"LoadBalanceId\": \"abc\",\n \"PortMappings\": [\n {\n \"Port\": 0,\n \"TargetPort\": 0,\n \"Protocol\": \"abc\",\n \"ServiceName\": \"abc\"\n }\n ],\n \"ServicePortMappingList\": [\n {\n \"Type\": \"abc\",\n \"ServiceName\": \"abc\",\n \"ClusterIp\": \"abc\",\n \"ExternalIp\": \"abc\",\n \"SubnetId\": \"abc\",\n \"VpcId\": \"abc\",\n \"LoadBalanceId\": \"abc\",\n \"Yaml\": \"abc\",\n \"Ports\": [\n 0\n ],\n \"PortMappingItemList\": [\n {\n \"Port\": 0,\n \"TargetPort\": 0,\n \"Protocol\": \"abc\"\n }\n ],\n \"ExternalDomain\": \"abc\"\n }\n ],\n \"FlushAll\": true,\n \"EnableRegistryNextDeploy\": 0,\n \"ApplicationId\": \"abc\",\n \"AllIpDone\": true,\n \"ExternalDomain\": \"abc\"\n },\n \"VersionId\": \"abc\",\n \"PostStart\": \"abc\",\n \"PreStop\": \"abc\",\n \"Liveness\": {\n \"Type\": \"abc\",\n \"Protocol\": \"abc\",\n \"Path\": \"abc\",\n \"Exec\": \"abc\",\n \"Port\": 0,\n \"InitialDelaySeconds\": 0,\n \"TimeoutSeconds\": 0,\n \"PeriodSeconds\": 0\n },\n \"Readiness\": {\n \"Type\": \"abc\",\n \"Protocol\": \"abc\",\n \"Path\": \"abc\",\n \"Exec\": \"abc\",\n \"Port\": 0,\n \"InitialDelaySeconds\": 0,\n \"TimeoutSeconds\": 0,\n \"PeriodSeconds\": 0\n },\n \"DeployStrategyConf\": {\n \"TotalBatchCount\": 0,\n \"BetaBatchNum\": 0,\n \"DeployStrategyType\": 0,\n \"BatchInterval\": 0,\n \"MinAvailable\": 0,\n \"Force\": true\n },\n \"HorizontalAutoscaler\": [\n {\n \"MinReplicas\": 0,\n \"MaxReplicas\": 0,\n \"Metrics\": \"abc\",\n \"Threshold\": 0,\n \"Enabled\": true,\n \"DoubleThreshold\": 0\n }\n ],\n \"CronHorizontalAutoscaler\": [\n {\n \"Name\": \"abc\",\n \"Period\": \"abc\",\n \"Schedules\": [\n {\n \"StartAt\": \"abc\",\n \"TargetReplicas\": 0\n }\n ],\n \"Enabled\": true,\n \"Priority\": 0\n }\n ],\n \"LogEnable\": 0,\n \"ConfEdited\": true,\n \"SpeedUp\": true,\n \"StartupProbe\": {\n \"Type\": \"abc\",\n \"Protocol\": \"abc\",\n \"Path\": \"abc\",\n \"Exec\": \"abc\",\n \"Port\": 0,\n \"InitialDelaySeconds\": 0,\n \"TimeoutSeconds\": 0,\n \"PeriodSeconds\": 0\n },\n \"OsFlavour\": \"abc\",\n \"EnablePrometheusConf\": {\n \"Port\": 0,\n \"Path\": \"abc\"\n },\n \"EnableTracing\": 0,\n \"EnableMetrics\": 0,\n \"TcrInstanceId\": \"abc\",\n \"RepoServer\": \"abc\",\n \"RepoType\": 0,\n \"PostStartEncoded\": \"abc\",\n \"PreStopEncoded\": \"abc\"\n}",
103
103
  "output": "{\n \"Response\": {\n \"RequestId\": \"81f74023-563c-437d-abf7-8139449ef178\",\n \"Result\": \"version-xxx\"\n }\n}",
104
104
  "title": "应用部署"
105
- },
106
- {
107
- "document": "",
108
- "input": "POST / HTTP/1.1\nHost: tem.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DeployApplication\n<公共请求参数>\n\n{\n \"Service\": {\n \"Name\": \"字符串\"\n },\n \"JvmOpts\": \"字符串\",\n \"SpeedUp\": \"false\",\n \"PreStop\": \"字符串\",\n \"ImgRepo\": \"字符串\",\n \"EnvConf\": [\n {\n \"Config\": \"字符串\",\n \"Type\": \"字符串\",\n \"Key\": \"字符串\",\n \"Value\": \"字符串\"\n }\n ],\n \"ImageCommand\": \"字符串\",\n \"Description\": \"字符串\",\n \"JdkVersion\": \"字符串\",\n \"ApplicationId\": \"字符串\",\n \"LogOutputConf\": {\n \"ClsLogTopicName\": \"字符串\",\n \"ClsLogsetName\": \"字符串\",\n \"ClsLogTopicId\": \"字符串\",\n \"OutputType\": \"字符串\",\n \"ClsLogsetId\": \"字符串\"\n },\n \"ConfEdited\": \"false\",\n \"EnvironmentId\": \"字符串\",\n \"CpuSpec\": \"0.1\",\n \"DeployMode\": \"字符串\",\n \"SecurityGroupIds\": [\n \"字符串\"\n ],\n \"SourceChannel\": \"0\",\n \"LogEnable\": \"0\",\n \"InitPodNum\": \"2\",\n \"VersionDesc\": \"字符串\",\n \"ImageArgs\": [\n \"字符串\"\n ],\n \"MemorySpec\": \"1024\",\n \"UseRegistryDefaultConfig\": \"true\",\n \"LogConfs\": [\n \"字符串\"\n ],\n \"PkgName\": \"字符串\",\n \"StorageMountConfs\": [\n {\n \"VolumeName\": \"字符串\",\n \"MountPath\": \"字符串\"\n }\n ],\n \"DeployVersion\": \"字符串\",\n \"VersionId\": \"字符串\",\n \"SettingConfs\": [\n {\n \"ConfigDataName\": \"字符串\",\n \"MountedPath\": \"字符串\",\n \"Data\": [\n {\n \"Config\": \"字符串\",\n \"Type\": \"字符串\",\n \"Key\": \"字符串\",\n \"Value\": \"字符串\"\n }\n ]\n }\n ],\n \"StorageConfs\": [\n {\n \"StorageVolPath\": \"字符串\",\n \"StorageVolIp\": \"字符串\",\n \"StorageVolName\": \"字符串\"\n }\n ],\n \"PostStart\": \"字符串\",\n \"OsFlavour\": \"ALPINE\"\n}",
109
- "output": "{\n \"Response\": {\n \"RequestId\": \"422a54ac-9913-4d46-8439-9c05600003b3\",\n \"Result\": \"version-success\"\n }\n}",
110
- "title": "nanjing-test-20220111"
111
105
  }
112
106
  ],
113
107
  "DescribeApplicationAutoscalerList": [
@@ -541,7 +541,7 @@ def doDescribeInitNodeScripts(args, parsed_globals):
541
541
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
542
542
 
543
543
 
544
- def doDeleteQueue(args, parsed_globals):
544
+ def doAttachNodes(args, parsed_globals):
545
545
  g_param = parse_global_arg(parsed_globals)
546
546
 
547
547
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -570,11 +570,11 @@ def doDeleteQueue(args, parsed_globals):
570
570
  client = mod.ThpcClient(cred, g_param[OptionsDefine.Region], profile)
571
571
  client._sdkVersion += ("_CLI_" + __version__)
572
572
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
573
- model = models.DeleteQueueRequest()
573
+ model = models.AttachNodesRequest()
574
574
  model.from_json_string(json.dumps(args))
575
575
  start_time = time.time()
576
576
  while True:
577
- rsp = client.DeleteQueue(model)
577
+ rsp = client.AttachNodes(model)
578
578
  result = rsp.to_json_string()
579
579
  try:
580
580
  json_obj = json.loads(result)
@@ -801,6 +801,58 @@ def doDescribeClusters(args, parsed_globals):
801
801
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
802
802
 
803
803
 
804
+ def doDetachNodes(args, parsed_globals):
805
+ g_param = parse_global_arg(parsed_globals)
806
+
807
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
808
+ cred = credential.CVMRoleCredential()
809
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
810
+ cred = credential.STSAssumeRoleCredential(
811
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
812
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
813
+ )
814
+ 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):
815
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
816
+ else:
817
+ cred = credential.Credential(
818
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
819
+ )
820
+ http_profile = HttpProfile(
821
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
822
+ reqMethod="POST",
823
+ endpoint=g_param[OptionsDefine.Endpoint],
824
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
825
+ )
826
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
827
+ if g_param[OptionsDefine.Language]:
828
+ profile.language = g_param[OptionsDefine.Language]
829
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
830
+ client = mod.ThpcClient(cred, g_param[OptionsDefine.Region], profile)
831
+ client._sdkVersion += ("_CLI_" + __version__)
832
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
833
+ model = models.DetachNodesRequest()
834
+ model.from_json_string(json.dumps(args))
835
+ start_time = time.time()
836
+ while True:
837
+ rsp = client.DetachNodes(model)
838
+ result = rsp.to_json_string()
839
+ try:
840
+ json_obj = json.loads(result)
841
+ except TypeError as e:
842
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
843
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
844
+ break
845
+ cur_time = time.time()
846
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
847
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
848
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
849
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
850
+ else:
851
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
852
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
853
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
854
+
855
+
804
856
  def doAddClusterStorageOption(args, parsed_globals):
805
857
  g_param = parse_global_arg(parsed_globals)
806
858
 
@@ -957,6 +1009,58 @@ def doDeleteCluster(args, parsed_globals):
957
1009
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
958
1010
 
959
1011
 
1012
+ def doDeleteQueue(args, parsed_globals):
1013
+ g_param = parse_global_arg(parsed_globals)
1014
+
1015
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1016
+ cred = credential.CVMRoleCredential()
1017
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1018
+ cred = credential.STSAssumeRoleCredential(
1019
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1020
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1021
+ )
1022
+ 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):
1023
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1024
+ else:
1025
+ cred = credential.Credential(
1026
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1027
+ )
1028
+ http_profile = HttpProfile(
1029
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1030
+ reqMethod="POST",
1031
+ endpoint=g_param[OptionsDefine.Endpoint],
1032
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1033
+ )
1034
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1035
+ if g_param[OptionsDefine.Language]:
1036
+ profile.language = g_param[OptionsDefine.Language]
1037
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1038
+ client = mod.ThpcClient(cred, g_param[OptionsDefine.Region], profile)
1039
+ client._sdkVersion += ("_CLI_" + __version__)
1040
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1041
+ model = models.DeleteQueueRequest()
1042
+ model.from_json_string(json.dumps(args))
1043
+ start_time = time.time()
1044
+ while True:
1045
+ rsp = client.DeleteQueue(model)
1046
+ result = rsp.to_json_string()
1047
+ try:
1048
+ json_obj = json.loads(result)
1049
+ except TypeError as e:
1050
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1051
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1052
+ break
1053
+ cur_time = time.time()
1054
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1055
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1056
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1057
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1058
+ else:
1059
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1060
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1061
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1062
+
1063
+
960
1064
  CLIENT_MAP = {
961
1065
  "v20230321": thpc_client_v20230321,
962
1066
  "v20220401": thpc_client_v20220401,
@@ -982,14 +1086,16 @@ ACTION_MAP = {
982
1086
  "AddQueue": doAddQueue,
983
1087
  "DescribeNodes": doDescribeNodes,
984
1088
  "DescribeInitNodeScripts": doDescribeInitNodeScripts,
985
- "DeleteQueue": doDeleteQueue,
1089
+ "AttachNodes": doAttachNodes,
986
1090
  "DescribeQueues": doDescribeQueues,
987
1091
  "AddNodes": doAddNodes,
988
1092
  "DescribeAutoScalingConfiguration": doDescribeAutoScalingConfiguration,
989
1093
  "DescribeClusters": doDescribeClusters,
1094
+ "DetachNodes": doDetachNodes,
990
1095
  "AddClusterStorageOption": doAddClusterStorageOption,
991
1096
  "DescribeClusterActivities": doDescribeClusterActivities,
992
1097
  "DeleteCluster": doDeleteCluster,
1098
+ "DeleteQueue": doDeleteQueue,
993
1099
 
994
1100
  }
995
1101