tccli 3.0.1146.1__py2.py3-none-any.whl → 3.0.1147.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.
Files changed (29) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/aiart/v20221229/api.json +2 -2
  3. tccli/services/aiart/v20221229/examples.json +4 -4
  4. tccli/services/cdb/v20170320/api.json +14 -10
  5. tccli/services/cdn/v20180606/api.json +1 -1
  6. tccli/services/goosefs/v20220519/api.json +92 -12
  7. tccli/services/iotexplorer/v20190423/api.json +1 -1
  8. tccli/services/ivld/ivld_client.py +163 -4
  9. tccli/services/ivld/v20210903/api.json +443 -0
  10. tccli/services/ivld/v20210903/examples.json +24 -0
  11. tccli/services/live/v20180801/api.json +7 -5
  12. tccli/services/lke/v20231130/examples.json +2 -2
  13. tccli/services/postgres/v20170312/api.json +7 -7
  14. tccli/services/rum/v20210622/api.json +9 -0
  15. tccli/services/tdcpg/v20211118/api.json +4 -4
  16. tccli/services/tdcpg/v20211118/examples.json +2 -2
  17. tccli/services/trtc/trtc_client.py +163 -4
  18. tccli/services/trtc/v20190722/api.json +311 -0
  19. tccli/services/trtc/v20190722/examples.json +24 -0
  20. tccli/services/tse/v20201207/api.json +19 -0
  21. tccli/services/vpc/v20170312/api.json +143 -25
  22. tccli/services/vpc/v20170312/examples.json +10 -2
  23. tccli/services/vpc/vpc_client.py +69 -16
  24. tccli/services/waf/v20180125/api.json +2 -2
  25. {tccli-3.0.1146.1.dist-info → tccli-3.0.1147.1.dist-info}/METADATA +2 -2
  26. {tccli-3.0.1146.1.dist-info → tccli-3.0.1147.1.dist-info}/RECORD +29 -29
  27. {tccli-3.0.1146.1.dist-info → tccli-3.0.1147.1.dist-info}/WHEEL +0 -0
  28. {tccli-3.0.1146.1.dist-info → tccli-3.0.1147.1.dist-info}/entry_points.txt +0 -0
  29. {tccli-3.0.1146.1.dist-info → tccli-3.0.1147.1.dist-info}/license_files/LICENSE +0 -0
@@ -416,14 +416,14 @@
416
416
  "DescribeLiveCert": {
417
417
  "document": "获取证书信息",
418
418
  "input": "DescribeLiveCertRequest",
419
- "name": "获取证书信息",
419
+ "name": "获取证书信息(该接口已下线,请使用新接口 ssl.DescribeCertificateDetail)",
420
420
  "output": "DescribeLiveCertResponse",
421
421
  "status": "online"
422
422
  },
423
423
  "DescribeLiveCerts": {
424
424
  "document": "获取证书信息列表",
425
425
  "input": "DescribeLiveCertsRequest",
426
- "name": "获取证书信息列表",
426
+ "name": "获取证书信息列表(该接口已下线,请使用新接口 DescribeLiveDomainCertBindings)",
427
427
  "output": "DescribeLiveCertsResponse",
428
428
  "status": "online"
429
429
  },
