tccli 3.0.1147.1__py2.py3-none-any.whl → 3.0.1148.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 (29) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/aiart/aiart_client.py +53 -0
  3. tccli/services/aiart/v20221229/api.json +80 -0
  4. tccli/services/aiart/v20221229/examples.json +8 -0
  5. tccli/services/asr/v20190614/api.json +6 -6
  6. tccli/services/clb/v20180317/api.json +1 -1
  7. tccli/services/dcdb/v20180411/api.json +2 -0
  8. tccli/services/dnspod/v20210323/api.json +9 -0
  9. tccli/services/lighthouse/v20200324/api.json +33 -31
  10. tccli/services/lighthouse/v20200324/examples.json +3 -3
  11. tccli/services/lke/lke_client.py +53 -0
  12. tccli/services/lke/v20231130/api.json +160 -1
  13. tccli/services/lke/v20231130/examples.json +8 -0
  14. tccli/services/mna/mna_client.py +485 -8
  15. tccli/services/mna/v20210119/api.json +743 -21
  16. tccli/services/mna/v20210119/examples.json +72 -0
  17. tccli/services/mps/v20190612/api.json +31 -10
  18. tccli/services/tdmq/v20200217/api.json +8 -8
  19. tccli/services/tdmq/v20200217/examples.json +1 -1
  20. tccli/services/tke/v20180525/api.json +3 -3
  21. tccli/services/tsf/tsf_client.py +110 -4
  22. tccli/services/tsf/v20180326/api.json +142 -0
  23. tccli/services/tsf/v20180326/examples.json +16 -0
  24. tccli/services/vpc/v20170312/api.json +1 -1
  25. {tccli-3.0.1147.1.dist-info → tccli-3.0.1148.1.dist-info}/METADATA +2 -2
  26. {tccli-3.0.1147.1.dist-info → tccli-3.0.1148.1.dist-info}/RECORD +29 -29
  27. {tccli-3.0.1147.1.dist-info → tccli-3.0.1148.1.dist-info}/WHEEL +0 -0
  28. {tccli-3.0.1147.1.dist-info → tccli-3.0.1148.1.dist-info}/entry_points.txt +0 -0
  29. {tccli-3.0.1147.1.dist-info → tccli-3.0.1148.1.dist-info}/license_files/LICENSE +0 -0
tccli/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = '3.0.1147.1'
1
+ __version__ = '3.0.1148.1'
@@ -485,6 +485,58 @@ def doTextToImage(args, parsed_globals):
485
485
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
486
486
 
487
487
 
488
+ def doChangeClothes(args, parsed_globals):
489
+ g_param = parse_global_arg(parsed_globals)
490
+
491
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
492
+ cred = credential.CVMRoleCredential()
493
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
494
+ cred = credential.STSAssumeRoleCredential(
495
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
496
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
497
+ )
498
+ 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):
499
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
500
+ else:
501
+ cred = credential.Credential(
502
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
503
+ )
504
+ http_profile = HttpProfile(
505
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
506
+ reqMethod="POST",
507
+ endpoint=g_param[OptionsDefine.Endpoint],
508
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
509
+ )
510
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
511
+ if g_param[OptionsDefine.Language]:
512
+ profile.language = g_param[OptionsDefine.Language]
513
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
514
+ client = mod.AiartClient(cred, g_param[OptionsDefine.Region], profile)
515
+ client._sdkVersion += ("_CLI_" + __version__)
516
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
517
+ model = models.ChangeClothesRequest()
518
+ model.from_json_string(json.dumps(args))
519
+ start_time = time.time()
520
+ while True:
521
+ rsp = client.ChangeClothes(model)
522
+ result = rsp.to_json_string()
523
+ try:
524
+ json_obj = json.loads(result)
525
+ except TypeError as e:
526
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
527
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
528
+ break
529
+ cur_time = time.time()
530
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
531
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
532
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
533
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
534
+ else:
535
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
536
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
537
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
538
+
539
+
488
540
  def doSubmitDrawPortraitJob(args, parsed_globals):
489
541
  g_param = parse_global_arg(parsed_globals)
490
542
 
