tccli 3.0.1187.1__py2.py3-none-any.whl → 3.0.1189.1__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) 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/cvm/cvm_client.py +53 -0
  11. tccli/services/cvm/v20170312/api.json +107 -0
  12. tccli/services/cvm/v20170312/examples.json +8 -0
  13. tccli/services/dc/v20180410/api.json +19 -19
  14. tccli/services/dc/v20180410/examples.json +5 -5
  15. tccli/services/dcdb/dcdb_client.py +106 -0
  16. tccli/services/dcdb/v20180411/api.json +338 -2
  17. tccli/services/dcdb/v20180411/examples.json +28 -0
  18. tccli/services/dlc/dlc_client.py +106 -0
  19. tccli/services/dlc/v20210125/api.json +87 -0
  20. tccli/services/dlc/v20210125/examples.json +16 -0
  21. tccli/services/dnspod/dnspod_client.py +53 -0
  22. tccli/services/dnspod/v20210323/api.json +118 -0
  23. tccli/services/dnspod/v20210323/examples.json +8 -0
  24. tccli/services/dts/v20211206/api.json +1 -0
  25. tccli/services/emr/emr_client.py +322 -4
  26. tccli/services/emr/v20190103/api.json +862 -10
  27. tccli/services/emr/v20190103/examples.json +54 -0
  28. tccli/services/es/es_client.py +53 -0
  29. tccli/services/es/v20180416/api.json +155 -0
  30. tccli/services/es/v20180416/examples.json +14 -0
  31. tccli/services/ess/ess_client.py +53 -0
  32. tccli/services/ess/v20201111/api.json +147 -0
  33. tccli/services/ess/v20201111/examples.json +8 -0
  34. tccli/services/essbasic/essbasic_client.py +53 -0
  35. tccli/services/essbasic/v20210526/api.json +120 -0
  36. tccli/services/essbasic/v20210526/examples.json +8 -0
  37. tccli/services/mariadb/mariadb_client.py +110 -4
  38. tccli/services/mariadb/v20170312/api.json +339 -3
  39. tccli/services/mariadb/v20170312/examples.json +16 -0
  40. tccli/services/ocr/v20181119/api.json +12 -2
  41. tccli/services/rce/v20201103/api.json +2 -2
  42. tccli/services/redis/redis_client.py +110 -4
  43. tccli/services/redis/v20180412/api.json +209 -0
  44. tccli/services/redis/v20180412/examples.json +16 -0
  45. tccli/services/sms/v20190711/api.json +2 -2
  46. tccli/services/sms/v20210111/api.json +2 -2
  47. tccli/services/teo/v20220901/api.json +14 -14
  48. tccli/services/trtc/v20190722/api.json +11 -0
  49. tccli/services/tse/v20201207/api.json +18 -18
  50. tccli/services/tsf/v20180326/api.json +74 -29
  51. tccli/services/vclm/v20240523/api.json +2 -2
  52. tccli/services/vdb/v20230616/api.json +491 -0
  53. tccli/services/vdb/v20230616/examples.json +46 -0
  54. tccli/services/vdb/vdb_client.py +265 -0
  55. tccli/services/vpc/v20170312/api.json +5 -5
  56. tccli/services/vtc/v20240223/api.json +2 -2
  57. {tccli-3.0.1187.1.dist-info → tccli-3.0.1189.1.dist-info}/METADATA +2 -2
  58. {tccli-3.0.1187.1.dist-info → tccli-3.0.1189.1.dist-info}/RECORD +61 -61
  59. {tccli-3.0.1187.1.dist-info → tccli-3.0.1189.1.dist-info}/WHEEL +0 -0
  60. {tccli-3.0.1187.1.dist-info → tccli-3.0.1189.1.dist-info}/entry_points.txt +0 -0
  61. {tccli-3.0.1187.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.1187.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
  }
@@ -3137,6 +3137,58 @@ def doModifyImageAttribute(args, parsed_globals):
3137
3137
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3138
3138
 
3139
3139
 