@@ -6181,7 +6181,7 @@
6181
6181
  {
6182
6182
  "disabled": false,
6183
6183
  "document": "DescribeLiveCerts接口获取到的证书Id。",
6184
- "example": "",
6184
+ "example": "F4eO8WVE",
6185
6185
  "member": "int64",
6186
6186
  "name": "CertId",
6187
6187
  "required": true,
@@ -6196,9 +6196,10 @@
6196
6196
  {
6197
6197
  "disabled": false,
6198
6198
  "document": "证书信息。",
6199
- "example": "",
6199
+ "example": "{}",
6200
6200
  "member": "CertInfo",
6201
6201
  "name": "CertInfo",
6202
+ "output_required": true,
6202
6203
  "type": "object",
6203
6204
  "value_allowed_null": false
6204
6205
  },
@@ -6222,9 +6223,10 @@
6222
6223
  {
6223
6224
  "disabled": false,
6224
6225
  "document": "证书信息列表。",
6225
- "example": "",
6226
+ "example": "{}",
6226
6227
  "member": "CertInfo",
6227
6228
  "name": "CertInfoSet",
6229
+ "output_required": true,
6228
6230
  "type": "list",
6229
6231
  "value_allowed_null": false
6230
6232
  },
@@ -68,7 +68,7 @@
68
68
  {
69
69
  "document": "",
70
70
  "input": "POST / HTTP/1.1\nHost: lke.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateReconstructDocumentFlow\n<公共请求参数>\n\n{\n \"FileStartPageNumber\": 1,\n \"FileEndPageNumber\": 1,\n \"Config\": {\n \"TableResultType\": \"1\"\n },\n \"FileBase64\": \"data:application/pdf;base64,JVBERi0xLjcKXXX...\"\n}",
71
- "output": "{\n \"Response\": {\n \"RequestId\": \"1d569fb4-4c9d-4141-bbd7-e1d8735bd1a9\",\n \"TaskId\": \"63d30100c7534a82a7eaea10d2ae48a2\"\n }\n}",
71
+ "output": "{\n \"Response\": {\n \"RequestId\": \"1d569fb4-4c9d-4141-bbd7-e1d8735bd1a9\",\n \"TaskId\": \"123123123\"\n }\n}",
72
72
  "title": "接口请求成功示例"
73
73
  }
74
74
  ],