@@ -609,6 +661,7 @@ ACTION_MAP = {
609
661
  "UploadTrainPortraitImages": doUploadTrainPortraitImages,
610
662
  "QueryDrawPortraitJob": doQueryDrawPortraitJob,
611
663
  "TextToImage": doTextToImage,
664
+ "ChangeClothes": doChangeClothes,
612
665
  "SubmitDrawPortraitJob": doSubmitDrawPortraitJob,
613
666
  "ImageToImage": doImageToImage,
614
667
 
@@ -1,5 +1,12 @@
1
1
  {
2
2
  "actions": {
3
+ "ChangeClothes": {
4
+ "document": "上传正面全身模特照和服装平铺图,生成模特换装后的图片。\n生成的换装图片分辨率和模特照分辨率一致。\n模特换装默认提供1个并发任务数,代表最多能同时处理1个已提交的任务,上一个任务处理完毕后才能开始处理下一个任务。",
5
+ "input": "ChangeClothesRequest",
6
+ "name": "模特换装",
7
+ "output": "ChangeClothesResponse",
8
+ "status": "online"
9
+ },
3
10
  "GenerateAvatar": {
4
11
  "document": "百变头像接口将根据输入的人像照片,生成风格百变的头像。\n百变头像默认提供1个并发任务数,代表最多能同时处理1个已提交的任务,上一个任务处理完毕后才能开始处理下一个任务。",
5
12
  "input": "GenerateAvatarRequest",
@@ -85,6 +92,79 @@
85
92
  "serviceShortName": "aiart"
86
93
  },
87
94
  "objects": {
95
+ "ChangeClothesRequest": {
96
+ "document": "ChangeClothes请求参数结构体",
97
+ "members": [
98
+ {
99
+ "disabled": false,
100
+ "document": "模特图片 Url。\n图片限制:单边分辨率小于3000,且大于512,转成 Base64 字符串后小于 8MB。\n输入要求:\n1、建议上传正面模特图片,至少完整露出应穿着输入指定服装的身体部位(全身、上半身或下半身),无大角度身体偏转或异常姿势。\n2、建议上传3:4比例的图片,生成效果更佳。\n3、建议模特图片中的原始服装和更换后的服装类别一致,或原始服装在身体上的覆盖范围小于等于更换后的服装(例如需要给模特换上短裤,则原始模特图片中也建议穿短裤,不建议穿长裤),否则会影响人像生成效果。\n",
101
+ "example": "无",
102
+ "member": "string",
103
+ "name": "ModelUrl",
104
+ "required": true,
105
+ "type": "string"
106
+ },
107
+ {
108
+ "disabled": false,
109
+ "document": "服装图片 Url。\n图片限制:单边分辨率小于3000,大于512,转成 Base64 字符串后小于 8MB。\n输入要求:\n建议上传服装完整的正面平铺图片,仅包含1个服装主体,服装类型支持上衣、下装、连衣裙,三选一。算法将根据输入的图片,结合服装图片给模特换装。",
110
+ "example": "无",
111
+ "member": "string",
112
+ "name": "ClothesUrl",
113
+ "required": true,
114
+ "type": "string"
115
+ },
116
+ {
117
+ "disabled": false,
118
+ "document": "服装类型,需要和服装图片保持一致。\n取值:\nUpper-body:上衣\nLower-body:下装\nDress:连衣裙",
119
+ "example": "无",
120
+ "member": "string",
121
+ "name": "ClothesType",
122
+ "required": true,
123
+ "type": "string"
124
+ },
125
+ {
126
+ "disabled": false,
127
+ "document": "为生成结果图添加标识的开关,默认为1。\n1:添加标识。\n0:不添加标识。\n其他数值:默认按1处理。\n建议您使用显著标识来提示结果图使用了 AI 绘画技术,是 AI 生成的图片。",
128
+ "example": "无",
129
+ "member": "int64",
130
+ "name": "LogoAdd",
131
+ "required": false,
132
+ "type": "int"
133
+ },
134
+ {
135
+ "disabled": false,
136
+ "document": "返回图像方式(base64 或 url) ,二选一,默认为 base64。url 有效期为1小时。\n生成图分辨率较大时建议选择 url,使用 base64 可能因图片过大导致返回失败。",
137
+ "example": "base64",
138
+ "member": "string",
139
+ "name": "RspImgType",
140
+ "required": false,
141
+ "type": "string"
142
+ }
143
+ ],
144
+ "type": "object"
145
+ },
146
+ "ChangeClothesResponse": {
147
+ "document": "ChangeClothes返回参数结构体",
148
+ "members": [
149
+ {
150
+ "disabled": false,
151
+ "document": "根据入参 RspImgType 填入不同,返回不同的内容。\n如果传入 base64 则返回生成图 Base64 编码。\n如果传入 url 则返回的生成图 URL , 有效期1小时,请及时保存。",
152
+ "example": "无",
153
+ "member": "string",
154
+ "name": "ResultImage",
155
+ "output_required": true,
156
+ "type": "string",
157
+ "value_allowed_null": false
158
+ },
159
+ {
160
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
161
+ "member": "string",
162
+ "name": "RequestId",
163
+ "type": "string"
164
+ }
165
+ ],
166
+ "type": "object"
167
+ },
88
168
  "Filter": {
89
169
  "document": "训练图像质量过滤开关配置。\n支持开启或关闭对训练图像分辨率下限、脸部区域大小、脸部遮挡、脸部角度的过滤,默认开启以上过滤。\n如果训练图像内包含多人脸或无人脸、和 Base 人像不为同一人也将被过滤,不可关闭该过滤条件。\n建议:关闭以上过滤可能导致写真生成效果受损,建议使用单人、正脸、脸部清晰、无遮挡、无夸张表情、脸部区域占比较大的图像进行训练。",
90
170
  "members": [
@@ -1,5 +1,13 @@
1
1
  {
2
2
  "actions": {
3
+ "ChangeClothes": [
4
+ {
5
+ "document": "",
6
+ "input": "POST / HTTP/1.1\nHost: aiart.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ChangeClothes\n<公共请求参数>\n\n{\n \"ModelUrl\": \"https://xxx.com/test.jpg\",\n \"ClothesUrl\": \"https://xxx.com/test.jpg\",\n \"ClothesType\": \"Upper-body\",\n \"RspImgType\": \"url\"\n}",
7
+ "output": "{\n \"Response\": {\n \"RequestId\": \"0d0728ed-f777-4861-aa4b-5a6167daa0b6\",\n \"ResultImage\": \"https://result.jpg\"\n }\n}",
8
+ "title": "成功"
9
+ }
10
+ ],
3
11
  "GenerateAvatar": [
4
12
  {
5
13
  "document": "",
@@ -2727,19 +2727,19 @@
2727
2727
  },
2728
2728
  {
2729
2729
  "disabled": false,
2730
- "document": "说话人id, 说话人唯一标识",
2731
- "example": "dasdagfdgddsdsada",
2730
+ "document": "音频数据, base64 编码, 音频时长不能超过30s,数据大小不超过2M\t",
2731
+ "example": "",
2732
2732
  "member": "string",
2733
- "name": "VoicePrintId",
2733
+ "name": "Data",
2734
2734
  "required": true,
2735
2735
  "type": "string"
2736
2736
  },
2737
2737
  {
2738
2738
  "disabled": false,
2739
- "document": "音频数据, base64 编码, 音频时长不能超过30s,数据大小不超过2M\t",
2740
- "example": "",
2739
+ "document": "说话人id, 说话人唯一标识",
2740
+ "example": "dasdagfdgddsdsada",
2741
2741
  "member": "string",
2742
- "name": "Data",
2742
+ "name": "VoicePrintId",
2743
2743
  "required": true,
2744
2744
  "type": "string"
2745
2745
  }
@@ -43,7 +43,7 @@
43
43
  "status": "online"
44
44
  },
45
45
  "CloneLoadBalancer": {
46
- "document": "克隆负载均衡实例,根据指定的负载均衡实例,复制出相同规则和绑定关系的负载均衡实例。克隆接口为异步操作,克隆的数据以调用CloneLoadBalancer时为准,如果调用CloneLoadBalancer后克隆CLB发生变化,变化规则不会克隆。\n\n注:查询实例创建状态可以根据返回值中的requestId访问[DescribeTaskStatus](https://cloud.tencent.com/document/product/214/30683)接口\n\n限制说明:\n实例属性维度限制\n 仅支持克隆按量计费实例,不支持包年包月实例。\n 不支持克隆未关联实例计费项的 CLB。\n 不支持克隆传统型负载均衡实例和高防 CLB。\n 不支持克隆基础网络类型的实例。\n 不支持克隆 IPv6、IPv6 NAT64 版本以及混绑的实例。\n 个性化配置、重定向配置、安全组默认放通开关的配置将不会被克隆,需重新配置。\n 执行克隆操作前,请确保实例上没有使用已过期证书,否则会导致克隆失败。\n监听器维度限制\n 不支持克隆监听器为 QUIC 类型和端口段的实例。\n 不支持监听器为 TCP_SSL 的内网型负载均衡的实例。\n 不支持克隆七层监听器没有转发规则的实例。\n 当实例的监听器个数超过50个时,不支持克隆。\n后端服务维度限制\n 不支持克隆绑定的后端服务类型为目标组和 SCF 云函数的实例。\n\n通过接口调用:\nBGP带宽包必须传带宽包id\n独占集群克隆必须传对应的参数,否则按共享型创建\n功能内测中,请提交 [内测申请](https://cloud.tencent.com/apply/p/1akuvsmyn0g)。",
46
+ "document": "克隆负载均衡实例,根据指定的负载均衡实例,复制出相同规则和绑定关系的负载均衡实例。克隆接口为异步操作,克隆的数据以调用CloneLoadBalancer时为准,如果调用CloneLoadBalancer后克隆CLB发生变化,变化规则不会克隆。\n\n注:查询实例创建状态可以根据返回值中的requestId访问[DescribeTaskStatus](https://cloud.tencent.com/document/product/214/30683)接口\n\n限制说明\n实例属性维度限制:\n- 支持克隆网络计费模式为按量计费与包年包月的实例,包年包月实例克隆后的新实例网络计费模式会转换为按小时带宽计费,其带宽、规格与原实例设置保持一致。\n- 不支持克隆未关联实例计费项的 CLB。\n- 不支持克隆传统型负载均衡实例和高防 CLB。\n- 不支持克隆基础网络类型的实例。\n- 不支持克隆 Anycast 类型的实例。\n- 不支持克隆 IPv6 NAT64 版本的实例。\n- 不支持克隆被封禁或冻结的实例。\n- 执行克隆操作前,请确保实例上没有使用已过期证书,否则会导致克隆失败。\n配额维度限制:\n- 当实例的监听器个数超过 50 个时,不支持克隆。\n- 当共享型实例的公网带宽上限超过 2G 时,不支持克隆。\n\n通过接口调用:\nBGP带宽包必须传带宽包id\n独占集群克隆必须传对应的参数,否则按共享型创建\n功能内测中,请提交 [内测申请](https://cloud.tencent.com/apply/p/1akuvsmyn0g)。",
47
47
  "input": "CloneLoadBalancerRequest",
48
48
  "name": "克隆负载均衡实例",
49
49
  "output": "CloneLoadBalancerResponse",
@@ -6747,6 +6747,7 @@
6747
6747
  "example": "[]",
6748
6748
  "member": "string",
6749
6749
  "name": "SuccessInstanceIds",
6750
+ "output_required": true,
6750
6751
  "type": "list",
6751
6752
  "value_allowed_null": false
6752
6753
  },
@@ -6756,6 +6757,7 @@
6756
6757
  "example": "[]",
6757
6758
  "member": "string",
6758
6759
  "name": "FailedInstanceIds",
6760
+ "output_required": true,
6759
6761
  "type": "list",
6760
6762
  "value_allowed_null": false
6761
6763
  },
@@ -1930,6 +1930,15 @@
1930
1930
  "name": "DnssecConflictMode",
1931
1931
  "required": false,
1932
1932
  "type": "string"
1933
+ },
1934
+ {
1935
+ "disabled": false,
1936
+ "document": "记录分组 Id。可以通过接口 DescribeRecordGroupList 接口 GroupId 字段获取。",
1937
+ "example": "123",
1938
+ "member": "uint64",
1939
+ "name": "GroupId",
1940
+ "required": false,
1941
+ "type": "int"
1933
1942
  }
1934
1943
  ],
1935
1944
  "type": "object"
@@ -2662,8 +2662,8 @@
2662
2662
  "members": [
2663
2663
  {
2664
2664
  "disabled": false,
2665
- "document": "实例 ID 列表,当前最多支持 1 个。",
2666
- "example": "[\"lhins-f4s49nap\\r\\n\"]",
2665
+ "document": "实例 ID 列表。可通过[DescribeInstances](https://cloud.tencent.com/document/api/1207/47573)接口返回值中的InstanceId获取。 当前最多支持1个。",
2666
+ "example": "[\"lhins-f4s49nap\"]",
2667
2667
  "member": "string",
2668
2668
  "name": "InstanceIds",
2669
2669
  "required": true,
@@ -2681,7 +2681,7 @@
2681
2681
  "example": "1",
2682
2682
  "member": "int64",
2683
2683
  "name": "TotalCount",
2684
- "required": true,
2684
+ "output_required": true,
2685
2685
  "type": "int",
2686
2686
  "value_allowed_null": false
2687
2687
  },
@@ -2691,7 +2691,7 @@
2691
2691
  "example": "无",
2692
2692
  "member": "BlueprintInstance",
2693
2693
  "name": "BlueprintInstanceSet",
2694
- "required": true,
2694
+ "output_required": true,
2695
2695
  "type": "list",
2696
2696
  "value_allowed_null": false
2697
2697
  },
@@ -2737,7 +2737,7 @@
2737
2737
  {
2738
2738
  "disabled": false,
2739
2739
  "document": "过滤器列表。\n<li>blueprint-id</li>按照【镜像 ID】进行过滤。\n类型:String\n必选:否\n<li>blueprint-type</li>按照【镜像类型】进行过滤。\n取值:APP_OS(应用镜像 );PURE_OS(系统镜像);DOCKER(Docker容器镜像);PRIVATE(自定义镜像);SHARED(共享镜像)。\n类型:String\n必选:否\n<li>platform-type</li>按照【镜像平台类型】进行过滤。\n取值: LINUX_UNIX(Linux/Unix系统);WINDOWS(Windows 系统)。\n类型:String\n必选:否\n<li>blueprint-name</li>按照【镜像名称】进行过滤。\n类型:String\n必选:否\n<li>blueprint-state</li>按照【镜像状态】进行过滤。\n类型:String\n必选:否\n<li>scene-id</li>按照【使用场景Id】进行过滤。\n类型:String\n必选:否\n\n每次请求的 Filters 的上限为 10,Filter.Values 的上限为 100。参数不支持同时指定 BlueprintIds 和 Filters 。",
2740
- "example": " [ { \"Name\": \"blueprint-type\", \"",
2740
+ "example": "",
2741
2741
  "member": "Filter",
2742
2742
  "name": "Filters",
2743
2743
  "required": false,
@@ -2755,15 +2755,17 @@
2755
2755
  "example": "1",
2756
2756
  "member": "int64",
2757
2757
  "name": "TotalCount",
2758
+ "output_required": true,
2758
2759
  "type": "int",
2759
2760
  "value_allowed_null": false
2760
2761
  },
2761
2762
  {
2762
2763
  "disabled": false,
2763
2764
  "document": "镜像详细信息列表。",
2764
- "example": " [ { \"BlueprintId\": \"lhbp-5e8807sc\",",
2765
+ "example": "",
2765
2766
  "member": "Blueprint",
2766
2767
  "name": "BlueprintSet",
2768
+ "output_required": true,
2767
2769
  "type": "list",
2768
2770
  "value_allowed_null": false
2769
2771
  },
@@ -4113,7 +4115,7 @@
4113
4115
  {
4114
4116
  "disabled": false,
4115
4117
  "document": "实例 ID 列表。每次请求批量实例的上限为 100。可通过[DescribeInstances](https://cloud.tencent.com/document/api/1207/47573)接口返回值中的InstanceId获取。",
4116
- "example": "[\"lhins-ruy9d2tw\\n\"]",
4118
+ "example": "[\"lhins-ruy9d2tw\"]",
4117
4119
  "member": "string",
4118
4120
  "name": "InstanceIds",
4119
4121
  "required": true,
@@ -4271,7 +4273,7 @@
4271
4273
  {
4272
4274
  "disabled": false,
4273
4275
  "document": "实例 ID 列表。每次请求批量实例的上限为 100。可通过[DescribeInstances](https://cloud.tencent.com/document/api/1207/47573)接口返回值中的InstanceId获取。",
4274
- "example": "[\"lhins-ruy9d2tw\\n\",\"lhins-xusdke45\\n\"]",
4276
+ "example": "[\"lhins-ruy9d2tw\",\"lhins-xusdke45\"]",
4275
4277
  "member": "string",
4276
4278
  "name": "InstanceIds",
4277
4279
  "required": false,
@@ -4307,7 +4309,7 @@
4307
4309
  "example": "2",
4308
4310
  "member": "int64",
4309
4311
  "name": "TotalCount",
4310
- "required": true,
4312
+ "output_required": true,
4311
4313
  "type": "int",
4312
4314
  "value_allowed_null": false
4313
4315
  },
@@ -4317,7 +4319,7 @@
4317
4319
  "example": "无",
4318
4320
  "member": "InstanceReturnable",
4319
4321
  "name": "InstanceReturnableSet",
4320
- "required": true,
4322
+ "output_required": true,
4321
4323
  "type": "list",
4322
4324
  "value_allowed_null": false
4323
4325
  },
@@ -5107,7 +5109,7 @@
5107
5109
  "example": "lhdisk-p1zflrif",
5108
5110
  "member": "string",
5109
5111
  "name": "DiskId",
5110
- "required": true,
5112
+ "output_required": true,
5111
5113
  "type": "string",
5112
5114
  "value_allowed_null": false
5113
5115
  },
@@ -5117,7 +5119,7 @@
5117
5119
  "example": "lhins-anxwfvxh",
5118
5120
  "member": "string",
5119
5121
  "name": "InstanceId",
5120
- "required": true,
5122
+ "output_required": true,
5121
5123
  "type": "string",
5122
5124
  "value_allowed_null": false
5123
5125
  },
@@ -5127,7 +5129,7 @@
5127
5129
  "example": "ap-guangzhou-1",
5128
5130
  "member": "string",
5129
5131
  "name": "Zone",
5130
- "required": true,
5132
+ "output_required": true,
5131
5133
  "type": "string",
5132
5134
  "value_allowed_null": false
5133
5135
  },
@@ -5137,7 +5139,7 @@
5137
5139
  "example": "disk-name",
5138
5140
  "member": "string",
5139
5141
  "name": "DiskName",
5140
- "required": true,
5142
+ "output_required": true,
5141
5143
  "type": "string",
5142
5144
  "value_allowed_null": false
5143
5145
  },
@@ -5147,7 +5149,7 @@
5147
5149
  "example": "DATA_DISK",
5148
5150
  "member": "string",
5149
5151
  "name": "DiskUsage",
5150
- "required": true,
5152
+ "output_required": true,
5151
5153
  "type": "string",
5152
5154
  "value_allowed_null": false
5153
5155
  },
