tccli 3.0.1188.1__py2.py3-none-any.whl → 3.0.1189.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 (44) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/aiart/aiart_client.py +53 -0
  3. tccli/services/aiart/v20221229/api.json +107 -0
  4. tccli/services/aiart/v20221229/examples.json +8 -0
  5. tccli/services/apm/v20210622/api.json +3 -1
  6. tccli/services/billing/v20180709/api.json +3 -0
  7. tccli/services/billing/v20180709/examples.json +1 -1
  8. tccli/services/cfg/v20210820/api.json +19 -4
  9. tccli/services/ckafka/v20190819/api.json +5 -5
  10. tccli/services/dcdb/dcdb_client.py +106 -0
  11. tccli/services/dcdb/v20180411/api.json +318 -0
  12. tccli/services/dcdb/v20180411/examples.json +28 -0
  13. tccli/services/dnspod/dnspod_client.py +53 -0
  14. tccli/services/dnspod/v20210323/api.json +118 -0
  15. tccli/services/dnspod/v20210323/examples.json +8 -0
  16. tccli/services/emr/emr_client.py +269 -4
  17. tccli/services/emr/v20190103/api.json +591 -0
  18. tccli/services/emr/v20190103/examples.json +46 -0
  19. tccli/services/es/es_client.py +53 -0
  20. tccli/services/es/v20180416/api.json +54 -0
  21. tccli/services/es/v20180416/examples.json +14 -0
  22. tccli/services/ess/v20201111/api.json +1 -1
  23. tccli/services/ess/v20201111/examples.json +1 -1
  24. tccli/services/essbasic/essbasic_client.py +53 -0
  25. tccli/services/essbasic/v20210526/api.json +120 -0
  26. tccli/services/essbasic/v20210526/examples.json +8 -0
  27. tccli/services/mariadb/mariadb_client.py +110 -4
  28. tccli/services/mariadb/v20170312/api.json +318 -0
  29. tccli/services/mariadb/v20170312/examples.json +16 -0
  30. tccli/services/ocr/v20181119/api.json +12 -2
  31. tccli/services/redis/redis_client.py +110 -4
  32. tccli/services/redis/v20180412/api.json +209 -0
  33. tccli/services/redis/v20180412/examples.json +16 -0
  34. tccli/services/teo/v20220901/api.json +14 -14
  35. tccli/services/tsf/v20180326/api.json +74 -29
  36. tccli/services/vdb/v20230616/api.json +491 -0
  37. tccli/services/vdb/v20230616/examples.json +46 -0
  38. tccli/services/vdb/vdb_client.py +265 -0
  39. tccli/services/vpc/v20170312/api.json +4 -4
  40. {tccli-3.0.1188.1.dist-info → tccli-3.0.1189.1.dist-info}/METADATA +2 -2
  41. {tccli-3.0.1188.1.dist-info → tccli-3.0.1189.1.dist-info}/RECORD +44 -44
  42. {tccli-3.0.1188.1.dist-info → tccli-3.0.1189.1.dist-info}/WHEEL +0 -0
  43. {tccli-3.0.1188.1.dist-info → tccli-3.0.1189.1.dist-info}/entry_points.txt +0 -0
  44. {tccli-3.0.1188.1.dist-info → tccli-3.0.1189.1.dist-info}/license_files/LICENSE +0 -0
tccli/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = '3.0.1188.1'
1
+ __version__ = '3.0.1189.1'
@@ -17,6 +17,58 @@ from tencentcloud.aiart.v20221229 import models as models_v20221229
17
17
  from jmespath import search
18
18
  import time
19
19
 
