tccli 3.0.1135.1__py2.py3-none-any.whl → 3.0.1137.1__py2.py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/command.py +4 -1
  3. tccli/help_command.py +4 -1
  4. tccli/services/__init__.py +3 -0
  5. tccli/services/asr/asr_client.py +53 -0
  6. tccli/services/asr/v20190614/api.json +193 -1
  7. tccli/services/asr/v20190614/examples.json +8 -0
  8. tccli/services/batch/v20170312/api.json +8 -5
  9. tccli/services/batch/v20170312/examples.json +1 -1
  10. tccli/services/cdb/v20170320/api.json +3 -3
  11. tccli/services/ckafka/v20190819/api.json +1 -1
  12. tccli/services/cls/v20201016/api.json +93 -0
  13. tccli/services/cwp/cwp_client.py +0 -53
  14. tccli/services/cwp/v20180228/api.json +0 -43
  15. tccli/services/cwp/v20180228/examples.json +0 -8
  16. tccli/services/cynosdb/v20190107/api.json +10 -0
  17. tccli/services/dlc/dlc_client.py +53 -0
  18. tccli/services/dlc/v20210125/api.json +157 -23
  19. tccli/services/dlc/v20210125/examples.json +14 -6
  20. tccli/services/dsgc/v20190723/api.json +35 -35
  21. tccli/services/dts/v20211206/api.json +3 -3
  22. tccli/services/eiam/v20210420/api.json +4 -4
  23. tccli/services/eiam/v20210420/examples.json +4 -4
  24. tccli/services/ess/v20201111/api.json +1 -1
  25. tccli/services/essbasic/v20210526/api.json +4 -4
  26. tccli/services/faceid/v20180301/api.json +1 -1
  27. tccli/services/ioa/ioa_client.py +159 -0
  28. tccli/services/ioa/v20220601/api.json +897 -80
  29. tccli/services/ioa/v20220601/examples.json +24 -0
  30. tccli/services/iotexplorer/iotexplorer_client.py +231 -19
  31. tccli/services/iotexplorer/v20190423/api.json +332 -0
  32. tccli/services/iotexplorer/v20190423/examples.json +32 -0
  33. tccli/services/lighthouse/v20200324/api.json +14 -14
  34. tccli/services/lighthouse/v20200324/examples.json +7 -7
  35. tccli/services/live/v20180801/api.json +12 -6
  36. tccli/services/lke/lke_client.py +175 -16
  37. tccli/services/lke/v20231130/api.json +429 -4
  38. tccli/services/lke/v20231130/examples.json +24 -0
  39. tccli/services/ocr/v20181119/api.json +3 -3
  40. tccli/services/partners/v20180321/api.json +26 -16
  41. tccli/services/tcr/v20190924/api.json +57 -35
  42. tccli/services/tcr/v20190924/examples.json +4 -4
  43. tccli/services/tcss/v20201101/api.json +123 -13
  44. tccli/services/tcss/v20201101/examples.json +3 -3
  45. tccli/services/tdmq/tdmq_client.py +53 -0
  46. tccli/services/tdmq/v20200217/api.json +301 -0
  47. tccli/services/tdmq/v20200217/examples.json +8 -0
  48. tccli/services/tem/v20210701/api.json +8 -5
  49. tccli/services/tem/v20210701/examples.json +2 -2
  50. tccli/services/tke/v20180525/api.json +13 -3
  51. tccli/services/trocket/trocket_client.py +65 -12
  52. tccli/services/trocket/v20230308/api.json +196 -0
  53. tccli/services/trocket/v20230308/examples.json +8 -0
  54. tccli/services/trtc/v20190722/api.json +45 -63
  55. tccli/services/tsi/__init__.py +4 -0
  56. tccli/services/tsi/tsi_client.py +301 -0
  57. tccli/services/tsi/v20210325/api.json +373 -0
  58. tccli/services/tsi/v20210325/examples.json +29 -0
  59. tccli/services/tts/v20190823/api.json +2 -2
  60. tccli/services/vpc/v20170312/api.json +36 -16
  61. tccli/services/vpc/v20170312/examples.json +9 -3
  62. tccli/services/waf/v20180125/api.json +70 -0
  63. tccli/services/waf/v20180125/examples.json +8 -0
  64. tccli/services/waf/waf_client.py +53 -0
  65. tccli/services/wedata/v20210820/api.json +377 -0
  66. tccli/services/wedata/v20210820/examples.json +8 -0
  67. tccli/services/wedata/wedata_client.py +61 -8
  68. {tccli-3.0.1135.1.dist-info → tccli-3.0.1137.1.dist-info}/METADATA +2 -2
  69. {tccli-3.0.1135.1.dist-info → tccli-3.0.1137.1.dist-info}/RECORD +72 -68
  70. {tccli-3.0.1135.1.dist-info → tccli-3.0.1137.1.dist-info}/WHEEL +0 -0
  71. {tccli-3.0.1135.1.dist-info → tccli-3.0.1137.1.dist-info}/entry_points.txt +0 -0
  72. {tccli-3.0.1135.1.dist-info → tccli-3.0.1137.1.dist-info}/license_files/LICENSE +0 -0