3140
+ def doConvertOperatingSystems(args, parsed_globals):
3141
+ g_param = parse_global_arg(parsed_globals)
3142
+
3143
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
3144
+ cred = credential.CVMRoleCredential()
3145
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
3146
+ cred = credential.STSAssumeRoleCredential(
3147
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
3148
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
3149
+ )
3150
+ 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):
3151
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
3152
+ else:
3153
+ cred = credential.Credential(
3154
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
3155
+ )
3156
+ http_profile = HttpProfile(
3157
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
3158
+ reqMethod="POST",
3159
+ endpoint=g_param[OptionsDefine.Endpoint],
3160
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
3161
+ )
3162
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
3163
+ if g_param[OptionsDefine.Language]:
3164
+ profile.language = g_param[OptionsDefine.Language]
3165
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
3166
+ client = mod.CvmClient(cred, g_param[OptionsDefine.Region], profile)
3167
+ client._sdkVersion += ("_CLI_" + __version__)
3168
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
3169
+ model = models.ConvertOperatingSystemsRequest()
3170
+ model.from_json_string(json.dumps(args))
3171
+ start_time = time.time()
3172
+ while True:
3173
+ rsp = client.ConvertOperatingSystems(model)
3174
+ result = rsp.to_json_string()
3175
+ try:
3176
+ json_obj = json.loads(result)
3177
+ except TypeError as e:
3178
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
3179
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
3180
+ break
3181
+ cur_time = time.time()
3182
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
3183
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
3184
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
3185
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
3186
+ else:
3187
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
3188
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
3189
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3190
+
3191
+
3140
3192
  def doDeleteDisasterRecoverGroups(args, parsed_globals):
3141
3193
  g_param = parse_global_arg(parsed_globals)
3142
3194
 
@@ -5236,6 +5288,7 @@ ACTION_MAP = {
5236
5288
  "DescribeLaunchTemplates": doDescribeLaunchTemplates,
5237
5289
  "AssociateSecurityGroups": doAssociateSecurityGroups,
5238
5290
  "ModifyImageAttribute": doModifyImageAttribute,
5291
+ "ConvertOperatingSystems": doConvertOperatingSystems,
5239
5292
  "DeleteDisasterRecoverGroups": doDeleteDisasterRecoverGroups,
5240
5293
  "TerminateInstances": doTerminateInstances,
5241
5294
  "RemoveChcAssistVpc": doRemoveChcAssistVpc,
@@ -35,6 +35,13 @@
35
35
  "output": "ConfigureChcDeployVpcResponse",
36
36
  "status": "online"
37
37
  },
38
+ "ConvertOperatingSystems": {
39
+ "document": "本接口(ConvertOperatingSystem)用于转换实例的操作系统,仅支持源操作系统为 CentOS 7、CentOS 8 的实例。",
40
+ "input": "ConvertOperatingSystemsRequest",
41
+ "name": "转换操作系统",
42
+ "output": "ConvertOperatingSystemsResponse",
43
+ "status": "online"
44
+ },
38
45
  "CreateDisasterRecoverGroup": {
39
46
  "document": "本接口 (CreateDisasterRecoverGroup)用于创建[分散置放群组](https://cloud.tencent.com/document/product/213/15486)。创建好的置放群组,可在[创建实例](https://cloud.tencent.com/document/api/213/15730)时指定。",
40
47
  "input": "CreateDisasterRecoverGroupRequest",
@@ -1390,6 +1397,80 @@
1390
1397
  ],
1391
1398
  "type": "object"
1392
1399
  },
