tccli 3.0.1234.1__py2.py3-none-any.whl → 3.0.1235.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/cdb/v20170320/api.json +15 -15
- tccli/services/cls/v20201016/api.json +4 -4
- tccli/services/cwp/cwp_client.py +326 -8
- tccli/services/cwp/v20180228/api.json +488 -1
- tccli/services/cwp/v20180228/examples.json +48 -0
- tccli/services/faceid/v20180301/api.json +19 -0
- tccli/services/hunyuan/v20230901/api.json +12 -3
- tccli/services/iotexplorer/iotexplorer_client.py +106 -0
- tccli/services/iotexplorer/v20190423/api.json +169 -0
- tccli/services/iotexplorer/v20190423/examples.json +16 -0
- tccli/services/iotvideo/iotvideo_client.py +106 -0
- tccli/services/iotvideo/v20211125/api.json +169 -0
- tccli/services/iotvideo/v20211125/examples.json +16 -0
- tccli/services/ocr/v20181119/api.json +5 -5
- tccli/services/ocr/v20181119/examples.json +7 -7
- tccli/services/privatedns/v20201028/api.json +8 -8
- tccli/services/smh/v20210712/api.json +7 -7
- tccli/services/smh/v20210712/examples.json +1 -1
- tccli/services/ssl/v20191205/api.json +46 -33
- tccli/services/ssl/v20191205/examples.json +13 -13
- tccli/services/tcbr/v20220217/api.json +71 -71
- tccli/services/tcbr/v20220217/examples.json +13 -31
- tccli/services/teo/v20220901/api.json +1 -1
- tccli/services/trocket/v20230308/api.json +19 -0
- tccli/services/tsf/v20180326/api.json +1577 -1408
- tccli/services/tsf/v20180326/examples.json +55 -61
- tccli/services/wedata/v20210820/api.json +76 -0
- {tccli-3.0.1234.1.dist-info → tccli-3.0.1235.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1234.1.dist-info → tccli-3.0.1235.1.dist-info}/RECORD +33 -33
- {tccli-3.0.1234.1.dist-info → tccli-3.0.1235.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1234.1.dist-info → tccli-3.0.1235.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1234.1.dist-info → tccli-3.0.1235.1.dist-info}/license_files/LICENSE +0 -0
@@ -10,14 +10,14 @@
|
|
10
10
|
"ChatCompletions": {
|
11
11
|
"document": "腾讯混元大模型是由腾讯研发的大语言模型,具备强大的中文创作能力,复杂语境下的逻辑推理能力,以及可靠的任务执行能力。本接口支持流式或非流式调用,当使用流式调用时为 SSE 协议。\n\n 1. 本接口暂不支持返回图片内容。\n 2. 默认该接口下单账号限制并发数为 5 路,如您有提高并发限制的需求请 [购买](https://buy.cloud.tencent.com/hunyuan) 。\n 3. 请使用 SDK 调用本接口,每种开发语言的 SDK Git 仓库 examples/hunyuan/v20230901/ 目录下有提供示例供参考。SDK 链接在文档下方 “**开发者资源 - SDK**” 部分提供。\n 4. 我们推荐您使用 API Explorer,方便快速地在线调试接口和下载各语言的示例代码,[点击打开](https://console.cloud.tencent.com/api/explorer?Product=hunyuan&Version=2023-09-01&Action=ChatCompletions)。",
|
12
12
|
"input": "ChatCompletionsRequest",
|
13
|
-
"name": "
|
13
|
+
"name": "对话",
|
14
14
|
"output": "ChatCompletionsResponse",
|
15
15
|
"status": "online"
|
16
16
|
},
|
17
17
|
"ChatTranslations": {
|
18
18
|
"document": "腾讯混元大模型是由腾讯研发的大语言模型,具备强大的中文创作能力,复杂语境下的逻辑推理能力,以及可靠的任务执行能力。本接口支持流式或非流式调用,当使用流式调用时为 SSE 协议。\n\n 1. 本接口暂不支持返回图片内容。\n 2. 默认该接口下单账号限制并发数为 5 路,如您有提高并发限制的需求请 [购买](https://buy.cloud.tencent.com/hunyuan) 。\n 3. 请使用 SDK 调用本接口,每种开发语言的 SDK Git 仓库 examples/hunyuan/v20230901/ 目录下有提供示例供参考。SDK 链接在文档下方 “**开发者资源 - SDK**” 部分提供。\n 4. 我们推荐您使用 API Explorer,方便快速地在线调试接口和下载各语言的示例代码,[点击打开](https://console.cloud.tencent.com/api/explorer?Product=hunyuan&Version=2023-09-01&Action=ChatCompletions)。",
|
19
19
|
"input": "ChatTranslationsRequest",
|
20
|
-
"name": "
|
20
|
+
"name": "翻译",
|
21
21
|
"output": "ChatTranslationsResponse",
|
22
22
|
"status": "online"
|
23
23
|
},
|
@@ -52,7 +52,7 @@
|
|
52
52
|
"GetEmbedding": {
|
53
53
|
"document": "腾讯混元 Embedding 接口,可以将文本转化为高质量的向量数据。向量维度为1024维。",
|
54
54
|
"input": "GetEmbeddingRequest",
|
55
|
-
"name": "
|
55
|
+
"name": "向量化",
|
56
56
|
"output": "GetEmbeddingResponse",
|
57
57
|
"status": "online"
|
58
58
|
},
|
@@ -323,6 +323,15 @@
|
|
323
323
|
"name": "ForceSearchEnhancement",
|
324
324
|
"required": false,
|
325
325
|
"type": "bool"
|
326
|
+
},
|
327
|
+
{
|
328
|
+
"disabled": false,
|
329
|
+
"document": "自定义结束生成字符串",
|
330
|
+
"example": "无",
|
331
|
+
"member": "string",
|
332
|
+
"name": "Stop",
|
333
|
+
"required": false,
|
334
|
+
"type": "list"
|
326
335
|
}
|
327
336
|
],
|
328
337
|
"type": "object"
|
@@ -4385,6 +4385,58 @@ def doGetProjectList(args, parsed_globals):
|
|
4385
4385
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4386
4386
|
|
4387
4387
|
|
4388
|
+
def doCreateFreeCloudStorage(args, parsed_globals):
|
4389
|
+
g_param = parse_global_arg(parsed_globals)
|
4390
|
+
|
4391
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
4392
|
+
cred = credential.CVMRoleCredential()
|
4393
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
4394
|
+
cred = credential.STSAssumeRoleCredential(
|
4395
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
4396
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
4397
|
+
)
|
4398
|
+
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):
|
4399
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
4400
|
+
else:
|
4401
|
+
cred = credential.Credential(
|
4402
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
4403
|
+
)
|
4404
|
+
http_profile = HttpProfile(
|
4405
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
4406
|
+
reqMethod="POST",
|
4407
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
4408
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
4409
|
+
)
|
4410
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
4411
|
+
if g_param[OptionsDefine.Language]:
|
4412
|
+
profile.language = g_param[OptionsDefine.Language]
|
4413
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
4414
|
+
client = mod.IotexplorerClient(cred, g_param[OptionsDefine.Region], profile)
|
4415
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
4416
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4417
|
+
model = models.CreateFreeCloudStorageRequest()
|
4418
|
+
model.from_json_string(json.dumps(args))
|
4419
|
+
start_time = time.time()
|
4420
|
+
while True:
|
4421
|
+
rsp = client.CreateFreeCloudStorage(model)
|
4422
|
+
result = rsp.to_json_string()
|
4423
|
+
try:
|
4424
|
+
json_obj = json.loads(result)
|
4425
|
+
except TypeError as e:
|
4426
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
4427
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
4428
|
+
break
|
4429
|
+
cur_time = time.time()
|
4430
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
4431
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
4432
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
4433
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
4434
|
+
else:
|
4435
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
4436
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
4437
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4438
|
+
|
4439
|
+
|
4388
4440
|
def doGetTWeCallPkgList(args, parsed_globals):
|
4389
4441
|
g_param = parse_global_arg(parsed_globals)
|
4390
4442
|
|
@@ -5841,6 +5893,58 @@ def doDeleteDevices(args, parsed_globals):
|
|
5841
5893
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
5842
5894
|
|
5843
5895
|
|
5896
|
+
def doCreateDeviceChannel(args, parsed_globals):
|
5897
|
+
g_param = parse_global_arg(parsed_globals)
|
5898
|
+
|
5899
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
5900
|
+
cred = credential.CVMRoleCredential()
|
5901
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
5902
|
+
cred = credential.STSAssumeRoleCredential(
|
5903
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
5904
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
5905
|
+
)
|
5906
|
+
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):
|
5907
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
5908
|
+
else:
|
5909
|
+
cred = credential.Credential(
|
5910
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
5911
|
+
)
|
5912
|
+
http_profile = HttpProfile(
|
5913
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
5914
|
+
reqMethod="POST",
|
5915
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
5916
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
5917
|
+
)
|
5918
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
5919
|
+
if g_param[OptionsDefine.Language]:
|
5920
|
+
profile.language = g_param[OptionsDefine.Language]
|
5921
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
5922
|
+
client = mod.IotexplorerClient(cred, g_param[OptionsDefine.Region], profile)
|
5923
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
5924
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
5925
|
+
model = models.CreateDeviceChannelRequest()
|
5926
|
+
model.from_json_string(json.dumps(args))
|
5927
|
+
start_time = time.time()
|
5928
|
+
while True:
|
5929
|
+
rsp = client.CreateDeviceChannel(model)
|
5930
|
+
result = rsp.to_json_string()
|
5931
|
+
try:
|
5932
|
+
json_obj = json.loads(result)
|
5933
|
+
except TypeError as e:
|
5934
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
5935
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
5936
|
+
break
|
5937
|
+
cur_time = time.time()
|
5938
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
5939
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
5940
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
5941
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
5942
|
+
else:
|
5943
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
5944
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
5945
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
5946
|
+
|
5947
|
+
|
5844
5948
|
def doCheckFirmwareUpdate(args, parsed_globals):
|
5845
5949
|
g_param = parse_global_arg(parsed_globals)
|
5846
5950
|
|
@@ -7704,6 +7808,7 @@ ACTION_MAP = {
|
|
7704
7808
|
"DescribeCloudStorage": doDescribeCloudStorage,
|
7705
7809
|
"UploadFirmware": doUploadFirmware,
|
7706
7810
|
"GetProjectList": doGetProjectList,
|
7811
|
+
"CreateFreeCloudStorage": doCreateFreeCloudStorage,
|
7707
7812
|
"GetTWeCallPkgList": doGetTWeCallPkgList,
|
7708
7813
|
"UpdateDevicesEnableState": doUpdateDevicesEnableState,
|
7709
7814
|
"ModifyProject": doModifyProject,
|
@@ -7732,6 +7837,7 @@ ACTION_MAP = {
|
|
7732
7837
|
"UpdateDeviceTWeCallAuthorizeStatus": doUpdateDeviceTWeCallAuthorizeStatus,
|
7733
7838
|
"DeleteCloudStorageEvent": doDeleteCloudStorageEvent,
|
7734
7839
|
"DeleteDevices": doDeleteDevices,
|
7840
|
+
"CreateDeviceChannel": doCreateDeviceChannel,
|
7735
7841
|
"CheckFirmwareUpdate": doCheckFirmwareUpdate,
|
7736
7842
|
"GetGatewaySubDeviceList": doGetGatewaySubDeviceList,
|
7737
7843
|
"GenerateCloudStorageAIServiceTaskFileURL": doGenerateCloudStorageAIServiceTaskFileURL,
|
@@ -91,6 +91,13 @@
|
|
91
91
|
"output": "CreateDeviceResponse",
|
92
92
|
"status": "online"
|
93
93
|
},
|
94
|
+
"CreateDeviceChannel": {
|
95
|
+
"document": "创建设备通道",
|
96
|
+
"input": "CreateDeviceChannelRequest",
|
97
|
+
"name": "创建设备通道",
|
98
|
+
"output": "CreateDeviceChannelResponse",
|
99
|
+
"status": "online"
|
100
|
+
},
|
94
101
|
"CreateExternalSourceAIServiceTask": {
|
95
102
|
"document": "创建外部视频 AI 分析任务",
|
96
103
|
"input": "CreateExternalSourceAIServiceTaskRequest",
|
@@ -105,6 +112,13 @@
|
|
105
112
|
"output": "CreateFenceBindResponse",
|
106
113
|
"status": "online"
|
107
114
|
},
|
115
|
+
"CreateFreeCloudStorage": {
|
116
|
+
"document": "开通免费云存服务",
|
117
|
+
"input": "CreateFreeCloudStorageRequest",
|
118
|
+
"name": "开通云存卡服务",
|
119
|
+
"output": "CreateFreeCloudStorageResponse",
|
120
|
+
"status": "online"
|
121
|
+
},
|
108
122
|
"CreateIotVideoCloudStorage": {
|
109
123
|
"document": "开通云存服务",
|
110
124
|
"input": "CreateIotVideoCloudStorageRequest",
|
@@ -2466,6 +2480,51 @@
|
|
2466
2480
|
],
|
2467
2481
|
"type": "object"
|
2468
2482
|
},
|
2483
|
+
"CreateDeviceChannelRequest": {
|
2484
|
+
"document": "CreateDeviceChannel请求参数结构体",
|
2485
|
+
"members": [
|
2486
|
+
{
|
2487
|
+
"disabled": false,
|
2488
|
+
"document": "产品ID",
|
2489
|
+
"example": "H541SOP191",
|
2490
|
+
"member": "string",
|
2491
|
+
"name": "ProductId",
|
2492
|
+
"required": true,
|
2493
|
+
"type": "string"
|
2494
|
+
},
|
2495
|
+
{
|
2496
|
+
"disabled": false,
|
2497
|
+
"document": "设备名称",
|
2498
|
+
"example": "event_36502632_1",
|
2499
|
+
"member": "string",
|
2500
|
+
"name": "DeviceName",
|
2501
|
+
"required": true,
|
2502
|
+
"type": "string"
|
2503
|
+
},
|
2504
|
+
{
|
2505
|
+
"disabled": false,
|
2506
|
+
"document": "通道ID",
|
2507
|
+
"example": "1",
|
2508
|
+
"member": "uint64",
|
2509
|
+
"name": "ChannelId",
|
2510
|
+
"required": true,
|
2511
|
+
"type": "int"
|
2512
|
+
}
|
2513
|
+
],
|
2514
|
+
"type": "object"
|
2515
|
+
},
|
2516
|
+
"CreateDeviceChannelResponse": {
|
2517
|
+
"document": "CreateDeviceChannel返回参数结构体",
|
2518
|
+
"members": [
|
2519
|
+
{
|
2520
|
+
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
2521
|
+
"member": "string",
|
2522
|
+
"name": "RequestId",
|
2523
|
+
"type": "string"
|
2524
|
+
}
|
2525
|
+
],
|
2526
|
+
"type": "object"
|
2527
|
+
},
|
2469
2528
|
"CreateDeviceRequest": {
|
2470
2529
|
"document": "CreateDevice请求参数结构体",
|
2471
2530
|
"members": [
|
@@ -2684,6 +2743,116 @@
|
|
2684
2743
|
],
|
2685
2744
|
"type": "object"
|
2686
2745
|
},
|
2746
|
+
"CreateFreeCloudStorageRequest": {
|
2747
|
+
"document": "CreateFreeCloudStorage请求参数结构体",
|
2748
|
+
"members": [
|
2749
|
+
{
|
2750
|
+
"disabled": false,
|
2751
|
+
"document": "产品ID",
|
2752
|
+
"example": "H541SOP191",
|
2753
|
+
"member": "string",
|
2754
|
+
"name": "ProductId",
|
2755
|
+
"required": true,
|
2756
|
+
"type": "string"
|
2757
|
+
},
|
2758
|
+
{
|
2759
|
+
"disabled": false,
|
2760
|
+
"document": "设备名称",
|
2761
|
+
"example": "event_36502632_1",
|
2762
|
+
"member": "string",
|
2763
|
+
"name": "DeviceName",
|
2764
|
+
"required": true,
|
2765
|
+
"type": "string"
|
2766
|
+
},
|
2767
|
+
{
|
2768
|
+
"disabled": false,
|
2769
|
+
"document": "云存套餐ID:\nlye1w3d:低功耗事件3天周套餐。\nye1w3d:事件3天周套餐",
|
2770
|
+
"example": "lye1w3d",
|
2771
|
+
"member": "string",
|
2772
|
+
"name": "PackageId",
|
2773
|
+
"required": true,
|
2774
|
+
"type": "string"
|
2775
|
+
},
|
2776
|
+
{
|
2777
|
+
"disabled": false,
|
2778
|
+
"document": "如果当前设备已开启云存套餐,Override=1会使用新套餐覆盖原有套餐。不传此参数则默认为0。",
|
2779
|
+
"example": "0",
|
2780
|
+
"member": "uint64",
|
2781
|
+
"name": "Override",
|
2782
|
+
"required": false,
|
2783
|
+
"type": "int"
|
2784
|
+
},
|
2785
|
+
{
|
2786
|
+
"disabled": false,
|
2787
|
+
"document": "套餐列表顺序:PackageQueue=front会立即使用新购买的套餐,新购套餐结束后,列表中下一个未过期的套餐继续生效;PackageQueue=end会等设备当前所有已购买套餐过期后才会生效新购套餐。与Override参数不能同时使用。",
|
2788
|
+
"example": "front",
|
2789
|
+
"member": "string",
|
2790
|
+
"name": "PackageQueue",
|
2791
|
+
"required": false,
|
2792
|
+
"type": "string"
|
2793
|
+
},
|
2794
|
+
{
|
2795
|
+
"disabled": false,
|
2796
|
+
"document": "订单id",
|
2797
|
+
"example": "slfie21321",
|
2798
|
+
"member": "string",
|
2799
|
+
"name": "OrderId",
|
2800
|
+
"required": false,
|
2801
|
+
"type": "string"
|
2802
|
+
},
|
2803
|
+
{
|
2804
|
+
"disabled": false,
|
2805
|
+
"document": "通道ID",
|
2806
|
+
"example": "1",
|
2807
|
+
"member": "uint64",
|
2808
|
+
"name": "ChannelId",
|
2809
|
+
"required": false,
|
2810
|
+
"type": "int"
|
2811
|
+
},
|
2812
|
+
{
|
2813
|
+
"disabled": false,
|
2814
|
+
"document": "云存视频存储区域,国内默认为ap-guangzhou。海外默认为东南亚ap-singapore,可选美东na-ashburn、欧洲eu-frankfurt。",
|
2815
|
+
"example": "ap-guangzhou",
|
2816
|
+
"member": "string",
|
2817
|
+
"name": "StorageRegion",
|
2818
|
+
"required": false,
|
2819
|
+
"type": "string"
|
2820
|
+
}
|
2821
|
+
],
|
2822
|
+
"type": "object"
|
2823
|
+
},
|
2824
|
+
"CreateFreeCloudStorageResponse": {
|
2825
|
+
"document": "CreateFreeCloudStorage返回参数结构体",
|
2826
|
+
"members": [
|
2827
|
+
{
|
2828
|
+
"disabled": false,
|
2829
|
+
"document": "订单金额,单位为分\n注意:此字段可能返回 null,表示取不到有效值。",
|
2830
|
+
"example": "100",
|
2831
|
+
"member": "uint64",
|
2832
|
+
"name": "Price",
|
2833
|
+
"output_required": false,
|
2834
|
+
"type": "int",
|
2835
|
+
"value_allowed_null": true
|
2836
|
+
},
|
2837
|
+
{
|
2838
|
+
"disabled": false,
|
2839
|
+
"document": "支付金额,单位为分\n注意:此字段可能返回 null,表示取不到有效值。",
|
2840
|
+
"example": "100",
|
2841
|
+
"member": "uint64",
|
2842
|
+
"name": "Amount",
|
2843
|
+
"output_required": false,
|
2844
|
+
"type": "int",
|
2845
|
+
"value_allowed_null": true
|
2846
|
+
},
|
2847
|
+
{
|
2848
|
+
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
2849
|
+
"member": "string",
|
2850
|
+
"name": "RequestId",
|
2851
|
+
"type": "string"
|
2852
|
+
}
|
2853
|
+
],
|
2854
|
+
"type": "object"
|
2855
|
+
},
|
2687
2856
|
"CreateIotVideoCloudStorageRequest": {
|
2688
2857
|
"document": "CreateIotVideoCloudStorage请求参数结构体",
|
2689
2858
|
"members": [
|
@@ -176,6 +176,14 @@
|
|
176
176
|
"title": "创建手动指定psk的设备"
|
177
177
|
}
|
178
178
|
],
|
179
|
+
"CreateDeviceChannel": [
|
180
|
+
{
|
181
|
+
"document": "",
|
182
|
+
"input": "POST / HTTP/1.1\nHost: iotexplorer.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateCloudStorage\n<公共请求参数>\n\n{\n \"ProductId\": \"H541SOP191\",\n \"DeviceName\": \"event_36502632_1\",\n \"ChannelId\": 1\n}",
|
183
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"a9a9d232-01c0-494a-baa3-57c384463c3f\"\n }\n}",
|
184
|
+
"title": "创建设备通道示例"
|
185
|
+
}
|
186
|
+
],
|
179
187
|
"CreateExternalSourceAIServiceTask": [
|
180
188
|
{
|
181
189
|
"document": "",
|
@@ -192,6 +200,14 @@
|
|
192
200
|
"title": "CreateFenceBind"
|
193
201
|
}
|
194
202
|
],
|
203
|
+
"CreateFreeCloudStorage": [
|
204
|
+
{
|
205
|
+
"document": "",
|
206
|
+
"input": "POST / HTTP/1.1\nHost: iotexplorer.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateCloudStorage\n<公共请求参数>\n\n{\n \"ProductId\": \"H541SOP191\",\n \"DeviceName\": \"event_36502632_1\",\n \"PackageId\": \"yc1m3d\"\n}",
|
207
|
+
"output": "{\n \"Response\": {\n \"Amount\": 0,\n \"Price\": 0,\n \"RequestId\": \"a9a9d232-01c0-494a-baa3-57c384463c3f\"\n }\n}",
|
208
|
+
"title": "开通免费实例"
|
209
|
+
}
|
210
|
+
],
|
195
211
|
"CreateIotVideoCloudStorage": [
|
196
212
|
{
|
197
213
|
"document": "",
|
@@ -5065,6 +5065,58 @@ def doCreateCOSCredentials(args, parsed_globals):
|
|
5065
5065
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
5066
5066
|
|
5067
5067
|
|
5068
|
+
def doCreateFreeCloudStorage(args, parsed_globals):
|
5069
|
+
g_param = parse_global_arg(parsed_globals)
|
5070
|
+
|
5071
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
5072
|
+
cred = credential.CVMRoleCredential()
|
5073
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
5074
|
+
cred = credential.STSAssumeRoleCredential(
|
5075
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
5076
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
5077
|
+
)
|
5078
|
+
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):
|
5079
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
5080
|
+
else:
|
5081
|
+
cred = credential.Credential(
|
5082
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
5083
|
+
)
|
5084
|
+
http_profile = HttpProfile(
|
5085
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
5086
|
+
reqMethod="POST",
|
5087
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
5088
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
5089
|
+
)
|
5090
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
5091
|
+
if g_param[OptionsDefine.Language]:
|
5092
|
+
profile.language = g_param[OptionsDefine.Language]
|
5093
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
5094
|
+
client = mod.IotvideoClient(cred, g_param[OptionsDefine.Region], profile)
|
5095
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
5096
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
5097
|
+
model = models.CreateFreeCloudStorageRequest()
|
5098
|
+
model.from_json_string(json.dumps(args))
|
5099
|
+
start_time = time.time()
|
5100
|
+
while True:
|
5101
|
+
rsp = client.CreateFreeCloudStorage(model)
|
5102
|
+
result = rsp.to_json_string()
|
5103
|
+
try:
|
5104
|
+
json_obj = json.loads(result)
|
5105
|
+
except TypeError as e:
|
5106
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
5107
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
5108
|
+
break
|
5109
|
+
cur_time = time.time()
|
5110
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
5111
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
5112
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
5113
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
5114
|
+
else:
|
5115
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
5116
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
5117
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
5118
|
+
|
5119
|
+
|
5068
5120
|
def doSendOnlineMsg(args, parsed_globals):
|
5069
5121
|
g_param = parse_global_arg(parsed_globals)
|
5070
5122
|
|
@@ -6521,6 +6573,58 @@ def doDisableDevice(args, parsed_globals):
|
|
6521
6573
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
6522
6574
|
|
6523
6575
|
|
6576
|
+
def doCreateDeviceChannel(args, parsed_globals):
|
6577
|
+
g_param = parse_global_arg(parsed_globals)
|
6578
|
+
|
6579
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
6580
|
+
cred = credential.CVMRoleCredential()
|
6581
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
6582
|
+
cred = credential.STSAssumeRoleCredential(
|
6583
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
6584
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
6585
|
+
)
|
6586
|
+
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):
|
6587
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
6588
|
+
else:
|
6589
|
+
cred = credential.Credential(
|
6590
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
6591
|
+
)
|
6592
|
+
http_profile = HttpProfile(
|
6593
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
6594
|
+
reqMethod="POST",
|
6595
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
6596
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
6597
|
+
)
|
6598
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
6599
|
+
if g_param[OptionsDefine.Language]:
|
6600
|
+
profile.language = g_param[OptionsDefine.Language]
|
6601
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
6602
|
+
client = mod.IotvideoClient(cred, g_param[OptionsDefine.Region], profile)
|
6603
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
6604
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
6605
|
+
model = models.CreateDeviceChannelRequest()
|
6606
|
+
model.from_json_string(json.dumps(args))
|
6607
|
+
start_time = time.time()
|
6608
|
+
while True:
|
6609
|
+
rsp = client.CreateDeviceChannel(model)
|
6610
|
+
result = rsp.to_json_string()
|
6611
|
+
try:
|
6612
|
+
json_obj = json.loads(result)
|
6613
|
+
except TypeError as e:
|
6614
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
6615
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
6616
|
+
break
|
6617
|
+
cur_time = time.time()
|
6618
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
6619
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
6620
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
6621
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
6622
|
+
else:
|
6623
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
6624
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
6625
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
6626
|
+
|
6627
|
+
|
6524
6628
|
def doRunTestOtaVersion(args, parsed_globals):
|
6525
6629
|
g_param = parse_global_arg(parsed_globals)
|
6526
6630
|
|
@@ -8505,6 +8609,7 @@ ACTION_MAP = {
|
|
8505
8609
|
"DescribeDeviceActionHistory": doDescribeDeviceActionHistory,
|
8506
8610
|
"DescribeIotModel": doDescribeIotModel,
|
8507
8611
|
"CreateCOSCredentials": doCreateCOSCredentials,
|
8612
|
+
"CreateFreeCloudStorage": doCreateFreeCloudStorage,
|
8508
8613
|
"SendOnlineMsg": doSendOnlineMsg,
|
8509
8614
|
"CreateTraceIds": doCreateTraceIds,
|
8510
8615
|
"CreateBatch": doCreateBatch,
|
@@ -8533,6 +8638,7 @@ ACTION_MAP = {
|
|
8533
8638
|
"DescribeMessageDataStats": doDescribeMessageDataStats,
|
8534
8639
|
"DeleteCloudStorageEvent": doDeleteCloudStorageEvent,
|
8535
8640
|
"DisableDevice": doDisableDevice,
|
8641
|
+
"CreateDeviceChannel": doCreateDeviceChannel,
|
8536
8642
|
"RunTestOtaVersion": doRunTestOtaVersion,
|
8537
8643
|
"DescribeP2PInfo": doDescribeP2PInfo,
|
8538
8644
|
"CreateIotDataType": doCreateIotDataType,
|