tccli 3.0.1158.1__py2.py3-none-any.whl → 3.0.1160.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 (59) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/aiart/v20221229/api.json +11 -14
  3. tccli/services/ams/v20201229/api.json +314 -56
  4. tccli/services/ams/v20201229/examples.json +2 -2
  5. tccli/services/bi/v20220105/api.json +1 -1
  6. tccli/services/cat/v20180409/api.json +9 -0
  7. tccli/services/cdb/v20170320/api.json +33 -4
  8. tccli/services/cdn/v20180606/api.json +86 -0
  9. tccli/services/cfg/cfg_client.py +224 -12
  10. tccli/services/cfg/v20210820/api.json +897 -32
  11. tccli/services/cfg/v20210820/examples.json +32 -0
  12. tccli/services/cfw/cfw_client.py +53 -0
  13. tccli/services/cfw/v20190904/api.json +255 -2
  14. tccli/services/cfw/v20190904/examples.json +8 -0
  15. tccli/services/cls/v20201016/api.json +11 -1
  16. tccli/services/cme/v20191029/api.json +9 -9
  17. tccli/services/cme/v20191029/examples.json +1 -1
  18. tccli/services/csip/csip_client.py +53 -0
  19. tccli/services/csip/v20221121/api.json +134 -0
  20. tccli/services/csip/v20221121/examples.json +8 -0
  21. tccli/services/cwp/v20180228/api.json +66 -46
  22. tccli/services/cwp/v20180228/examples.json +1 -1
  23. tccli/services/cynosdb/v20190107/api.json +91 -0
  24. tccli/services/dnspod/v20210323/api.json +1 -1
  25. tccli/services/ecm/v20190719/api.json +23 -5
  26. tccli/services/emr/emr_client.py +53 -0
  27. tccli/services/emr/v20190103/api.json +351 -98
  28. tccli/services/emr/v20190103/examples.json +11 -3
  29. tccli/services/ess/v20201111/api.json +1 -1
  30. tccli/services/ess/v20201111/examples.json +6 -6
  31. tccli/services/essbasic/v20210526/api.json +10 -1
  32. tccli/services/essbasic/v20210526/examples.json +7 -1
  33. tccli/services/hunyuan/v20230901/api.json +114 -3
  34. tccli/services/iotexplorer/v20190423/api.json +25 -25
  35. tccli/services/iotexplorer/v20190423/examples.json +10 -4
  36. tccli/services/lcic/lcic_client.py +57 -4
  37. tccli/services/lcic/v20220817/api.json +52 -0
  38. tccli/services/lcic/v20220817/examples.json +8 -0
  39. tccli/services/live/v20180801/api.json +1 -1
  40. tccli/services/lke/v20231130/api.json +7 -7
  41. tccli/services/ocr/v20181119/api.json +10 -0
  42. tccli/services/tke/tke_client.py +53 -0
  43. tccli/services/tke/v20180525/api.json +188 -0
  44. tccli/services/tke/v20180525/examples.json +8 -0
  45. tccli/services/trtc/trtc_client.py +53 -0
  46. tccli/services/trtc/v20190722/api.json +76 -0
  47. tccli/services/trtc/v20190722/examples.json +8 -0
  48. tccli/services/vclm/v20240523/api.json +136 -0
  49. tccli/services/vclm/v20240523/examples.json +46 -0
  50. tccli/services/vclm/vclm_client.py +106 -0
  51. tccli/services/vm/v20201229/api.json +209 -45
  52. tccli/services/vm/v20201229/examples.json +1 -1
  53. tccli/services/vm/v20210922/api.json +25 -25
  54. tccli/services/vpc/v20170312/api.json +1 -1
  55. {tccli-3.0.1158.1.dist-info → tccli-3.0.1160.1.dist-info}/METADATA +2 -2
  56. {tccli-3.0.1158.1.dist-info → tccli-3.0.1160.1.dist-info}/RECORD +59 -59
  57. {tccli-3.0.1158.1.dist-info → tccli-3.0.1160.1.dist-info}/WHEEL +0 -0
  58. {tccli-3.0.1158.1.dist-info → tccli-3.0.1160.1.dist-info}/entry_points.txt +0 -0
  59. {tccli-3.0.1158.1.dist-info → tccli-3.0.1160.1.dist-info}/license_files/LICENSE +0 -0