1400
+ "ConvertOperatingSystemsRequest": {
1401
+ "document": "ConvertOperatingSystems请求参数结构体",
1402
+ "members": [
1403
+ {
1404
+ "disabled": false,
1405
+ "document": "执行操作系统转换的实例 ID",
1406
+ "example": "[\"ins-xxxxxxxx\"]",
1407
+ "member": "string",
1408
+ "name": "InstanceIds",
1409
+ "required": true,
1410
+ "type": "list"
1411
+ },
1412
+ {
1413
+ "disabled": false,
1414
+ "document": "是否最小规模转换",
1415
+ "example": "true",
1416
+ "member": "bool",
1417
+ "name": "MinimalConversion",
1418
+ "required": false,
1419
+ "type": "bool"
1420
+ },
1421
+ {
1422
+ "disabled": false,
1423
+ "document": "是否只预检",
1424
+ "example": "true",
1425
+ "member": "bool",
1426
+ "name": "DryRun",
1427
+ "required": false,
1428
+ "type": "bool"
1429
+ },
1430
+ {
1431
+ "disabled": false,
1432
+ "document": "转换的目标操作系统类型。仅支持 TencentOS。",
1433
+ "example": "TencentOS",
1434
+ "member": "string",
1435
+ "name": "TargetOSType",
1436
+ "required": false,
1437
+ "type": "string"
1438
+ }
1439
+ ],
1440
+ "type": "object"
1441
+ },
1442
+ "ConvertOperatingSystemsResponse": {
1443
+ "document": "ConvertOperatingSystems返回参数结构体",
1444
+ "members": [
1445
+ {
1446
+ "disabled": false,
1447
+ "document": "转换的目标操系统信息,仅在入参 DryRun 为 true 时返回。\n注意:此字段可能返回 null,表示取不到有效值。",
1448
+ "example": "无",
1449
+ "member": "TargetOS",
1450
+ "name": "SupportTargetOSList",
1451
+ "output_required": false,
1452
+ "type": "list",
1453
+ "value_allowed_null": true
1454
+ },
1455
+ {
1456
+ "disabled": false,
1457
+ "document": "操作系统转换的任务 ID\n注意:此字段可能返回 null,表示取不到有效值。",
1458
+ "example": "无",
1459
+ "member": "string",
1460
+ "name": "TaskId",
1461
+ "output_required": false,
1462
+ "type": "string",
1463
+ "value_allowed_null": true
1464
+ },
1465
+ {
1466
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
1467
+ "member": "string",
1468
+ "name": "RequestId",
1469
+ "type": "string"
1470
+ }
1471
+ ],
1472
+ "type": "object"
1473
+ },
1393
1474
  "CpuTopology": {
1394
1475
  "document": "描述了实例CPU拓扑结构的相关信息。",
1395
1476
  "members": [
@@ -11713,6 +11794,32 @@
11713
11794
  ],
11714
11795
  "usage": "both"
11715
11796
  },
11797
+ "TargetOS": {
11798
+ "document": "操作系统转换的目标操作系统信息",
11799
+ "members": [
11800
+ {
11801
+ "disabled": false,
11802
+ "document": "目标操作系统类型",
11803
+ "example": "TencentOS",
11804
+ "member": "string",
11805
+ "name": "TargetOSType",
11806
+ "output_required": true,
11807
+ "type": "string",
11808
+ "value_allowed_null": false
11809
+ },
11810
+ {
11811
+ "disabled": false,
11812
+ "document": "目标操作系统版本",
11813
+ "example": "2.4",
11814
+ "member": "string",
11815
+ "name": "TargetOSVersion",
11816
+ "output_required": true,
11817
+ "type": "string",
11818
+ "value_allowed_null": false
11819
+ }
11820
+ ],
11821
+ "usage": "out"
11822
+ },
11716
11823
  "TerminateInstancesRequest": {
11717
11824
  "document": "TerminateInstances请求参数结构体",
11718
11825
  "members": [
@@ -40,6 +40,14 @@
40
40
  "title": "配置CHC物理服务器的部署网络"
41
41
  }
42
42
  ],
43
+ "ConvertOperatingSystems": [
44
+ {
45
+ "document": "针对实例 ins-6pb6lrmy 执行操作系统转换",
46
+ "input": "POST / HTTP/1.1\nHost: cvm.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ConvertOperatingSystem\n<公共请求参数>\n\n{\n \"InstanceIds\": [\n \"ins-6pb6lrmy\"\n ]\n}",
47
+ "output": "{\n \"Response\": {\n \"SupportTargetOSList\": [\n {\n \"TargetOSType\": \"TencentOS\",\n \"TargetOSVersion\": \"2.4\"\n }\n ],\n \"TaskId\": \"12345678\",\n \"RequestId\": \"abc\"\n }\n}",
48
+ "title": "执行操作系统转换"
49
+ }
50
+ ],
43
51
  "CreateDisasterRecoverGroup": [
44
52
  {
45
53
  "document": "创建分散置放群组",