@@ -5157,7 +5159,7 @@
5157
5159
  "example": "CLOUD_SSD",
5158
5160
  "member": "string",
5159
5161
  "name": "DiskType",
5160
- "required": true,
5162
+ "output_required": true,
5161
5163
  "type": "string",
5162
5164
  "value_allowed_null": false
5163
5165
  },
@@ -5167,7 +5169,7 @@
5167
5169
  "example": "PREPAID",
5168
5170
  "member": "string",
5169
5171
  "name": "DiskChargeType",
5170
- "required": true,
5172
+ "output_required": true,
5171
5173
  "type": "string",
5172
5174
  "value_allowed_null": false
5173
5175
  },
@@ -5177,7 +5179,7 @@
5177
5179
  "example": "20",
5178
5180
  "member": "int64",
5179
5181
  "name": "DiskSize",
5180
- "required": true,
5182
+ "output_required": true,
5181
5183
  "type": "int",
5182
5184
  "value_allowed_null": false
5183
5185
  },
@@ -5187,7 +5189,7 @@
5187
5189
  "example": "NOTIFY_AND_MANUAL_RENEW",
5188
5190
  "member": "string",
5189
5191
  "name": "RenewFlag",
5190
- "required": true,
5192
+ "output_required": true,
5191
5193
  "type": "string",
