tccli 3.0.1230.1__py2.py3-none-any.whl → 3.0.1232.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 (53) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/aiart/aiart_client.py +53 -0
  3. tccli/services/aiart/v20221229/api.json +98 -0
  4. tccli/services/aiart/v20221229/examples.json +8 -0
  5. tccli/services/batch/v20170312/api.json +8 -10
  6. tccli/services/cam/cam_client.py +53 -0
  7. tccli/services/cam/v20190116/api.json +125 -52
  8. tccli/services/cam/v20190116/examples.json +12 -4
  9. tccli/services/cfg/v20210820/api.json +9 -0
  10. tccli/services/cloudaudit/v20190319/api.json +39 -39
  11. tccli/services/cloudaudit/v20190319/examples.json +5 -5
  12. tccli/services/cvm/v20170312/api.json +59 -61
  13. tccli/services/cvm/v20170312/examples.json +3 -3
  14. tccli/services/es/v20180416/api.json +106 -8
  15. tccli/services/ess/v20201111/api.json +1 -1
  16. tccli/services/essbasic/v20210526/api.json +2 -2
  17. tccli/services/live/v20180801/api.json +7 -7
  18. tccli/services/live/v20180801/examples.json +1 -1
  19. tccli/services/memcached/v20190318/api.json +20 -20
  20. tccli/services/mps/v20190612/api.json +11 -0
  21. tccli/services/mqtt/mqtt_client.py +283 -71
  22. tccli/services/mqtt/v20240516/api.json +312 -0
  23. tccli/services/mqtt/v20240516/examples.json +32 -0
  24. tccli/services/mrs/v20200910/api.json +3 -3
  25. tccli/services/mrs/v20200910/examples.json +1 -1
  26. tccli/services/ocr/v20181119/api.json +147 -4
  27. tccli/services/ocr/v20181119/examples.json +3 -3
  28. tccli/services/postgres/v20170312/api.json +11 -9
  29. tccli/services/postgres/v20170312/examples.json +2 -2
  30. tccli/services/redis/v20180412/examples.json +2 -2
  31. tccli/services/ssl/v20191205/api.json +4 -4
  32. tccli/services/ssl/v20191205/examples.json +1 -1
  33. tccli/services/sts/v20180813/api.json +9 -9
  34. tccli/services/tcbr/v20220217/api.json +84 -88
  35. tccli/services/tcbr/v20220217/examples.json +14 -14
  36. tccli/services/tdmq/v20200217/api.json +10 -0
  37. tccli/services/tione/tione_client.py +166 -113
  38. tccli/services/tione/v20211111/api.json +939 -361
  39. tccli/services/tione/v20211111/examples.json +30 -22
  40. tccli/services/tse/tse_client.py +228 -16
  41. tccli/services/tse/v20201207/api.json +476 -0
  42. tccli/services/tse/v20201207/examples.json +32 -0
  43. tccli/services/vclm/v20240523/api.json +1 -1
  44. tccli/services/vdb/v20230616/api.json +3 -3
  45. tccli/services/vdb/v20230616/examples.json +1 -1
  46. tccli/services/vod/v20180717/api.json +6 -6
  47. tccli/services/vpc/v20170312/api.json +17 -7
  48. tccli/services/vpc/v20170312/examples.json +1 -1
  49. {tccli-3.0.1230.1.dist-info → tccli-3.0.1232.1.dist-info}/METADATA +2 -2
  50. {tccli-3.0.1230.1.dist-info → tccli-3.0.1232.1.dist-info}/RECORD +53 -53
  51. {tccli-3.0.1230.1.dist-info → tccli-3.0.1232.1.dist-info}/WHEEL +0 -0
  52. {tccli-3.0.1230.1.dist-info → tccli-3.0.1232.1.dist-info}/entry_points.txt +0 -0
  53. {tccli-3.0.1230.1.dist-info → tccli-3.0.1232.1.dist-info}/license_files/LICENSE +0 -0
tccli/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = '3.0.1230.1'
1
+ __version__ = '3.0.1232.1'
@@ -641,6 +641,58 @@ def doChangeClothes(args, parsed_globals):
641
641
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
642
642
 
643
643
 
