tccli 3.0.1159.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 (40) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/aiart/v20221229/api.json +11 -14
  3. tccli/services/cdb/v20170320/api.json +3 -1
  4. tccli/services/cfg/cfg_client.py +224 -12
  5. tccli/services/cfg/v20210820/api.json +897 -32
  6. tccli/services/cfg/v20210820/examples.json +32 -0
  7. tccli/services/cfw/v20190904/api.json +12 -2
  8. tccli/services/cls/v20201016/api.json +11 -1
  9. tccli/services/cme/v20191029/api.json +9 -9
  10. tccli/services/cme/v20191029/examples.json +1 -1
  11. tccli/services/csip/csip_client.py +53 -0
  12. tccli/services/csip/v20221121/api.json +134 -0
  13. tccli/services/csip/v20221121/examples.json +8 -0
  14. tccli/services/cwp/v20180228/api.json +66 -46
  15. tccli/services/cwp/v20180228/examples.json +1 -1
  16. tccli/services/dnspod/v20210323/api.json +1 -1
  17. tccli/services/ess/v20201111/api.json +1 -1
  18. tccli/services/ess/v20201111/examples.json +6 -6
  19. tccli/services/essbasic/v20210526/api.json +10 -1
  20. tccli/services/essbasic/v20210526/examples.json +7 -1
  21. tccli/services/iotexplorer/v20190423/api.json +25 -25
  22. tccli/services/iotexplorer/v20190423/examples.json +10 -4
  23. tccli/services/lcic/lcic_client.py +57 -4
  24. tccli/services/lcic/v20220817/api.json +52 -0
  25. tccli/services/lcic/v20220817/examples.json +8 -0
  26. tccli/services/live/v20180801/api.json +1 -1
  27. tccli/services/lke/v20231130/api.json +7 -7
  28. tccli/services/ocr/v20181119/api.json +10 -0
  29. tccli/services/trtc/trtc_client.py +53 -0
  30. tccli/services/trtc/v20190722/api.json +76 -0
  31. tccli/services/trtc/v20190722/examples.json +8 -0
  32. tccli/services/vclm/v20240523/api.json +136 -0
  33. tccli/services/vclm/v20240523/examples.json +46 -0
  34. tccli/services/vclm/vclm_client.py +106 -0
  35. tccli/services/vpc/v20170312/api.json +1 -1
  36. {tccli-3.0.1159.1.dist-info → tccli-3.0.1160.1.dist-info}/METADATA +2 -2
  37. {tccli-3.0.1159.1.dist-info → tccli-3.0.1160.1.dist-info}/RECORD +40 -40
  38. {tccli-3.0.1159.1.dist-info → tccli-3.0.1160.1.dist-info}/WHEEL +0 -0
  39. {tccli-3.0.1159.1.dist-info → tccli-3.0.1160.1.dist-info}/entry_points.txt +0 -0
  40. {tccli-3.0.1159.1.dist-info → tccli-3.0.1160.1.dist-info}/license_files/LICENSE +0 -0
tccli/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = '3.0.1159.1'
1
+ __version__ = '3.0.1160.1'
@@ -212,7 +212,7 @@
212
212
  },
213
213
  {
214
214
  "disabled": false,
215
- "document": "输入图 Base64 数据。\n算法将根据输入的图片,结合文本描述智能生成与之相关的图像。\nBase64 和 Url 必须提供一个,如果都提供以 Base64 为准。\n图片限制:单边分辨率小于5000,转成 Base64 字符串后小于 6MB,格式支持 jpg、jpeg、png、bmp、tiff、webp。",
215
+ "document": "输入图 Base64 数据。\n算法将根据输入的图片,结合文本描述智能生成与之相关的图像。\nBase64 和 Url 必须提供一个,如果都提供以 Url 为准。\n图片限制:单边分辨率小于5000,转成 Base64 字符串后小于 6MB,格式支持 jpg、jpeg、png、bmp、tiff、webp。",
216
216
  "example": "无",
217
217
  "member": "string",
218
218
  "name": "InputImage",
@@ -221,7 +221,7 @@
221
221
  },