5192
5194
  "value_allowed_null": false
5193
5195
  },
@@ -5197,7 +5199,7 @@
5197
5199
  "example": "UNATTACHED",
5198
5200
  "member": "string",
5199
5201
  "name": "DiskState",
5200
- "required": true,
5202
+ "output_required": true,
5201
5203
  "type": "string",
5202
5204
  "value_allowed_null": false
5203
5205
  },
@@ -5207,7 +5209,7 @@
5207
5209
  "example": "False",
5208
5210
  "member": "bool",
5209
5211
  "name": "Attached",
5210
- "required": true,
5212
+ "output_required": true,
5211
5213
  "type": "bool",
5212
5214
  "value_allowed_null": false
5213
5215
  },
@@ -5217,7 +5219,7 @@
5217
5219
  "example": "False",
5218
5220
  "member": "bool",
5219
5221
  "name": "DeleteWithInstance",
5220
- "required": true,
5222
+ "output_required": true,
5221
5223
  "type": "bool",
5222
5224
  "value_allowed_null": false
5223
5225
  },
@@ -5227,7 +5229,7 @@
5227
5229
  "example": "CreateDisks",
5228
5230
  "member": "string",
5229
5231
  "name": "LatestOperation",
5230
- "required": true,
5232
+ "output_required": true,
5231
5233
  "type": "string",