@@ -1,5 +1,13 @@
1
1
  {
2
2
  "actions": {
3
+ "DescribeAccountGroups": [
4
+ {
5
+ "document": "",
6
+ "input": "Path : /capi/Assets/DescribeAccountGroups\n\n<body>\n\n{\n \"Condition\":{\n \"PageNum\":0,\n \"PageSize\":10,\n \"Sort\":{\n \"Field\":\"Itime\",\n \"Order\":\"desc\"\n }\n },\n \"ParentId\":1\n}",
7
+ "output": "{\n \"Response\": {\n \"Data\": {\n \"Items\": [\n {\n \"Source\": 0,\n \"IdPath\": \"1.30\",\n \"ImportType\": \"zijian\",\n \"Id\": 30,\n \"UserTotal\": 0,\n \"IsLeaf\": false,\n \"ReadOnly\": false,\n \"ParentId\": 1,\n \"ExtraInfo\": \"\",\n \"OrgId\": \"30\",\n \"NamePath\": \"分组路径\",\n \"Description\": \"\",\n \"IdPathArr\": [\n 1,\n 30\n ],\n \"Utime\": \"2022-07-21 10:24:11\",\n \"Name\": \"用户名\",\n \"Itime\": \"2022-07-21 10:24:11\",\n \"ParentOrgId\": \"0\",\n \"MiniIamId\": \"\"\n }\n ],\n \"Page\": {\n \"PageSize\": 10,\n \"PageNum\": 0,\n \"Total\": 4,\n \"PageCount\": 1\n }\n },\n \"RequestId\": \"1658388211.551832\"\n }\n}",
8
+ "title": "查询账号列表"
9
+ }
10
+ ],
3
11
  "DescribeDevices": [
4
12
  {
5
13
  "document": "获取租户满足条件:最近登录账号包含\\'cc\\'(不区分大小写)的设备列表详情",
@@ -7,6 +15,22 @@
7
15
  "output": "{\n \"Response\": {\n \"Data\": {\n \"Items\": [\n {\n \"AccountGroupId\": 0,\n \"AccountGroupName\": \"test\",\n \"AccountName\": \"cc\",\n \"AccountUsers\": \"\",\n \"BaseBoardSn\": \"\",\n \"ComputerName\": \"DESKTOP-AL8RU6H\",\n \"ConnActiveTime\": \"2023-12-01T12:11:47.076416+08:00\",\n \"CriticalVulListCount\": 0,\n \"DeviceNewStrategyVer\": \"2023-12-01 12:11:00\",\n \"DeviceStrategyVer\": \"2023-12-01 11:10:00\",\n \"DomainName\": \"\",\n \"FirewallStatus\": 1,\n \"GroupId\": 93,\n \"GroupName\": \"未分组终端\",\n \"GroupNamePath\": \"全网终端.未分组终端\",\n \"HostId\": 0,\n \"HostName\": \"\",\n \"IOAUserName\": \"cc\",\n \"Id\": 54,\n \"IdentityNewStrategyVer\": \"\",\n \"IdentityStrategyVer\": \"\",\n \"Ip\": \"113.108.77.51\",\n \"Itime\": \"2023-12-01T09:37:38.505458+08:00\",\n \"LocalIpList\": \"192.168.0.128\",\n \"Locked\": 0,\n \"MacAddr\": \"00:0C:29:10:00:5C\",\n \"Mid\": \"75129D715480905B6A9C4569893C7634656938E2\",\n \"NGNNewStrategyVer\": \"2023-11-20 15:54:00\",\n \"NGNStrategyVer\": \"2023-11-20 15:54:00\",\n \"Name\": \"DESKTOP-AL8RU6H\",\n \"OnlineStatus\": 1,\n \"OsType\": 0,\n \"RiskCount\": 0,\n \"SerialNum\": \"VMware-56 4d 76 2d d7 24 e1 ab-43 f3 af 25 e3 10 00 5c\",\n \"StrVersion\": \"209.12.18590.201\",\n \"SysRepVersion\": \"2023.11.30.19.52.38\",\n \"Tags\": \"\",\n \"UserName\": \"cc\",\n \"Version\": \"58828322890449097\",\n \"VirusVer\": \"2.0.13712.288\",\n \"VulCount\": 0,\n \"VulCriticalList\": [],\n \"VulVersion\": \"2023.11.21.16.28.52\"\n },\n {\n \"AccountGroupId\": 0,\n \"AccountGroupName\": \"test\",\n \"AccountName\": \"cc\",\n \"AccountUsers\": \"\",\n \"BaseBoardSn\": \"\",\n \"ComputerName\": \"DESKTOP-AL8RU6H\",\n \"ConnActiveTime\": \"2023-11-29T17:53:33.715333+08:00\",\n \"CriticalVulListCount\": 0,\n \"DeviceNewStrategyVer\": \"2023-12-01 12:11:00\",\n \"DeviceStrategyVer\": \"2023-11-29 17:42:00\",\n \"DomainName\": \"\",\n \"FirewallStatus\": 1,\n \"GroupId\": 93,\n \"GroupName\": \"未分组终端\",\n \"GroupNamePath\": \"全网终端.未分组终端\",\n \"HostId\": 0,\n \"HostName\": \"\",\n \"IOAUserName\": \"cc\",\n \"Id\": 51,\n \"IdentityNewStrategyVer\": \"\",\n \"IdentityStrategyVer\": \"\",\n \"Ip\": \"113.108.77.60\",\n \"Itime\": \"2023-11-29T17:26:42.200203+08:00\",\n \"LocalIpList\": \"192.168.0.128\",\n \"Locked\": 0,\n \"MacAddr\": \"00:0C:29:10:00:5C\",\n \"Mid\": \"75129D715480905B6A9C4569893C7634656703D2\",\n \"NGNNewStrategyVer\": \"2023-11-20 15:54:00\",\n \"NGNStrategyVer\": \"2023-11-20 15:54:00\",\n \"Name\": \"DESKTOP-AL8RU6H\",\n \"OnlineStatus\": 1,\n \"OsType\": 0,\n \"RiskCount\": 0,\n \"SerialNum\": \"VMware-56 4d 76 2d d7 24 e1 ab-43 f3 af 25 e3 10 00 5c\",\n \"StrVersion\": \"107.1.18559.201\",\n \"SysRepVersion\": \"2023.11.29.12.55.06\",\n \"Tags\": \"\",\n \"UserName\": \"cc\",\n \"Version\": \"30117828019290313\",\n \"VirusVer\": \"2.0.13712.60\",\n \"VulCount\": 0,\n \"VulCriticalList\": [],\n \"VulVersion\": \"2023.11.21.16.28.52\"\n }\n ],\n \"Paging\": {\n \"PageCount\": 1,\n \"PageNum\": 1,\n \"PageSize\": 10,\n \"Total\": 2\n }\n },\n \"RequestId\": \"807938c5-9308-4c87-918d-e84a05f226a1\"\n }\n}",
8
16
  "title": "获取设备列表详情"
9
17
  }
18
+ ],
19
+ "DescribeLocalAccounts": [
20
+ {
21
+ "document": "",
22
+ "input": "POST / HTTP/1.1\nHost: ioa.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeLocalAccounts\n<公共请求参数>\n\n{\n \"Condition\": {\n \"Filters\": [\n {\n \"Field\": \"abc\",\n \"Operator\": \"abc\",\n \"Values\": [\n \"abc\"\n ]\n }\n ],\n \"FilterGroups\": [\n {\n \"Filters\": [\n {\n \"Field\": \"abc\",\n \"Operator\": \"abc\",\n \"Values\": [\n \"abc\"\n ]\n }\n ]\n }\n ],\n \"Sort\": {\n \"Field\": \"abc\",\n \"Order\": \"abc\"\n },\n \"PageSize\": 0,\n \"PageNum\": 0\n },\n \"AccountGroupId\": 0,\n \"ShowFlag\": 0\n}",
23
+ "output": "{\n \"Response\": {\n \"Data\": {\n \"Page\": {\n \"PageSize\": 1,\n \"PageNum\": 1,\n \"PageCount\": 1,\n \"Total\": 1\n },\n \"Items\": [\n {\n \"Id\": 0,\n \"UserId\": \"abc\",\n \"UserName\": \"abc\",\n \"AccountId\": 0,\n \"GroupId\": 0,\n \"GroupName\": \"abc\",\n \"NamePath\": \"abc\",\n \"Source\": 0,\n \"Status\": 0,\n \"Itime\": \"abc\",\n \"Utime\": \"abc\",\n \"ExtraInfo\": \"abc\",\n \"RiskLevel\": \"abc\",\n \"AccountGroups\": [\n {\n \"AccountGroupId\": 0\n }\n ],\n \"MobileBindNum\": 0,\n \"PcBindNum\": 0,\n \"OnlineStatus\": 0,\n \"ActiveStatus\": 0,\n \"LoginTime\": \"abc\",\n \"LogoutTime\": \"abc\"\n }\n ]\n },\n \"RequestId\": \"abc\"\n }\n}",
24
+ "title": "normal"
25
+ }
26
+ ],
27
+ "DescribeRootAccountGroup": [
28
+ {
29
+ "document": "",
30
+ "input": "POST / HTTP/1.1\nHost: ioa.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeRootAccountGroup\n<公共请求参数>\n\n{}",
31
+ "output": "{\n \"Response\": {\n \"Data\": {\n \"NamePath\": \"全网账户\",\n \"IdPathArr\": [\n 2222\n ],\n \"ExtraInfo\": \"{}\",\n \"Utime\": \"2022-10-09 14:37:05\",\n \"ParentId\": 0,\n \"OrgId\": \"0\",\n \"Source\": 0,\n \"IdPath\": \"2222\",\n \"Itime\": \"2022-10-09 14:37:05\",\n \"ParentOrgId\": \"0\",\n \"Name\": \"全网账户\",\n \"ImportEnable\": false,\n \"ImportType\": \"\",\n \"MiniIamId\": \"\",\n \"Id\": 2222,\n \"Import\": \"\",\n \"Description\": \"\"\n },\n \"RequestId\": \"e6f9be7b-af66-4a22-b867-94510cf04492\"\n }\n}",
32
+ "title": "https://ioa.test.tencentcloudapi.com/?Action=DescribeRootAccountGroup"
33
+ }
10
34
  ]
11
35
  },
12
36
  "version": "1.0"
@@ -225,7 +225,7 @@ def doDescribeDevicePackages(args, parsed_globals):
225
225
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
226
226
 
227
227
 
228
- def doDescribeDevice(args, parsed_globals):
228
+ def doDescribeFirmwareUpdateStatus(args, parsed_globals):
229
229
  g_param = parse_global_arg(parsed_globals)
230
230
 
231
231
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -254,11 +254,11 @@ def doDescribeDevice(args, parsed_globals):
254
254
  client = mod.IotexplorerClient(cred, g_param[OptionsDefine.Region], profile)
255
255
  client._sdkVersion += ("_CLI_" + __version__)
256
256
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
257
- model = models.DescribeDeviceRequest()
257
+ model = models.DescribeFirmwareUpdateStatusRequest()
258
258
  model.from_json_string(json.dumps(args))
259
259
  start_time = time.time()
260
260
  while True:
261
- rsp = client.DescribeDevice(model)
261
+ rsp = client.DescribeFirmwareUpdateStatus(model)
262
262
  result = rsp.to_json_string()
263
263
  try:
264
264
  json_obj = json.loads(result)
@@ -277,7 +277,7 @@ def doDescribeDevice(args, parsed_globals):
277
277
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
278
278
 
279
279
 
280
- def doGenSingleDeviceSignatureOfPublic(args, parsed_globals):
280
+ def doDescribeDevice(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 doGenSingleDeviceSignatureOfPublic(args, parsed_globals):
306
306
  client = mod.IotexplorerClient(cred, g_param[OptionsDefine.Region], profile)
307
307
  client._sdkVersion += ("_CLI_" + __version__)
308
308
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
309
- model = models.GenSingleDeviceSignatureOfPublicRequest()
309
+ model = models.DescribeDeviceRequest()
310
310
  model.from_json_string(json.dumps(args))
311
311
  start_time = time.time()
312
312
  while True:
313
- rsp = client.GenSingleDeviceSignatureOfPublic(model)
313
+ rsp = client.DescribeDevice(model)
314
314
  result = rsp.to_json_string()
315
315
  try:
316
316
  json_obj = json.loads(result)
@@ -2409,6 +2409,58 @@ def doListFirmwares(args, parsed_globals):
2409
2409
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2410
2410
 
2411
2411
 
2412
+ def doPublishFirmwareUpdateMessage(args, parsed_globals):
2413
+ g_param = parse_global_arg(parsed_globals)
2414
+
2415
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
2416
+ cred = credential.CVMRoleCredential()
2417
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
2418
+ cred = credential.STSAssumeRoleCredential(
2419
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
2420
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
2421
+ )
2422
+ 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):
2423
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
2424
+ else:
2425
+ cred = credential.Credential(
2426
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
2427
+ )
2428
+ http_profile = HttpProfile(
2429
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
2430
+ reqMethod="POST",
2431
+ endpoint=g_param[OptionsDefine.Endpoint],
2432
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
2433
+ )
2434
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
2435
+ if g_param[OptionsDefine.Language]:
2436
+ profile.language = g_param[OptionsDefine.Language]
2437
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
2438
+ client = mod.IotexplorerClient(cred, g_param[OptionsDefine.Region], profile)
2439
+ client._sdkVersion += ("_CLI_" + __version__)
2440
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
2441
+ model = models.PublishFirmwareUpdateMessageRequest()
2442
+ model.from_json_string(json.dumps(args))
2443
+ start_time = time.time()
2444
+ while True:
2445
+ rsp = client.PublishFirmwareUpdateMessage(model)
2446
+ result = rsp.to_json_string()
2447
+ try:
2448
+ json_obj = json.loads(result)
2449
+ except TypeError as e:
2450
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
2451
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
2452
+ break
2453
+ cur_time = time.time()
2454
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
2455
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
2456
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
2457
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
2458
+ else:
2459
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
2460
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
2461
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2462
+
2463
+
2412
2464
  def doCreateDevice(args, parsed_globals):
2413
2465
  g_param = parse_global_arg(parsed_globals)
2414
2466
 
@@ -2773,7 +2825,7 @@ def doDescribeLoRaFrequency(args, parsed_globals):
2773
2825
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2774
2826
 
2775
2827
 
2776
- def doModifyTopicPolicy(args, parsed_globals):
2828
+ def doModifyPositionSpace(args, parsed_globals):
2777
2829
  g_param = parse_global_arg(parsed_globals)
2778
2830
 
2779
2831
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2802,11 +2854,11 @@ def doModifyTopicPolicy(args, parsed_globals):
2802
2854
  client = mod.IotexplorerClient(cred, g_param[OptionsDefine.Region], profile)
2803
2855
  client._sdkVersion += ("_CLI_" + __version__)
2804
2856
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2805
- model = models.ModifyTopicPolicyRequest()
2857
+ model = models.ModifyPositionSpaceRequest()
2806
2858
  model.from_json_string(json.dumps(args))
2807
2859
  start_time = time.time()
2808
2860
  while True:
2809
- rsp = client.ModifyTopicPolicy(model)
2861
+ rsp = client.ModifyPositionSpace(model)
2810
2862
  result = rsp.to_json_string()
2811
2863
  try:
2812
2864
  json_obj = json.loads(result)
@@ -3293,6 +3345,58 @@ def doDeleteProject(args, parsed_globals):
3293
3345
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3294
3346
 
3295
3347
 
3348
+ def doDescribeCloudStorageAIServiceTask(args, parsed_globals):
3349
+ g_param = parse_global_arg(parsed_globals)
3350
+
3351
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
3352
+ cred = credential.CVMRoleCredential()
3353
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
3354
+ cred = credential.STSAssumeRoleCredential(
3355
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
3356
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
3357
+ )
3358
+ 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):
3359
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
3360
+ else:
3361
+ cred = credential.Credential(
3362
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
3363
+ )
3364
+ http_profile = HttpProfile(
3365
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
3366
+ reqMethod="POST",
3367
+ endpoint=g_param[OptionsDefine.Endpoint],
3368
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
3369
+ )
3370
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
3371
+ if g_param[OptionsDefine.Language]:
3372
+ profile.language = g_param[OptionsDefine.Language]
3373
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
3374
+ client = mod.IotexplorerClient(cred, g_param[OptionsDefine.Region], profile)
3375
+ client._sdkVersion += ("_CLI_" + __version__)
3376
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
3377
+ model = models.DescribeCloudStorageAIServiceTaskRequest()
3378
+ model.from_json_string(json.dumps(args))
3379
+ start_time = time.time()
3380
+ while True:
3381
+ rsp = client.DescribeCloudStorageAIServiceTask(model)
3382
+ result = rsp.to_json_string()
3383
+ try:
3384
+ json_obj = json.loads(result)
3385
+ except TypeError as e:
3386
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
3387
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
3388
+ break
3389
+ cur_time = time.time()
3390
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
3391
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
3392
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
3393
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
3394
+ else:
3395
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
3396
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
3397
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3398
+
3399
+
3296
3400
  def doDescribeTopicRule(args, parsed_globals):
