tccli 3.0.1114.1__py2.py3-none-any.whl → 3.0.1116.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 (49) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/aiart/v20221229/examples.json +1 -1
  3. tccli/services/asr/v20190614/api.json +1 -1
  4. tccli/services/cat/v20180409/api.json +1 -1
  5. tccli/services/cat/v20180409/examples.json +2 -2
  6. tccli/services/ccc/v20200210/api.json +2 -2
  7. tccli/services/cdwdoris/v20211228/api.json +9 -0
  8. tccli/services/ckafka/v20190819/api.json +20 -0
  9. tccli/services/cynosdb/v20190107/api.json +151 -50
  10. tccli/services/dasb/dasb_client.py +347 -29
  11. tccli/services/dasb/v20191018/api.json +966 -13
  12. tccli/services/dasb/v20191018/examples.json +48 -0
  13. tccli/services/dbbrain/dbbrain_client.py +53 -0
  14. tccli/services/dbbrain/v20210527/api.json +62 -0
  15. tccli/services/dbbrain/v20210527/examples.json +9 -1
  16. tccli/services/dlc/dlc_client.py +61 -8
  17. tccli/services/dlc/v20210125/api.json +53 -0
  18. tccli/services/dlc/v20210125/examples.json +8 -0
  19. tccli/services/domain/domain_client.py +871 -129
  20. tccli/services/domain/v20180808/api.json +1502 -146
  21. tccli/services/domain/v20180808/examples.json +112 -0
  22. tccli/services/dsgc/v20190723/api.json +30 -17
  23. tccli/services/dsgc/v20190723/examples.json +1 -1
  24. tccli/services/dts/v20211206/api.json +2 -2
  25. tccli/services/ess/v20201111/api.json +10 -1
  26. tccli/services/ess/v20201111/examples.json +1 -1
  27. tccli/services/essbasic/v20210526/api.json +2 -2
  28. tccli/services/gs/v20191118/api.json +11 -8
  29. tccli/services/iotexplorer/iotexplorer_client.py +326 -8
  30. tccli/services/iotexplorer/v20190423/api.json +583 -0
  31. tccli/services/iotexplorer/v20190423/examples.json +48 -0
  32. tccli/services/lighthouse/v20200324/api.json +16 -16
  33. tccli/services/mna/mna_client.py +110 -4
  34. tccli/services/mna/v20210119/api.json +182 -0
  35. tccli/services/mna/v20210119/examples.json +16 -0
  36. tccli/services/ocr/v20181119/api.json +60 -0
  37. tccli/services/ocr/v20181119/examples.json +1 -1
  38. tccli/services/rum/v20210622/api.json +6 -6
  39. tccli/services/rum/v20210622/examples.json +2 -2
  40. tccli/services/ssl/v20191205/api.json +1 -1
  41. tccli/services/ssl/v20191205/examples.json +1 -1
  42. tccli/services/teo/v20220901/api.json +1 -1
  43. tccli/services/tione/v20211111/api.json +11 -0
  44. tccli/services/tmt/v20180321/api.json +3 -3
  45. {tccli-3.0.1114.1.dist-info → tccli-3.0.1116.1.dist-info}/METADATA +2 -2
  46. {tccli-3.0.1114.1.dist-info → tccli-3.0.1116.1.dist-info}/RECORD +49 -49
  47. {tccli-3.0.1114.1.dist-info → tccli-3.0.1116.1.dist-info}/WHEEL +0 -0
  48. {tccli-3.0.1114.1.dist-info → tccli-3.0.1116.1.dist-info}/entry_points.txt +0 -0
  49. {tccli-3.0.1114.1.dist-info → tccli-3.0.1116.1.dist-info}/license_files/LICENSE +0 -0