@@ -34,7 +34,7 @@
34
34
  {
35
35
  "document": "在创建任务后,可以通过TaskId查看任务详情",
36
36
  "input": "POST / HTTP/1.1\nHost: ams.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeTaskDetail\n<公共请求参数>\n\n{\n \"TaskId\": \"task-video-XwxJtbkKXWgCt8AZ\"\n}",
37
- "output": "{\n \"Response\": {\n \"TaskId\": \"w-audio-X_Qnzci_GulDQ01r\",\n \"DataId\": \"\",\n \"BizType\": \"202012161\",\n \"Name\": \"\",\n \"Status\": \"FINISH\",\n \"Type\": \"AUDIO\",\n \"Suggestion\": \"Review\",\n \"Labels\": [\n {\n \"Label\": \"Abuse\",\n \"Suggestion\": \"Review\",\n \"Score\": 0,\n \"SubLabel\": \"\"\n }\n ],\n \"InputInfo\": {\n \"Type\": \"URL\",\n \"Url\": \"https://test.cos.ap-guangzhou.myqcloud.com/porn5.mp3\"\n },\n \"AudioText\": \"音频文本\",\n \"AudioSegments\": [\n {\n \"Result\": {\n \"HitFlag\": 0,\n \"Url\": \"https://cos.ap-guangzhou.myqcloud.com/0.mp3\",\n \"Suggestion\": \"Pass\",\n \"Label\": \"Normal\",\n \"Text\": \"\",\n \"TextResults\": [],\n \"MoanResults\": [],\n \"LanguageResults\": [],\n \"Duration\": \"60000\",\n \"Score\": 0,\n \"Extra\": \"\",\n \"SubLabel\": \"\"\n },\n \"OffsetTime\": \"0\"\n }\n ],\n \"ErrorType\": \"\",\n \"ErrorDescription\": \"\",\n \"CreatedAt\": \"2021-01-05T08:48:13.069Z\",\n \"UpdatedAt\": \"2021-01-05T08:49:31.421Z\",\n \"RequestId\": \"34785328532523\",\n \"Label\": \"Abuse\"\n }\n}",
37
+ "output": "{\n \"Response\": {\n \"TaskId\": \"abc\",\n \"DataId\": \"abc\",\n \"BizType\": \"abc\",\n \"Name\": \"abc\",\n \"Status\": \"abc\",\n \"Type\": \"abc\",\n \"Suggestion\": \"abc\",\n \"Labels\": [\n {\n \"Label\": \"abc\",\n \"Suggestion\": \"abc\",\n \"Score\": 0,\n \"SubLabel\": \"abc\"\n }\n ],\n \"InputInfo\": {\n \"Type\": \"abc\",\n \"Url\": \"abc\",\n \"BucketInfo\": {\n \"Bucket\": \"abc\",\n \"Region\": \"abc\",\n \"Object\": \"abc\"\n }\n },\n \"AudioText\": \"abc\",\n \"AudioSegments\": [\n {\n \"OffsetTime\": \"abc\",\n \"Result\": {\n \"HitFlag\": 0,\n \"Label\": \"abc\",\n \"Suggestion\": \"abc\",\n \"Score\": 0,\n \"Text\": \"abc\",\n \"Url\": \"abc\",\n \"Duration\": \"abc\",\n \"Extra\": \"abc\",\n \"TextResults\": [\n {\n \"Label\": \"abc\",\n \"Keywords\": [\n \"abc\"\n ],\n \"LibId\": \"abc\",\n \"LibName\": \"abc\",\n \"Score\": 0,\n \"Suggestion\": \"abc\",\n \"LibType\": 0,\n \"SubLabel\": \"abc\"\n }\n ],\n \"MoanResults\": [\n {\n \"Label\": \"abc\",\n \"Score\": 0,\n \"StartTime\": 0,\n \"EndTime\": 0,\n \"SubLabelCode\": \"abc\",\n \"SubLabel\": \"abc\",\n \"Suggestion\": \"abc\"\n }\n ],\n \"LanguageResults\": [\n {\n \"Label\": \"abc\",\n \"Score\": 0,\n \"StartTime\": 0,\n \"EndTime\": 0,\n \"SubLabelCode\": \"abc\"\n }\n ],\n \"SubLabel\": \"abc\",\n \"RecognitionResults\": [\n {\n \"Label\": \"abc\",\n \"Tags\": [\n {\n \"Name\": \"abc\",\n \"Score\": 0,\n \"StartTime\": 0,\n \"EndTime\": 0\n }\n ]\n }\n ]\n }\n }\n ],\n \"ErrorType\": \"abc\",\n \"ErrorDescription\": \"abc\",\n \"CreatedAt\": \"abc\",\n \"UpdatedAt\": \"abc\",\n \"Label\": \"abc\",\n \"RequestId\": \"abc\"\n }\n}",
38
38
  "title": "查看任务详情"
39
39
  }