3297
3401
  g_param = parse_global_arg(parsed_globals)
3298
3402
 
@@ -4437,7 +4541,7 @@ def doAssignTWeCallLicense(args, parsed_globals):
4437
4541
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4438
4542
 
4439
4543
 
4440
- def doModifyPositionSpace(args, parsed_globals):
4544
+ def doModifyTopicPolicy(args, parsed_globals):
4441
4545
  g_param = parse_global_arg(parsed_globals)
4442
4546
 
4443
4547
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -4466,11 +4570,11 @@ def doModifyPositionSpace(args, parsed_globals):
4466
4570
  client = mod.IotexplorerClient(cred, g_param[OptionsDefine.Region], profile)
4467
4571
  client._sdkVersion += ("_CLI_" + __version__)
4468
4572
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
4469
- model = models.ModifyPositionSpaceRequest()
4573
+ model = models.ModifyTopicPolicyRequest()
4470
4574
  model.from_json_string(json.dumps(args))
4471
4575
  start_time = time.time()
4472
4576
  while True:
4473
- rsp = client.ModifyPositionSpace(model)
4577
+ rsp = client.ModifyTopicPolicy(model)
4474
4578
  result = rsp.to_json_string()
4475
4579
  try:
4476
4580
  json_obj = json.loads(result)