@@ -321,7 +321,7 @@
321
321
  "GetReconstructDocumentResult": [
322
322
  {
323
323
  "document": "",
324
- "input": "POST / HTTP/1.1\nHost: lke.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: GetReconstructDocumentResult\n<公共请求参数>\n\n{\n \"TaskId\": \"a9c6a9482c72412fa84445af84125531\"\n}",
324
+ "input": "POST / HTTP/1.1\nHost: lke.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: GetReconstructDocumentResult\n<公共请求参数>\n\n{\n \"TaskId\": \"123123123\"\n}",
325
325
  "output": "{\n \"Response\": {\n \"DocumentRecognizeResultUrl\": \"https://document-restruction-1258344699.cos.ap-guangzhou.myqcloud.com/doc_parse/output_files/a9c6a9482c72412fa84445a44ss125531.zip?q-sign-algorithm=sha1&q-ak=AKIDlWFaadfHLNbidLwPqOrAKGzXrx40scL7l&q-sign-time=1715503711%3B1718804311&q-key-time=1718855711%3B1718804311&q-header-list=host&q-url-param-list=&q-signature=71b568b8632d7e45gertdc3d235ef68d41fdfe7f8\",\n \"FailedPages\": [],\n \"RequestId\": \"a37b0d0b-c3af-44bd-iuiu-632442644a80\",\n \"Status\": \"Success\"\n }\n}",
326
326
  "title": "接口调用成功示例"
327
327
  }
@@ -651,7 +651,7 @@
651
651
  {
652
652
  "disabled": false,
653
653
  "document": "实例ID,形如postgres-lnp6j617",
654
- "example": "",
654
+ "example": "postgres-lnp6j617",
655
655
  "member": "string",
656
656
  "name": "DBInstanceId",
657
657
  "output_required": true,
@@ -661,7 +661,7 @@
661
661
  {
662
662
  "disabled": false,
663
663
  "document": "账号",
664
- "example": "",
664
+ "example": "test_user",
665
665
  "member": "string",
666
666
  "name": "UserName",
667
667
  "output_required": true,
@@ -671,7 +671,7 @@
671
671
  {
672
672
  "disabled": false,
673
673
  "document": "账号备注",
674
- "example": "",
674
+ "example": "remark",
675
675
  "member": "string",
676
676
  "name": "Remark",
677
677
  "output_required": true,
@@ -681,7 +681,7 @@
681
681
  {
682
682
  "disabled": false,
683
683
  "document": "账号状态。 1-创建中,2-正常,3-修改中,4-密码重置中,5-锁定中,-1-删除中",
684
- "example": "",
684
+ "example": "2",
685
685
  "member": "int64",
686
686
  "name": "Status",
687
687
  "output_required": true,
@@ -691,7 +691,7 @@
691
691
  {
692
692
  "disabled": false,
693
693
  "document": "账号创建时间",
694
- "example": "",
694
+ "example": "2024-06-06 21:00:12",
695
695
  "member": "datetime",
696
696
  "name": "CreateTime",
697
697
  "output_required": true,
@@ -701,7 +701,7 @@
701
701
  {
702
702
  "disabled": false,
703
703
  "document": "账号最后一次更新时间",
704
- "example": "",
704
+ "example": "2024-06-06 22:00:12",
705
705
  "member": "datetime",
706
706
  "name": "UpdateTime",
707
707
  "output_required": true,
@@ -711,7 +711,7 @@
711
711
  {
712
712
  "disabled": false,
713
713
  "document": "账号类型",
714
- "example": "",
714
+ "example": "normal",
715
715
  "member": "string",
716
716
  "name": "UserType",
717
717
  "output_required": false,
@@ -5171,6 +5171,15 @@
5171
5171
  "name": "FileType",
5172
5172
  "required": false,
5173
5173
  "type": "int"
5174
+ },
5175
+ {
5176
+ "disabled": false,
5177
+ "document": "获取临时签名的bucket是国内站还是国际站(1表示国际站,其它表示国内站)",
5178
+ "example": "0",
5179
+ "member": "int64",
5180
+ "name": "Site",
5181
+ "required": false,
5182
+ "type": "int"
5174
5183
  }
5175
5184
  ],
5176
5185
  "type": "object"
@@ -1292,7 +1292,7 @@
1292
1292
  "example": "100",
1293
1293
  "member": "uint64",
1294
1294
  "name": "TotalCount",
1295
- "required": true,
1295
+ "output_required": true,
1296
1296
  "type": "int",
1297
1297
  "value_allowed_null": false
1298
1298
  },
@@ -1302,7 +1302,7 @@
1302
1302
  "example": "[]",
1303
1303
  "member": "Instance",
1304
1304
  "name": "InstanceSet",
1305
- "required": true,
1305
+ "output_required": true,
1306
1306
  "type": "list",
1307
1307
  "value_allowed_null": false
1308
1308
  },
@@ -1421,7 +1421,7 @@
1421
1421
  "example": "100",
1422
1422
  "member": "int64",
1423
1423
  "name": "TotalCount",
1424
- "required": true,
1424
+ "output_required": true,
1425
1425
  "type": "int",
1426
1426
  "value_allowed_null": false
1427
1427
  },
@@ -1431,7 +1431,7 @@
1431
1431
  "example": "[]",
1432
1432
  "member": "Cluster",
1433
1433
  "name": "ClusterSet",
1434
- "required": true,
1434
+ "output_required": true,
1435
1435
  "type": "list",
1436
1436
  "value_allowed_null": false
1437
1437
  },
@@ -68,7 +68,7 @@
68
68
  {
69
69
  "document": "",
70
70
  "input": "POST / HTTP/1.1\nHost: tdcpg.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeClusterInstances\n<公共请求参数>\n\n{\n \"ClusterId\": \"tdcpg-77iesdqa\",\n \"OrderBy\": \"CreateTime\",\n \"OrderByType\": \"DESC\",\n \"PageNumber\": 1,\n \"Filters\": [\n {\n \"Values\": [\n \"tdcpg-ins-6c6xs52r\"\n ],\n \"Name\": \"InstanceId\",\n \"ExactMatch\": true\n }\n ],\n \"PageSize\": 10\n}",
71
- "output": "{\n \"Response\": {\n \"InstanceSet\": [\n {\n \"CPU\": 1,\n \"ClusterId\": \"tdcpg-77iesdqa\",\n \"CreateTime\": \"2021-12-08T19:50:56+08:00\",\n \"DBVersion\": \"10.17\",\n \"EndpointId\": \"tdcpg-ep-6c6xs52r\",\n \"InstanceId\": \"tdcpg-ins-pzu77n6e\",\n \"InstanceName\": \"tdcpg-ins-pzu77n6e\",\n \"InstanceType\": \"RW\",\n \"Memory\": 1,\n \"PayMode\": \"PREPAID\",\n \"PayPeriodEndTime\": \"2022-01-08T19:50:54+08:00\",\n \"Region\": \"ap-guangzhou\",\n \"Status\": \"running\",\n \"StatusDesc\": \"运行中\",\n \"Zone\": \"ap-guangzhou-2\"\n }\n ],\n \"RequestId\": \"e0ef1b06-405f-48cc-863f-185dbb6eb037\",\n \"TotalCount\": 1\n }\n}",
71
+ "output": "{\n \"Response\": {\n \"InstanceSet\": [\n {\n \"CPU\": 1,\n \"ClusterId\": \"tdcpg-77iesdqa\",\n \"CreateTime\": \"2021-12-08T19:50:56+08:00\",\n \"DBVersion\": \"10.17\",\n \"DBKernelVersion\": \"v10.17_r1.1\",\n \"DBMajorVersion\": \"10\",\n \"EndpointId\": \"tdcpg-ep-6c6xs52r\",\n \"InstanceId\": \"tdcpg-ins-pzu77n6e\",\n \"InstanceName\": \"tdcpg-ins-pzu77n6e\",\n \"InstanceType\": \"RW\",\n \"Memory\": 1,\n \"PayMode\": \"PREPAID\",\n \"PayPeriodEndTime\": \"2022-01-08T19:50:54+08:00\",\n \"Region\": \"ap-guangzhou\",\n \"Status\": \"running\",\n \"StatusDesc\": \"运行中\",\n \"Zone\": \"ap-guangzhou-2\"\n }\n ],\n \"RequestId\": \"e0ef1b06-405f-48cc-863f-185dbb6eb037\",\n \"TotalCount\": 1\n }\n}",
72
72
  "title": "查询实例"
73
73
  }
74
74
  ],
@@ -84,7 +84,7 @@
84
84
  {
85
85
  "document": "",
86
86
  "input": "POST / HTTP/1.1\nHost: tdcpg.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeClusters\n<公共请求参数>\n\n{\n \"OrderBy\": \"CreateTime\",\n \"OrderByType\": \"DESC\",\n \"PageNumber\": 1,\n \"Filters\": [\n {\n \"Values\": [\n \"tdcpg-77iesdqa\"\n ],\n \"Name\": \"ClusterId\",\n \"ExactMatch\": true\n }\n ],\n \"PageSize\": 10\n}",
87
- "output": "{\n \"Response\": {\n \"ClusterSet\": [\n {\n \"AutoRenewFlag\": 0,\n \"ClusterId\": \"tdcpg-77iesdqa\",\n \"ClusterName\": \"tdcpg-77iesdqa\",\n \"CreateTime\": \"2021-12-08T19:50:55+08:00\",\n \"DBCharset\": \"UTF8\",\n \"DBMajorVersion\": \"10\",\n \"DBVersion\": \"10.17\",\n \"DBKernelVersion\": \"v10.17_r1.4\",\n \"EndpointSet\": [\n {\n \"ClusterId\": \"tdcpg-77iesdqa\",\n \"EndpointId\": \"tdcpg-ep-6c6xs52r\",\n \"EndpointName\": \"tdcpg-ep-6c6xs52r\",\n \"EndpointType\": \"RW\",\n \"PrivateIp\": \"10.0.64.20\",\n \"PrivatePort\": 5432,\n \"SubnetId\": \"subnet-5wnhtsmw\",\n \"VpcId\": \"vpc-l0ee2prd\",\n \"WanDomain\": \"\",\n \"WanIp\": \"\",\n \"WanPort\": 0\n },\n {\n \"ClusterId\": \"tdcpg-77iesdqa\",\n \"EndpointId\": \"tdcpg-ep-ffscxj6f\",\n \"EndpointName\": \"tdcpg-ep-ffscxj6f\",\n \"EndpointType\": \"RO\",\n \"PrivateIp\": \"10.0.64.24\",\n \"PrivatePort\": 5432,\n \"SubnetId\": \"subnet-5wnhtsmw\",\n \"VpcId\": \"vpc-l0ee2prd\",\n \"WanDomain\": \"\",\n \"WanIp\": \"\",\n \"WanPort\": 0\n }\n ],\n \"InstanceCount\": 2,\n \"PayMode\": \"PREPAID\",\n \"PayPeriodEndTime\": \"2022-01-08T19:50:54+08:00\",\n \"ProjectId\": 0,\n \"Region\": \"ap-guangzhou\",\n \"Status\": \"running\",\n \"StatusDesc\": \"运行中\",\n \"StorageLimit\": 2048,\n \"StorageUsed\": 0.14,\n \"Zone\": \"ap-guangzhou-3\"\n }\n ],\n \"RequestId\": \"c644d6ec-0743-4ba3-916a-e30c5a00ada1\",\n \"TotalCount\": 1\n }\n}",
87
+ "output": "{\n \"Response\": {\n \"ClusterSet\": [\n {\n \"AutoRenewFlag\": 0,\n \"ClusterId\": \"tdcpg-77iesdqa\",\n \"ClusterName\": \"tdcpg-77iesdqa\",\n \"CreateTime\": \"2021-12-08T19:50:55+08:00\",\n \"DBCharset\": \"UTF8\",\n \"DBMajorVersion\": \"10\",\n \"DBVersion\": \"10.17\",\n \"DBKernelVersion\": \"v10.17_r1.4\",\n \"EndpointSet\": [\n {\n \"ClusterId\": \"tdcpg-77iesdqa\",\n \"EndpointId\": \"tdcpg-ep-6c6xs52r\",\n \"EndpointName\": \"tdcpg-ep-6c6xs52r\",\n \"EndpointType\": \"RW\",\n \"PrivateIp\": \"10.0.64.20\",\n \"PrivatePort\": 5432,\n \"SubnetId\": \"subnet-5wnhtsmw\",\n \"VpcId\": \"vpc-l0ee2prd\",\n \"WanDomain\": \"\",\n \"WanIp\": \"\",\n \"WanPort\": 0\n },\n {\n \"ClusterId\": \"tdcpg-77iesdqa\",\n \"EndpointId\": \"tdcpg-ep-ffscxj6f\",\n \"EndpointName\": \"tdcpg-ep-ffscxj6f\",\n \"EndpointType\": \"RO\",\n \"PrivateIp\": \"10.0.64.24\",\n \"PrivatePort\": 5432,\n \"SubnetId\": \"subnet-5wnhtsmw\",\n \"VpcId\": \"vpc-l0ee2prd\",\n \"WanDomain\": \"\",\n \"WanIp\": \"\",\n \"WanPort\": 0\n }\n ],\n \"InstanceCount\": 2,\n \"PayMode\": \"PREPAID\",\n \"PayPeriodEndTime\": \"2022-01-08T19:50:54+08:00\",\n \"ProjectId\": 0,\n \"Region\": \"ap-guangzhou\",\n \"Status\": \"running\",\n \"StatusDesc\": \"运行中\",\n \"StorageLimit\": 2048,\n \"StoragePayMode\": \"POSTPAID_BY_HOUR\",\n \"StorageUsed\": 0.14,\n \"Zone\": \"ap-guangzhou-3\"\n }\n ],\n \"RequestId\": \"c644d6ec-0743-4ba3-916a-e30c5a00ada1\",\n \"TotalCount\": 1\n }\n}",
88
88
  "title": "查询集群"
89
89
  }
90
90
  ],