40
40
  ],
@@ -42,7 +42,7 @@
42
42
  {
43
43
  "document": "查看审核任务列表",
44
44
  "input": "POST / HTTP/1.1\nHost: ams.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeTasks\n<公共请求参数>\n\n{\n \"Filter\": {\n \"Type\": \"AUDIO\"\n }\n}",
45
- "output": "{\n \"Response\": {\n \"Total\": \"1\",\n \"Data\": [\n {\n \"TaskId\": \"task-video-XwxJtbkKXWgCt8AZ\",\n \"DataId\": \"data_test_01\",\n \"BizType\": \"1001\",\n \"Name\": \"测试视频\",\n \"Status\": \"FINISH\",\n \"Type\": \"VIDEO\",\n \"Suggestion\": \"Block\",\n \"Labels\": [\n {\n \"Label\": \"Porn\",\n \"Suggestion\": \"Block\",\n \"Score\": 99\n },\n {\n \"Label\": \"Hot\",\n \"Suggestion\": \"Block\",\n \"Score\": 70\n }\n ],\n \"MediaInfo\": {\n \"Codecs\": \"h264 aac\",\n \"Duration\": 36,\n \"Width\": 352,\n \"Height\": 640\n },\n \"CreatedAt\": \"2020-07-13T11:47:01.925Z\",\n \"UpdatedAt\": \"2020-07-13T11:47:25.840Z\"\n }\n ],\n \"PageToken\": \"4765-48dXwxJtbkKXW8d3eb\",\n \"RequestId\": \"8d3e4765-48db-40b5-8fdb-aaf1d7225a60\"\n }\n}",
45
+ "output": "{\n \"Response\": {\n \"Total\": \"abc\",\n \"Data\": [\n {\n \"DataId\": \"abc\",\n \"TaskId\": \"abc\",\n \"Status\": \"abc\",\n \"Name\": \"abc\",\n \"BizType\": \"abc\",\n \"Type\": \"abc\",\n \"Suggestion\": \"abc\",\n \"MediaInfo\": {\n \"Codecs\": \"abc\",\n \"Duration\": 0,\n \"Width\": 0,\n \"Height\": 0,\n \"Thumbnail\": \"abc\"\n },\n \"Labels\": [\n {\n \"Label\": \"abc\",\n \"Suggestion\": \"abc\",\n \"Score\": 0,\n \"SubLabel\": \"abc\"\n }\n ],\n \"CreatedAt\": \"abc\",\n \"UpdatedAt\": \"abc\"\n }\n ],\n \"PageToken\": \"abc\",\n \"RequestId\": \"abc\"\n }\n}",
46
46
  "title": "查看审核任务列表"
47
47
  }
48
48
  ]
@@ -932,7 +932,7 @@
932
932
  },
933
933
  {
934
934
  "disabled": false,
935
- "document": "page表示嵌出页面,panel表嵌出整个看板",
935
+ "document": "page表示嵌出页面,panel表示嵌出整个看板",
936
936
  "example": "1",
937
937
  "member": "string",
938
938
  "name": "Scope",
@@ -202,6 +202,15 @@
202
202
  "name": "NodeIpType",
203
203
  "required": false,
204
204
  "type": "int"
205
+ },
206
+ {
207
+ "disabled": false,
208
+ "document": "供应商子账户同步标志",
209
+ "example": "无",
210
+ "member": "int64",
211
+ "name": "SubSyncFlag",
212
+ "required": false,
213
+ "type": "int"
205
214
  }
206
215
  ],
207
216
  "type": "object"
@@ -5304,7 +5304,7 @@
5304
5304
  },