5232
5234
  "value_allowed_null": false
5233
5235
  },
@@ -5237,7 +5239,7 @@
5237
5239
  "example": "SUCCESS",
5238
5240
  "member": "string",
5239
5241
  "name": "LatestOperationState",
5240
- "required": true,
5242
+ "output_required": true,
5241
5243
  "type": "string",
5242
5244
  "value_allowed_null": false
5243
5245
  },
@@ -5247,7 +5249,7 @@
5247
5249
  "example": "b786faac-d27b-4f70-a52e-3ae725e0f639",
5248
5250
  "member": "string",
5249
5251
  "name": "LatestOperationRequestId",
5250
- "required": true,
5252
+ "output_required": true,
5251
5253
  "type": "string",
5252
5254
  "value_allowed_null": false
5253
5255
  },
@@ -5257,7 +5259,7 @@
5257
5259
  "example": "2021-08-25T08:50:57Z",
5258
5260
  "member": "datetime_iso",
5259
5261
  "name": "CreatedTime",
5260
- "required": true,
5262
+ "output_required": true,
5261
5263
  "type": "string",
5262
5264
  "value_allowed_null": true
5263
5265
  },
@@ -5267,7 +5269,7 @@
5267
5269
  "example": "2021-08-25T08:50:57Z",
5268
5270
  "member": "datetime_iso",