644
+ def doImageInpaintingRemoval(args, parsed_globals):
645
+ g_param = parse_global_arg(parsed_globals)
646
+
647
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
648
+ cred = credential.CVMRoleCredential()
649
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
650
+ cred = credential.STSAssumeRoleCredential(
651
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
652
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
653
+ )
654
+ 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):
655
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
656
+ else:
657
+ cred = credential.Credential(
658
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
659
+ )
660
+ http_profile = HttpProfile(
661
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
662
+ reqMethod="POST",
663
+ endpoint=g_param[OptionsDefine.Endpoint],
664
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
665
+ )
666
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
667
+ if g_param[OptionsDefine.Language]:
668
+ profile.language = g_param[OptionsDefine.Language]
669
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
670
+ client = mod.AiartClient(cred, g_param[OptionsDefine.Region], profile)
671
+ client._sdkVersion += ("_CLI_" + __version__)
672
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
673
+ model = models.ImageInpaintingRemovalRequest()
674
+ model.from_json_string(json.dumps(args))
675
+ start_time = time.time()
676
+ while True:
677
+ rsp = client.ImageInpaintingRemoval(model)
678
+ result = rsp.to_json_string()
679
+ try:
680
+ json_obj = json.loads(result)
681
+ except TypeError as e:
682
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
683
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
684
+ break
685
+ cur_time = time.time()
686
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
687
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
688
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
689
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
690
+ else:
691
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
692
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
693
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
694
+
695
+
644
696
  def doSubmitDrawPortraitJob(args, parsed_globals):
645
697
  g_param = parse_global_arg(parsed_globals)
646
698
 
@@ -768,6 +820,7 @@ ACTION_MAP = {
768
820
  "TextToImage": doTextToImage,
769
821
  "QueryTextToImageProJob": doQueryTextToImageProJob,
770
822
  "ChangeClothes": doChangeClothes,
823
+ "ImageInpaintingRemoval": doImageInpaintingRemoval,
771
824
  "SubmitDrawPortraitJob": doSubmitDrawPortraitJob,
772
825
  "ImageToImage": doImageToImage,
773
826
 
@@ -14,6 +14,13 @@
14
14
  "output": "GenerateAvatarResponse",
15
15
  "status": "online"
16
16
  },
17
+ "ImageInpaintingRemoval": {
18
+ "document": "局部消除接口通过图像 mask 指定需要消除的人、物、文字等区域,在选定区域对图像内容进行消除与重绘补全。\n默认提供1个并发,代表最多能同时处理1个已提交的任务。",
19
+ "input": "ImageInpaintingRemovalRequest",
20
+ "name": "局部消除",
21
+ "output": "ImageInpaintingRemovalResponse",
22
+ "status": "online"
23
+ },
17
24
  "ImageOutpainting": {
18
25
  "document": "扩图接口支持对输入图像按指定宽高比实现智能扩图。\n默认提供1个并发,代表最多能同时处理1个已提交的任务。",
19
26
  "input": "ImageOutpaintingRequest",
@@ -321,6 +328,97 @@
321
328
  ],
322
329
  "type": "object"
323
330
  },