5305
5305
  {
5306
5306
  "disabled": false,
5307
- "document": "克隆实例类型。支持值包括: \"UNIVERSAL\" - 通用型实例, \"EXCLUSIVE\" - 独享型实例。 不指定则默认为通用型。",
5307
+ "document": "克隆实例类型。支持值包括:\"UNIVERSAL\" - 通用型实例,\"EXCLUSIVE\" - 独享型实例,\"CLOUD_NATIVE_CLUSTER\" - 集群版标准型,\"CLOUD_NATIVE_CLUSTER_EXCLUSIVE\" - 集群版加强型。不指定则默认为通用型。",
5308
5308
  "example": "UNIVERSAL",
5309
5309
  "member": "string",
5310
5310
  "name": "DeviceType",
@@ -5373,6 +5373,15 @@
5373
5373
  "name": "Period",
5374
5374
  "required": false,
5375
5375
  "type": "int"
5376
+ },
5377
+ {
5378
+ "disabled": false,
5379
+ "document": "集群版节点拓扑配置。",
5380
+ "example": "无",
5381
+ "member": "ClusterTopology",
5382
+ "name": "ClusterTopology",
5383
+ "required": false,
5384
+ "type": "object"
5376
5385
  }
5377
5386
  ],
5378
5387
  "type": "object"
@@ -5711,7 +5720,7 @@
5711
5720
  },
5712
5721
  {
5713
5722
  "disabled": false,
5714
- "document": "实例隔离类型。支持值包括: \"UNIVERSAL\" - 通用型实例, \"EXCLUSIVE\" - 独享型实例, \"BASIC_V2\" - ONTKE单节点实例。 不指定则默认为通用型实例。",
5723
+ "document": "实例隔离类型。支持值包括:\"UNIVERSAL\" - 通用型实例,\"EXCLUSIVE\" - 独享型实例,\"BASIC_V2\" - ONTKE 单节点实例,\"CLOUD_NATIVE_CLUSTER\" - 集群版标准型,\"CLOUD_NATIVE_CLUSTER_EXCLUSIVE\" - 集群版加强型。不指定则默认为通用型实例。",
5715
5724
  "example": "UNIVERSAL",
5716
5725
  "member": "string",
5717
5726
  "name": "DeviceType",
@@ -5816,6 +5825,15 @@
5816
5825
  "name": "Vips",
5817
5826
  "required": false,
5818
5827
  "type": "list"
5828
+ },
5829
+ {
5830
+ "disabled": false,
5831
+ "document": "集群版节点拓扑配置。",
5832
+ "example": "无",
5833
+ "member": "ClusterTopology",
5834
+ "name": "ClusterTopology",
5835
+ "required": false,
5836
+ "type": "object"
5819
5837
  }
5820
5838
  ],
5821
5839
  "type": "object"
@@ -6091,7 +6109,7 @@
6091
6109
  },
6092
6110
  {
6093
6111
  "disabled": false,
6094
- "document": "实例隔离类型。支持值包括: \"UNIVERSAL\" - 通用型实例, \"EXCLUSIVE\" - 独享型实例, \"BASIC_V2\" - ONTKE单节点实例。 不指定则默认为通用型实例。",
6112
+ "document": "实例隔离类型。支持值包括:\"UNIVERSAL\" - 通用型实例,\"EXCLUSIVE\" - 独享型实例,\"BASIC_V2\" - ONTKE 单节点实例,\"CLOUD_NATIVE_CLUSTER\" - 集群版标准型,\"CLOUD_NATIVE_CLUSTER_EXCLUSIVE\" - 集群版加强型。不指定则默认为通用型实例。",
6095
6113
  "example": "UNIVERSAL",
6096
6114
  "member": "string",
6097
6115
  "name": "DeviceType",
@@ -6196,6 +6214,15 @@
6196
6214
  "name": "Vips",
6197
6215
  "required": false,
6198
6216
  "type": "list"
6217
+ },
6218
+ {
6219
+ "disabled": false,
6220
+ "document": "集群版节点拓扑配置。",
6221
+ "example": "无",
6222
+ "member": "ClusterTopology",
6223
+ "name": "ClusterTopology",
6224
+ "required": false,
6225
+ "type": "object"
6199
6226
  }
6200
6227
  ],
6201
6228
  "type": "object"
@@ -19985,6 +20012,7 @@
19985
20012
  "example": "‘’",
19986
20013
  "member": "string",
19987
20014
  "name": "TagKey",
20015
+ "output_required": true,
19988
20016
  "required": true,
19989
20017
  "type": "string",
19990
20018
  "value_allowed_null": true
@@ -19995,12 +20023,13 @@
19995
20023
  "example": "‘’",