@@ -1,5 +1,21 @@
1
1
  {
2
2
  "actions": {
3
+ "ActivateTWeCallLicense": [
4
+ {
5
+ "document": "",
6
+ "input": "POST / HTTP/1.1\nHost: iotexplorer.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ActivateTWeCallLicense\n<公共请求参数>\n\n{\n \"PkgType\": 1,\n \"MiniProgramAppId\": \"abc\",\n \"DeviceList\": [\n {\n \"ModelId\": \"1qaz\",\n \"Sn\": \"p/d\"\n }\n ]\n}",
7
+ "output": "{\n \"Response\": {\n \"RequestId\": \"abc\"\n }\n}",
8
+ "title": "成功激活示例"
9
+ }
10
+ ],
11
+ "AssignTWeCallLicense": [
12
+ {
13
+ "document": "",
14
+ "input": "POST / HTTP/1.1\nHost: iotexplorer.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: AssignTWeCallLicense\n<公共请求参数>\n\n{\n \"PkgType\": 1,\n \"MiniProgramAppId\": \"abc\",\n \"DeductNum\": 1\n}",
15
+ "output": "{\n \"Response\": {\n \"RequestId\": \"abc\"\n }\n}",
16
+ "title": "分配成功"
17
+ }
18
+ ],
3
19
  "BindCloudStorageUser": [
4
20
  {
5
21
  "document": "",
@@ -52,6 +68,14 @@
52
68
  "title": "同步调用设备行为,设备不在线。"
53
69
  }
54
70
  ],
71
+ "CancelAssignTWeCallLicense": [
72
+ {
73
+ "document": "",
74
+ "input": "POST / HTTP/1.1\nHost: iotexplorer.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CancelAssignTWeCallLicense\n<公共请求参数>\n\n{\n \"PkgId\": \"abc\"\n}",
75
+ "output": "{\n \"Response\": {\n \"RequestId\": \"abc\"\n }\n}",
76
+ "title": "成功取消分配"
77
+ }
78
+ ],
55
79
  "ControlDeviceData": [
56
80
  {
57
81
  "document": "设置设备数据",
@@ -706,6 +730,14 @@
706
730
  "title": "获取视频防盗链播放URL"
707
731
  }
708
732
  ],
733
+ "GetAuthMiniProgramAppList": [
734
+ {
735
+ "document": "",
736
+ "input": "POST / HTTP/1.1\nHost: iotexplorer.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: GetAuthMiniProgramAppList\n<公共请求参数>\n\n{\n \"MiniProgramAppId\": \"123wdc\"\n}",
737
+ "output": "{\n \"Response\": {\n \"RequestId\": \"abc\",\n \"Total\": 1,\n \"MiniProgramList\": [\n {\n \"MiniProgramAppId\": \"1qaz\",\n \"MiniProgramName\": \"appBane\",\n \"LicenseNum\": 100,\n \"CreateTime\": 45674345567\n }\n ]\n }\n}",
738
+ "title": "成功查询小程序列表"
739
+ }
740
+ ],
709
741
  "GetBatchProductionsList": [
710
742
  {
711
743
  "document": "",
@@ -800,6 +832,22 @@
800
832
  "title": "获取产品列表"
801
833
  }
802
834
  ],
835
+ "GetTWeCallActiveStatus": [
836
+ {
837
+ "document": "",
838
+ "input": "POST / HTTP/1.1\nHost: iotexplorer.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: GetTWeCallActiveStatus\n<公共请求参数>\n\n{\n \"MiniProgramAppId\": \"abc\",\n \"DeviceList\": [\n {\n \"ModelId\": \"1qaz\",\n \"Sn\": \"p/d\"\n }\n ]\n}",
839
+ "output": "{\n \"Response\": {\n \"RequestId\": \"abc\",\n \"TWeCallActiveInfos\": [\n {\n \"ModelId\": \"1qaz\",\n \"Sn\": \"p/d\",\n \"ExpireTime\": 45674345567\n }\n ]\n }\n}",
840
+ "title": "成功获取激活状态"
841
+ }
842
+ ],
843
+ "GetTWeCallPkgList": [
844
+ {
845
+ "document": "",
846
+ "input": "POST / HTTP/1.1\nHost: iotexplorer.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: GetTWeCallPkgList\n<公共请求参数>\n\n{\n \"MiniProgramAppId\": \"abc\"\n}",
847
+ "output": "{\n \"Response\": {\n \"RequestId\": \"abc\",\n \"Total\": 1,\n \"TWeCallPkgList\": [\n {\n \"PkgId\": \"1qaz\",\n \"PkgType\": 1,\n \"CreateTime\": 45674345567,\n \"ExpireTime\": 45674345567,\n \"LicenseTotalNum\": 1,\n \"LicenseUsedNum\": 1\n }\n ]\n }\n}",
848
+ "title": "成功查询示例"
849
+ }
850
+ ],
803
851
  "GetTopicRuleList": [
804
852
  {
805
853
  "document": "",
@@ -993,7 +993,7 @@
993
993
  "members": [
994
994
  {
995
995
  "disabled": false,
996
- "document": "云硬盘ID列表。",
996
+ "document": "云硬盘ID列表。每次批量请求云硬盘的上限为 100。可通过[DescribeDisks](https://cloud.tencent.com/document/product/1207/66093)接口返回值中的DiskId获取。",
997
997
  "example": "[\"lhdisk-5vmz00i3\"]",
998
998
  "member": "string",
999
999
  "name": "DiskIds",
@@ -1002,7 +1002,7 @@
1002
1002
  },
1003
1003
  {
1004
1004
  "disabled": false,
1005
- "document": "实例ID",
1005
+ "document": "实例ID。可通过[DescribeInstances](https://cloud.tencent.com/document/product/1207/47573)接口返回值中的InstanceId获取。",
1006
1006
  "example": "lhins-qg08np8l",
1007
1007
  "member": "string",
1008
1008
  "name": "InstanceId",
@@ -3149,7 +3149,7 @@
3149
3149
  "members": [
3150
3150
  {
3151
3151
  "disabled": false,
3152
- "document": "云硬盘ID列表。",
3152
+ "document": "云硬盘ID列表。每次批量请求云硬盘的上限为 100。可通过[DescribeDisks](https://cloud.tencent.com/document/product/1207/66093)接口返回值中的DiskId获取。",
3153
3153
  "example": "[\"lhdisk-eobj8huv\"]",
3154
3154
  "member": "string",
3155
3155
  "name": "DiskIds",
@@ -3168,7 +3168,7 @@
3168
3168
  "example": "无",
3169
3169
  "member": "DiskDeniedActions",
3170
3170
  "name": "DiskDeniedActionSet",
3171
- "required": true,
3171
+ "output_required": true,
3172
3172
  "type": "list",
3173
3173
  "value_allowed_null": false
3174
3174
  },
@@ -3186,7 +3186,7 @@
3186
3186
  "members": [
3187
3187
  {
3188
3188
  "disabled": false,
3189
- "document": "云硬盘ID列表。",
3189
+ "document": "云硬盘ID列表。每次批量请求云硬盘的上限为 100。",
3190
3190
  "example": "[\"lhdisk-p1zflrif\"]",
3191
3191
  "member": "string",
3192
3192
  "name": "DiskIds",
@@ -3278,7 +3278,7 @@
3278
3278
  "members": [
3279
3279
  {
3280
3280
  "disabled": false,
3281
- "document": "云硬盘ID列表。",
3281
+ "document": "云硬盘ID列表。每次批量请求云硬盘的上限为 10。可通过[DescribeDisks](https://cloud.tencent.com/document/product/1207/66093)接口返回值中的DiskId获取。",
3282
3282
  "example": "[\"lhdisk-eobj8huv\"]",
3283
3283
  "member": "string",
3284
3284
  "name": "DiskIds",
@@ -3315,7 +3315,7 @@
3315
3315
  "example": "无",
3316
3316
  "member": "DiskReturnable",
3317
3317
  "name": "DiskReturnableSet",
3318
- "required": true,
3318
+ "output_required": true,
3319
3319
  "type": "list",
3320
3320
  "value_allowed_null": false
3321
3321
  },
@@ -3325,7 +3325,7 @@
3325
3325
  "example": "1",
3326
3326
  "member": "int64",
3327
3327
  "name": "TotalCount",
3328
- "required": true,
3328
+ "output_required": true,
3329
3329
  "type": "int",
3330
3330
  "value_allowed_null": false
3331
3331
  },
@@ -4889,7 +4889,7 @@
4889
4889
  "members": [
4890
4890
  {
4891
4891
  "disabled": false,
4892
- "document": "云联网实例ID",
4892
+ "document": "云联网实例ID。可通过[DescribeCcnAttachedInstances](https://cloud.tencent.com/document/product/1207/58797)接口返回值中的CcnId获取。",
4893
4893
  "example": "ccn-f49l6u0z",
4894
4894
  "member": "string",
4895
4895
  "name": "CcnId",
@@ -4916,7 +4916,7 @@
4916
4916
  "members": [
4917
4917
  {
4918
4918
  "disabled": false,
4919
- "document": "云硬盘ID列表。",
4919
+ "document": "云硬盘ID列表。每次批量请求云硬盘的上限为 100。可通过[DescribeDisks](https://cloud.tencent.com/document/product/1207/66093)接口返回值中的DiskId获取。",
4920
4920
  "example": "[\"lhdisk-eobj8huv\"]",
4921
4921
  "member": "string",
4922
4922
  "name": "DiskIds",
@@ -6641,7 +6641,7 @@
6641
6641
  "members": [
6642
6642
  {
6643
6643
  "disabled": false,
6644
- "document": "云硬盘ID列表。",
6644
+ "document": "云硬盘ID列表。每次批量请求云硬盘的上限为 1。可通过[DescribeDisks](https://cloud.tencent.com/document/product/1207/66093)接口返回值中的DiskId获取。",
6645
6645
  "example": "[\"lhdisk-eobj8huv\"]",
6646
6646
  "member": "string",
6647
6647
  "name": "DiskIds",
@@ -6669,7 +6669,7 @@
6669
6669
  "example": "无",
6670
6670
  "member": "DiskPrice",
6671
6671
  "name": "DiskPrice",
6672
- "required": true,
6672
+ "output_required": true,
6673
6673
  "type": "object",
6674
6674
  "value_allowed_null": false
6675
6675
  },
@@ -7656,7 +7656,7 @@
7656
7656
  "members": [
7657
7657
  {
7658
7658
  "disabled": false,
7659
- "document": "云硬盘ID列表。",
7659
+ "document": "云硬盘ID列表。每次批量请求云硬盘的上限为 100。可通过[DescribeDisks](https://cloud.tencent.com/document/product/1207/66093)接口返回值中的DiskId获取。",
7660
7660
  "example": "[\"lhdisk-p1zflrif\"]",
7661
7661
  "member": "string",
7662
7662
  "name": "DiskIds",
@@ -7728,7 +7728,7 @@
7728
7728
  "members": [
7729
7729
  {
7730
7730
  "disabled": false,
7731
- "document": "云硬盘ID列表。",
7731
+ "document": "云硬盘ID列表。每次批量请求云硬盘的上限为 100。可通过[DescribeDisks](https://cloud.tencent.com/document/product/1207/66093)接口返回值中的DiskId获取。",
7732
7732
  "example": "[\"lhdisk-eobj8huv\"]",
7733
7733
  "member": "string",
7734
7734
  "name": "DiskIds",
@@ -7737,7 +7737,7 @@
7737
7737
  },
7738
7738
  {
7739
7739
  "disabled": false,
7740
- "document": "自动续费标识。取值范围:<br><li>NOTIFY_AND_AUTO_RENEW:通知过期且自动续费<br><li>NOTIFY_AND_MANUAL_RENEW:通知过期不自动续费<br><li>DISABLE_NOTIFY_AND_MANUAL_RENEW:不通知过期不自动续费<br><br>若该参数指定为NOTIFY_AND_AUTO_RENEW,在账户余额充足的情况下,实例到期后将按月自动续费。",
7740
+ "document": "自动续费标识。取值范围:\n\n- NOTIFY_AND_AUTO_RENEW:通知过期且自动续费\n- NOTIFY_AND_MANUAL_RENEW:通知过期不自动续费\n- DISABLE_NOTIFY_AND_MANUAL_RENEW:不通知过期不自动续费\n\n若该参数指定为NOTIFY_AND_AUTO_RENEW,在账户余额充足的情况下,实例到期后将按月自动续费。",
7741
7741
  "example": "NOTIFY_AND_AUTO_RENEW",
7742
7742
  "member": "string",
7743
7743
  "name": "RenewFlag",
@@ -8657,7 +8657,7 @@
8657
8657
  "members": [
8658
8658
  {
8659
8659
  "disabled": false,
8660
- "document": "云联网实例ID",
8660
+ "document": "云联网实例ID。可通过[DescribeCcnAttachedInstances](https://cloud.tencent.com/document/product/1207/58797)接口返回值中的CcnId获取。",
8661
8661
  "example": "ccn-f49l6u0z",
8662
8662
  "member": "string",
8663
8663
  "name": "CcnId",
@@ -173,6 +173,58 @@ def doGetFlowStatistic(args, parsed_globals):
173
173
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
174
174
 
175
175
 
176
+ def doGetFlowStatisticByGroup(args, parsed_globals):
177
+ g_param = parse_global_arg(parsed_globals)
178
+
179
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
180
+ cred = credential.CVMRoleCredential()
181
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
182
+ cred = credential.STSAssumeRoleCredential(
183
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
184
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
185
+ )
186
+ 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):
187
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
188
+ else:
189
+ cred = credential.Credential(
190
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
191
+ )
192
+ http_profile = HttpProfile(
193
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
194
+ reqMethod="POST",
195
+ endpoint=g_param[OptionsDefine.Endpoint],
196
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
197
+ )
198
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
199
+ if g_param[OptionsDefine.Language]:
200
+ profile.language = g_param[OptionsDefine.Language]
201
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
202
+ client = mod.MnaClient(cred, g_param[OptionsDefine.Region], profile)
203
+ client._sdkVersion += ("_CLI_" + __version__)
204
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
205
+ model = models.GetFlowStatisticByGroupRequest()
206
+ model.from_json_string(json.dumps(args))
207
+ start_time = time.time()
208
+ while True:
209
+ rsp = client.GetFlowStatisticByGroup(model)
210
+ result = rsp.to_json_string()
211
+ try:
212
+ json_obj = json.loads(result)
213
+ except TypeError as e:
214
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
215
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
216
+ break
217
+ cur_time = time.time()
218
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
219
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
220
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
221
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
222
+ else:
223
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
224
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
225
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
226
+
227
+
176
228
  def doGetMultiFlowStatistic(args, parsed_globals):
177
229
  g_param = parse_global_arg(parsed_globals)
178
230
 
@@ -485,6 +537,58 @@ def doAddHardware(args, parsed_globals):
485
537
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
486
538
 
487
539
 
540
+ def doGetDevice(args, parsed_globals):
541
+ g_param = parse_global_arg(parsed_globals)
542
+
543
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
544
+ cred = credential.CVMRoleCredential()
545
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
546
+ cred = credential.STSAssumeRoleCredential(
547
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
548
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
549
+ )
550
+ elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
551
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
552
+ else:
553
+ cred = credential.Credential(
554
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
555
+ )
556
+ http_profile = HttpProfile(
557
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
558
+ reqMethod="POST",
559
+ endpoint=g_param[OptionsDefine.Endpoint],
560
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
561
+ )
562
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
563
+ if g_param[OptionsDefine.Language]:
564
+ profile.language = g_param[OptionsDefine.Language]
565
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
566
+ client = mod.MnaClient(cred, g_param[OptionsDefine.Region], profile)
567
+ client._sdkVersion += ("_CLI_" + __version__)
568
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
569
+ model = models.GetDeviceRequest()
570
+ model.from_json_string(json.dumps(args))
571
+ start_time = time.time()
572
+ while True:
573
+ rsp = client.GetDevice(model)
574
+ result = rsp.to_json_string()
575
+ try:
576
+ json_obj = json.loads(result)
577
+ except TypeError as e:
578
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
579
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
580
+ break
581
+ cur_time = time.time()
582
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
583
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
584
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
585
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
586
+ else:
587
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
588
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
589
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
590
+
591
+
488
592
  def doCreateQos(args, parsed_globals):
489
593
  g_param = parse_global_arg(parsed_globals)
490
594
 
@@ -901,7 +1005,7 @@ def doDeleteQos(args, parsed_globals):
901
1005
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
902
1006
 
903
1007
 
904
- def doGetDevice(args, parsed_globals):
1008
+ def doGetFlowAlarmInfo(args, parsed_globals):
905
1009
  g_param = parse_global_arg(parsed_globals)
906
1010
 
907
1011
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -930,11 +1034,11 @@ def doGetDevice(args, parsed_globals):
930
1034
  client = mod.MnaClient(cred, g_param[OptionsDefine.Region], profile)
931
1035
  client._sdkVersion += ("_CLI_" + __version__)
932
1036
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
933
- model = models.GetDeviceRequest()
1037
+ model = models.GetFlowAlarmInfoRequest()
934
1038
  model.from_json_string(json.dumps(args))
935
1039
  start_time = time.time()
936
1040
  while True:
937
- rsp = client.GetDevice(model)
1041
+ rsp = client.GetFlowAlarmInfo(model)
938
1042
  result = rsp.to_json_string()
939
1043
  try:
940
1044
  json_obj = json.loads(result)
@@ -1227,12 +1331,14 @@ ACTION_MAP = {
1227
1331
  "GetDevicePayMode": doGetDevicePayMode,
1228
1332
  "ModifyPackageRenewFlag": doModifyPackageRenewFlag,
1229
1333
  "GetFlowStatistic": doGetFlowStatistic,
1334
+ "GetFlowStatisticByGroup": doGetFlowStatisticByGroup,
1230
1335
  "GetMultiFlowStatistic": doGetMultiFlowStatistic,
1231
1336
  "GetDevices": doGetDevices,
1232
1337
  "GetPublicKey": doGetPublicKey,
1233
1338
  "ActivateHardware": doActivateHardware,
1234
1339
  "GetFlowPackages": doGetFlowPackages,
1235
1340
  "AddHardware": doAddHardware,
1341
+ "GetDevice": doGetDevice,
1236
1342
  "CreateQos": doCreateQos,
1237
1343
  "DeleteDevice": doDeleteDevice,
1238
1344
  "UpdateDevice": doUpdateDevice,
@@ -1241,7 +1347,7 @@ ACTION_MAP = {
1241
1347
  "GetVendorHardware": doGetVendorHardware,
1242
1348
  "CreateEncryptedKey": doCreateEncryptedKey,
1243
1349
  "DeleteQos": doDeleteQos,
1244
- "GetDevice": doGetDevice,
1350
+ "GetFlowAlarmInfo": doGetFlowAlarmInfo,
1245
1351
  "OrderFlowPackage": doOrderFlowPackage,
1246
1352
  "GetStatisticData": doGetStatisticData,
1247
1353
  "GetHardwareList": doGetHardwareList,
@@ -77,6 +77,13 @@
77
77
  "output": "GetDevicesResponse",
78
78
  "status": "online"
79
79
  },
80
+ "GetFlowAlarmInfo": {
81
+ "document": "根据AppId查询用户设置的流量告警信息,包括阈值,回调url和key",
82
+ "input": "GetFlowAlarmInfoRequest",
83
+ "name": "查询流量告警信息",
84
+ "output": "GetFlowAlarmInfoResponse",
85
+ "status": "online"
86
+ },
80
87
  "GetFlowPackages": {
81
88
  "document": "获取流量包列表",
82
89
  "input": "GetFlowPackagesRequest",
@@ -91,6 +98,13 @@
91
98
  "output": "GetFlowStatisticResponse",
92
99
  "status": "online"
93
100
  },
101
+ "GetFlowStatisticByGroup": {
102
+ "document": "获取指定分组,指定时间数据流量使用情况",
103
+ "input": "GetFlowStatisticByGroupRequest",
104
+ "name": "根据设备组获取数据流量统计数据",
105
+ "output": "GetFlowStatisticByGroupResponse",
106
+ "status": "online"
107
+ },
94
108
  "GetHardwareList": {
95
109
  "document": "获取厂商硬件列表",
96
110
  "input": "GetHardwareListRequest",
@@ -1653,6 +1667,53 @@
1653
1667
  ],
1654
1668
  "type": "object"
1655
1669
  },
1670
+ "GetFlowAlarmInfoRequest": {
1671
+ "document": "GetFlowAlarmInfo请求参数结构体",
1672
+ "members": [],
1673
+ "type": "object"
1674
+ },
1675
+ "GetFlowAlarmInfoResponse": {
1676
+ "document": "GetFlowAlarmInfo返回参数结构体",
1677
+ "members": [
1678
+ {
1679
+ "disabled": false,
1680
+ "document": "流量包的告警阈值\n注意:此字段可能返回 null,表示取不到有效值。",
1681
+ "example": "20",
1682
+ "member": "int64",
1683
+ "name": "AlarmValue",
1684
+ "output_required": false,
1685
+ "type": "int",
1686
+ "value_allowed_null": true
1687
+ },
1688
+ {
1689
+ "disabled": false,
1690
+ "document": "告警通知回调url\n注意:此字段可能返回 null,表示取不到有效值。",
1691
+ "example": "http://ip:port/callurl",
1692
+ "member": "string",
1693
+ "name": "NotifyUrl",
1694
+ "output_required": true,
1695
+ "type": "string",
1696
+ "value_allowed_null": true
1697
+ },
1698
+ {
1699
+ "disabled": false,
1700
+ "document": "告警通知回调key\n注意:此字段可能返回 null,表示取不到有效值。",
1701
+ "example": "xd23y5cb89bx23432",
1702
+ "member": "string",
1703
+ "name": "CallbackKey",
1704
+ "output_required": true,
1705
+ "type": "string",
1706
+ "value_allowed_null": true
1707
+ },
1708
+ {
1709
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
1710
+ "member": "string",
1711
+ "name": "RequestId",
1712
+ "type": "string"
1713
+ }
1714
+ ],
1715
+ "type": "object"
1716
+ },
1656
1717
  "GetFlowPackagesRequest": {
1657
1718
  "document": "GetFlowPackages请求参数结构体",
1658
1719
  "members": [
@@ -1736,6 +1797,127 @@
1736
1797
  ],
1737
1798
  "type": "object"
1738
1799
  },
1800
+ "GetFlowStatisticByGroupRequest": {
1801
+ "document": "GetFlowStatisticByGroup请求参数结构体",
1802
+ "members": [
1803
+ {
1804
+ "disabled": false,
1805
+ "document": "分组ID",
1806
+ "example": "1a2b3c4d5e",
1807
+ "member": "string",
1808
+ "name": "GroupId",
1809
+ "required": true,
1810
+ "type": "string"
1811
+ },
1812
+ {
1813
+ "disabled": false,
1814
+ "document": "开始查找时间",
1815
+ "example": "1659514436",
1816
+ "member": "int64",
1817
+ "name": "BeginTime",
1818
+ "required": true,
1819
+ "type": "int"
1820
+ },
1821
+ {
1822
+ "disabled": false,
1823
+ "document": "截止时间",
1824
+ "example": "1659515436",
1825
+ "member": "int64",
1826
+ "name": "EndTime",
1827
+ "required": true,
1828
+ "type": "int"
1829
+ },
1830
+ {
1831
+ "disabled": false,
1832
+ "document": "流量种类(1:上行流量,2:下行流量, 3: 上下行总和)",
1833
+ "example": "1",
1834
+ "member": "int64",
1835
+ "name": "Type",
1836
+ "required": true,
1837
+ "type": "int"
1838
+ },
1839
+ {
1840
+ "disabled": false,
1841
+ "document": "时间粒度(1:按小时统计,2:按天统计)",
1842
+ "example": "1",
1843
+ "member": "int64",
1844
+ "name": "TimeGranularity",
1845
+ "required": true,
1846
+ "type": "int"
1847
+ },
1848
+ {
1849
+ "disabled": false,
1850
+ "document": "接入区域。取值范围:['MC','AP','EU','AM'] MC=中国大陆 AP=亚太 EU=欧洲 AM=美洲。不填代表全量区域。",
1851
+ "example": "MC",
1852
+ "member": "string",
1853
+ "name": "AccessRegion",
1854
+ "required": false,
1855
+ "type": "string"
1856
+ },
1857
+ {
1858
+ "disabled": false,
1859
+ "document": "网关类型。0:公有云网关;1:自有网关。不传默认为0。",
1860
+ "example": "0",
1861
+ "member": "int64",
1862
+ "name": "GatewayType",
1863
+ "required": false,
1864
+ "type": "int"
1865
+ }
1866
+ ],
1867
+ "type": "object"
1868
+ },
1869
+ "GetFlowStatisticByGroupResponse": {
1870
+ "document": "GetFlowStatisticByGroup返回参数结构体",
1871
+ "members": [
1872
+ {
1873
+ "disabled": false,
1874
+ "document": "流量详细信息",
1875
+ "example": "无",
1876
+ "member": "NetDetails",
1877
+ "name": "NetDetails",
1878
+ "output_required": true,
1879
+ "type": "list",
1880
+ "value_allowed_null": false
1881
+ },
1882
+ {
1883
+ "disabled": false,
1884
+ "document": "查找时间段流量使用最大值(单位:byte)",
1885
+ "example": "216516",
1886
+ "member": "float",
1887
+ "name": "MaxValue",
1888
+ "output_required": true,
1889
+ "type": "float",
1890
+ "value_allowed_null": false
1891
+ },
1892
+ {
1893
+ "disabled": false,
1894
+ "document": "查找时间段流量使用平均值(单位:byte)",
1895
+ "example": "25151",
1896
+ "member": "float",
1897
+ "name": "AvgValue",
1898
+ "output_required": true,
1899
+ "type": "float",
1900
+ "value_allowed_null": false
1901
+ },
1902
+ {
1903
+ "disabled": false,
1904
+ "document": "查找时间段流量使用总量(单位:byte)",
1905
+ "example": "35465464",
1906
+ "member": "float",
1907
+ "name": "TotalValue",
1908
+ "output_required": true,
1909
+ "type": "float",
1910
+ "value_allowed_null": false
1911
+ },
1912
+ {
1913
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
1914
+ "member": "string",
1915
+ "name": "RequestId",
1916
+ "type": "string"
1917
+ }
1918
+ ],
1919
+ "type": "object"
1920
+ },
1739
1921
  "GetFlowStatisticRequest": {
1740
1922
  "document": "GetFlowStatistic请求参数结构体",
1741
1923
  "members": [
@@ -88,6 +88,14 @@
88
88
  "title": "获取设备基本信息列表"
89
89
  }
90
90
  ],
91
+ "GetFlowAlarmInfo": [
92
+ {
93
+ "document": "",
94
+ "input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: GetFlowAlarmInfo\n<公共请求参数>\n\n{}",
95
+ "output": "{\n \"Response\": {\n \"AlarmValue\": 20,\n \"NotifyUrl\": \"http://ip:port/callurl\",\n \"CallbackKey\": \"xd23y5cb89bx23432\",\n \"RequestId\": \"1206563f-f13f-4647-aaa8-37fa86954cc4-1\"\n }\n}",
96
+ "title": "示例1"
97
+ }
98
+ ],
91
99
  "GetFlowPackages": [
92
100
  {
93
101
  "document": "",
@@ -110,6 +118,14 @@
110
118
  "title": "获取多个设备的流量使用信息之和"
111
119
  }
112
120
  ],
121
+ "GetFlowStatisticByGroup": [
122
+ {
123
+ "document": "",
124
+ "input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: GetFlowStatisticByGroup\n<公共请求参数>\n\n{\n \"GroupId\": \"cliGrp-xf8rboasbh\",\n \"BeginTime\": 1711296000,\n \"EndTime\": 1711987200,\n \"Type\": 1,\n \"TimeGranularity\": 2,\n \"AccessRegion\": \"MC\",\n \"GatewayType\": 0\n}",
125
+ "output": "{\n \"Response\": {\n \"AvgValue\": 154434162.5,\n \"MaxValue\": 305576473,\n \"NetDetails\": [\n {\n \"Current\": 305576473,\n \"Time\": \"1711555200\"\n },\n {\n \"Current\": 3291852,\n \"Time\": \"1711641600\"\n }\n ],\n \"RequestId\": \"e5b650a9-d994-439f-9132-3e5c56054903\",\n \"TotalValue\": 308868325\n }\n}",
126
+ "title": "根据分组获取用量统计信息"
127
+ }
128
+ ],
113
129
  "GetHardwareList": [
114
130
  {
115
131
  "document": "硬件信息列表",