222
222
  {
223
223
  "disabled": false,
224
- "document": "输入图 Url。\n算法将根据输入的图片,结合文本描述智能生成与之相关的图像。\nBase64 和 Url 必须提供一个,如果都提供以 Base64 为准。\n图片限制:单边分辨率小于5000,转成 Base64 字符串后小于 6MB,格式支持 jpg、jpeg、png、bmp、tiff、webp。",
224
+ "document": "输入图 Url。\n算法将根据输入的图片,结合文本描述智能生成与之相关的图像。\nBase64 和 Url 必须提供一个,如果都提供以 Url 为准。\n图片限制:单边分辨率小于5000,转成 Base64 字符串后小于 6MB,格式支持 jpg、jpeg、png、bmp、tiff、webp。",
225
225
  "example": "无",
226
226
  "member": "string",
227
227
  "name": "InputUrl",
@@ -294,7 +294,7 @@
294
294
  "members": [
295
295
  {
296
296
  "disabled": false,
297
- "document": "输入图 Base64 数据。\n算法将根据输入的图片,结合文本描述智能生成与之相关的图像。\nBase64 和 Url 必须提供一个,如果都提供以 Base64 为准。\n图片限制:单边分辨率小于5000且大于50,转成 Base64 字符串后小于 8MB。",
297
+ "document": "输入图 Base64 数据。\n算法将根据输入的图片,结合文本描述智能生成与之相关的图像。\nBase64 和 Url 必须提供一个,如果都提供以 Url 为准。\n图片限制:单边分辨率小于5000且大于50,转成 Base64 字符串后小于 8MB,格式支持 jpg、jpeg、png、bmp、tiff、webp。",
298
298
  "example": "无",
299
299
  "member": "string",
300
300
  "name": "InputImage",
@@ -303,7 +303,7 @@
303
303
  },
304
304
  {
305
305
  "disabled": false,
306
- "document": "输入图 Url。\n算法将根据输入的图片,结合文本描述智能生成与之相关的图像。\nBase64 和 Url 必须提供一个,如果都提供以 Base64 为准。\n图片限制:单边分辨率小于5000且大于50,转成 Base64 字符串后小于8MB。",
306
+ "document": "输入图 Url。\n算法将根据输入的图片,结合文本描述智能生成与之相关的图像。\nBase64 和 Url 必须提供一个,如果都提供以 Url 为准。\n图片限制:单边分辨率小于5000且大于50,转成 Base64 字符串后小于 8MB,格式支持 jpg、jpeg、png、bmp、tiff、webp。",
307
307
  "example": "无",
308
308
  "member": "string",
309
309
  "name": "InputUrl",
@@ -412,33 +412,30 @@
412
412
  "members": [
413
413
  {
414
414
  "disabled": false,
415
- "document": "水印url",
415
+ "document": "水印 Url",
416
416
  "example": "无",
417
417
  "member": "string",
418
418
  "name": "LogoUrl",
419
419
  "required": false,
420
- "type": "string",
421
- "value_allowed_null": true
420
+ "type": "string"
422
421
  },
423
422
  {
424
423
  "disabled": false,
425
- "document": "水印base64urlbase64二选一传入",
424
+ "document": "水印 Base64Url Base64 二选一传入,如果都提供以 Url 为准",
426
425
  "example": "无",
427
426
  "member": "string",
428
427
  "name": "LogoImage",
429
428
  "required": false,
430
- "type": "string",
431
- "value_allowed_null": true
429
+ "type": "string"
432
430
  },
433
431
  {
434
432
  "disabled": false,
435
- "document": "水印图片位于融合结果图中的坐标,将按照坐标对标识图片进行位置和大小的拉伸匹配",
433
+ "document": "水印图片位于生成结果图中的坐标,将按照坐标对标识图片进行位置和大小的拉伸匹配",
436
434
  "example": "无",
437
435
  "member": "LogoRect",
438
436
  "name": "LogoRect",
439
437
  "required": false,
440
- "type": "object",
441
- "value_allowed_null": true
438
+ "type": "object"
442
439
  }
443
440
  ],
444
441
  "usage": "in"
@@ -846,7 +843,7 @@
846
843
  "members": [
847
844
  {
848
845
  "disabled": false,
849
- "document": "生成图分辨率\n\n智能文生图支持生成以下分辨率的图片:768:768(1:1)、768:1024(3:4)、1024:768(4:3)、1024:1024(1:1)、720:1280(9:16)、1280:720(16:9)、768:1280(3:5)、1280:768(5:3)、1080:1920(9:16)、1920:1080(16:9),不传默认使用768:768。\n\n智能图生图支持生成以下分辨率的图片:origin(与输入图分辨率一致,长边最高为2000,超出将做等比例缩小)、768:768(1:1)、768:1024(3:4)、1024:768(4:3),不传默认使用origin,如果指定生成的长宽比与输入图长宽比差异过大可能导致图片内容被裁剪。",
846
+ "document": "生成图分辨率\n\n图像风格化(图生图)支持生成以下分辨率的图片:origin(与输入图分辨率一致,长边最高为2000,超出将做等比例缩小)、768:768(1:1)、768:1024(3:4)、1024:768(4:3),不传默认使用origin,如果指定生成的长宽比与输入图长宽比差异过大可能导致图片内容被裁剪。",
850
847
  "example": "768:768",
851
848
  "member": "string",
852
849
  "name": "Resolution",
@@ -20012,6 +20012,7 @@
20012
20012
  "example": "‘’",
20013
20013
  "member": "string",
20014
20014
  "name": "TagKey",
20015
+ "output_required": true,
20015
20016
  "required": true,
20016
20017
  "type": "string",
20017
20018
  "value_allowed_null": true
@@ -20022,12 +20023,13 @@
20022
20023
  "example": "‘’",
20023
20024
  "member": "string",
20024
20025
  "name": "TagValue",
20026
+ "output_required": true,
20025
20027
  "required": true,
20026
20028
  "type": "string",
20027
20029
  "value_allowed_null": true
20028
20030
  }
20029
20031
  ],
20030
- "usage": "out"
20032
+ "usage": "both"
20031
20033
  },
20032
20034
  "TagInfoUnit": {
20033
20035
  "document": "tag信息单元",
@@ -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