19996
20024
  "member": "string",
19997
20025
  "name": "TagValue",
20026
+ "output_required": true,
19998
20027
  "required": true,
19999
20028
  "type": "string",
20000
20029
  "value_allowed_null": true
20001
20030
  }
20002
20031
  ],
20003
- "usage": "out"
20032
+ "usage": "both"
20004
20033
  },
20005
20034
  "TagInfoUnit": {
20006
20035
  "document": "tag信息单元",
@@ -8635,6 +8635,16 @@
8635
8635
  "output_required": true,
8636
8636
  "type": "object",
8637
8637
  "value_allowed_null": true
8638
+ },
8639
+ {
8640
+ "disabled": false,
8641
+ "document": "参数黑名单\n注意:此字段可能返回 null,表示取不到有效值。",
8642
+ "example": "无",
8643
+ "member": "ParamFilter",
8644
+ "name": "ParamFilter",
8645
+ "output_required": true,
8646
+ "type": "object",
8647
+ "value_allowed_null": true
8638
8648
  }
8639
8649
  ],
8640
8650
  "usage": "out"
@@ -13319,6 +13329,73 @@
13319
13329
  ],
13320
13330
  "usage": "both"
13321
13331
  },
13332
+ "ParamFilter": {
13333
+ "document": "参数黑名单",
13334
+ "members": [
13335
+ {
13336
+ "disabled": false,
13337
+ "document": " 参数黑名单开关\n注意:此字段可能返回 null,表示取不到有效值。",
13338
+ "example": "off",
13339
+ "member": "string",
13340
+ "name": "Switch",
13341
+ "output_required": true,
13342
+ "required": true,
13343
+ "type": "string",
13344
+ "value_allowed_null": true
13345
+ },
13346
+ {
13347
+ "disabled": false,
13348
+ "document": "参数黑名单规则\n注意:此字段可能返回 null,表示取不到有效值。",
13349
+ "example": "[]",
13350
+ "member": "ParamFilterRule",
13351
+ "name": "FilterRules",
13352
+ "output_required": true,
13353
+ "required": false,
13354
+ "type": "list",
13355
+ "value_allowed_null": true
13356
+ }
13357
+ ],
13358
+ "usage": "both"
13359
+ },
13360
+ "ParamFilterRule": {
13361
+ "document": "参数黑名单规则",
13362
+ "members": [
13363
+ {
13364
+ "disabled": false,
13365
+ "document": "参数名\n注意:此字段可能返回 null,表示取不到有效值。",
13366
+ "example": "exampleParam",
13367
+ "member": "string",
13368
+ "name": "Key",
13369
+ "output_required": true,
13370
+ "required": true,
13371
+ "type": "string",
13372
+ "value_allowed_null": true
13373
+ },
13374
+ {
13375
+ "disabled": false,
13376
+ "document": "参数值数组, 小于10个\n注意:此字段可能返回 null,表示取不到有效值。",
13377
+ "example": "['blacklistValue1', 'blacklistValue2']",
13378
+ "member": "string",
13379
+ "name": "Values",
13380
+ "output_required": true,
13381
+ "required": true,
13382
+ "type": "list",
13383
+ "value_allowed_null": true
13384
+ },
13385
+ {
13386
+ "disabled": false,
13387
+ "document": "http 返回码 ( 暂仅支持403)\n注意:此字段可能返回 null,表示取不到有效值。",
13388
+ "example": "403",
13389
+ "member": "string",
13390
+ "name": "ReturnCode",
13391
+ "output_required": true,
13392
+ "required": false,
13393
+ "type": "string",
13394
+ "value_allowed_null": true
13395
+ }
13396
+ ],
13397
+ "usage": "both"
13398
+ },
13322
13399
  "PathBasedOriginRule": {
13323
13400
  "document": "分路径回源规则",
13324
13401
  "members": [
@@ -17379,6 +17456,15 @@
17379
17456
  "name": "HttpsBilling",
17380
17457
  "required": false,
17381
17458
  "type": "object"
17459
+ },
17460
+ {
17461
+ "disabled": false,
17462
+ "document": "参数黑名单",
17463
+ "example": "无",
17464
+ "member": "ParamFilter",
17465
+ "name": "ParamFilter",
17466
+ "required": false,
17467
+ "type": "object"
17382
17468
  }
17383
17469
  ],
17384
17470
  "type": "object"
@@ -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