5269
5271
  "name": "ExpiredTime",
5270
- "required": true,
5272
+ "output_required": true,
5271
5273
  "type": "string",
5272
5274
  "value_allowed_null": true
5273
5275
  },
@@ -5277,7 +5279,7 @@
5277
5279
  "example": "2021-08-25T08:50:57Z",
5278
5280
  "member": "datetime_iso",
5279
5281
  "name": "IsolatedTime",
5280
- "required": true,
5282
+ "output_required": true,
5281
5283
  "type": "string",
5282
5284
  "value_allowed_null": true
5283
5285
  },
@@ -5287,7 +5289,7 @@
5287
5289
  "example": "1",
5288
5290
  "member": "int64",
5289
5291
  "name": "DiskBackupCount",
5290
- "required": true,
5292
+ "output_required": true,
5291
5293
  "type": "int",
5292
5294
  "value_allowed_null": false
5293
5295
  },
@@ -5297,7 +5299,7 @@
5297
5299
  "example": "1",
5298
5300
  "member": "int64",
5299
5301
  "name": "DiskBackupQuota",
5300
- "required": true,
5302
+ "output_required": true,
5301
5303
  "type": "int",
5302
5304
  "value_allowed_null": false
5303
5305
  }
@@ -8250,7 +8252,7 @@
8250
8252
  {
8251
8253
  "disabled": false,
8252
8254
  "document": "实例 ID 列表。每次请求批量实例的上限为 100。可通过[DescribeInstances](https://cloud.tencent.com/document/api/1207/47573)接口返回值中的InstanceId获取。",
8253
- "example": "[\"lhins-ruy9d2tw\\n\",\"lhins-rusdke45\\n\"]",
8255
+ "example": "[\"lhins-ruy9d2tw\",\"lhins-rusdke45\"]",
8254
8256
  "member": "string",
8255
8257
  "name": "InstanceIds",
8256
8258
  "required": true,
@@ -196,15 +196,15 @@
196
196
  {
197
197
  "document": "",
198
198
  "input": "https://lighthouse.tencentcloudapi.com/?Action=DescribeBlueprintInstances\n&InstanceIds.0=lhins-f4s49nap\n&<公共请求参数>",
199
- "output": "{\n \"Response\": {\n \"TotalCount\": 1,\n \"BlueprintInstanceSet\": [\n {\n \"InstanceId\": \"lhins-aaaabbbb\",\n \"Blueprint\": {\n \"BlueprintId\": \"lhbp-5e8807sc\",\n \"DisplayTitle\": \"wordpress\",\n \"DisplayVersion\": \"5.3.2\",\n \"Description\": \"个人blog建站\",\n \"OsName\": \"CentOS-7.6-64bit\",\n \"Platform\": \"CENTOS\",\n \"PlatformType\": \"LINUX_UNIX\",\n \"BlueprintName\": \"my-blueprint\",\n \"BlueprintType\": \"APP_OS\",\n \"ImageUrl\": \"http://www.wordpress.com/image\",\n \"RequiredMemorySize\": 2,\n \"RequiredSystemDiskSize\": 10,\n \"BlueprintState\": \"NORMAL\",\n \"SupportAutomationTools\": true,\n \"CreatedTime\": \"2020-09-22T00:00:00+00:00\",\n \"ImageId\": \"img-f82x5lxe\"\n },\n \"SoftwareSet\": [\n {\n \"Name\": \"wordpress\",\n \"Version\": \"5.3.2\",\n \"ImageUrl\": \"\",\n \"InstallDir\": \"/usr/local/lighthouse/softwares/wordpress\",\n \"DetailSet\": [\n {\n \"Key\": \"IndexUrl\",\n \"Title\": \"首页地址\",\n \"Value\": \"http://xxx.xxx.xxx.xxx\"\n }\n ]\n }\n ]\n }\n ],\n \"RequestId\": \"989f74ea-567c-4c99-a24e-7bc200cf679b\"\n }\n}",
199
+ "output": "{\n \"Response\": {\n \"TotalCount\": 1,\n \"BlueprintInstanceSet\": [\n {\n \"InstanceId\": \"lhins-f4s49nap\",\n \"Blueprint\": {\n \"BlueprintId\": \"lhbp-lf6jlx98\",\n \"DisplayTitle\": \"宝塔Linux面板\",\n \"DisplayVersion\": \"8.1.0 腾讯云专享版\",\n \"BlueprintName\": \"btpanel_exclusive\",\n \"Description\": \"宝塔Linux面板(BT-Panel)是一款简单好用的服务器运维管理面板,支持一键LAMP/LNMP/集群/监控/网站/FTP/数据库/JAVA等100多项服务器管理功能,能够极大提升运维管理效率。宝塔面板腾讯云专享版由腾讯云与堡塔公司联合开发,与普通版相比,专享版默认集成腾讯云COSFS、CDN和DNS解析插件,让用户更便捷的使用宝塔面板对腾讯云产品进行管理和操作。该镜像基于OpenCloudOS 9操作系统。\",\n \"OsName\": \"OpenCloudOS 9\",\n \"Platform\": \"OPENCLOUDOS\",\n \"PlatformType\": \"LINUX_UNIX\",\n \"BlueprintType\": \"APP_OS\",\n \"ImageUrl\": \"https://cloudcache.tencent-cloud.com/open_proj/proj_qcloud_v2/tc-console/tea-static-lighthouse/src/styles/slice/bt-panel.svg\",\n \"RequiredSystemDiskSize\": 20,\n \"RequiredMemorySize\": 1,\n \"BlueprintState\": \"NORMAL\",\n \"SupportAutomationTools\": true,\n \"ImageId\": \"\",\n \"CommunityUrl\": \"https://www.bt.cn\",\n \"GuideUrl\": \"https://cloud.tencent.com/document/product/1207/47425\",\n \"SceneIdSet\": [\n \"lhsc-3bzsddow\"\n ],\n \"DockerVersion\": null,\n \"BlueprintShared\": false,\n \"CreatedTime\": \"2024-05-08T03:43:06Z\"\n },\n \"SoftwareSet\": [\n {\n \"Name\": \"宝塔Linux面板\",\n \"Version\": \"8.1.0 腾讯云专享版\",\n \"ImageUrl\": \"https://imgcache.qq.com/open_proj/proj_qcloud_v2/tc-console/tea-static-lighthouse/src/styles/slice/bt-panel.svg\",\n \"InstallDir\": \"/www\",\n \"DetailSet\": [\n {\n \"Key\": \"BTPanelIndexUrl\",\n \"Title\": \"面板首页地址\",\n \"Value\": \"http://1.13.251.147:面板端口/tencentcloud\"\n },\n {\n \"Key\": \"BTPanelPort\",\n \"Title\": \"面板端口\",\n \"Value\": \"默认为8888,您可以在登录面板后修改面板端口\"\n },\n {\n \"Key\": \"BTPanelCredential\",\n \"Title\": \"用户名与密码\",\n \"Value\": \"sudo /etc/init.d/bt default\"\n }\n ]\n }\n ]\n }\n ],\n \"RequestId\": \"128d0517-4eb0-4301-868c-650eaeac5556\"\n }\n}",
200
200
  "title": "查询镜像实例信息"
201
201
  }
202
202
  ],