331
+ "ImageInpaintingRemovalRequest": {
332
+ "document": "ImageInpaintingRemoval请求参数结构体",
333
+ "members": [
334
+ {
335
+ "disabled": false,
336
+ "document": "输入图 Base64 数据。\nBase64 和 Url 必须提供一个,如果都提供以 Url 为准。\n图片限制:单边分辨率小于5000,转成 Base64 字符串后小于 6MB,格式支持 jpg、jpeg、png、bmp、tiff、webp。",
337
+ "example": "9j/4QlQaHR0c...N6a2M5ZCI",
338
+ "member": "string",
339
+ "name": "InputImage",
340
+ "required": false,
341
+ "type": "string"
342
+ },
343
+ {
344
+ "disabled": false,
345
+ "document": "输入图 Url。\nBase64 和 Url 必须提供一个,如果都提供以 Url 为准。\n图片限制:单边分辨率小于5000,转成 Base64 字符串后小于 6MB,格式支持 jpg、jpeg、png、bmp、tiff、webp。",
346
+ "example": "https://xxx.com/image.jpg",
347
+ "member": "string",
348
+ "name": "InputUrl",
349
+ "required": false,
350
+ "type": "string"
351
+ },
352
+ {
353
+ "disabled": false,
354
+ "document": "消除区域 Mask 图 Base64 数据。\nMask 为单通道灰度图,待消除部分呈白色区域,原图保持部分呈黑色区域。\nMask 的 Base64 和 Url 必须提供一个,如果都提供以 Url 为准。\n图片限制:Mask 分辨率需要和输入原图保持一致,转成 Base64 字符串后小于 6MB。",
355
+ "example": "9j/4QlQaHR0c...N6a2M5ZCI",
356
+ "member": "string",
357
+ "name": "Mask",
358
+ "required": false,
359
+ "type": "string"
360
+ },
361
+ {
362
+ "disabled": false,
363
+ "document": "消除区域 Mask 图 Url。\nMask 为单通道灰度图,待消除部分呈白色区域,原图保持部分呈黑色区域。\nMask 的 Base64 和 Url 必须提供一个,如果都提供以 Url 为准。\n图片限制:Mask 分辨率需要和输入原图保持一致,转成 Base64 字符串后小于 6MB。",
364
+ "example": "https://xxx.com/mask.jpg",
365
+ "member": "string",
366
+ "name": "MaskUrl",
367
+ "required": false,
368
+ "type": "string"
369
+ },
370
+ {
371
+ "disabled": false,
372
+ "document": "返回图像方式(base64 或 url) ,二选一,默认为 base64。url 有效期为1小时。",
373
+ "example": "url",
374
+ "member": "string",
375
+ "name": "RspImgType",
376
+ "required": false,
377
+ "type": "string"
378
+ },
379
+ {
380
+ "disabled": false,
381
+ "document": "为生成结果图添加标识的开关,默认为1。\n1:添加标识。\n0:不添加标识。\n其他数值:默认按1处理。\n建议您使用显著标识来提示结果图使用了 AI 绘画技术,是 AI 生成的图片。",
382
+ "example": "1",
383
+ "member": "int64",
384
+ "name": "LogoAdd",
385
+ "required": false,
386
+ "type": "int"
387
+ },
388
+ {
389
+ "disabled": false,
390
+ "document": "标识内容设置。\n默认在生成结果图右下角添加“图片由 AI 生成”字样,您可根据自身需要替换为其他的标识图片。",
391
+ "example": "{\"LogoUrl\": \"https://xxx.com/logo.jpg\", \"LogoRect\": {\"X\": 10, \"Y\": 10, \"Width\": 20, \"Height\": 20}}",
392
+ "member": "LogoParam",
393
+ "name": "LogoParam",
394
+ "required": false,
395
+ "type": "object"
396
+ }
397
+ ],
398
+ "type": "object"
399
+ },
400
+ "ImageInpaintingRemovalResponse": {
401
+ "document": "ImageInpaintingRemoval返回参数结构体",
402
+ "members": [
403
+ {
404
+ "disabled": false,
405
+ "document": "根据入参 RspImgType 填入不同,返回不同的内容。 如果传入 base64 则返回生成图 Base64 编码。 如果传入 url 则返回的生成图 URL , 有效期1小时,请及时保存。",
406
+ "example": "https://xxx.com/image.jpg",
407
+ "member": "string",
408
+ "name": "ResultImage",
409
+ "output_required": false,
410
+ "type": "string",
411
+ "value_allowed_null": false
412
+ },
413
+ {
414
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
415
+ "member": "string",
416
+ "name": "RequestId",
417
+ "type": "string"
418
+ }
419
+ ],
420
+ "type": "object"
421
+ },
324
422
  "ImageOutpaintingRequest": {
325
423
  "document": "ImageOutpainting请求参数结构体",
326
424
  "members": [
@@ -16,6 +16,14 @@
16
16
  "title": "调用成功示例"
17
17
  }
18
18
  ],
