tccli 3.0.1284.1__py2.py3-none-any.whl → 3.0.1285.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 +88 -86
- tccli/services/bh/bh_client.py +53 -0
- tccli/services/bh/v20230418/api.json +199 -0
- tccli/services/bh/v20230418/examples.json +8 -0
- tccli/services/cdwch/v20200915/api.json +19 -9
- tccli/services/cdwch/v20200915/examples.json +1 -1
- tccli/services/cfg/v20210820/api.json +43 -19
- tccli/services/cfg/v20210820/examples.json +8 -2
- tccli/services/clb/v20180317/api.json +1 -1
- tccli/services/cmq/v20190304/api.json +92 -92
- tccli/services/cynosdb/v20190107/api.json +379 -379
- tccli/services/dlc/v20210125/api.json +2 -2
- tccli/services/dlc/v20210125/examples.json +2 -2
- tccli/services/domain/v20180808/api.json +157 -157
- tccli/services/dsgc/v20190723/api.json +2 -2
- tccli/services/dts/v20180330/api.json +3 -3
- tccli/services/dts/v20211206/api.json +336 -330
- tccli/services/emr/emr_client.py +53 -0
- tccli/services/emr/v20190103/api.json +247 -0
- tccli/services/emr/v20190103/examples.json +8 -0
- tccli/services/es/v20180416/api.json +10 -0
- tccli/services/es/v20180416/examples.json +1 -1
- tccli/services/fmu/fmu_client.py +8 -167
- tccli/services/fmu/v20191213/api.json +0 -292
- tccli/services/fmu/v20191213/examples.json +0 -24
- tccli/services/iotcloud/v20210408/api.json +27 -27
- tccli/services/iotcloud/v20210408/examples.json +6 -6
- tccli/services/iotexplorer/iotexplorer_client.py +0 -106
- tccli/services/iotexplorer/v20190423/api.json +0 -274
- tccli/services/iotexplorer/v20190423/examples.json +0 -16
- tccli/services/iss/v20230517/api.json +547 -537
- tccli/services/iss/v20230517/examples.json +2 -2
- tccli/services/kms/v20190118/api.json +20 -0
- tccli/services/lcic/lcic_client.py +114 -8
- tccli/services/lcic/v20220817/api.json +108 -0
- tccli/services/lcic/v20220817/examples.json +16 -0
- tccli/services/mongodb/mongodb_client.py +57 -4
- tccli/services/mongodb/v20190725/api.json +63 -0
- tccli/services/mongodb/v20190725/examples.json +14 -0
- tccli/services/monitor/v20180724/api.json +29 -29
- tccli/services/monitor/v20180724/examples.json +8 -8
- tccli/services/rum/v20210622/api.json +2 -2
- tccli/services/svp/svp_client.py +57 -4
- tccli/services/svp/v20240125/api.json +319 -0
- tccli/services/svp/v20240125/examples.json +8 -0
- tccli/services/trtc/v20190722/api.json +16 -5
- tccli/services/tsf/tsf_client.py +53 -0
- tccli/services/tsf/v20180326/api.json +48 -4
- tccli/services/tsf/v20180326/examples.json +8 -0
- tccli/services/vpc/v20170312/api.json +54 -0
- tccli/services/vpc/v20170312/examples.json +8 -0
- tccli/services/vpc/vpc_client.py +53 -0
- tccli/services/wedata/v20210820/api.json +383 -0
- tccli/services/wedata/v20210820/examples.json +8 -0
- tccli/services/wedata/wedata_client.py +53 -0
- {tccli-3.0.1284.1.dist-info → tccli-3.0.1285.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1284.1.dist-info → tccli-3.0.1285.1.dist-info}/RECORD +61 -61
- {tccli-3.0.1284.1.dist-info → tccli-3.0.1285.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1284.1.dist-info → tccli-3.0.1285.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1284.1.dist-info → tccli-3.0.1285.1.dist-info}/license_files/LICENSE +0 -0
@@ -148,9 +148,9 @@
|
|
148
148
|
"status": "online"
|
149
149
|
},
|
150
150
|
"DescribeDeviceShadow": {
|
151
|
-
"document": "本接口(DescribeDeviceShadow)用于查询虚拟设备信息。
|
151
|
+
"document": "本接口(DescribeDeviceShadow)用于查询虚拟设备信息。",
|
152
152
|
"input": "DescribeDeviceShadowRequest",
|
153
|
-
"name": "
|
153
|
+
"name": "获取设备影子(旧)",
|
154
154
|
"output": "DescribeDeviceShadowResponse",
|
155
155
|
"status": "online"
|
156
156
|
},
|
@@ -1296,7 +1296,7 @@
|
|
1296
1296
|
{
|
1297
1297
|
"disabled": false,
|
1298
1298
|
"document": "文件上传类型时文件md5值",
|
1299
|
-
"example": "
|
1299
|
+
"example": "bda2cc64487b0db7f53d689bccabde2d",
|
1300
1300
|
"member": "string",
|
1301
1301
|
"name": "Hash",
|
1302
1302
|
"required": false,
|
@@ -2322,7 +2322,7 @@
|
|
2322
2322
|
{
|
2323
2323
|
"disabled": false,
|
2324
2324
|
"document": "产品 ID",
|
2325
|
-
"example": "
|
2325
|
+
"example": "EQPOKD5111",
|
2326
2326
|
"member": "string",
|
2327
2327
|
"name": "ProductId",
|
2328
2328
|
"required": true,
|
@@ -2331,7 +2331,7 @@
|
|
2331
2331
|
{
|
2332
2332
|
"disabled": false,
|
2333
2333
|
"document": "设备名称。命名规则:[a-zA-Z0-9:_-]{1,60}",
|
2334
|
-
"example": "
|
2334
|
+
"example": "dev-001",
|
2335
2335
|
"member": "string",
|
2336
2336
|
"name": "DeviceName",
|
2337
2337
|
"required": true,
|
@@ -2349,7 +2349,7 @@
|
|
2349
2349
|
"example": "{\"payload\":{\"state\": {\"reported\": { \"color\": \"red\"}}, \"timestamp",
|
2350
2350
|
"member": "string",
|
2351
2351
|
"name": "Data",
|
2352
|
-
"
|
2352
|
+
"output_required": true,
|
2353
2353
|
"type": "string",
|
2354
2354
|
"value_allowed_null": false
|
2355
2355
|
},
|
@@ -2951,7 +2951,7 @@
|
|
2951
2951
|
{
|
2952
2952
|
"disabled": false,
|
2953
2953
|
"document": "搜索过滤条件",
|
2954
|
-
"example": "
|
2954
|
+
"example": "{\"Values\": [\"\\u672a\\u547d\\u540d\"], \"Name\": \"instance-name\"}",
|
2955
2955
|
"member": "SearchKeyword",
|
2956
2956
|
"name": "Filters",
|
2957
2957
|
"required": false,
|
@@ -2966,7 +2966,7 @@
|
|
2966
2966
|
{
|
2967
2967
|
"disabled": false,
|
2968
2968
|
"document": "固件升级任务列表\n注意:此字段可能返回 null,表示取不到有效值。",
|
2969
|
-
"example": "
|
2969
|
+
"example": " { \"TaskId\": 1000175, \"Status\": 3, \"CreateTime\": 1589466879, \"Type\": 1 }",
|
2970
2970
|
"member": "FirmwareTaskInfo",
|
2971
2971
|
"name": "TaskInfos",
|
2972
2972
|
"output_required": true,
|
@@ -3667,7 +3667,7 @@
|
|
3667
3667
|
{
|
3668
3668
|
"disabled": false,
|
3669
3669
|
"document": "产品ID",
|
3670
|
-
"example": "
|
3670
|
+
"example": "EQPOKD5111",
|
3671
3671
|
"member": "string",
|
3672
3672
|
"name": "ProductID",
|
3673
3673
|
"required": true,
|
@@ -3703,7 +3703,7 @@
|
|
3703
3703
|
{
|
3704
3704
|
"disabled": false,
|
3705
3705
|
"document": "搜索过滤条件",
|
3706
|
-
"example": "
|
3706
|
+
"example": "{ \"TaskId\": 1000175}",
|
3707
3707
|
"member": "SearchKeyword",
|
3708
3708
|
"name": "Filters",
|
3709
3709
|
"required": false,
|
@@ -3718,10 +3718,10 @@
|
|
3718
3718
|
{
|
3719
3719
|
"disabled": false,
|
3720
3720
|
"document": "资源任务列表\n注意:此字段可能返回 null,表示取不到有效值。",
|
3721
|
-
"example": "
|
3721
|
+
"example": "{ \"TaskId\": 1000175, \"Status\": 3, \"CreateTime\": 1589466879, \"Type\": 1 }",
|
3722
3722
|
"member": "FirmwareTaskInfo",
|
3723
3723
|
"name": "TaskInfos",
|
3724
|
-
"
|
3724
|
+
"output_required": true,
|
3725
3725
|
"type": "list",
|
3726
3726
|
"value_allowed_null": true
|
3727
3727
|
},
|
@@ -3731,7 +3731,7 @@
|
|
3731
3731
|
"example": "53",
|
3732
3732
|
"member": "uint64",
|
3733
3733
|
"name": "Total",
|
3734
|
-
"
|
3734
|
+
"output_required": true,
|
3735
3735
|
"type": "int",
|
3736
3736
|
"value_allowed_null": true
|
3737
3737
|
},
|
@@ -4834,7 +4834,7 @@
|
|
4834
4834
|
{
|
4835
4835
|
"disabled": false,
|
4836
4836
|
"document": "日志检索上下文",
|
4837
|
-
"example": "
|
4837
|
+
"example": "62080",
|
4838
4838
|
"member": "string",
|
4839
4839
|
"name": "Context",
|
4840
4840
|
"required": false,
|
@@ -5057,7 +5057,7 @@
|
|
5057
5057
|
"example": "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAD1JVkWTEk5MHpyTVRTQ3lqa0tVbUtNVm9sZw==",
|
5058
5058
|
"member": "string",
|
5059
5059
|
"name": "Context",
|
5060
|
-
"
|
5060
|
+
"output_required": true,
|
5061
5061
|
"type": "string",
|
5062
5062
|
"value_allowed_null": false
|
5063
5063
|
},
|
@@ -5067,17 +5067,17 @@
|
|
5067
5067
|
"example": "1",
|
5068
5068
|
"member": "bool",
|
5069
5069
|
"name": "Listover",
|
5070
|
-
"
|
5070
|
+
"output_required": true,
|
5071
5071
|
"type": "bool",
|
5072
5072
|
"value_allowed_null": false
|
5073
5073
|
},
|
5074
5074
|
{
|
5075
5075
|
"disabled": false,
|
5076
5076
|
"document": "日志列表",
|
5077
|
-
"example": "
|
5077
|
+
"example": "[\"test_device1\\n\",\"test_device2\\n\"]",
|
5078
5078
|
"member": "SDKLogItem",
|
5079
5079
|
"name": "Results",
|
5080
|
-
"
|
5080
|
+
"output_required": true,
|
5081
5081
|
"type": "list",
|
5082
5082
|
"value_allowed_null": false
|
5083
5083
|
},
|
@@ -5130,7 +5130,7 @@
|
|
5130
5130
|
{
|
5131
5131
|
"disabled": false,
|
5132
5132
|
"document": "规则列表",
|
5133
|
-
"example": "
|
5133
|
+
"example": "{\"RuleName\":\"rule2\"}",
|
5134
5134
|
"member": "TopicRuleInfo",
|
5135
5135
|
"name": "Rules",
|
5136
5136
|
"output_required": true,
|
@@ -6140,20 +6140,20 @@
|
|
6140
6140
|
{
|
6141
6141
|
"disabled": false,
|
6142
6142
|
"document": "产品ID",
|
6143
|
-
"example": "
|
6143
|
+
"example": "EQPOKD5111",
|
6144
6144
|
"member": "string",
|
6145
6145
|
"name": "ProductId",
|
6146
|
-
"
|
6146
|
+
"output_required": true,
|
6147
6147
|
"type": "string",
|
6148
6148
|
"value_allowed_null": false
|
6149
6149
|
},
|
6150
6150
|
{
|
6151
6151
|
"disabled": false,
|
6152
6152
|
"document": "设备名称",
|
6153
|
-
"example": "
|
6153
|
+
"example": "dev-001",
|
6154
6154
|
"member": "string",
|
6155
6155
|
"name": "DeviceName",
|
6156
|
-
"
|
6156
|
+
"output_required": true,
|
6157
6157
|
"type": "string",
|
6158
6158
|
"value_allowed_null": false
|
6159
6159
|
},
|
@@ -6163,7 +6163,7 @@
|
|
6163
6163
|
"example": "DEBUG",
|
6164
6164
|
"member": "string",
|
6165
6165
|
"name": "Level",
|
6166
|
-
"
|
6166
|
+
"output_required": true,
|
6167
6167
|
"type": "string",
|
6168
6168
|
"value_allowed_null": false
|
6169
6169
|
},
|
@@ -6173,17 +6173,17 @@
|
|
6173
6173
|
"example": "2021-04-08 00:00:00",
|
6174
6174
|
"member": "string",
|
6175
6175
|
"name": "DateTime",
|
6176
|
-
"
|
6176
|
+
"output_required": true,
|
6177
6177
|
"type": "string",
|
6178
6178
|
"value_allowed_null": false
|
6179
6179
|
},
|
6180
6180
|
{
|
6181
6181
|
"disabled": false,
|
6182
6182
|
"document": "日志内容",
|
6183
|
-
"example": "
|
6183
|
+
"example": "4534234",
|
6184
6184
|
"member": "string",
|
6185
6185
|
"name": "Content",
|
6186
|
-
"
|
6186
|
+
"output_required": true,
|
6187
6187
|
"type": "string",
|
6188
6188
|
"value_allowed_null": false
|
6189
6189
|
}
|
@@ -177,8 +177,8 @@
|
|
177
177
|
"DescribeDeviceShadow": [
|
178
178
|
{
|
179
179
|
"document": "",
|
180
|
-
"input": "https://iotcloud.tencentcloudapi.com/?Action=DescribeDeviceShadow\n&ProductId=
|
181
|
-
"output": "{\n \"Response\": {\n \"Data\": \"{\\\"payload\\\":{\\\"state\\\": {\\\"reported\\\": { \\\"color\\\": \\\"red\\\"}}, \\\"metadata\\\": {\\\"reported\\\": {\\\"color\\\": {\\\"timestamp\\\": 1509092895971}}}, \\\"timestamp\\\": 1509443636326, \\\"version\\\": 5},\\\"result\\\":0,\\\"timestamp\\\":1509440846582,\\\"type\\\":\\\"get\\\"}\",\n \"RequestId\": \"
|
180
|
+
"input": "https://iotcloud.tencentcloudapi.com/?Action=DescribeDeviceShadow\n&ProductId=EQPOKD5111\n&DeviceName=dev-001\n&<公共请求参数>",
|
181
|
+
"output": "{\n \"Response\": {\n \"Data\": \"{\\\"payload\\\":{\\\"state\\\": {\\\"reported\\\": { \\\"color\\\": \\\"red\\\"}}, \\\"metadata\\\": {\\\"reported\\\": {\\\"color\\\": {\\\"timestamp\\\": 1509092895971}}}, \\\"timestamp\\\": 1509443636326, \\\"version\\\": 5},\\\"result\\\":0,\\\"timestamp\\\":1509440846582,\\\"type\\\":\\\"get\\\"}\",\n \"RequestId\": \"54f75f05-a87c-45fc-9520-6b59e251e91c\"\n }\n}",
|
182
182
|
"title": "获取设备影子"
|
183
183
|
}
|
184
184
|
],
|
@@ -337,8 +337,8 @@
|
|
337
337
|
"DescribeResourceTasks": [
|
338
338
|
{
|
339
339
|
"document": "",
|
340
|
-
"input": "https://iotcloud.tencentcloudapi.com/?Action=DescribeResourceTasks\n&ProductID=
|
341
|
-
"output": "{\n \"Response\": {\n \"Total\": 53,\n \"TaskInfos\": [\n {\n \"TaskId\": 1000175,\n \"Status\": 3,\n \"CreateTime\": 1589466879,\n \"Type\": 1\n },\n {\n \"TaskId\": 1000176,\n \"Status\": 3,\n \"CreateTime\": 1589467049,\n \"Type\": 1\n },\n {\n \"Status\": 3,\n \"CreateTime\": 1589467138,\n \"Type\": 1,\n \"TaskId\": 1000179\n },\n {\n \"TaskId\": 1000180,\n \"Status\": 3,\n \"CreateTime\": 1589467139,\n \"Type\": 1\n },\n {\n \"Type\": 1,\n \"TaskId\": 1000182,\n \"Status\": 3,\n \"CreateTime\": 1589467141\n }\n ],\n \"RequestId\": \"
|
340
|
+
"input": "https://iotcloud.tencentcloudapi.com/?Action=DescribeResourceTasks\n&ProductID= EQPOKD5111\n&Name=dev-001\n&Offset=1\n&Limit=5\n&<公共请求参数>",
|
341
|
+
"output": "{\n \"Response\": {\n \"Total\": 53,\n \"TaskInfos\": [\n {\n \"TaskId\": 1000175,\n \"Status\": 3,\n \"CreateTime\": 1589466879,\n \"Type\": 1\n },\n {\n \"TaskId\": 1000176,\n \"Status\": 3,\n \"CreateTime\": 1589467049,\n \"Type\": 1\n },\n {\n \"Status\": 3,\n \"CreateTime\": 1589467138,\n \"Type\": 1,\n \"TaskId\": 1000179\n },\n {\n \"TaskId\": 1000180,\n \"Status\": 3,\n \"CreateTime\": 1589467139,\n \"Type\": 1\n },\n {\n \"Type\": 1,\n \"TaskId\": 1000182,\n \"Status\": 3,\n \"CreateTime\": 1589467141\n }\n ],\n \"RequestId\": \"ebea2fd8-0b8f-44b3-99ab-1b04fcfb6cbd\"\n }\n}",
|
342
342
|
"title": "查询资源推送任务列表"
|
343
343
|
}
|
344
344
|
],
|
@@ -425,7 +425,7 @@
|
|
425
425
|
"ListSDKLog": [
|
426
426
|
{
|
427
427
|
"document": "查询设备SDK日志",
|
428
|
-
"input": "https://iotcloud.tencentcloudapi.com/?Action=ListSDKLog\n&Keywords=productid:
|
428
|
+
"input": "https://iotcloud.tencentcloudapi.com/?Action=ListSDKLog\n&Keywords=productid: UTY5QRLMQY\n&MinTime=1606205400000\n&MaxTime=1606209059999\n&<公共请求参数>",
|
429
429
|
"output": "{\n \"Response\": {\n \"Context\": \"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAD1JVkWTEk5MHpyTVRTQ3lqa0tVbUtNVm9sZw==\",\n \"Listover\": true,\n \"RequestId\": \"1641d33e-df97-43d4-8cf1-21ba85533336\",\n \"Results\": []\n }\n}",
|
430
430
|
"title": "查询设备SDK日志"
|
431
431
|
}
|
@@ -434,7 +434,7 @@
|
|
434
434
|
{
|
435
435
|
"document": "",
|
436
436
|
"input": "https://iotcloud.tencentcloudapi.com/?Action=ListTopicRules\n&PageNum=1\n&PageSize=10\n&<公共请求参数>",
|
437
|
-
"output": "{\n \"Response\": {\n \"TotalCnt\": 2,\n \"Rules\": [\n {\n \"RuleName\": \"rule2\",\n \"CreatedAt\": 1524455688,\n \"RuleDisabled\": false,\n \"Description\": \"
|
437
|
+
"output": "{\n \"Response\": {\n \"TotalCnt\": 2,\n \"Rules\": [\n {\n \"RuleName\": \"rule2\",\n \"CreatedAt\": 1524455688,\n \"RuleDisabled\": false,\n \"Description\": \"mydescription1\",\n \"TopicPattern\": \"\"\n },\n {\n \"RuleName\": \"rule1\",\n \"CreatedAt\": 1524192248,\n \"RuleDisabled\": false,\n \"Description\": \"Describe\",\n \"TopicPattern\": \"gstasg\"\n }\n ],\n \"RequestId\": \"be69a7a3-7315-40a7-9532-3316e4a3e97e\"\n }\n}",
|
438
438
|
"title": "获取规则列表示例"
|
439
439
|
}
|
440
440
|
],
|
@@ -4749,58 +4749,6 @@ def doCreateFreeCloudStorage(args, parsed_globals):
|
|
4749
4749
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4750
4750
|
|
4751
4751
|
|
4752
|
-
def doGetTWeCallPkgList(args, parsed_globals):
|
4753
|
-
g_param = parse_global_arg(parsed_globals)
|
4754
|
-
|
4755
|
-
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
4756
|
-
cred = credential.CVMRoleCredential()
|
4757
|
-
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
4758
|
-
cred = credential.STSAssumeRoleCredential(
|
4759
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
4760
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
4761
|
-
)
|
4762
|
-
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):
|
4763
|
-
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
4764
|
-
else:
|
4765
|
-
cred = credential.Credential(
|
4766
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
4767
|
-
)
|
4768
|
-
http_profile = HttpProfile(
|
4769
|
-
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
4770
|
-
reqMethod="POST",
|
4771
|
-
endpoint=g_param[OptionsDefine.Endpoint],
|
4772
|
-
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
4773
|
-
)
|
4774
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
4775
|
-
if g_param[OptionsDefine.Language]:
|
4776
|
-
profile.language = g_param[OptionsDefine.Language]
|
4777
|
-
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
4778
|
-
client = mod.IotexplorerClient(cred, g_param[OptionsDefine.Region], profile)
|
4779
|
-
client._sdkVersion += ("_CLI_" + __version__)
|
4780
|
-
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4781
|
-
model = models.GetTWeCallPkgListRequest()
|
4782
|
-
model.from_json_string(json.dumps(args))
|
4783
|
-
start_time = time.time()
|
4784
|
-
while True:
|
4785
|
-
rsp = client.GetTWeCallPkgList(model)
|
4786
|
-
result = rsp.to_json_string()
|
4787
|
-
try:
|
4788
|
-
json_obj = json.loads(result)
|
4789
|
-
except TypeError as e:
|
4790
|
-
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
4791
|
-
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
4792
|
-
break
|
4793
|
-
cur_time = time.time()
|
4794
|
-
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
4795
|
-
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
4796
|
-
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
4797
|
-
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
4798
|
-
else:
|
4799
|
-
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
4800
|
-
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
4801
|
-
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4802
|
-
|
4803
|
-
|
4804
4752
|
def doUpdateDevicesEnableState(args, parsed_globals):
|
4805
4753
|
g_param = parse_global_arg(parsed_globals)
|
4806
4754
|
|
@@ -5061,58 +5009,6 @@ def doSearchPositionSpace(args, parsed_globals):
|
|
5061
5009
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
5062
5010
|
|
5063
5011
|
|
5064
|
-
def doAssignTWeCallLicense(args, parsed_globals):
|
5065
|
-
g_param = parse_global_arg(parsed_globals)
|
5066
|
-
|
5067
|
-
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
5068
|
-
cred = credential.CVMRoleCredential()
|
5069
|
-
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
5070
|
-
cred = credential.STSAssumeRoleCredential(
|
5071
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
5072
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
5073
|
-
)
|
5074
|
-
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):
|
5075
|
-
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
5076
|
-
else:
|
5077
|
-
cred = credential.Credential(
|
5078
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
5079
|
-
)
|
5080
|
-
http_profile = HttpProfile(
|
5081
|
-
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
5082
|
-
reqMethod="POST",
|
5083
|
-
endpoint=g_param[OptionsDefine.Endpoint],
|
5084
|
-
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
5085
|
-
)
|
5086
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
5087
|
-
if g_param[OptionsDefine.Language]:
|
5088
|
-
profile.language = g_param[OptionsDefine.Language]
|
5089
|
-
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
5090
|
-
client = mod.IotexplorerClient(cred, g_param[OptionsDefine.Region], profile)
|
5091
|
-
client._sdkVersion += ("_CLI_" + __version__)
|
5092
|
-
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
5093
|
-
model = models.AssignTWeCallLicenseRequest()
|
5094
|
-
model.from_json_string(json.dumps(args))
|
5095
|
-
start_time = time.time()
|
5096
|
-
while True:
|
5097
|
-
rsp = client.AssignTWeCallLicense(model)
|
5098
|
-
result = rsp.to_json_string()
|
5099
|
-
try:
|
5100
|
-
json_obj = json.loads(result)
|
5101
|
-
except TypeError as e:
|
5102
|
-
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
5103
|
-
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
5104
|
-
break
|
5105
|
-
cur_time = time.time()
|
5106
|
-
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
5107
|
-
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
5108
|
-
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
5109
|
-
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
5110
|
-
else:
|
5111
|
-
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
5112
|
-
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
5113
|
-
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
5114
|
-
|
5115
|
-
|
5116
5012
|
def doResetTWeCallDevice(args, parsed_globals):
|
5117
5013
|
g_param = parse_global_arg(parsed_globals)
|
5118
5014
|
|
@@ -8335,13 +8231,11 @@ ACTION_MAP = {
|
|
8335
8231
|
"InvokeCloudStorageAIServiceTask": doInvokeCloudStorageAIServiceTask,
|
8336
8232
|
"DescribeActivateLicenseService": doDescribeActivateLicenseService,
|
8337
8233
|
"CreateFreeCloudStorage": doCreateFreeCloudStorage,
|
8338
|
-
"GetTWeCallPkgList": doGetTWeCallPkgList,
|
8339
8234
|
"UpdateDevicesEnableState": doUpdateDevicesEnableState,
|
8340
8235
|
"ModifyProject": doModifyProject,
|
8341
8236
|
"BindProducts": doBindProducts,
|
8342
8237
|
"RemoveUserByRoomIdFromTRTC": doRemoveUserByRoomIdFromTRTC,
|
8343
8238
|
"SearchPositionSpace": doSearchPositionSpace,
|
8344
|
-
"AssignTWeCallLicense": doAssignTWeCallLicense,
|
8345
8239
|
"ResetTWeCallDevice": doResetTWeCallDevice,
|
8346
8240
|
"ModifyTopicPolicy": doModifyTopicPolicy,
|
8347
8241
|
"DescribeSpaceFenceEventList": doDescribeSpaceFenceEventList,
|