20
+ def doSketchToImage(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.AiartClient(cred, g_param[OptionsDefine.Region], profile)
47
+ client._sdkVersion += ("_CLI_" + __version__)
48
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
49
+ model = models.SketchToImageRequest()
50
+ model.from_json_string(json.dumps(args))
51
+ start_time = time.time()
52
+ while True:
53
+ rsp = client.SketchToImage(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 doSubmitTextToImageProJob(args, parsed_globals):
21
73
  g_param = parse_global_arg(parsed_globals)
22
74
 
@@ -652,6 +704,7 @@ MODELS_MAP = {
652
704
  }
653
705
 
654
706
  ACTION_MAP = {
707
+ "SketchToImage": doSketchToImage,
655
708
  "SubmitTextToImageProJob": doSubmitTextToImageProJob,
656
709
  "ReplaceBackground": doReplaceBackground,
657
710
  "SubmitTrainPortraitModelJob": doSubmitTrainPortraitModelJob,
@@ -49,6 +49,13 @@
49
49
  "output": "ReplaceBackgroundResponse",
50
50
  "status": "online"
51
51
  },
52
+ "SketchToImage": {
53
+ "document": "线稿生图接口支持上传一张黑白线稿图,按照指定的主体对象以及样式、颜色、材质、风格等的文本描述prompt ,对线稿图进行色彩填充与细节描绘,得到一张完整绘制的图像。生成图分辨率默认为1024:1024。\n线稿生图默认提供1个并发任务数,代表最多能同时处理1个已提交的任务,上一个任务处理完毕后才能开始处理下一个任务。",
54
+ "input": "SketchToImageRequest",
55
+ "name": "线稿生图",
56
+ "output": "SketchToImageResponse",
57
+ "status": "online"
58
+ },
52
59
  "SubmitDrawPortraitJob": {
53
60
  "document": "AI 写真提供 AI 写真形象照的训练与生成能力,分为上传训练图片、训练模型、生成图片3个环节,需要依次调用对应接口。\n每个写真模型自训练完成起1年内有效,有效期内可使用写真模型 ID 生成图片,期满后需要重新训练。\n生成图片分为提交任务和查询任务2个接口。\n- 提交生成写真图片任务:完成训练写真模型后,选择风格模板,提交一个生成写真图片异步任务,根据写真模型 ID 开始生成人物形象在指定风格上的写真图片,获得任务 ID。\n- 查询生成写真图片任务:根据任务 ID 查询生成图片任务的处理状态、处理结果。\n\n提交生成写真图片任务默认提供1个并发任务数。",
54
61
  "input": "SubmitDrawPortraitJobRequest",
@@ -390,6 +397,24 @@
390
397
  "name": "RspImgType",
391
398
  "required": false,
392
399
  "type": "string"
400
+ },
401
+ {
402
+ "disabled": false,
403
+ "document": "画质增强开关,默认关闭。\n1:开启\n0:关闭\n开启后将增强图像的画质清晰度,生成耗时有所增加。",
404
+ "example": "0",
405
+ "member": "int64",
406
+ "name": "EnhanceImage",
407
+ "required": false,
408
+ "type": "int"
409
+ },
410
+ {
411
+ "disabled": false,
412
+ "document": "细节优化的面部数量上限,支持0 ~ 6,默认为0。\n若上传大于0的值,将以此为上限对每张图片中面积占比较小的面部进行细节修复,生成耗时根据实际优化的面部个数有所增加。",
413
+ "example": "0",
414
+ "member": "int64",
415
+ "name": "RestoreFace",
416
+ "required": false,
417
+ "type": "int"
393
418
  }
394
419
  ],
395
420
  "type": "object"
@@ -871,6 +896,88 @@
871
896
  ],
872
897
  "usage": "in"
873
898
  },