19
+ "ImageInpaintingRemoval": [
20
+ {
21
+ "document": "",
22
+ "input": "POST / HTTP/1.1\nHost: aiart.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ImageInpaintingRemoval\n<公共请求参数>\n\n{\n \"InputUrl\": \"https://xxx.com/image.jpg\",\n \"MaskUrl\": \"https://xxx.com/mask.jpg\",\n \"RspImgType\": \"url\"\n}",
23
+ "output": "{\n \"Response\": {\n \"ResultImage\": \"https://aiart-xxx.cos.ap-guangzhou.myqcloud.com/xxx.jpg?q-sign-algorithm=sha1&q-ak=xxxxx&q-sign-time=1731574045;1731577645&q-key-time=1731574045;1731577645&q-header-list=host&q-url-param-list=&q-signature=31fe75c1c18c3d91db59508961209dd37aaf41c7\",\n \"RequestId\": \"301bfc25-61ca-4ece-b03e-f6aefb547969\"\n }\n}",
24
+ "title": "调用示例"
25
+ }
26
+ ],
19
27
  "ImageOutpainting": [
20
28
  {
21
29
  "document": "",
@@ -3341,7 +3341,7 @@
3341
3341
  {
3342
3342
  "disabled": false,
3343
3343
  "document": "释放地址\n注意:此字段可能返回 null,表示取不到有效值。",
3344
- "example": "",
3344
+ "example": "true",
3345
3345
  "member": "bool",
3346
3346
  "name": "ReleaseAddress",
3347
3347
  "output_required": false,
@@ -3351,8 +3351,8 @@
3351
3351
  },
3352
3352
  {
3353
3353
  "disabled": false,
3354
- "document": "不支持的网络类型,取值范围:<br><li>BASIC:基础网络<br><li>VPC1.0:私有网络VPC1.0\n注意:此字段可能返回 null,表示取不到有效值。",
3355
- "example": "",
3354
+ "document": "不支持的网络类型,取值范围:<br><li>BASIC:基础网络</li><li>VPC1.0:私有网络VPC1.0</li>\n注意:此字段可能返回 null,表示取不到有效值。",
3355
+ "example": "VPC1.0",
3356
3356
  "member": "string",
3357
3357
  "name": "UnsupportNetworks",
3358
3358
  "output_required": false,
@@ -3363,7 +3363,7 @@
3363
3363
  {
3364
3364
  "disabled": false,
3365
3365
  "document": "HDD本地存储属性\n注意:此字段可能返回 null,表示取不到有效值。",
3366
- "example": "",
3366
+ "example": "{ \"Type\": \"LOCAL_NVME\", \"MinSize\": 3570, \"MaxSize\": 3570 }",
3367
3367
  "member": "StorageBlock",
3368
3368
  "name": "StorageBlockAttr",
3369
3369
  "output_required": false,
@@ -3380,22 +3380,20 @@
3380
3380
  {
3381
3381
  "disabled": false,
3382
3382
  "document": "需要过滤的字段。",
3383
- "example": "",
3383
+ "example": "zone",
3384
3384
  "member": "string",
3385
3385
  "name": "Name",
3386
3386
  "required": true,
3387
- "type": "string",
3388
- "value_allowed_null": false
3387
+ "type": "string"
3389
3388
  },
3390
3389
  {
3391
3390
  "disabled": false,
3392
3391
  "document": "字段的过滤值。",
3393
- "example": "",
3392
+ "example": "[\"ap-guangzhou-2\"]",
3394
3393
  "member": "string",
3395
3394
  "name": "Values",
3396
3395
  "required": true,
3397
- "type": "list",
3398
- "value_allowed_null": false
3396
+ "type": "list"
3399
3397
  }
3400
3398
  ],
3401
3399
  "usage": "in"
@@ -3345,6 +3345,58 @@ def doDescribeSafeAuthFlagIntl(args, parsed_globals):
3345
3345
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3346
3346
 
3347
3347
 
3348
+ def doUpdateRoleSessionDuration(args, parsed_globals):
3349
+ g_param = parse_global_arg(parsed_globals)
3350
+
3351
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
3352
+ cred = credential.CVMRoleCredential()
3353
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
3354
+ cred = credential.STSAssumeRoleCredential(
3355
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
3356
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
3357
+ )
3358
+ 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):
3359
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
3360
+ else:
3361
+ cred = credential.Credential(
3362
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
3363
+ )
3364
+ http_profile = HttpProfile(
3365
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
3366
+ reqMethod="POST",
3367
+ endpoint=g_param[OptionsDefine.Endpoint],
3368
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
3369
+ )
3370
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
3371
+ if g_param[OptionsDefine.Language]:
3372
+ profile.language = g_param[OptionsDefine.Language]
3373
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
3374
+ client = mod.CamClient(cred, g_param[OptionsDefine.Region], profile)
3375
+ client._sdkVersion += ("_CLI_" + __version__)
3376
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
3377
+ model = models.UpdateRoleSessionDurationRequest()
3378
+ model.from_json_string(json.dumps(args))
3379
+ start_time = time.time()
3380
+ while True:
3381
+ rsp = client.UpdateRoleSessionDuration(model)
3382
+ result = rsp.to_json_string()
3383
+ try:
3384
+ json_obj = json.loads(result)
3385
+ except TypeError as e:
3386
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
3387
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
3388
+ break
3389
+ cur_time = time.time()
3390
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
3391
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
3392
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
3393
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
3394
+ else:
3395
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
3396
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
3397
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3398
+
3399
+
3348
3400
  def doListGroups(args, parsed_globals):
3349
3401
  g_param = parse_global_arg(parsed_globals)
3350
3402
 
@@ -4772,6 +4824,7 @@ ACTION_MAP = {
4772
4824
  "DetachGroupPolicy": doDetachGroupPolicy,
4773
4825
  "DescribeSafeAuthFlag": doDescribeSafeAuthFlag,
4774
4826
  "DescribeSafeAuthFlagIntl": doDescribeSafeAuthFlagIntl,
4827
+ "UpdateRoleSessionDuration": doUpdateRoleSessionDuration,
4775
4828
  "ListGroups": doListGroups,
4776
4829
  "ListWeChatWorkSubAccounts": doListWeChatWorkSubAccounts,
4777
4830
  "ListPolicyVersions": doListPolicyVersions,