tccli 3.0.1227.1__py2.py3-none-any.whl → 3.0.1229.1__py2.py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- tccli/__init__.py +1 -1
- tccli/services/__init__.py +3 -0
- tccli/services/aiart/v20221229/api.json +12 -3
- tccli/services/cam/v20190116/api.json +25 -25
- tccli/services/cam/v20190116/examples.json +8 -8
- tccli/services/cdb/v20170320/api.json +167 -9
- tccli/services/cdb/v20170320/examples.json +2 -2
- tccli/services/cfs/v20190719/api.json +19 -0
- tccli/services/ckafka/v20190819/api.json +5 -5
- tccli/services/ckafka/v20190819/examples.json +106 -112
- tccli/services/clb/v20180317/api.json +1 -1
- tccli/services/cloudaudit/v20190319/api.json +15 -15
- tccli/services/cloudaudit/v20190319/examples.json +3 -3
- tccli/services/config/v20220802/api.json +70 -68
- tccli/services/config/v20220802/examples.json +6 -6
- tccli/services/cynosdb/cynosdb_client.py +228 -16
- tccli/services/cynosdb/v20190107/api.json +251 -0
- tccli/services/cynosdb/v20190107/examples.json +32 -0
- tccli/services/emr/v20190103/api.json +28 -22
- tccli/services/ess/v20201111/api.json +18 -0
- tccli/services/essbasic/v20210526/api.json +20 -1
- tccli/services/facefusion/v20181201/api.json +12 -6
- tccli/services/faceid/v20180301/api.json +1 -1
- tccli/services/hai/v20230812/api.json +6 -6
- tccli/services/hai/v20230812/examples.json +2 -2
- tccli/services/lke/lke_client.py +394 -23
- tccli/services/lke/v20231130/api.json +737 -4
- tccli/services/lke/v20231130/examples.json +62 -0
- tccli/services/mps/v20190612/api.json +1 -1
- tccli/services/mqtt/mqtt_client.py +118 -12
- tccli/services/mqtt/v20240516/api.json +312 -33
- tccli/services/mqtt/v20240516/examples.json +23 -13
- tccli/services/ocr/v20181119/api.json +11 -2
- tccli/services/ocr/v20181119/examples.json +6 -6
- tccli/services/privatedns/v20201028/api.json +41 -13
- tccli/services/pts/v20210728/api.json +22 -12
- tccli/services/redis/v20180412/api.json +14 -14
- tccli/services/scf/v20180416/api.json +12 -0
- tccli/services/ssl/v20191205/api.json +246 -173
- tccli/services/ssl/v20191205/examples.json +69 -69
- tccli/services/sts/v20180813/api.json +17 -11
- tccli/services/sts/v20180813/examples.json +6 -6
- tccli/services/tcr/v20190924/api.json +17 -17
- tccli/services/tdmq/tdmq_client.py +4 -57
- tccli/services/tdmq/v20200217/api.json +119 -200
- tccli/services/tdmq/v20200217/examples.json +29 -49
- tccli/services/tmt/v20180321/api.json +1 -1
- tccli/services/tmt/v20180321/examples.json +2 -2
- tccli/services/trocket/v20230308/api.json +79 -79
- tccli/services/trocket/v20230308/examples.json +8 -8
- tccli/services/trtc/v20190722/api.json +1 -1
- tccli/services/vclm/v20240523/api.json +25 -15
- tccli/services/vclm/v20240523/examples.json +2 -2
- tccli/services/vcube/__init__.py +4 -0
- tccli/services/vcube/v20220410/api.json +4168 -0
- tccli/services/vcube/v20220410/examples.json +277 -0
- tccli/services/vcube/vcube_client.py +1956 -0
- tccli/services/vod/v20180717/api.json +38 -1
- tccli/services/vod/v20180717/examples.json +13 -1
- tccli/services/vpc/v20170312/api.json +195 -148
- tccli/services/vpc/v20170312/examples.json +5 -5
- {tccli-3.0.1227.1.dist-info → tccli-3.0.1229.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1227.1.dist-info → tccli-3.0.1229.1.dist-info}/RECORD +66 -62
- {tccli-3.0.1227.1.dist-info → tccli-3.0.1229.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1227.1.dist-info → tccli-3.0.1229.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1227.1.dist-info → tccli-3.0.1229.1.dist-info}/license_files/LICENSE +0 -0
@@ -48,6 +48,14 @@
|
|
48
48
|
"title": "集成商创建企业"
|
49
49
|
}
|
50
50
|
],
|
51
|
+
"CreateDocCate": [
|
52
|
+
{
|
53
|
+
"document": "",
|
54
|
+
"input": "POST / HTTP/1.1\nHost: lke.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateDocCate\n<公共请求参数>\n\n{\n \"BotBizId\": \"1714970520775950336\",\n \"ParentBizId\": \"1733053612030808064\",\n \"Name\": \"哈哈哈哈\"\n}",
|
55
|
+
"output": "{\n \"Response\": {\n \"CanAdd\": true,\n \"CanDelete\": true,\n \"CanEdit\": true,\n \"CateBizId\": \"1734144647474577408\",\n \"RequestId\": \"39db6689-ceab-4ae7-87a9-f926774255d7\"\n }\n}",
|
56
|
+
"title": "创建Doc分类"
|
57
|
+
}
|
58
|
+
],
|
51
59
|
"CreateQA": [
|
52
60
|
{
|
53
61
|
"document": "创建问答",
|
@@ -112,6 +120,14 @@
|
|
112
120
|
"title": "删除文档"
|
113
121
|
}
|
114
122
|
],
|
123
|
+
"DeleteDocCate": [
|
124
|
+
{
|
125
|
+
"document": "",
|
126
|
+
"input": "POST / HTTP/1.1\nHost: lke.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DeleteDocCate\n<公共请求参数>\n\n{\n \"BotBizId\": \"1714970520775950336\",\n \"CateBizId\": \"1734144647474577408\"\n}",
|
127
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"4478d155-4b10-40d8-a1dd-5ea045259966\"\n }\n}",
|
128
|
+
"title": "Doc分类删除"
|
129
|
+
}
|
130
|
+
],
|
115
131
|
"DeleteQA": [
|
116
132
|
{
|
117
133
|
"document": "删除问答",
|
@@ -420,6 +436,14 @@
|
|
420
436
|
"title": "获取 WS Token"
|
421
437
|
}
|
422
438
|
],
|
439
|
+
"GroupDoc": [
|
440
|
+
{
|
441
|
+
"document": "",
|
442
|
+
"input": "POST / HTTP/1.1\nHost: lke.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: GroupDoc\n<公共请求参数>\n\n{\n \"BotBizId\": \"1714970520775950336\",\n \"BizIds\": [\n \"17341635094137912292\"\n ],\n \"CateBizId\": \"1734163509413793792\"\n}",
|
443
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"1a86bd37-eeae-427a-baad-c8aa20eb6252\"\n }\n}",
|
444
|
+
"title": "Doc分组"
|
445
|
+
}
|
446
|
+
],
|
423
447
|
"GroupQA": [
|
424
448
|
{
|
425
449
|
"document": "分组QA",
|
@@ -460,6 +484,20 @@
|
|
460
484
|
"title": "获取应用类型列表"
|
461
485
|
}
|
462
486
|
],
|
487
|
+
"ListAppKnowledgeDetail": [
|
488
|
+
{
|
489
|
+
"document": "列表查询知识库容量详情",
|
490
|
+
"input": "POST / HTTP/1.1\nHost: lke.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ListAppKnowledgeDetail\n<公共请求参数>\n\n{\n \"PageNumber\": 1,\n \"PageSize\": 10\n}",
|
491
|
+
"output": "{\n \"Response\": {\n \"List\": [],\n \"RequestId\": \"94d7732a-0b85-45a8-9f3f-2c73e750ba67\",\n \"Total\": 6\n }\n}",
|
492
|
+
"title": "列表查询知识库容量详情"
|
493
|
+
},
|
494
|
+
{
|
495
|
+
"document": "列表查询应用知识库容量使用详情",
|
496
|
+
"input": "POST / HTTP/1.1\nHost: lke.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ListAppKnowledgeDetail\n<公共请求参数>\n\n{\n \"PageNumber\": 1,\n \"PageSize\": 10\n}",
|
497
|
+
"output": "{\n \"Response\": {\n \"List\": [],\n \"RequestId\": \"99007a19-557c-43ec-9bdc-2f8587b461cf\",\n \"Total\": 0\n }\n}",
|
498
|
+
"title": "列表查询应用知识库容量使用详情"
|
499
|
+
}
|
500
|
+
],
|
463
501
|
"ListAttributeLabel": [
|
464
502
|
{
|
465
503
|
"document": "知识标签列表",
|
@@ -476,6 +514,14 @@
|
|
476
514
|
"title": "文档列表"
|
477
515
|
}
|
478
516
|
],
|
517
|
+
"ListDocCate": [
|
518
|
+
{
|
519
|
+
"document": "",
|
520
|
+
"input": "POST / HTTP/1.1\nHost: lke.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ListDocCate\n<公共请求参数>\n\n{\n \"BotBizId\": \"1714970520775950336\"\n}",
|
521
|
+
"output": "{\n \"Response\": {\n \"List\": [\n {\n \"CanAdd\": true,\n \"CanDelete\": false,\n \"CanEdit\": false,\n \"CateBizId\": \"0\",\n \"Children\": [\n {\n \"CanAdd\": false,\n \"CanDelete\": false,\n \"CanEdit\": false,\n \"CateBizId\": \"54554\",\n \"Children\": [],\n \"Name\": \"未分类\",\n \"Total\": 4\n }\n ],\n \"Name\": \"全部分类\",\n \"Total\": 4\n }\n ],\n \"RequestId\": \"b6a45aaf-571d-48bd-988d-b0063d5e1a8b\"\n }\n}",
|
522
|
+
"title": "获取Doc分类"
|
523
|
+
}
|
524
|
+
],
|
479
525
|
"ListModel": [
|
480
526
|
{
|
481
527
|
"document": "获取模型列表\n",
|
@@ -564,6 +610,14 @@
|
|
564
610
|
"title": "查询不满意回复列表"
|
565
611
|
}
|
566
612
|
],
|
613
|
+
"ListUsageCallDetail": [
|
614
|
+
{
|
615
|
+
"document": "列表查询单次调用明细",
|
616
|
+
"input": "POST / HTTP/1.1\nHost: lke.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ListUsageCallDetail\n<公共请求参数>\n\n{\n \"CallType\": \"AllCallType\",\n \"ModelName\": \"cs-normal-70b\",\n \"StartTime\": \"1723564800\",\n \"EndTime\": \"1726156799\",\n \"PageNumber\": 1,\n \"PageSize\": 10\n}",
|
617
|
+
"output": "{\n \"Response\": {\n \"List\": [\n {\n \"AppName\": \"\",\n \"CallTime\": \"1724946200\",\n \"CallType\": \"对话调用\",\n \"Id\": \"e8h_20240701_194330_474_XRMUA92T\",\n \"InputTokenUsage\": 471,\n \"ModelName\": \"精调知识大模型高级版\",\n \"OutputTokenUsage\": 886,\n \"SearchUsage\": 0,\n \"TotalTokenUsage\": 1357,\n \"UinAccount\": \"600000562455\"\n }\n ],\n \"RequestId\": \"9332ab9b-dec8-481e-87a8-af6983ac9fe7\",\n \"Total\": 1\n }\n}",
|
618
|
+
"title": "列表查询单次调用明细"
|
619
|
+
}
|
620
|
+
],
|
567
621
|
"ModifyApp": [
|
568
622
|
{
|
569
623
|
"document": "修改应用",
|
@@ -596,6 +650,14 @@
|
|
596
650
|
"title": "批量修改文档的适用范围"
|
597
651
|
}
|
598
652
|
],
|
653
|
+
"ModifyDocCate": [
|
654
|
+
{
|
655
|
+
"document": "",
|
656
|
+
"input": "POST / HTTP/1.1\nHost: lke.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifyDocCate\n<公共请求参数>\n\n{\n \"BotBizId\": \"1714970520775950336\",\n \"Name\": \"1733038\",\n \"CateBizId\": \"1733038348326273024\"\n}",
|
657
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"f28a91f9-11ec-451c-a09e-3c8552f6fd29\"\n }\n}",
|
658
|
+
"title": "修改Doc分类"
|
659
|
+
}
|
660
|
+
],
|
599
661
|
"ModifyQA": [
|
600
662
|
{
|
601
663
|
"document": "修改问答",
|
@@ -12691,7 +12691,7 @@
|
|
12691
12691
|
{
|
12692
12692
|
"disabled": false,
|
12693
12693
|
"document": "媒体质检模板标识过滤条件,长度限制:64 个字符。",
|
12694
|
-
"example": "
|
12694
|
+
"example": "\"\"",
|
12695
12695
|
"member": "string",
|
12696
12696
|
"name": "Name",
|
12697
12697
|
"required": false,
|
@@ -17,7 +17,7 @@ from tencentcloud.mqtt.v20240516 import models as models_v20240516
|
|
17
17
|
from jmespath import search
|
18
18
|
import time
|
19
19
|
|
20
|
-
def
|
20
|
+
def doCreateTopic(args, parsed_globals):
|
21
21
|
g_param = parse_global_arg(parsed_globals)
|
22
22
|
|
23
23
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -46,11 +46,11 @@ def doModifyAuthorizationPolicy(args, parsed_globals):
|
|
46
46
|
client = mod.MqttClient(cred, g_param[OptionsDefine.Region], profile)
|
47
47
|
client._sdkVersion += ("_CLI_" + __version__)
|
48
48
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
49
|
-
model = models.
|
49
|
+
model = models.CreateTopicRequest()
|
50
50
|
model.from_json_string(json.dumps(args))
|
51
51
|
start_time = time.time()
|
52
52
|
while True:
|
53
|
-
rsp = client.
|
53
|
+
rsp = client.CreateTopic(model)
|
54
54
|
result = rsp.to_json_string()
|
55
55
|
try:
|
56
56
|
json_obj = json.loads(result)
|
@@ -69,7 +69,7 @@ def doModifyAuthorizationPolicy(args, parsed_globals):
|
|
69
69
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
70
70
|
|
71
71
|
|
72
|
-
def
|
72
|
+
def doActivateDeviceCertificate(args, parsed_globals):
|
73
73
|
g_param = parse_global_arg(parsed_globals)
|
74
74
|
|
75
75
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -98,11 +98,11 @@ def doDeleteAuthorizationPolicy(args, parsed_globals):
|
|
98
98
|
client = mod.MqttClient(cred, g_param[OptionsDefine.Region], profile)
|
99
99
|
client._sdkVersion += ("_CLI_" + __version__)
|
100
100
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
101
|
-
model = models.
|
101
|
+
model = models.ActivateDeviceCertificateRequest()
|
102
102
|
model.from_json_string(json.dumps(args))
|
103
103
|
start_time = time.time()
|
104
104
|
while True:
|
105
|
-
rsp = client.
|
105
|
+
rsp = client.ActivateDeviceCertificate(model)
|
106
106
|
result = rsp.to_json_string()
|
107
107
|
try:
|
108
108
|
json_obj = json.loads(result)
|
@@ -381,7 +381,7 @@ def doRegisterDeviceCertificate(args, parsed_globals):
|
|
381
381
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
382
382
|
|
383
383
|
|
384
|
-
def
|
384
|
+
def doModifyAuthorizationPolicy(args, parsed_globals):
|
385
385
|
g_param = parse_global_arg(parsed_globals)
|
386
386
|
|
387
387
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -410,11 +410,11 @@ def doCreateTopic(args, parsed_globals):
|
|
410
410
|
client = mod.MqttClient(cred, g_param[OptionsDefine.Region], profile)
|
411
411
|
client._sdkVersion += ("_CLI_" + __version__)
|
412
412
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
413
|
-
model = models.
|
413
|
+
model = models.ModifyAuthorizationPolicyRequest()
|
414
414
|
model.from_json_string(json.dumps(args))
|
415
415
|
start_time = time.time()
|
416
416
|
while True:
|
417
|
-
rsp = client.
|
417
|
+
rsp = client.ModifyAuthorizationPolicy(model)
|
418
418
|
result = rsp.to_json_string()
|
419
419
|
try:
|
420
420
|
json_obj = json.loads(result)
|
@@ -641,6 +641,58 @@ def doDescribeInstance(args, parsed_globals):
|
|
641
641
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
642
642
|
|
643
643
|
|
644
|
+
def doDeleteAuthorizationPolicy(args, parsed_globals):
|
645
|
+
g_param = parse_global_arg(parsed_globals)
|
646
|
+
|
647
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
648
|
+
cred = credential.CVMRoleCredential()
|
649
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
650
|
+
cred = credential.STSAssumeRoleCredential(
|
651
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
652
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
653
|
+
)
|
654
|
+
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):
|
655
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
656
|
+
else:
|
657
|
+
cred = credential.Credential(
|
658
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
659
|
+
)
|
660
|
+
http_profile = HttpProfile(
|
661
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
662
|
+
reqMethod="POST",
|
663
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
664
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
665
|
+
)
|
666
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
667
|
+
if g_param[OptionsDefine.Language]:
|
668
|
+
profile.language = g_param[OptionsDefine.Language]
|
669
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
670
|
+
client = mod.MqttClient(cred, g_param[OptionsDefine.Region], profile)
|
671
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
672
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
673
|
+
model = models.DeleteAuthorizationPolicyRequest()
|
674
|
+
model.from_json_string(json.dumps(args))
|
675
|
+
start_time = time.time()
|
676
|
+
while True:
|
677
|
+
rsp = client.DeleteAuthorizationPolicy(model)
|
678
|
+
result = rsp.to_json_string()
|
679
|
+
try:
|
680
|
+
json_obj = json.loads(result)
|
681
|
+
except TypeError as e:
|
682
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
683
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
684
|
+
break
|
685
|
+
cur_time = time.time()
|
686
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
687
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
688
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
689
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
690
|
+
else:
|
691
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
692
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
693
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
694
|
+
|
695
|
+
|
644
696
|
def doUpdateAuthorizationPolicyPriority(args, parsed_globals):
|
645
697
|
g_param = parse_global_arg(parsed_globals)
|
646
698
|
|
@@ -1005,6 +1057,58 @@ def doModifyJWKSAuthenticator(args, parsed_globals):
|
|
1005
1057
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1006
1058
|
|
1007
1059
|
|
1060
|
+
def doDescribeDeviceCertificates(args, parsed_globals):
|
1061
|
+
g_param = parse_global_arg(parsed_globals)
|
1062
|
+
|
1063
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1064
|
+
cred = credential.CVMRoleCredential()
|
1065
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1066
|
+
cred = credential.STSAssumeRoleCredential(
|
1067
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1068
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1069
|
+
)
|
1070
|
+
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):
|
1071
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1072
|
+
else:
|
1073
|
+
cred = credential.Credential(
|
1074
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1075
|
+
)
|
1076
|
+
http_profile = HttpProfile(
|
1077
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1078
|
+
reqMethod="POST",
|
1079
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
1080
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1081
|
+
)
|
1082
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1083
|
+
if g_param[OptionsDefine.Language]:
|
1084
|
+
profile.language = g_param[OptionsDefine.Language]
|
1085
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1086
|
+
client = mod.MqttClient(cred, g_param[OptionsDefine.Region], profile)
|
1087
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1088
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1089
|
+
model = models.DescribeDeviceCertificatesRequest()
|
1090
|
+
model.from_json_string(json.dumps(args))
|
1091
|
+
start_time = time.time()
|
1092
|
+
while True:
|
1093
|
+
rsp = client.DescribeDeviceCertificates(model)
|
1094
|
+
result = rsp.to_json_string()
|
1095
|
+
try:
|
1096
|
+
json_obj = json.loads(result)
|
1097
|
+
except TypeError as e:
|
1098
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1099
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1100
|
+
break
|
1101
|
+
cur_time = time.time()
|
1102
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1103
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1104
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1105
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1106
|
+
else:
|
1107
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1108
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1109
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1110
|
+
|
1111
|
+
|
1008
1112
|
CLIENT_MAP = {
|
1009
1113
|
"v20240516": mqtt_client_v20240516,
|
1010
1114
|
|
@@ -1016,18 +1120,19 @@ MODELS_MAP = {
|
|
1016
1120
|
}
|
1017
1121
|
|
1018
1122
|
ACTION_MAP = {
|
1019
|
-
"
|
1020
|
-
"
|
1123
|
+
"CreateTopic": doCreateTopic,
|
1124
|
+
"ActivateDeviceCertificate": doActivateDeviceCertificate,
|
1021
1125
|
"DescribeAuthorizationPolicies": doDescribeAuthorizationPolicies,
|
1022
1126
|
"DescribeTopicList": doDescribeTopicList,
|
1023
1127
|
"ModifyTopic": doModifyTopic,
|
1024
1128
|
"CreateAuthorizationPolicy": doCreateAuthorizationPolicy,
|
1025
1129
|
"RegisterDeviceCertificate": doRegisterDeviceCertificate,
|
1026
|
-
"
|
1130
|
+
"ModifyAuthorizationPolicy": doModifyAuthorizationPolicy,
|
1027
1131
|
"CreateJWTAuthenticator": doCreateJWTAuthenticator,
|
1028
1132
|
"DeleteAuthenticator": doDeleteAuthenticator,
|
1029
1133
|
"DescribeAuthenticator": doDescribeAuthenticator,
|
1030
1134
|
"DescribeInstance": doDescribeInstance,
|
1135
|
+
"DeleteAuthorizationPolicy": doDeleteAuthorizationPolicy,
|
1031
1136
|
"UpdateAuthorizationPolicyPriority": doUpdateAuthorizationPolicyPriority,
|
1032
1137
|
"DescribeTopic": doDescribeTopic,
|
1033
1138
|
"DescribeInstanceList": doDescribeInstanceList,
|
@@ -1035,6 +1140,7 @@ ACTION_MAP = {
|
|
1035
1140
|
"ModifyJWTAuthenticator": doModifyJWTAuthenticator,
|
1036
1141
|
"DeleteTopic": doDeleteTopic,
|
1037
1142
|
"ModifyJWKSAuthenticator": doModifyJWKSAuthenticator,
|
1143
|
+
"DescribeDeviceCertificates": doDescribeDeviceCertificates,
|
1038
1144
|
|
1039
1145
|
}
|
1040
1146
|
|