899
+ "SketchToImageRequest": {
900
+ "document": "SketchToImage请求参数结构体",
901
+ "members": [
902
+ {
903
+ "disabled": false,
904
+ "document": "用于线稿生图的文本描述。\n最多支持200个 utf-8 字符。\n建议格式:线稿中的主体对象+画面场景+配色/材质/元素/风格等",
905
+ "example": "鞋子,红白配色,皮革材质,真实画质,写实风格,精细,高清摄影,白色背景",
906
+ "member": "string",
907
+ "name": "Prompt",
908
+ "required": true,
909
+ "type": "string"
910
+ },
911
+ {
912
+ "disabled": false,
913
+ "document": "线稿图 Base64 数据。\nBase64 和 Url 必须提供一个,如果都提供以Url 为准。\n图片限制:黑白线稿图片,单边分辨率小于5000且大于512(分辨率过小会导致效果受损),转成 Base64 字符串后小于 6MB,格式支持 jpg、jpeg、png、bmp、tiff、webp。",
914
+ "example": "无",
915
+ "member": "string",
916
+ "name": "InputImage",
917
+ "required": false,
918
+ "type": "string"
919
+ },
920
+ {
921
+ "disabled": false,
922
+ "document": "线稿图 Url。\nBase64 和 Url 必须提供一个,如果都提供以Url 为准。\n图片限制:黑白线稿图片,单边分辨率小于5000且大于512(分辨率过小会导致效果受损),转成 Base64 字符串后小于 6MB,格式支持 jpg、jpeg、png、bmp、tiff、webp。",
923
+ "example": "无",
924
+ "member": "string",
925
+ "name": "InputUrl",
926
+ "required": false,
927
+ "type": "string"
928
+ },
929
+ {
930
+ "disabled": false,
931
+ "document": "为生成结果图添加标识的开关,默认为1。\n1:添加标识。\n0:不添加标识。\n其他数值:默认按1处理。\n建议您使用显著标识来提示结果图使用了 AI 绘画技术,是 AI 生成的图片。",
932
+ "example": "无",
933
+ "member": "int64",
934
+ "name": "LogoAdd",
935
+ "required": false,
936
+ "type": "int"
937
+ },
938
+ {
939
+ "disabled": false,
940
+ "document": "标识内容设置。\n默认在生成结果图右下角添加“图片由 AI 生成”字样,您可根据自身需要替换为其他的标识图片。",
941
+ "example": "无",
942
+ "member": "LogoParam",
943
+ "name": "LogoParam",
944
+ "required": false,
945
+ "type": "object"
946
+ },
947
+ {
948
+ "disabled": false,
949
+ "document": "返回图像方式(base64 或 url) ,二选一,默认为 base64。url 有效期为1小时。生成图分辨率较大时建议选择 url,使用 base64 可能因图片过大导致返回失败。",
950
+ "example": "base64",
951
+ "member": "string",
952
+ "name": "RspImgType",
953
+ "required": false,
954
+ "type": "string"
955
+ }
956
+ ],
957
+ "type": "object"
958
+ },
959
+ "SketchToImageResponse": {
960
+ "document": "SketchToImage返回参数结构体",
961
+ "members": [
962
+ {
963
+ "disabled": false,
964
+ "document": "根据入参 RspImgType 填入不同,返回不同的内容。\n如果传入 base64 则返回生成图 Base64 编码。\n如果传入 url 则返回的生成图 URL , 有效期1小时,请及时保存。",
965
+ "example": "无",
966
+ "member": "string",
967
+ "name": "ResultImage",
968
+ "output_required": true,
969
+ "type": "string",
970
+ "value_allowed_null": false
971
+ },
972
+ {
973
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
974
+ "member": "string",
975
+ "name": "RequestId",
976
+ "type": "string"
977
+ }
978
+ ],
979
+ "type": "object"
980
+ },
874
981
  "SubmitDrawPortraitJobRequest": {
875
982
  "document": "SubmitDrawPortraitJob请求参数结构体",
876
983
  "members": [
@@ -56,6 +56,14 @@
56
56
  "title": "成功调用并生成图片"
57
57
  }
58
58
  ],
59
+ "SketchToImage": [
60
+ {
61
+ "document": "成功调用并生成图片",
62
+ "input": "POST / HTTP/1.1\nHost: aiart.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: SketchToImage\n<公共请求参数>\n\n{\n \"InputUrl\": \"https://xxx.com/test.jpg\",\n \"Prompt\": \"backpack,real picture quality, fabric texture, fine, cartoon\",\n \"RspImgType\": \"url\"\n}",
63
+ "output": "{\n \"Response\": {\n \"RequestId\": \"0d0728ed-f777-4861-aa4b-5a6167daa0b6\",\n \"ResultImage\": \"https://result.jpg\"\n }\n}",
64
+ "title": "成功调用并生成图片"
65
+ }
66
+ ],
59
67
  "SubmitDrawPortraitJob": [
60
68
  {
61
69
  "document": "调用成功",
@@ -127,6 +127,7 @@
127
127
  "example": "name",
128
128
  "member": "string",
129
129
  "name": "Key",
130
+ "output_required": true,
130
131
  "required": true,
131
132
  "type": "string",
132
133
  "value_allowed_null": true
@@ -137,12 +138,13 @@
137
138
  "example": "xxxx",
138
139
  "member": "string",
139
140
  "name": "Value",
141
+ "output_required": true,
140
142
  "required": true,
141
143
  "type": "string",
142
144
  "value_allowed_null": true
143
145
  }
144
146
  ],
145
- "usage": "out"
147
+ "usage": "both"
146
148
  },
147
149
  "ApmAgentInfo": {
148
150
  "document": "apm Agent信息",
@@ -13171,6 +13171,7 @@
13171
13171
  "example": "0",
13172
13172
  "member": "int64",
13173
13173
  "name": "TotalCount",
13174
+ "output_required": true,
13174
13175
  "type": "int",
13175
13176
  "value_allowed_null": false
13176
13177
  },