@@ -225,6 +225,58 @@ def doDescribeTrtcUsage(args, parsed_globals):
225
225
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
226
226
 
227
227
 
228
+ def doStopAIConversation(args, parsed_globals):
229
+ g_param = parse_global_arg(parsed_globals)
230
+
231
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
232
+ cred = credential.CVMRoleCredential()
233
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
234
+ cred = credential.STSAssumeRoleCredential(
235
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
236
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
237
+ )
238
+ 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):
239
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
240
+ else:
241
+ cred = credential.Credential(
242
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
243
+ )
244
+ http_profile = HttpProfile(
245
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
246
+ reqMethod="POST",
247
+ endpoint=g_param[OptionsDefine.Endpoint],
248
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
249
+ )
250
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
251
+ if g_param[OptionsDefine.Language]:
252
+ profile.language = g_param[OptionsDefine.Language]
253
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
254
+ client = mod.TrtcClient(cred, g_param[OptionsDefine.Region], profile)
255
+ client._sdkVersion += ("_CLI_" + __version__)
256
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
257
+ model = models.StopAIConversationRequest()
258
+ model.from_json_string(json.dumps(args))
259
+ start_time = time.time()
260
+ while True:
261
+ rsp = client.StopAIConversation(model)
262
+ result = rsp.to_json_string()
263
+ try:
264
+ json_obj = json.loads(result)
265
+ except TypeError as e:
266
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
267
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
268
+ break
269
+ cur_time = time.time()
270
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
271
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
272
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
273
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
274
+ else:
275
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
276
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
277
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
278
+
279
+
228
280
  def doDescribeTRTCMarketQualityMetricData(args, parsed_globals):