203
203
  "DescribeBlueprints": [
204
204
  {
205
205
  "document": "查询镜像信息",
206
- "input": "POST / HTTP/1.1\nHost: lighthouse.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeBlueprints\n<公共请求参数>\n\n{\n \"BlueprintIds\": [\n \"lhbp-5e8807sc\"\n ]\n}",
207
- "output": "{\n \"Response\": {\n \"TotalCount\": 1,\n \"BlueprintSet\": [\n {\n \"BlueprintId\": \"lhbp-5e8807sc\",\n \"DisplayTitle\": \"wordpress\",\n \"DisplayVersion\": \"5.3.2\",\n \"Description\": \"个人blog建站\",\n \"OsName\": \"CentOS-7.6-64bit\",\n \"Platform\": \"CENTOS\",\n \"PlatformType\": \"LINUX_UNIX\",\n \"BlueprintType\": \"APP_OS\",\n \"ImageUrl\": \"http://www.wordpress.com/image\",\n \"RequiredSystemDiskSize\": 50,\n \"BlueprintState\": \"NORMAL\",\n \"CreatedTime\": \"2020-04-28T03:46:09Z\",\n \"BlueprintName\": \"Wordpress\",\n \"SupportAutomationTools\": true,\n \"RequiredMemorySize\": 1,\n \"ImageId\": \"\",\n \"SceneIdSet\": [],\n \"CommunityUrl\": \"CommunityUrl_test\",\n \"GuideUrl\": \"GuideUrl_test\"\n }\n ],\n \"RequestId\": \"3df9cd92-cec1-4864-a2a1-358084f41551\"\n }\n}",
206
+ "input": "POST / HTTP/1.1\nHost: lighthouse.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeBlueprints\n<公共请求参数>\n\n{\n \"BlueprintIds\": [\n \"lhbp-lf6jlx98\"\n ]\n}",
207
+ "output": "{\n \"Response\": {\n \"TotalCount\": 1,\n \"BlueprintSet\": [\n {\n \"BlueprintId\": \"lhbp-lf6jlx98\",\n \"DisplayTitle\": \"宝塔Linux面板\",\n \"DisplayVersion\": \"8.1.0 腾讯云专享版\",\n \"BlueprintName\": \"btpanel_exclusive\",\n \"Description\": \"宝塔Linux面板(BT-Panel)是一款简单好用的服务器运维管理面板,支持一键LAMP/LNMP/集群/监控/网站/FTP/数据库/JAVA等100多项服务器管理功能,能够极大提升运维管理效率。宝塔面板腾讯云专享版由腾讯云与堡塔公司联合开发,与普通版相比,专享版默认集成腾讯云COSFS、CDN和DNS解析插件,让用户更便捷的使用宝塔面板对腾讯云产品进行管理和操作。该镜像基于OpenCloudOS 9操作系统。\",\n \"OsName\": \"OpenCloudOS 9\",\n \"Platform\": \"OPENCLOUDOS\",\n \"PlatformType\": \"LINUX_UNIX\",\n \"BlueprintType\": \"APP_OS\",\n \"ImageUrl\": \"https://cloudcache.tencent-cloud.com/open_proj/proj_qcloud_v2/tc-console/tea-static-lighthouse/src/styles/slice/bt-panel.svg\",\n \"RequiredSystemDiskSize\": 20,\n \"RequiredMemorySize\": 1,\n \"BlueprintState\": \"NORMAL\",\n \"SupportAutomationTools\": true,\n \"ImageId\": \"\",\n \"CommunityUrl\": \"https://www.bt.cn\",\n \"GuideUrl\": \"https://cloud.tencent.com/document/product/1207/47425\",\n \"SceneIdSet\": [\n \"lhsc-3bzsddow\"\n ],\n \"DockerVersion\": null,\n \"BlueprintShared\": false,\n \"CreatedTime\": \"2024-05-08T03:43:06Z\"\n }\n ],\n \"RequestId\": \"817c4e56-36fc-47ff-bfb6-c4462816972b\"\n }\n}",
208
208
  "title": "查询镜像信息"
209
209
  }
210
210
  ],