@@ -13180,6 +13181,7 @@
13180
13181
  "example": "0",
13181
13182
  "member": "int64",
13182
13183
  "name": "TotalUsedAmount",
13184
+ "output_required": true,
13183
13185
  "type": "int",
13184
13186
  "value_allowed_null": false
13185
13187
  },
@@ -13189,6 +13191,7 @@
13189
13191
  "example": "无",
13190
13192
  "member": "UsageRecords",
13191
13193
  "name": "UsageRecords",
13194
+ "output_required": true,
13192
13195
  "type": "list",
13193
13196
  "value_allowed_null": true
13194
13197
  },
@@ -402,7 +402,7 @@
402
402
  {
403
403
  "document": "获取代金券使用记录",
404
404
  "input": "https://billing.tencentcloudapi.com/?Action=DescribeVoucherUsageDetails\n&Limit=10\n&Offset=1\n&VoucherId=\"abc\"\n&Operator=\"abc\"\n&<公共请求参数>",
405
- "output": "{\n \"Response\": {\n \"TotalCount\": \"1\",\n \"TotalUsedAmount\": 18000000000,\n \"UsageRecords\": [\n {\n \"UsedAmount\": 18000000000,\n \"UsedTime\": \"2021-01-01 00:00:00\",\n \"UsageDetails\": [\n {\n \"ProductName\": \"轻量应用服务器\",\n \"SubProductName\": \"轻量应用服务器 (通用型-2核2G-50G-500G)\"\n }\n ]\n }\n ],\n \"RequestId\": \"76cf663e-f683-41b9-b44d-849123783bf4\"\n }\n}",
405
+ "output": "{\n \"Response\": {\n \"RequestId\": \"9168e8fe-ed79-4726-9ced-29033e5a7011\",\n \"TotalCount\": 5,\n \"TotalUsedAmount\": 5000000,\n \"UsageRecords\": [\n {\n \"PayMode\": \"prepay\",\n \"PayScene\": \"\",\n \"SeqId\": \"20240212840001259973831114\",\n \"UsageDetails\": [\n {\n \"Action\": \"purchase\",\n \"BillingItemCode\": \"\",\n \"CalcUnit\": \"\",\n \"ProductCode\": \"p_cvm\",\n \"ProductEnName\": \"Cloud Virtual Machine(CVM)\",\n \"ProductName\": \"云服务器CVM\",\n \"SubBillingItemCode\": \"\",\n \"SubProductCode\": \"sp_cvm_s2\",\n \"SubProductEnName\": \"CVM Standard S2\",\n \"SubProductName\": \"云服务器CVM-标准型S2\"\n }\n ],\n \"UsedAmount\": 1000000,\n \"UsedTime\": \"2024-02-12 15:54:56\",\n \"VoucherId\": \"WFRCNWBQBHNYJTZ3XLGE3T\"\n },\n {\n \"PayMode\": \"postpay\",\n \"PayScene\": null,\n \"SeqId\": \"20240212799000283860282006\",\n \"UsageDetails\": [\n {\n \"Action\": \"\",\n \"BillingItemCode\": \"\",\n \"CalcUnit\": \"1\",\n \"ProductCode\": \"p_ccn\",\n \"ProductEnName\": \"Cloud Connect Network\",\n \"ProductName\": \"云联网CCN\",\n \"SubBillingItemCode\": \"\",\n \"SubProductCode\": \"sp_ccn_connecting_instance\",\n \"SubProductEnName\": \"Cloud Connect Network-connecting-instance\",\n \"SubProductName\": \"云联网网络连接实例费\"\n }\n ],\n \"UsedAmount\": 1000000,\n \"UsedTime\": \"2024-02-12 15:53:33\",\n \"VoucherId\": \"WFRCNWBQBHNYJTZ3XLGE3T\"\n },\n {\n \"PayMode\": \"postpay\",\n \"PayScene\": null,\n \"SeqId\": \"20240212799000283860282005\",\n \"UsageDetails\": [\n {\n \"Action\": \"\",\n \"BillingItemCode\": \"\",\n \"CalcUnit\": \"1\",\n \"ProductCode\": \"p_ccn\",\n \"ProductEnName\": \"Cloud Connect Network\",\n \"ProductName\": \"云联网CCN\",\n \"SubBillingItemCode\": \"\",\n \"SubProductCode\": \"sp_ccn_connecting_instance\",\n \"SubProductEnName\": \"Cloud Connect Network-connecting-instance\",\n \"SubProductName\": \"云联网网络连接实例费\"\n }\n ],\n \"UsedAmount\": 1000000,\n \"UsedTime\": \"2024-02-12 15:36:54\",\n \"VoucherId\": \"WFRCNWBQBHNYJTZ3XLGE3T\"\n },\n {\n \"PayMode\": \"prepay\",\n \"PayScene\": \"\",\n \"SeqId\": \"20240212840001259973831111\",\n \"UsageDetails\": [\n {\n \"Action\": \"purchase\",\n \"BillingItemCode\": \"\",\n \"CalcUnit\": \"\",\n \"ProductCode\": \"p_cvm\",\n \"ProductEnName\": \"Cloud Virtual Machine(CVM)\",\n \"ProductName\": \"云服务器CVM\",\n \"SubBillingItemCode\": \"\",\n \"SubProductCode\": \"sp_cvm_s2\",\n \"SubProductEnName\": \"CVM Standard S2\",\n \"SubProductName\": \"云服务器CVM-标准型S2\"\n }\n ],\n \"UsedAmount\": 1000000,\n \"UsedTime\": \"2024-02-12 15:15:49\",\n \"VoucherId\": \"WFRCNWBQBHNYJTZ3XLGE3T\"\n },\n {\n \"PayMode\": \"prepay\",\n \"PayScene\": \"\",\n \"SeqId\": \"20240212840001259973831109\",\n \"UsageDetails\": [\n {\n \"Action\": \"purchase\",\n \"BillingItemCode\": \"\",\n \"CalcUnit\": \"\",\n \"ProductCode\": \"p_cvm\",\n \"ProductEnName\": \"Cloud Virtual Machine(CVM)\",\n \"ProductName\": \"云服务器CVM\",\n \"SubBillingItemCode\": \"\",\n \"SubProductCode\": \"sp_cvm_s2\",\n \"SubProductEnName\": \"CVM Standard S2\",\n \"SubProductName\": \"云服务器CVM-标准型S2\"\n }\n ],\n \"UsedAmount\": 1000000,\n \"UsedTime\": \"2024-02-12 15:14:18\",\n \"VoucherId\": \"WFRCNWBQBHNYJTZ3XLGE3T\"\n }\n ]\n }\n}",
406
406
  "title": "获取代金券使用记录"
407
407
  }