@@ -4749,6 +4853,58 @@ def doDescribeDevicePositionList(args, parsed_globals):
4749
4853
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4750
4854
 
4751
4855
 
4856
+ def doDescribeFirmware(args, parsed_globals):
4857
+ g_param = parse_global_arg(parsed_globals)
4858
+
4859
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
4860
+ cred = credential.CVMRoleCredential()
4861
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
4862
+ cred = credential.STSAssumeRoleCredential(
4863
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
4864
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
4865
+ )
4866
+ 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):
4867
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
4868
+ else:
4869
+ cred = credential.Credential(
4870
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
4871
+ )
4872
+ http_profile = HttpProfile(
4873
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
4874
+ reqMethod="POST",
4875
+ endpoint=g_param[OptionsDefine.Endpoint],
4876
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
4877
+ )
4878
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
4879
+ if g_param[OptionsDefine.Language]:
4880
+ profile.language = g_param[OptionsDefine.Language]
4881
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
4882
+ client = mod.IotexplorerClient(cred, g_param[OptionsDefine.Region], profile)
4883
+ client._sdkVersion += ("_CLI_" + __version__)
4884
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
4885
+ model = models.DescribeFirmwareRequest()
4886
+ model.from_json_string(json.dumps(args))
4887
+ start_time = time.time()
4888
+ while True:
4889
+ rsp = client.DescribeFirmware(model)
4890
+ result = rsp.to_json_string()
4891
+ try:
4892
+ json_obj = json.loads(result)
4893
+ except TypeError as e:
4894
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
4895
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
4896
+ break
4897
+ cur_time = time.time()
4898
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
4899
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
4900
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
4901
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
4902
+ else:
4903
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
4904
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
4905
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4906
+
4907
+
4752
4908
  def doDescribeDeviceFirmwares(args, parsed_globals):
