tccli 3.0.1328.1__py2.py3-none-any.whl → 3.0.1330.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.
- tccli/__init__.py +1 -1
- tccli/services/autoscaling/v20180419/api.json +3 -3
- tccli/services/autoscaling/v20180419/examples.json +1 -1
- tccli/services/btoe/v20210514/api.json +26 -26
- tccli/services/cbs/v20170312/api.json +13 -13
- tccli/services/ccc/v20200210/api.json +36 -0
- tccli/services/cdn/v20180606/examples.json +1 -1
- tccli/services/cdwch/v20200915/api.json +3 -3
- tccli/services/cdwch/v20200915/examples.json +1 -1
- tccli/services/ckafka/v20190819/api.json +9 -0
- tccli/services/emr/v20190103/api.json +1 -1
- tccli/services/ess/v20201111/api.json +12 -3
- tccli/services/essbasic/v20210526/api.json +13 -4
- tccli/services/essbasic/v20210526/examples.json +3 -3
- tccli/services/faceid/v20180301/api.json +45 -0
- tccli/services/gs/gs_client.py +53 -0
- tccli/services/gs/v20191118/api.json +62 -9
- tccli/services/gs/v20191118/examples.json +8 -0
- tccli/services/hai/hai_client.py +110 -4
- tccli/services/hai/v20230812/api.json +105 -0
- tccli/services/hai/v20230812/examples.json +16 -0
- tccli/services/ioa/ioa_client.py +53 -0
- tccli/services/ioa/v20220601/api.json +263 -0
- tccli/services/ioa/v20220601/examples.json +8 -0
- tccli/services/iotexplorer/v20190423/api.json +54 -3
- tccli/services/lighthouse/v20200324/api.json +1 -1
- tccli/services/lke/v20231130/api.json +315 -4
- tccli/services/lke/v20231130/examples.json +4 -4
- tccli/services/mps/v20190612/api.json +11 -0
- tccli/services/ocr/v20181119/api.json +42 -2
- tccli/services/postgres/v20170312/api.json +1 -1
- tccli/services/sms/v20190711/api.json +4 -4
- tccli/services/sms/v20210111/api.json +4 -4
- tccli/services/sqlserver/v20180328/api.json +29 -2
- tccli/services/ssl/v20191205/api.json +79 -0
- tccli/services/ssl/v20191205/examples.json +6 -6
- tccli/services/tcss/tcss_client.py +57 -4
- tccli/services/tcss/v20201101/api.json +79 -0
- tccli/services/tcss/v20201101/examples.json +8 -0
- tccli/services/tke/tke_client.py +53 -0
- tccli/services/tke/v20180525/api.json +59 -1
- tccli/services/tke/v20180525/examples.json +4 -4
- tccli/services/tke/v20220501/api.json +61 -0
- tccli/services/tke/v20220501/examples.json +8 -0
- tccli/services/trtc/trtc_client.py +216 -4
- tccli/services/trtc/v20190722/api.json +430 -1
- tccli/services/trtc/v20190722/examples.json +32 -0
- tccli/services/vm/v20210922/api.json +16 -20
- tccli/services/vod/v20180717/api.json +25 -13
- tccli/services/vod/v20180717/examples.json +2 -2
- tccli/services/wedata/v20210820/api.json +4144 -447
- tccli/services/wedata/v20210820/examples.json +52 -10
- tccli/services/wedata/wedata_client.py +403 -85
- {tccli-3.0.1328.1.dist-info → tccli-3.0.1330.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1328.1.dist-info → tccli-3.0.1330.1.dist-info}/RECORD +58 -58
- {tccli-3.0.1328.1.dist-info → tccli-3.0.1330.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1328.1.dist-info → tccli-3.0.1330.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1328.1.dist-info → tccli-3.0.1330.1.dist-info}/license_files/LICENSE +0 -0
@@ -1898,6 +1898,16 @@
|
|
1898
1898
|
"output_required": true,
|
1899
1899
|
"type": "string",
|
1900
1900
|
"value_allowed_null": true
|
1901
|
+
},
|
1902
|
+
{
|
1903
|
+
"disabled": false,
|
1904
|
+
"document": "当次token中所有用户活体视频的COS存储路径,仅当您开启数据存储服务且“IsReturnAllVideo”入参取值为true 时返回。\n注意:此字段可能返回 null,表示取不到有效值。",
|
1905
|
+
"example": "无",
|
1906
|
+
"member": "VideoDetailData",
|
1907
|
+
"name": "LivenessVideos",
|
1908
|
+
"output_required": false,
|
1909
|
+
"type": "list",
|
1910
|
+
"value_allowed_null": true
|
1901
1911
|
}
|
1902
1912
|
],
|
1903
1913
|
"usage": "out"
|
@@ -2229,6 +2239,15 @@
|
|
2229
2239
|
"name": "IsEncryptResponse",
|
2230
2240
|
"required": false,
|
2231
2241
|
"type": "bool"
|
2242
|
+
},
|
2243
|
+
{
|
2244
|
+
"disabled": false,
|
2245
|
+
"document": "是否需要返回认证中间过程的刷脸重试视频,默认不开启,多段视频需要存储到COS空间中,因此开启后还需要额外开启数据存储服务才可生效。详见[数据存储指引](https://cloud.tencent.com/document/product/1007/104229)。",
|
2246
|
+
"example": "false",
|
2247
|
+
"member": "bool",
|
2248
|
+
"name": "IsReturnAllVideo",
|
2249
|
+
"required": false,
|
2250
|
+
"type": "bool"
|
2232
2251
|
}
|
2233
2252
|
],
|
2234
2253
|
"type": "object"
|
@@ -5197,6 +5216,32 @@
|
|
5197
5216
|
],
|
5198
5217
|
"usage": "in"
|
5199
5218
|
},
|
5219
|
+
"VideoDetailData": {
|
5220
|
+
"document": "核身过程视频信息。",
|
5221
|
+
"members": [
|
5222
|
+
{
|
5223
|
+
"disabled": false,
|
5224
|
+
"document": "本次活体一比一请求的唯一标记。\n注意:此字段可能返回 null,表示取不到有效值。",
|
5225
|
+
"example": "AE13A3B3-F276-4C65-9BC9-1FE137851581",
|
5226
|
+
"member": "string",
|
5227
|
+
"name": "Seq",
|
5228
|
+
"output_required": false,
|
5229
|
+
"type": "string",
|
5230
|
+
"value_allowed_null": true
|
5231
|
+
},
|
5232
|
+
{
|
5233
|
+
"disabled": false,
|
5234
|
+
"document": "活体视频的base64编码。\n注意:此字段可能返回 null,表示取不到有效值。",
|
5235
|
+
"example": "/9j/4AAQSkZJRg.....s97n//2Q==",
|
5236
|
+
"member": "string",
|
5237
|
+
"name": "Video",
|
5238
|
+
"output_required": false,
|
5239
|
+
"type": "string",
|
5240
|
+
"value_allowed_null": true
|
5241
|
+
}
|
5242
|
+
],
|
5243
|
+
"usage": "out"
|
5244
|
+
},
|
5200
5245
|
"WeChatBillDetail": {
|
5201
5246
|
"document": "账单详情",
|
5202
5247
|
"members": [
|
tccli/services/gs/gs_client.py
CHANGED
@@ -1785,6 +1785,58 @@ def doResetAndroidInstances(args, parsed_globals):
|
|
1785
1785
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1786
1786
|
|
1787
1787
|
|
1788
|
+
def doDistributePhotoToAndroidInstances(args, parsed_globals):
|
1789
|
+
g_param = parse_global_arg(parsed_globals)
|
1790
|
+
|
1791
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1792
|
+
cred = credential.CVMRoleCredential()
|
1793
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1794
|
+
cred = credential.STSAssumeRoleCredential(
|
1795
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1796
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1797
|
+
)
|
1798
|
+
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):
|
1799
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1800
|
+
else:
|
1801
|
+
cred = credential.Credential(
|
1802
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1803
|
+
)
|
1804
|
+
http_profile = HttpProfile(
|
1805
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1806
|
+
reqMethod="POST",
|
1807
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
1808
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1809
|
+
)
|
1810
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1811
|
+
if g_param[OptionsDefine.Language]:
|
1812
|
+
profile.language = g_param[OptionsDefine.Language]
|
1813
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1814
|
+
client = mod.GsClient(cred, g_param[OptionsDefine.Region], profile)
|
1815
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1816
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1817
|
+
model = models.DistributePhotoToAndroidInstancesRequest()
|
1818
|
+
model.from_json_string(json.dumps(args))
|
1819
|
+
start_time = time.time()
|
1820
|
+
while True:
|
1821
|
+
rsp = client.DistributePhotoToAndroidInstances(model)
|
1822
|
+
result = rsp.to_json_string()
|
1823
|
+
try:
|
1824
|
+
json_obj = json.loads(result)
|
1825
|
+
except TypeError as e:
|
1826
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1827
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1828
|
+
break
|
1829
|
+
cur_time = time.time()
|
1830
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1831
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1832
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1833
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1834
|
+
else:
|
1835
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1836
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1837
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1838
|
+
|
1839
|
+
|
1788
1840
|
def doStartPublishStreamToCSS(args, parsed_globals):
|
1789
1841
|
g_param = parse_global_arg(parsed_globals)
|
1790
1842
|
|
@@ -3754,6 +3806,7 @@ ACTION_MAP = {
|
|
3754
3806
|
"DescribeAndroidInstances": doDescribeAndroidInstances,
|
3755
3807
|
"UploadFilesToAndroidInstances": doUploadFilesToAndroidInstances,
|
3756
3808
|
"ResetAndroidInstances": doResetAndroidInstances,
|
3809
|
+
"DistributePhotoToAndroidInstances": doDistributePhotoToAndroidInstances,
|
3757
3810
|
"StartPublishStreamToCSS": doStartPublishStreamToCSS,
|
3758
3811
|
"DescribeAndroidApps": doDescribeAndroidApps,
|
3759
3812
|
"ModifyAndroidInstanceInformation": doModifyAndroidInstanceInformation,
|
@@ -57,7 +57,7 @@
|
|
57
57
|
"status": "online"
|
58
58
|
},
|
59
59
|
"CreateAndroidInstanceLabel": {
|
60
|
-
"document": "
|
60
|
+
"document": "创建安卓实例标签",
|
61
61
|
"input": "CreateAndroidInstanceLabelRequest",
|
62
62
|
"name": "创建安卓实例标签",
|
63
63
|
"output": "CreateAndroidInstanceLabelResponse",
|
@@ -127,7 +127,7 @@
|
|
127
127
|
"status": "online"
|
128
128
|
},
|
129
129
|
"DeleteAndroidInstanceLabel": {
|
130
|
-
"document": "
|
130
|
+
"document": "删除安卓实例标签",
|
131
131
|
"input": "DeleteAndroidInstanceLabelRequest",
|
132
132
|
"name": "删除安卓实例标签",
|
133
133
|
"output": "DeleteAndroidInstanceLabelResponse",
|
@@ -155,7 +155,7 @@
|
|
155
155
|
"status": "online"
|
156
156
|
},
|
157
157
|
"DescribeAndroidInstanceLabels": {
|
158
|
-
"document": "
|
158
|
+
"document": "查询安卓实例标签",
|
159
159
|
"input": "DescribeAndroidInstanceLabelsRequest",
|
160
160
|
"name": "查询安卓实例标签",
|
161
161
|
"output": "DescribeAndroidInstanceLabelsResponse",
|
@@ -217,6 +217,13 @@
|
|
217
217
|
"output": "DistributeFileToAndroidInstancesResponse",
|
218
218
|
"status": "online"
|
219
219
|
},
|
220
|
+
"DistributePhotoToAndroidInstances": {
|
221
|
+
"document": "将一张照片批量分发到多个实例的相册中,一次接口调用触发一次照片分发,一次照片分发只会从公网下载一次,然后照片会走内网分发到实例列表中的实例。",
|
222
|
+
"input": "DistributePhotoToAndroidInstancesRequest",
|
223
|
+
"name": "分发照片到安卓实例相册",
|
224
|
+
"output": "DistributePhotoToAndroidInstancesResponse",
|
225
|
+
"status": "online"
|
226
|
+
},
|
220
227
|
"EnableAndroidInstancesApp": {
|
221
228
|
"document": "批量启用安卓实例应用",
|
222
229
|
"input": "EnableAndroidInstancesAppRequest",
|
@@ -253,7 +260,7 @@
|
|
253
260
|
"status": "online"
|
254
261
|
},
|
255
262
|
"InstallAndroidInstancesAppWithURL": {
|
256
|
-
"document": "安装安卓实例应用",
|
263
|
+
"document": "通过 URL 安装安卓实例应用",
|
257
264
|
"input": "InstallAndroidInstancesAppWithURLRequest",
|
258
265
|
"name": "通过 URL 安装安卓实例应用",
|
259
266
|
"output": "InstallAndroidInstancesAppWithURLResponse",
|
@@ -302,7 +309,7 @@
|
|
302
309
|
"status": "online"
|
303
310
|
},
|
304
311
|
"ModifyAndroidInstancesLabels": {
|
305
|
-
"document": "
|
312
|
+
"document": "批量修改安卓实例的标签",
|
306
313
|
"input": "ModifyAndroidInstancesLabelsRequest",
|
307
314
|
"name": "批量修改安卓实例的标签",
|
308
315
|
"output": "ModifyAndroidInstancesLabelsResponse",
|
@@ -358,7 +365,7 @@
|
|
358
365
|
"status": "online"
|
359
366
|
},
|
360
367
|
"RestartAndroidInstancesApp": {
|
361
|
-
"document": "
|
368
|
+
"document": "重启安卓实例应用",
|
362
369
|
"input": "RestartAndroidInstancesAppRequest",
|
363
370
|
"name": "重启安卓实例应用",
|
364
371
|
"output": "RestartAndroidInstancesAppResponse",
|
@@ -393,7 +400,7 @@
|
|
393
400
|
"status": "online"
|
394
401
|
},
|
395
402
|
"StartAndroidInstances": {
|
396
|
-
"document": "
|
403
|
+
"document": "开机安卓实例",
|
397
404
|
"input": "StartAndroidInstancesRequest",
|
398
405
|
"name": "开机安卓实例",
|
399
406
|
"output": "StartAndroidInstancesResponse",
|
@@ -421,7 +428,7 @@
|
|
421
428
|
"status": "online"
|
422
429
|
},
|
423
430
|
"StopAndroidInstances": {
|
424
|
-
"document": "
|
431
|
+
"document": "关机安卓实例",
|
425
432
|
"input": "StopAndroidInstancesRequest",
|
426
433
|
"name": "关机安卓实例",
|
427
434
|
"output": "StopAndroidInstancesResponse",
|
@@ -3053,7 +3060,7 @@
|
|
3053
3060
|
},
|
3054
3061
|
{
|
3055
3062
|
"disabled": false,
|
3056
|
-
"document": "字段过滤器。Filter 的 Name 有以下值:\nName:实例名称\nUserId:实例用户ID",
|
3063
|
+
"document": "字段过滤器。Filter 的 Name 有以下值:\nName:实例名称\nUserId:实例用户ID\nHostSerialNumber:宿主机序列号\nHostServerSerialNumber:机箱序列号",
|
3057
3064
|
"example": "无",
|
3058
3065
|
"member": "Filter",
|
3059
3066
|
"name": "Filters",
|
@@ -3295,6 +3302,52 @@
|
|
3295
3302
|
],
|
3296
3303
|
"type": "object"
|
3297
3304
|
},
|
3305
|
+
"DistributePhotoToAndroidInstancesRequest": {
|
3306
|
+
"document": "DistributePhotoToAndroidInstances请求参数结构体",
|
3307
|
+
"members": [
|
3308
|
+
{
|
3309
|
+
"disabled": false,
|
3310
|
+
"document": "安卓实例 ID 列表",
|
3311
|
+
"example": "[\"cai_xxx\"]",
|
3312
|
+
"member": "string",
|
3313
|
+
"name": "AndroidInstanceIds",
|
3314
|
+
"required": true,
|
3315
|
+
"type": "list"
|
3316
|
+
},
|
3317
|
+
{
|
3318
|
+
"disabled": false,
|
3319
|
+
"document": "照片下载 URL",
|
3320
|
+
"example": "https://xxx",
|
3321
|
+
"member": "string",
|
3322
|
+
"name": "PhotoURL",
|
3323
|
+
"required": true,
|
3324
|
+
"type": "string"
|
3325
|
+
}
|
3326
|
+
],
|
3327
|
+
"type": "object"
|
3328
|
+
},
|
3329
|
+
"DistributePhotoToAndroidInstancesResponse": {
|
3330
|
+
"document": "DistributePhotoToAndroidInstances返回参数结构体",
|
3331
|
+
"members": [
|
3332
|
+
{
|
3333
|
+
"disabled": false,
|
3334
|
+
"document": "实例任务集合",
|
3335
|
+
"example": "无",
|
3336
|
+
"member": "AndroidInstanceTask",
|
3337
|
+
"name": "TaskSet",
|
3338
|
+
"output_required": true,
|
3339
|
+
"type": "list",
|
3340
|
+
"value_allowed_null": false
|
3341
|
+
},
|
3342
|
+
{
|
3343
|
+
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
3344
|
+
"member": "string",
|
3345
|
+
"name": "RequestId",
|
3346
|
+
"type": "string"
|
3347
|
+
}
|
3348
|
+
],
|
3349
|
+
"type": "object"
|
3350
|
+
},
|
3298
3351
|
"EnableAndroidInstancesAppRequest": {
|
3299
3352
|
"document": "EnableAndroidInstancesApp请求参数结构体",
|
3300
3353
|
"members": [
|
@@ -254,6 +254,14 @@
|
|
254
254
|
"title": "示例"
|
255
255
|
}
|
256
256
|
],
|
257
|
+
"DistributePhotoToAndroidInstances": [
|
258
|
+
{
|
259
|
+
"document": "示例",
|
260
|
+
"input": "POST / HTTP/1.1\nHost: gs.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DistributePhotoToAndroidInstances\n<公共请求参数>\n\n{\n \"AndroidInstanceIds\": [\n \"cai-251006279-ea99wkeEIID\",\n \"cai-251006279-ea99QMMwk3A\"\n ],\n \"PhotoURL\": \"https://test.cos.ap-nanjing.myqcloud.com/tmp/wallpaper.jpg\"\n}",
|
261
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"385f8b9c-4c2a-4d9f-8fcd-c06e8a606fe8\",\n \"TaskSet\": [\n {\n \"AndroidInstanceId\": \"cai-251006279-ea99wkeEIID\",\n \"TaskId\": \"8ab16ee3-ea89-48ab-9aaf-18871420d567\"\n },\n {\n \"AndroidInstanceId\": \"cai-251006279-ea99QMMwk3A\",\n \"TaskId\": \"4f9bd67c-6f03-46d5-86c8-19393ab9a375\"\n }\n ]\n }\n}",
|
262
|
+
"title": "示例"
|
263
|
+
}
|
264
|
+
],
|
257
265
|
"EnableAndroidInstancesApp": [
|
258
266
|
{
|
259
267
|
"document": "",
|
tccli/services/hai/hai_client.py
CHANGED
@@ -277,7 +277,7 @@ def doDescribeScenes(args, parsed_globals):
|
|
277
277
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
278
278
|
|
279
279
|
|
280
|
-
def
|
280
|
+
def doResizeInstanceDisk(args, parsed_globals):
|
281
281
|
g_param = parse_global_arg(parsed_globals)
|
282
282
|
|
283
283
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -306,11 +306,11 @@ def doRunInstances(args, parsed_globals):
|
|
306
306
|
client = mod.HaiClient(cred, g_param[OptionsDefine.Region], profile)
|
307
307
|
client._sdkVersion += ("_CLI_" + __version__)
|
308
308
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
309
|
-
model = models.
|
309
|
+
model = models.ResizeInstanceDiskRequest()
|
310
310
|
model.from_json_string(json.dumps(args))
|
311
311
|
start_time = time.time()
|
312
312
|
while True:
|
313
|
-
rsp = client.
|
313
|
+
rsp = client.ResizeInstanceDisk(model)
|
314
314
|
result = rsp.to_json_string()
|
315
315
|
try:
|
316
316
|
json_obj = json.loads(result)
|
@@ -381,6 +381,58 @@ def doDescribeRegions(args, parsed_globals):
|
|
381
381
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
382
382
|
|
383
383
|
|
384
|
+
def doRunInstances(args, parsed_globals):
|
385
|
+
g_param = parse_global_arg(parsed_globals)
|
386
|
+
|
387
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
388
|
+
cred = credential.CVMRoleCredential()
|
389
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
390
|
+
cred = credential.STSAssumeRoleCredential(
|
391
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
392
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
393
|
+
)
|
394
|
+
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):
|
395
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
396
|
+
else:
|
397
|
+
cred = credential.Credential(
|
398
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
399
|
+
)
|
400
|
+
http_profile = HttpProfile(
|
401
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
402
|
+
reqMethod="POST",
|
403
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
404
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
405
|
+
)
|
406
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
407
|
+
if g_param[OptionsDefine.Language]:
|
408
|
+
profile.language = g_param[OptionsDefine.Language]
|
409
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
410
|
+
client = mod.HaiClient(cred, g_param[OptionsDefine.Region], profile)
|
411
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
412
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
413
|
+
model = models.RunInstancesRequest()
|
414
|
+
model.from_json_string(json.dumps(args))
|
415
|
+
start_time = time.time()
|
416
|
+
while True:
|
417
|
+
rsp = client.RunInstances(model)
|
418
|
+
result = rsp.to_json_string()
|
419
|
+
try:
|
420
|
+
json_obj = json.loads(result)
|
421
|
+
except TypeError as e:
|
422
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
423
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
424
|
+
break
|
425
|
+
cur_time = time.time()
|
426
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
427
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
428
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
429
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
430
|
+
else:
|
431
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
432
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
433
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
434
|
+
|
435
|
+
|
384
436
|
def doStartInstance(args, parsed_globals):
|
385
437
|
g_param = parse_global_arg(parsed_globals)
|
386
438
|
|
@@ -485,6 +537,58 @@ def doCreateMuskPrompt(args, parsed_globals):
|
|
485
537
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
486
538
|
|
487
539
|
|
540
|
+
def doResetInstancesPassword(args, parsed_globals):
|
541
|
+
g_param = parse_global_arg(parsed_globals)
|
542
|
+
|
543
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
544
|
+
cred = credential.CVMRoleCredential()
|
545
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
546
|
+
cred = credential.STSAssumeRoleCredential(
|
547
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
548
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
549
|
+
)
|
550
|
+
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):
|
551
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
552
|
+
else:
|
553
|
+
cred = credential.Credential(
|
554
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
555
|
+
)
|
556
|
+
http_profile = HttpProfile(
|
557
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
558
|
+
reqMethod="POST",
|
559
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
560
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
561
|
+
)
|
562
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
563
|
+
if g_param[OptionsDefine.Language]:
|
564
|
+
profile.language = g_param[OptionsDefine.Language]
|
565
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
566
|
+
client = mod.HaiClient(cred, g_param[OptionsDefine.Region], profile)
|
567
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
568
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
569
|
+
model = models.ResetInstancesPasswordRequest()
|
570
|
+
model.from_json_string(json.dumps(args))
|
571
|
+
start_time = time.time()
|
572
|
+
while True:
|
573
|
+
rsp = client.ResetInstancesPassword(model)
|
574
|
+
result = rsp.to_json_string()
|
575
|
+
try:
|
576
|
+
json_obj = json.loads(result)
|
577
|
+
except TypeError as e:
|
578
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
579
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
580
|
+
break
|
581
|
+
cur_time = time.time()
|
582
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
583
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
584
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
585
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
586
|
+
else:
|
587
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
588
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
589
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
590
|
+
|
591
|
+
|
488
592
|
def doDescribeInstanceNetworkStatus(args, parsed_globals):
|
489
593
|
g_param = parse_global_arg(parsed_globals)
|
490
594
|
|
@@ -761,10 +865,12 @@ ACTION_MAP = {
|
|
761
865
|
"DescribeApplications": doDescribeApplications,
|
762
866
|
"DescribeMuskPrompts": doDescribeMuskPrompts,
|
763
867
|
"DescribeScenes": doDescribeScenes,
|
764
|
-
"
|
868
|
+
"ResizeInstanceDisk": doResizeInstanceDisk,
|
765
869
|
"DescribeRegions": doDescribeRegions,
|
870
|
+
"RunInstances": doRunInstances,
|
766
871
|
"StartInstance": doStartInstance,
|
767
872
|
"CreateMuskPrompt": doCreateMuskPrompt,
|
873
|
+
"ResetInstancesPassword": doResetInstancesPassword,
|
768
874
|
"DescribeInstanceNetworkStatus": doDescribeInstanceNetworkStatus,
|
769
875
|
"DescribeServiceLoginSettings": doDescribeServiceLoginSettings,
|
770
876
|
"InquirePriceRunInstances": doInquirePriceRunInstances,
|
@@ -70,6 +70,20 @@
|
|
70
70
|
"output": "InquirePriceRunInstancesResponse",
|
71
71
|
"status": "online"
|
72
72
|
},
|
73
|
+
"ResetInstancesPassword": {
|
74
|
+
"document": "本接口 (ResetInstancesPassword) 用于重置实例的用户密码。",
|
75
|
+
"input": "ResetInstancesPasswordRequest",
|
76
|
+
"name": "重置实例的用户密码",
|
77
|
+
"output": "ResetInstancesPasswordResponse",
|
78
|
+
"status": "online"
|
79
|
+
},
|
80
|
+
"ResizeInstanceDisk": {
|
81
|
+
"document": "本接口(ResizeInstanceDisk)用于对指定HAI实例进行扩容云硬盘操作。",
|
82
|
+
"input": "ResizeInstanceDiskRequest",
|
83
|
+
"name": "扩容实例云硬盘",
|
84
|
+
"output": "ResizeInstanceDiskResponse",
|
85
|
+
"status": "online"
|
86
|
+
},
|
73
87
|
"RunInstances": {
|
74
88
|
"document": "本接口 (RunInstances) 用于创建一个或多个指定配置的实例。",
|
75
89
|
"input": "RunInstancesRequest",
|
@@ -1497,6 +1511,97 @@
|
|
1497
1511
|
],
|
1498
1512
|
"usage": "out"
|
1499
1513
|
},
|
1514
|
+
"ResetInstancesPasswordRequest": {
|
1515
|
+
"document": "ResetInstancesPassword请求参数结构体",
|
1516
|
+
"members": [
|
1517
|
+
{
|
1518
|
+
"disabled": false,
|
1519
|
+
"document": "实例ID列表",
|
1520
|
+
"example": "['hai-2dfajzo4q']\t",
|
1521
|
+
"member": "string",
|
1522
|
+
"name": "InstanceIds",
|
1523
|
+
"required": true,
|
1524
|
+
"type": "list"
|
1525
|
+
},
|
1526
|
+
{
|
1527
|
+
"disabled": false,
|
1528
|
+
"document": "实例密码必须8-30位,推荐使用12位以上密码,不能以“/”开头,至少包含以下字符中的三种不同字符,字符种类:<br><li>小写字母:[a-z]</li><br><li>大写字母:[A-Z]</li><br><li>数字:0-9</li><br><li>特殊字符: ()\\`\\~!@#$%^&\\*-+=\\_|{}[]:;'<>,.?/</li>",
|
1529
|
+
"example": "test@11111.",
|
1530
|
+
"member": "string",
|
1531
|
+
"name": "Password",
|
1532
|
+
"required": true,
|
1533
|
+
"type": "string"
|
1534
|
+
},
|
1535
|
+
{
|
1536
|
+
"disabled": false,
|
1537
|
+
"document": "默认为False,True代表只验证接口连通性",
|
1538
|
+
"example": "False",
|
1539
|
+
"member": "bool",
|
1540
|
+
"name": "DryRun",
|
1541
|
+
"required": false,
|
1542
|
+
"type": "bool"
|
1543
|
+
}
|
1544
|
+
],
|
1545
|
+
"type": "object"
|
1546
|
+
},
|
1547
|
+
"ResetInstancesPasswordResponse": {
|
1548
|
+
"document": "ResetInstancesPassword返回参数结构体",
|
1549
|
+
"members": [
|
1550
|
+
{
|
1551
|
+
"disabled": false,
|
1552
|
+
"document": "task任务id",
|
1553
|
+
"example": "23898659",
|
1554
|
+
"member": "uint64",
|
1555
|
+
"name": "TaskId",
|
1556
|
+
"output_required": false,
|
1557
|
+
"type": "int",
|
1558
|
+
"value_allowed_null": false
|
1559
|
+
},
|
1560
|
+
{
|
1561
|
+
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
1562
|
+
"member": "string",
|
1563
|
+
"name": "RequestId",
|
1564
|
+
"type": "string"
|
1565
|
+
}
|
1566
|
+
],
|
1567
|
+
"type": "object"
|
1568
|
+
},
|
1569
|
+
"ResizeInstanceDiskRequest": {
|
1570
|
+
"document": "ResizeInstanceDisk请求参数结构体",
|
1571
|
+
"members": [
|
1572
|
+
{
|
1573
|
+
"disabled": false,
|
1574
|
+
"document": "需要扩容云盘的HAI实例ID",
|
1575
|
+
"example": "hai-0asd1",
|
1576
|
+
"member": "string",
|
1577
|
+
"name": "InstanceId",
|
1578
|
+
"required": true,
|
1579
|
+
"type": "string"
|
1580
|
+
},
|
1581
|
+
{
|
1582
|
+
"disabled": false,
|
1583
|
+
"document": "扩容云硬盘大小,单位为GB,必须大于当前云硬盘大小。",
|
1584
|
+
"example": "180",
|
1585
|
+
"member": "int64",
|
1586
|
+
"name": "DiskSize",
|
1587
|
+
"required": true,
|
1588
|
+
"type": "int"
|
1589
|
+
}
|
1590
|
+
],
|
1591
|
+
"type": "object"
|
1592
|
+
},
|
1593
|
+
"ResizeInstanceDiskResponse": {
|
1594
|
+
"document": "ResizeInstanceDisk返回参数结构体",
|
1595
|
+
"members": [
|
1596
|
+
{
|
1597
|
+
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
1598
|
+
"member": "string",
|
1599
|
+
"name": "RequestId",
|
1600
|
+
"type": "string"
|
1601
|
+
}
|
1602
|
+
],
|
1603
|
+
"type": "object"
|
1604
|
+
},
|
1500
1605
|
"RunInstancesRequest": {
|
1501
1606
|
"document": "RunInstances请求参数结构体",
|
1502
1607
|
"members": [
|
@@ -80,6 +80,22 @@
|
|
80
80
|
"title": "发货询价"
|
81
81
|
}
|
82
82
|
],
|
83
|
+
"ResetInstancesPassword": [
|
84
|
+
{
|
85
|
+
"document": "实例重置密码",
|
86
|
+
"input": "POST / HTTP/1.1\nHost: hai.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ResetInstancesPassword\n<公共请求参数>\n\n{\n \"InstanceIds\": [\n \"hai-xxxx\"\n ],\n \"DryRun\": false,\n \"Password\": \"test#123456\"\n}",
|
87
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"e188f45e-e2db-4c30-81e0-2e7a3dfa7754\",\n \"TaskId\": 232559186\n }\n}",
|
88
|
+
"title": "实例重置密码"
|
89
|
+
}
|
90
|
+
],
|
91
|
+
"ResizeInstanceDisk": [
|
92
|
+
{
|
93
|
+
"document": "",
|
94
|
+
"input": "POST / HTTP/1.1\nHost: hai.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ResizeInstanceDisk\n<公共请求参数>\n\n{\n \"InstanceId\": \"hai-iog9qa62\",\n \"DiskSize\": 180\n}",
|
95
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"1e3e3ae0-5418-a9f9-858c-9ec5589871a8\"\n }\n}",
|
96
|
+
"title": "实例扩容云盘"
|
97
|
+
}
|
98
|
+
],
|
83
99
|
"RunInstances": [
|
84
100
|
{
|
85
101
|
"document": "创建hai实例",
|
tccli/services/ioa/ioa_client.py
CHANGED
@@ -329,6 +329,58 @@ def doDescribeSoftCensusListByDevice(args, parsed_globals):
|
|
329
329
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
330
330
|
|
331
331
|
|
332
|
+
def doDescribeDeviceHardwareInfoList(args, parsed_globals):
|
333
|
+
g_param = parse_global_arg(parsed_globals)
|
334
|
+
|
335
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
336
|
+
cred = credential.CVMRoleCredential()
|
337
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
338
|
+
cred = credential.STSAssumeRoleCredential(
|
339
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
340
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
341
|
+
)
|
342
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
343
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
344
|
+
else:
|
345
|
+
cred = credential.Credential(
|
346
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
347
|
+
)
|
348
|
+
http_profile = HttpProfile(
|
349
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
350
|
+
reqMethod="POST",
|
351
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
352
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
353
|
+
)
|
354
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
355
|
+
if g_param[OptionsDefine.Language]:
|
356
|
+
profile.language = g_param[OptionsDefine.Language]
|
357
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
358
|
+
client = mod.IoaClient(cred, g_param[OptionsDefine.Region], profile)
|
359
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
360
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
361
|
+
model = models.DescribeDeviceHardwareInfoListRequest()
|
362
|
+
model.from_json_string(json.dumps(args))
|
363
|
+
start_time = time.time()
|
364
|
+
while True:
|
365
|
+
rsp = client.DescribeDeviceHardwareInfoList(model)
|
366
|
+
result = rsp.to_json_string()
|
367
|
+
try:
|
368
|
+
json_obj = json.loads(result)
|
369
|
+
except TypeError as e:
|
370
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
371
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
372
|
+
break
|
373
|
+
cur_time = time.time()
|
374
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
375
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
376
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
377
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
378
|
+
else:
|
379
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
380
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
381
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
382
|
+
|
383
|
+
|
332
384
|
def doDescribeRootAccountGroup(args, parsed_globals):
|
333
385
|
g_param = parse_global_arg(parsed_globals)
|
334
386
|
|
@@ -502,6 +554,7 @@ ACTION_MAP = {
|
|
502
554
|
"DescribeDevices": doDescribeDevices,
|
503
555
|
"CreateDLPFileDetectionTask": doCreateDLPFileDetectionTask,
|
504
556
|
"DescribeSoftCensusListByDevice": doDescribeSoftCensusListByDevice,
|
557
|
+
"DescribeDeviceHardwareInfoList": doDescribeDeviceHardwareInfoList,
|
505
558
|
"DescribeRootAccountGroup": doDescribeRootAccountGroup,
|
506
559
|
"DescribeDLPFileDetectResult": doDescribeDLPFileDetectResult,
|
507
560
|
"DescribeAccountGroups": doDescribeAccountGroups,
|