408
408
  ],
@@ -726,7 +726,7 @@
726
726
  {
727
727
  "disabled": false,
728
728
  "document": "资源下线信息\n注意:此字段可能返回 null,表示取不到有效值。",
729
- "example": "{\"ResourceId\": 4, \"ResourceDeleteTime\": \"2023-12-14\",\"ResourceDeleteMessage\": \"由于该动作不具备手动中止能力,已将该动作下线。现有新的故障动作替换,请参考<a href=\\\"https://cloud.tencent.com/document/product/1500/102833\\\" target=\\\"_blank\\\">探针管理</a>文档,在实例安装探针后重新创建新的演练执行。\"}",
729
+ "example": "{ \"ResourceId\": 4, \"ResourceDeleteTime\": \"2023-12-14\", \"ResourceDeleteMessage\": \"由于该动作不具备手动中止能力,已将该动作下线。现有新的故障动作替换,请参考<a href=https://cloud.tencent.com/document/product/1500/102833 target=\\\"_blank\\\">探针管理</a>文档,在实例安装探针后重新创建新的演练执行。\" }",
730
730
  "member": "ResourceOffline",
731
731
  "name": "ResourceOffline",
732
732
  "output_required": false,
@@ -793,7 +793,7 @@
793
793
  {
794
794
  "disabled": false,
795
795
  "document": "筛选项 -动作ID",
796
- "example": "",
796
+ "example": "1",
797
797
  "member": "uint64",
798
798
  "name": "ActionIds",
799
799
  "required": false,
@@ -1681,6 +1681,7 @@
1681
1681
  "example": "instanceId",
1682
1682
  "member": "string",
1683
1683
  "name": "Key",
1684
+ "output_required": true,
1684
1685
  "required": true,
1685
1686
  "type": "string",
1686
1687
  "value_allowed_null": false
@@ -1691,6 +1692,7 @@
1691
1692
  "example": "实例id",
1692
1693
  "member": "string",
1693
1694
  "name": "Header",
1695
+ "output_required": true,
1694
1696
  "required": true,
1695
1697
  "type": "string",
1696
1698
  "value_allowed_null": false
@@ -1698,9 +1700,10 @@
1698
1700
  {
1699
1701
  "disabled": false,
1700
1702
  "document": "字段值是否需要转译,当不需要转译时,此字段返回null\n注意:此字段可能返回 null,表示取不到有效值。",
1701
- "example": "",
1703
+ "example": "{\"true\": \"是\", \"false\": \"否\"}",
1702
1704
  "member": "string",
1703
1705
  "name": "Transfer",
1706
+ "output_required": true,
1704
1707
  "required": false,
1705
1708
  "type": "string",
1706
1709
  "value_allowed_null": true
@@ -1708,9 +1711,10 @@
1708
1711
  {
1709
1712
  "disabled": false,
1710
1713
  "document": "tke的pod字段信息解析\n注意:此字段可能返回 null,表示取不到有效值。",
1711
- "example": "",
1714
+ "example": "$.spec.nodeName",
1712
1715
  "member": "string",
1713
1716
  "name": "JsonParse",
1717
+ "output_required": true,
1714
1718
  "required": false,
1715
1719
  "type": "string",
1716
1720
  "value_allowed_null": true
@@ -2278,6 +2282,17 @@
2278
2282
  "required": false,
2279
2283
  "type": "string",
2280
2284
  "value_allowed_null": true
2285
+ },
2286
+ {
2287
+ "disabled": false,
2288
+ "document": "region信息\n注意:此字段可能返回 null,表示取不到有效值。",
2289
+ "example": "无",
2290
+ "member": "string",
2291
+ "name": "TaskRegionName",
2292
+ "output_required": false,
2293
+ "required": false,
2294
+ "type": "string",
2295
+ "value_allowed_null": true
2281
2296
  }
2282
2297
  ],
2283
2298
  "usage": "both"
@@ -13287,7 +13287,7 @@
13287
13287
  "type": "int"
13288
13288
  },
13289
13289
  {
13290
- "disabled": false,
13290
+ "disabled": true,
13291
13291
  "document": "动态硬盘扩容策略配置",
13292
13292
  "example": "无",
13293
13293
  "member": "DynamicDiskConfig",
@@ -13480,8 +13480,8 @@
13480
13480
  },
13481
13481
  {
13482
13482
  "disabled": false,
13483
- "document": "自动化运维子类别",
13484
- "example": "INSTANCE_STORAGE_CAPACITY",
13483
+ "document": "INSTANCE_STORAGE_CAPACITY(磁盘自动扩容)/MESSAGE_RETENTION_PERIOD(磁盘动态消息保留策略)",
13484
+ "example": "INSTANCE_STORAGE_CAPACITY/MESSAGE_RETENTION_PERIOD",
13485
13485
  "member": "string",
13486
13486
  "name": "MaintenanceSubtype",
13487
13487
  "required": true,
@@ -14820,7 +14820,7 @@
14820
14820
  "example": "1",
14821
14821
  "member": "int64",
14822
14822
  "name": "FlowId",
14823
- "required": true,
14823
+ "output_required": true,
14824
14824
  "type": "int",
14825
14825
  "value_allowed_null": true
14826
14826
  },
@@ -14830,7 +14830,7 @@
14830
14830
  "example": "{}",
14831
14831
  "member": "RouteDTO",
14832
14832
  "name": "RouteDTO",
14833
- "required": false,
14833
+ "output_required": true,
14834
14834
  "type": "object",
14835
14835
  "value_allowed_null": true
14836
14836
  }