4753
4909
  g_param = parse_global_arg(parsed_globals)
4754
4910
 
@@ -5425,6 +5581,58 @@ def doDeleteDevices(args, parsed_globals):
5425
5581
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
5426
5582
 
5427
5583
 
5584
+ def doCheckFirmwareUpdate(args, parsed_globals):
5585
+ g_param = parse_global_arg(parsed_globals)
5586
+
5587
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
5588
+ cred = credential.CVMRoleCredential()
5589
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
5590
+ cred = credential.STSAssumeRoleCredential(
5591
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
5592
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
5593
+ )
5594
+ 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):
5595
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
5596
+ else:
5597
+ cred = credential.Credential(
5598
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
5599
+ )
5600
+ http_profile = HttpProfile(
5601
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
5602
+ reqMethod="POST",
5603
+ endpoint=g_param[OptionsDefine.Endpoint],
5604
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
5605
+ )
5606
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
5607
+ if g_param[OptionsDefine.Language]:
5608
+ profile.language = g_param[OptionsDefine.Language]
5609
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
5610
+ client = mod.IotexplorerClient(cred, g_param[OptionsDefine.Region], profile)
5611
+ client._sdkVersion += ("_CLI_" + __version__)
5612
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
5613
+ model = models.CheckFirmwareUpdateRequest()
5614
+ model.from_json_string(json.dumps(args))
5615
+ start_time = time.time()
5616
+ while True:
5617
+ rsp = client.CheckFirmwareUpdate(model)
5618
+ result = rsp.to_json_string()
5619
+ try:
5620
+ json_obj = json.loads(result)
5621
+ except TypeError as e:
5622
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
5623
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
5624
+ break
5625
+ cur_time = time.time()
5626
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
5627
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
5628
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
5629
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
5630
+ else:
5631
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
5632
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
5633
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
5634
+
5635
+
5428
5636
  def doGetGatewaySubDeviceList(args, parsed_globals):