@@ -3501,6 +3501,58 @@ def doListAttributeLabel(args, parsed_globals):
3501
3501
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3502
3502
 
3503
3503
 
3504
+ def doDescribeSegments(args, parsed_globals):
3505
+ g_param = parse_global_arg(parsed_globals)
3506
+
3507
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
3508
+ cred = credential.CVMRoleCredential()
3509
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
3510
+ cred = credential.STSAssumeRoleCredential(
3511
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
3512
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
3513
+ )
3514
+ 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):
3515
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
3516
+ else:
3517
+ cred = credential.Credential(
3518
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
3519
+ )
3520
+ http_profile = HttpProfile(
3521
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
3522
+ reqMethod="POST",
3523
+ endpoint=g_param[OptionsDefine.Endpoint],
3524
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
3525
+ )
3526
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
3527
+ if g_param[OptionsDefine.Language]:
3528
+ profile.language = g_param[OptionsDefine.Language]
3529
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
3530
+ client = mod.LkeClient(cred, g_param[OptionsDefine.Region], profile)
3531
+ client._sdkVersion += ("_CLI_" + __version__)
3532
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
3533
+ model = models.DescribeSegmentsRequest()
3534
+ model.from_json_string(json.dumps(args))
3535
+ start_time = time.time()
3536
+ while True:
3537
+ rsp = client.DescribeSegments(model)
3538
+ result = rsp.to_json_string()
3539
+ try:
3540
+ json_obj = json.loads(result)
3541
+ except TypeError as e:
3542
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
3543
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
3544
+ break
3545
+ cur_time = time.time()
3546
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
3547
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
3548
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
3549
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
3550
+ else:
3551
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
3552
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
3553
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3554
+
3555
+
3504
3556
  def doListRejectedQuestion(args, parsed_globals):
3505
3557
  g_param = parse_global_arg(parsed_globals)
3506
3558
 
@@ -4307,6 +4359,7 @@ ACTION_MAP = {
4307
4359
  "ListModel": doListModel,
4308
4360
  "GroupQA": doGroupQA,
4309
4361
  "ListAttributeLabel": doListAttributeLabel,
4362
+ "DescribeSegments": doDescribeSegments,
4310
4363
  "ListRejectedQuestion": doListRejectedQuestion,
4311
4364
  "ListReleaseConfigPreview": doListReleaseConfigPreview,
4312
4365
  "GetTaskStatus": doGetTaskStatus,