@@ -1629,6 +1629,58 @@ def doIsolateHourDCDBInstance(args, parsed_globals):
1629
1629
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1630
1630
 
1631
1631
 
1632
+ def doDescribeBackupConfigs(args, parsed_globals):
1633
+ g_param = parse_global_arg(parsed_globals)
1634
+
1635
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1636
+ cred = credential.CVMRoleCredential()
1637
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1638
+ cred = credential.STSAssumeRoleCredential(
1639
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1640
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1641
+ )
1642
+ 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):
1643
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1644
+ else:
1645
+ cred = credential.Credential(
1646
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1647
+ )
1648
+ http_profile = HttpProfile(
1649
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1650
+ reqMethod="POST",
1651
+ endpoint=g_param[OptionsDefine.Endpoint],
1652
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1653
+ )
1654
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1655
+ if g_param[OptionsDefine.Language]:
1656
+ profile.language = g_param[OptionsDefine.Language]
1657
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1658
+ client = mod.DcdbClient(cred, g_param[OptionsDefine.Region], profile)
1659
+ client._sdkVersion += ("_CLI_" + __version__)
1660
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1661
+ model = models.DescribeBackupConfigsRequest()
1662
+ model.from_json_string(json.dumps(args))
1663
+ start_time = time.time()
1664
+ while True:
1665
+ rsp = client.DescribeBackupConfigs(model)
1666
+ result = rsp.to_json_string()
1667
+ try:
1668
+ json_obj = json.loads(result)
1669
+ except TypeError as e:
1670
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1671
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1672
+ break
1673
+ cur_time = time.time()
1674
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1675
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1676
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1677
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1678
+ else:
1679
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1680
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1681
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1682
+
1683
+
1632
1684
  def doDescribeDBSyncMode(args, parsed_globals):