5429
5637
  g_param = parse_global_arg(parsed_globals)
5430
5638
 
@@ -6257,7 +6465,7 @@ def doListTopicPolicy(args, parsed_globals):
6257
6465
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
6258
6466
 
6259
6467
 
6260
- def doDescribeCloudStorageAIServiceTask(args, parsed_globals):
6468
+ def doGenSingleDeviceSignatureOfPublic(args, parsed_globals):
6261
6469
  g_param = parse_global_arg(parsed_globals)
6262
6470
 
6263
6471
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -6286,11 +6494,11 @@ def doDescribeCloudStorageAIServiceTask(args, parsed_globals):
6286
6494
  client = mod.IotexplorerClient(cred, g_param[OptionsDefine.Region], profile)
6287
6495
  client._sdkVersion += ("_CLI_" + __version__)
6288
6496
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
6289
- model = models.DescribeCloudStorageAIServiceTaskRequest()
6497
+ model = models.GenSingleDeviceSignatureOfPublicRequest()
6290
6498
  model.from_json_string(json.dumps(args))
6291
6499
  start_time = time.time()
6292
6500
  while True:
6293
- rsp = client.DescribeCloudStorageAIServiceTask(model)
6501
+ rsp = client.GenSingleDeviceSignatureOfPublic(model)
6294
6502
  result = rsp.to_json_string()