229
281
  g_param = parse_global_arg(parsed_globals)
230
282
 
@@ -537,7 +589,7 @@ def doStopMCUMixTranscode(args, parsed_globals):
537
589
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
538
590
 
539
591
 
540
- def doStopStreamIngest(args, parsed_globals):
592
+ def doStartAIConversation(args, parsed_globals):
541
593
  g_param = parse_global_arg(parsed_globals)
542
594
 
543
595
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -566,11 +618,63 @@ def doStopStreamIngest(args, parsed_globals):
566
618
  client = mod.TrtcClient(cred, g_param[OptionsDefine.Region], profile)
567
619
  client._sdkVersion += ("_CLI_" + __version__)
568
620
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
569
- model = models.StopStreamIngestRequest()
621
+ model = models.StartAIConversationRequest()
570
622
  model.from_json_string(json.dumps(args))
571
623
  start_time = time.time()
572
624
  while True:
573
- rsp = client.StopStreamIngest(model)
625
+ rsp = client.StartAIConversation(model)
626
+ result = rsp.to_json_string()
627
+ try:
628
+ json_obj = json.loads(result)
629
+ except TypeError as e:
630
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
631
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
632
+ break
633
+ cur_time = time.time()
634
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
635
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
636
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
637
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
638
+ else:
639
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
640
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
641
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
642
+
643
+
644
+ def doDescribeAIConversation(args, parsed_globals):
645
+ g_param = parse_global_arg(parsed_globals)
646
+
647
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
648
+ cred = credential.CVMRoleCredential()
649
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
650
+ cred = credential.STSAssumeRoleCredential(
651
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
652
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
653
+ )
654
+ elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
655
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
656
+ else:
657
+ cred = credential.Credential(
658
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
659
+ )
660
+ http_profile = HttpProfile(
661
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
662
+ reqMethod="POST",
663
+ endpoint=g_param[OptionsDefine.Endpoint],
664
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
665
+ )
666
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
667
+ if g_param[OptionsDefine.Language]:
668
+ profile.language = g_param[OptionsDefine.Language]
669
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
670
+ client = mod.TrtcClient(cred, g_param[OptionsDefine.Region], profile)
671
+ client._sdkVersion += ("_CLI_" + __version__)
672
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
673
+ model = models.DescribeAIConversationRequest()
674
+ model.from_json_string(json.dumps(args))
675
+ start_time = time.time()
676
+ while True:
677
+ rsp = client.DescribeAIConversation(model)
574
678
  result = rsp.to_json_string()