1633
1685
  g_param = parse_global_arg(parsed_globals)
1634
1686
 
@@ -3501,6 +3553,58 @@ def doCreateAccount(args, parsed_globals):
3501
3553
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3502
3554
 
3503
3555
 
3556
+ def doModifyBackupConfigs(args, parsed_globals):
3557
+ g_param = parse_global_arg(parsed_globals)
3558
+
3559
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
3560
+ cred = credential.CVMRoleCredential()
3561
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
3562
+ cred = credential.STSAssumeRoleCredential(
3563
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
3564
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
3565
+ )
3566
+ 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):
3567
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
3568
+ else:
3569
+ cred = credential.Credential(
3570
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
3571
+ )
3572
+ http_profile = HttpProfile(
3573
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
3574
+ reqMethod="POST",
3575
+ endpoint=g_param[OptionsDefine.Endpoint],
3576
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
3577
+ )
3578
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
3579
+ if g_param[OptionsDefine.Language]:
3580
+ profile.language = g_param[OptionsDefine.Language]
3581
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
3582
+ client = mod.DcdbClient(cred, g_param[OptionsDefine.Region], profile)
3583
+ client._sdkVersion += ("_CLI_" + __version__)
3584
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
3585
+ model = models.ModifyBackupConfigsRequest()
3586
+ model.from_json_string(json.dumps(args))
3587
+ start_time = time.time()
3588
+ while True:
3589
+ rsp = client.ModifyBackupConfigs(model)
3590
+ result = rsp.to_json_string()
3591
+ try:
3592
+ json_obj = json.loads(result)
3593
+ except TypeError as e:
3594
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
3595
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
3596
+ break
3597
+ cur_time = time.time()
3598
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
3599
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
3600
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
3601
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
3602
+ else:
3603
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
3604
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
3605
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3606
+
3607
+
3504
3608
  def doModifyDBInstanceName(args, parsed_globals):
3505
3609
  g_param = parse_global_arg(parsed_globals)
3506
3610
 
@@ -3907,6 +4011,7 @@ ACTION_MAP = {
3907
4011
  "KillSession": doKillSession,
3908
4012
  "DescribeDBLogFiles": doDescribeDBLogFiles,
3909
4013
  "IsolateHourDCDBInstance": doIsolateHourDCDBInstance,
4014
+ "DescribeBackupConfigs": doDescribeBackupConfigs,
3910
4015
  "DescribeDBSyncMode": doDescribeDBSyncMode,
3911
4016
  "DescribeDCDBBinlogTime": doDescribeDCDBBinlogTime,
3912
4017
  "UpgradeHourDCDBInstance": doUpgradeHourDCDBInstance,
@@ -3943,6 +4048,7 @@ ACTION_MAP = {
3943
4048
  "InitDCDBInstances": doInitDCDBInstances,
3944
4049
  "DescribeDCDBInstanceDetail": doDescribeDCDBInstanceDetail,
3945
4050
  "CreateAccount": doCreateAccount,
4051
+ "ModifyBackupConfigs": doModifyBackupConfigs,
3946
4052
  "ModifyDBInstanceName": doModifyDBInstanceName,
3947
4053
  "DescribeLogFileRetentionPeriod": doDescribeLogFileRetentionPeriod,
3948
4054
  "CreateTmpDCDBInstance": doCreateTmpDCDBInstance,