tccli 3.0.1328.1__py2.py3-none-any.whl → 3.0.1331.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/ccc_client.py +53 -0
- tccli/services/ccc/v20200210/api.json +105 -0
- tccli/services/ccc/v20200210/examples.json +8 -0
- tccli/services/cdn/v20180606/api.json +3 -3
- tccli/services/cdn/v20180606/examples.json +4 -4
- 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/clb/v20180317/api.json +18 -0
- tccli/services/dbbrain/v20210527/api.json +1 -0
- tccli/services/dnspod/dnspod_client.py +106 -0
- tccli/services/dnspod/v20210323/api.json +509 -2
- tccli/services/dnspod/v20210323/examples.json +17 -1
- tccli/services/emr/v20190103/api.json +1 -1
- tccli/services/ess/v20201111/api.json +13 -4
- tccli/services/essbasic/v20210526/api.json +15 -6
- tccli/services/essbasic/v20210526/examples.json +3 -3
- tccli/services/faceid/v20180301/api.json +49 -4
- 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 +106 -0
- tccli/services/ioa/v20220601/api.json +428 -0
- tccli/services/ioa/v20220601/examples.json +22 -0
- tccli/services/iotexplorer/v20190423/api.json +61 -10
- tccli/services/iotexplorer/v20190423/examples.json +1 -1
- tccli/services/lighthouse/v20200324/api.json +1 -1
- tccli/services/lke/lke_client.py +383 -12
- tccli/services/lke/v20231130/api.json +950 -24
- tccli/services/lke/v20231130/examples.json +60 -4
- tccli/services/lowcode/v20210108/api.json +41 -1
- tccli/services/lowcode/v20210108/examples.json +2 -2
- tccli/services/mps/v20190612/api.json +11 -0
- tccli/services/ocr/ocr_client.py +532 -320
- tccli/services/ocr/v20181119/api.json +651 -74
- tccli/services/ocr/v20181119/examples.json +32 -0
- 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/teo/v20220901/api.json +1 -1
- 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.1331.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1328.1.dist-info → tccli-3.0.1331.1.dist-info}/RECORD +73 -73
- {tccli-3.0.1328.1.dist-info → tccli-3.0.1331.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1328.1.dist-info → tccli-3.0.1331.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1328.1.dist-info → tccli-3.0.1331.1.dist-info}/license_files/LICENSE +0 -0
@@ -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,110 @@ 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 doDescribeSoftwareInformation(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.DescribeSoftwareInformationRequest()
|
362
|
+
model.from_json_string(json.dumps(args))
|
363
|
+
start_time = time.time()
|
364
|
+
while True:
|
365
|
+
rsp = client.DescribeSoftwareInformation(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
|
+
|
384
|
+
def doDescribeDeviceHardwareInfoList(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.IoaClient(cred, g_param[OptionsDefine.Region], profile)
|
411
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
412
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
413
|
+
model = models.DescribeDeviceHardwareInfoListRequest()
|
414
|
+
model.from_json_string(json.dumps(args))
|
415
|
+
start_time = time.time()
|
416
|
+
while True:
|
417
|
+
rsp = client.DescribeDeviceHardwareInfoList(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
|
+
|
332
436
|
def doDescribeRootAccountGroup(args, parsed_globals):
|
333
437
|
g_param = parse_global_arg(parsed_globals)
|
334
438
|
|
@@ -502,6 +606,8 @@ ACTION_MAP = {
|
|
502
606
|
"DescribeDevices": doDescribeDevices,
|
503
607
|
"CreateDLPFileDetectionTask": doCreateDLPFileDetectionTask,
|
504
608
|
"DescribeSoftCensusListByDevice": doDescribeSoftCensusListByDevice,
|
609
|
+
"DescribeSoftwareInformation": doDescribeSoftwareInformation,
|
610
|
+
"DescribeDeviceHardwareInfoList": doDescribeDeviceHardwareInfoList,
|
505
611
|
"DescribeRootAccountGroup": doDescribeRootAccountGroup,
|
506
612
|
"DescribeDLPFileDetectResult": doDescribeDLPFileDetectResult,
|
507
613
|
"DescribeAccountGroups": doDescribeAccountGroups,
|