575
679
  try:
576
680
  json_obj = json.loads(result)
@@ -2461,6 +2565,58 @@ def doDescribeTRTCMarketQualityData(args, parsed_globals):
2461
2565
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2462
2566
 
2463
2567
 
2568
+ def doStopStreamIngest(args, parsed_globals):
2569
+ g_param = parse_global_arg(parsed_globals)
2570
+
2571
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
2572
+ cred = credential.CVMRoleCredential()
2573
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
2574
+ cred = credential.STSAssumeRoleCredential(
2575
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
2576
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
2577
+ )
2578
+ 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):
2579
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
2580
+ else:
2581
+ cred = credential.Credential(
2582
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
2583
+ )
2584
+ http_profile = HttpProfile(
2585
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
2586
+ reqMethod="POST",
2587
+ endpoint=g_param[OptionsDefine.Endpoint],
2588
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
2589
+ )
2590
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
2591
+ if g_param[OptionsDefine.Language]:
2592
+ profile.language = g_param[OptionsDefine.Language]
2593
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
2594
+ client = mod.TrtcClient(cred, g_param[OptionsDefine.Region], profile)
2595
+ client._sdkVersion += ("_CLI_" + __version__)
2596
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
2597
+ model = models.StopStreamIngestRequest()
2598
+ model.from_json_string(json.dumps(args))
2599
+ start_time = time.time()
2600
+ while True:
2601
+ rsp = client.StopStreamIngest(model)
2602
+ result = rsp.to_json_string()
2603
+ try:
2604
+ json_obj = json.loads(result)
2605
+ except TypeError as e:
2606
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
2607
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
2608
+ break
2609
+ cur_time = time.time()
2610
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
2611
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
2612
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
2613
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
2614
+ else:
2615
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
2616
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
2617
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2618
+
2619
+
2464
2620
  def doStopPublishCdnStream(args, parsed_globals):