6295
6503
  try:
6296
6504
  json_obj = json.loads(result)
@@ -7156,8 +7364,8 @@ ACTION_MAP = {
7156
7364
  "GetCOSURL": doGetCOSURL,
7157
7365
  "ModifyStudioProduct": doModifyStudioProduct,
7158
7366
  "DescribeDevicePackages": doDescribeDevicePackages,
7367
+ "DescribeFirmwareUpdateStatus": doDescribeFirmwareUpdateStatus,
7159
7368
  "DescribeDevice": doDescribeDevice,
7160
- "GenSingleDeviceSignatureOfPublic": doGenSingleDeviceSignatureOfPublic,
7161
7369
  "DescribeTopicPolicy": doDescribeTopicPolicy,
7162
7370
  "ModifyProductCloudStorageAIService": doModifyProductCloudStorageAIService,
7163
7371
  "GetProjectList": doGetProjectList,
@@ -7198,6 +7406,7 @@ ACTION_MAP = {
7198
7406
  "ModifyTopicRule": doModifyTopicRule,
7199
7407
  "InheritCloudStorageUser": doInheritCloudStorageUser,
7200
7408
  "ListFirmwares": doListFirmwares,
7409
+ "PublishFirmwareUpdateMessage": doPublishFirmwareUpdateMessage,
7201
7410
  "CreateDevice": doCreateDevice,
7202
7411
  "DeleteFenceBind": doDeleteFenceBind,
7203
7412
  "DescribeFenceEventList": doDescribeFenceEventList,
@@ -7205,7 +7414,7 @@ ACTION_MAP = {
7205
7414
  "GetPositionSpaceList": doGetPositionSpaceList,
7206
7415
  "ResetCloudStorage": doResetCloudStorage,
7207
7416
  "DescribeLoRaFrequency": doDescribeLoRaFrequency,
7208
- "ModifyTopicPolicy": doModifyTopicPolicy,
7417
+ "ModifyPositionSpace": doModifyPositionSpace,
7209
7418
  "DescribeCloudStorageTime": doDescribeCloudStorageTime,
7210
7419
  "GetTopicRuleList": doGetTopicRuleList,
7211
7420
  "DescribeCloudStorageThumbnail": doDescribeCloudStorageThumbnail,
@@ -7215,6 +7424,7 @@ ACTION_MAP = {
7215
7424
  "DescribeCloudStorageStreamData": doDescribeCloudStorageStreamData,
7216
7425
  "GetDeviceSumStatistics": doGetDeviceSumStatistics,
7217
7426
  "DeleteProject": doDeleteProject,
7427
+ "DescribeCloudStorageAIServiceTask": doDescribeCloudStorageAIServiceTask,
7218
7428
  "DescribeTopicRule": doDescribeTopicRule,
7219
7429
  "PublishBroadcastMessage": doPublishBroadcastMessage,
7220
7430
  "UnbindProducts": doUnbindProducts,
@@ -7237,12 +7447,13 @@ ACTION_MAP = {
7237
7447
  "RemoveUserByRoomIdFromTRTC": doRemoveUserByRoomIdFromTRTC,
7238
7448
  "SearchPositionSpace": doSearchPositionSpace,
7239
7449
  "AssignTWeCallLicense": doAssignTWeCallLicense,
7240
- "ModifyPositionSpace": doModifyPositionSpace,
7450
+ "ModifyTopicPolicy": doModifyTopicPolicy,
7241
7451
  "DescribeSpaceFenceEventList": doDescribeSpaceFenceEventList,
7242
7452
  "UpdateFirmware": doUpdateFirmware,
7243
7453
  "GetTWeCallActiveStatus": doGetTWeCallActiveStatus,
7244
7454
  "DescribeGatewaySubProducts": doDescribeGatewaySubProducts,
7245
7455
  "DescribeDevicePositionList": doDescribeDevicePositionList,
7456
+ "DescribeFirmware": doDescribeFirmware,
7246
7457
  "DescribeDeviceFirmwares": doDescribeDeviceFirmwares,
7247
7458
  "BindDevices": doBindDevices,
7248
7459
  "CreateBatchProduction": doCreateBatchProduction,
@@ -7256,6 +7467,7 @@ ACTION_MAP = {
7256
7467
  "UpdateDeviceTWeCallAuthorizeStatus": doUpdateDeviceTWeCallAuthorizeStatus,
7257
7468
  "DeleteCloudStorageEvent": doDeleteCloudStorageEvent,
7258
7469
  "DeleteDevices": doDeleteDevices,
7470
+ "CheckFirmwareUpdate": doCheckFirmwareUpdate,
7259
7471
  "GetGatewaySubDeviceList": doGetGatewaySubDeviceList,
7260
7472
  "GenerateCloudStorageAIServiceTaskFileURL": doGenerateCloudStorageAIServiceTaskFileURL,
7261
7473
  "DescribeCloudStorageOrder": doDescribeCloudStorageOrder,
@@ -7272,7 +7484,7 @@ ACTION_MAP = {
7272
7484
  "DeleteTopicPolicy": doDeleteTopicPolicy,
7273
7485
  "GetDeviceList": doGetDeviceList,
7274
7486
  "ListTopicPolicy": doListTopicPolicy,
7275
- "DescribeCloudStorageAIServiceTask": doDescribeCloudStorageAIServiceTask,
7487
+ "GenSingleDeviceSignatureOfPublic": doGenSingleDeviceSignatureOfPublic,
7276
7488
  "DescribeInstance": doDescribeInstance,
7277
7489
  "ModifyLoRaFrequency": doModifyLoRaFrequency,
7278
7490
  "GetAuthMiniProgramAppList": doGetAuthMiniProgramAppList,