2465
2621
  g_param = parse_global_arg(parsed_globals)
2466
2622
 
@@ -2632,13 +2788,15 @@ ACTION_MAP = {
2632
2788
  "DescribeRoomInfo": doDescribeRoomInfo,
2633
2789
  "StopAITranscription": doStopAITranscription,
2634
2790
  "DescribeTrtcUsage": doDescribeTrtcUsage,
2791
+ "StopAIConversation": doStopAIConversation,
2635
2792
  "DescribeTRTCMarketQualityMetricData": doDescribeTRTCMarketQualityMetricData,
2636
2793
  "DeleteCloudRecording": doDeleteCloudRecording,
2637
2794
  "StartPublishCdnStream": doStartPublishCdnStream,
2638
2795
  "DescribeCallDetailInfo": doDescribeCallDetailInfo,
2639
2796
  "DescribeStreamIngest": doDescribeStreamIngest,
2640
2797
  "StopMCUMixTranscode": doStopMCUMixTranscode,
2641
- "StopStreamIngest": doStopStreamIngest,
2798
+ "StartAIConversation": doStartAIConversation,
2799
+ "DescribeAIConversation": doDescribeAIConversation,
2642
2800
  "DescribeRecordingUsage": doDescribeRecordingUsage,
2643
2801
  "StartStreamIngest": doStartStreamIngest,
2644
2802
  "DeletePicture": doDeletePicture,
@@ -2675,6 +2833,7 @@ ACTION_MAP = {
2675
2833
  "DescribeWebRecord": doDescribeWebRecord,
2676
2834
  "DescribePicture": doDescribePicture,
2677
2835
  "DescribeTRTCMarketQualityData": doDescribeTRTCMarketQualityData,
2836
+ "StopStreamIngest": doStopStreamIngest,
2678
2837
  "StopPublishCdnStream": doStopPublishCdnStream,
2679
2838
  "DescribeUnusualEvent": doDescribeUnusualEvent,
2680
2839
  "DescribeTRTCRealTimeScaleMetricData": doDescribeTRTCRealTimeScaleMetricData,