tccli 3.0.1189.1__py2.py3-none-any.whl → 3.0.1191.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 (66) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/command.py +7 -1
  3. tccli/configure.py +11 -3
  4. tccli/loaders.py +43 -8
  5. tccli/oauth.py +115 -0
  6. tccli/plugin.py +30 -0
  7. tccli/plugins/__init__.py +0 -0
  8. tccli/plugins/auth/__init__.py +59 -0
  9. tccli/plugins/auth/browser_flow.py +88 -0
  10. tccli/plugins/auth/login.py +130 -0
  11. tccli/plugins/auth/logout.py +21 -0
  12. tccli/plugins/auth/texts.py +30 -0
  13. tccli/plugins/test/__init__.py +87 -0
  14. tccli/plugins/test/add.py +31 -0
  15. tccli/services/__init__.py +2 -1
  16. tccli/services/apm/v20210622/api.json +19 -0
  17. tccli/services/cam/cam_client.py +138 -32
  18. tccli/services/cam/v20190116/api.json +203 -0
  19. tccli/services/cam/v20190116/examples.json +16 -0
  20. tccli/services/cdb/v20170320/api.json +4 -4
  21. tccli/services/cfg/v20210820/api.json +1 -1
  22. tccli/services/cfw/v20190904/api.json +82 -2
  23. tccli/services/dasb/dasb_client.py +53 -0
  24. tccli/services/dasb/v20191018/api.json +168 -0
  25. tccli/services/dasb/v20191018/examples.json +8 -0
  26. tccli/services/dlc/v20210125/api.json +287 -37
  27. tccli/services/dlc/v20210125/examples.json +18 -18
  28. tccli/services/dsgc/v20190723/api.json +13 -3
  29. tccli/services/emr/v20190103/api.json +1 -1
  30. tccli/services/ess/v20201111/api.json +56 -23
  31. tccli/services/ess/v20201111/examples.json +7 -1
  32. tccli/services/essbasic/v20210526/api.json +28 -1
  33. tccli/services/essbasic/v20210526/examples.json +6 -0
  34. tccli/services/iotexplorer/v20190423/api.json +2 -2
  35. tccli/services/iss/iss_client.py +118 -65
  36. tccli/services/iss/v20230517/api.json +78 -0
  37. tccli/services/iss/v20230517/examples.json +8 -0
  38. tccli/services/mps/v20190612/api.json +257 -8
  39. tccli/services/ocr/v20181119/api.json +10 -0
  40. tccli/services/region/v20220627/api.json +11 -11
  41. tccli/services/region/v20220627/examples.json +1 -1
  42. tccli/services/sms/v20210111/api.json +9 -9
  43. tccli/services/ssl/v20191205/api.json +3 -3
  44. tccli/services/ssl/v20191205/examples.json +2 -2
  45. tccli/services/tat/v20201028/api.json +10 -0
  46. tccli/services/tcb/v20180608/api.json +2 -2
  47. tccli/services/tdmq/v20200217/api.json +2 -2
  48. tccli/services/tdmq/v20200217/examples.json +2 -2
  49. tccli/services/tke/tke_client.py +364 -46
  50. tccli/services/tke/v20180525/api.json +9 -0
  51. tccli/services/tke/v20220501/api.json +525 -0
  52. tccli/services/tke/v20220501/examples.json +54 -0
  53. tccli/services/tmt/v20180321/api.json +2 -2
  54. tccli/services/vdb/v20230616/api.json +29 -1
  55. tccli/services/vod/v20180717/api.json +30 -9
  56. tccli/services/vod/v20180717/examples.json +1 -1
  57. tccli/services/vod/v20240718/api.json +121 -0
  58. tccli/services/vod/v20240718/examples.json +31 -0
  59. tccli/services/vod/vod_client.py +58 -0
  60. tccli/services/vpc/v20170312/api.json +9 -0
  61. tccli/services/wedata/v20210820/api.json +1 -1
  62. {tccli-3.0.1189.1.dist-info → tccli-3.0.1191.1.dist-info}/METADATA +2 -2
  63. {tccli-3.0.1189.1.dist-info → tccli-3.0.1191.1.dist-info}/RECORD +66 -54
  64. {tccli-3.0.1189.1.dist-info → tccli-3.0.1191.1.dist-info}/WHEEL +0 -0
  65. {tccli-3.0.1189.1.dist-info → tccli-3.0.1191.1.dist-info}/entry_points.txt +0 -0
  66. {tccli-3.0.1189.1.dist-info → tccli-3.0.1191.1.dist-info}/license_files/LICENSE +0 -0
@@ -2324,6 +2324,15 @@
2324
2324
  "name": "Operator",
2325
2325
  "required": false,
2326
2326
  "type": "object"
2327
+ },
2328
+ {
2329
+ "disabled": false,
2330
+ "document": "在短信通知、填写、签署流程中,若标题、按钮、合同详情等地方存在“合同”字样时,可根据此配置指定文案,可选文案如下: <ul><li> <b>0</b> :合同(默认值)</li> <li> <b>1</b> :文件</li> <li> <b>2</b> :协议</li></ul>效果如下:![FlowDisplayType](https://qcloudimg.tencent-cloud.cn/raw/e4a2c4d638717cc901d3dbd5137c9bbc.png)",
2331
+ "example": "1",
2332
+ "member": "int64",
2333
+ "name": "FlowDisplayType",
2334
+ "required": false,
2335
+ "type": "int"
2327
2336
  }
2328
2337
  ],
2329
2338
  "type": "object"
@@ -2688,7 +2697,7 @@
2688
2697
  },
2689
2698
  {
2690
2699
  "disabled": false,
2691
- "document": "流程签署人列表,其中结构体的ApproverType必传。\n若为个人签署方或saas企业签署方,则Name,Mobile必传。OrganizationName 传对应企业名称。\n若为子客企业签署方则需传OpenId、OrganizationOpenId,其他可不传。\n\n注:\n`1. 签署人只能有手写签名、时间类型、印章类型的签署控件和内容填写控件,其他类型的签署控件暂时未支持。`\n`2. 生成发起方预览链接时,该字段(FlowApproverInfos)传空或者不传`",
2700
+ "document": "流程签署人列表,其中结构体的ApproverType必传。\n若为个人签署方或saas企业签署方,则Name,Mobile必传。OrganizationName 传对应企业名称。\n若为子客企业签署方则需传OpenId、OrganizationOpenId,其他可不传。\n\n注:\n`1. 签署人只能有手写签名、时间类型、印章类型、签批类型的签署控件和内容填写控件,其他类型的签署控件暂时未支持。`\n`2. 生成发起方预览链接时,该字段(FlowApproverInfos)传空或者不传`",
2692
2701
  "example": "无",
2693
2702
  "member": "FlowApproverInfo",
2694
2703
  "name": "FlowApproverInfos",
@@ -9321,6 +9330,15 @@
9321
9330
  "name": "NeedSignReview",
9322
9331
  "required": false,
9323
9332
  "type": "bool"
9333
+ },
9334
+ {
9335
+ "disabled": false,
9336
+ "document": "在短信通知、填写、签署流程中,若标题、按钮、合同详情等地方存在“合同”字样时,可根据此配置指定文案,可选文案如下: <ul><li> <b>0</b> :合同(默认值)</li> <li> <b>1</b> :文件</li> <li> <b>2</b> :协议</li></ul>效果如下:![FlowDisplayType](https://qcloudimg.tencent-cloud.cn/raw/e4a2c4d638717cc901d3dbd5137c9bbc.png)",
9337
+ "example": "1",
9338
+ "member": "int64",
9339
+ "name": "FlowDisplayType",
9340
+ "required": false,
9341
+ "type": "int"
9324
9342
  }
9325
9343
  ],
9326
9344
  "usage": "in"
@@ -9542,6 +9560,15 @@
9542
9560
  "name": "AutoSignScene",
9543
9561
  "required": false,
9544
9562
  "type": "string"
9563
+ },
9564
+ {
9565
+ "disabled": false,
9566
+ "document": "在短信通知、填写、签署流程中,若标题、按钮、合同详情等地方存在“合同”字样时,可根据此配置指定文案,可选文案如下: <ul><li> <b>0</b> :合同(默认值)</li> <li> <b>1</b> :文件</li> <li> <b>2</b> :协议</li></ul>效果如下:![FlowDisplayType](https://qcloudimg.tencent-cloud.cn/raw/e4a2c4d638717cc901d3dbd5137c9bbc.png)",
9567
+ "example": "1",
9568
+ "member": "int64",
9569
+ "name": "FlowDisplayType",
9570
+ "required": false,
9571
+ "type": "int"
9545
9572
  }
9546
9573
  ],
9547
9574
  "usage": "in"
@@ -112,6 +112,12 @@
112
112
  "input": "POST / HTTP/1.1\nHost: essbasic.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ChannelCreateBatchQuickSignUrl\n<公共请求参数>\n\n{\n \"Agent\": {\n \"ProxyOrganizationOpenId\": \"org_dianziqian\",\n \"AppId\": \"yDRSRUUgygj6rq7wUuO4zjECxndqQApl\"\n },\n \"FlowApproverInfo\": {\n \"ApproverType\": \"PERSON\",\n \"Mobile\": \"13200000000\",\n \"Name\": \"典子谦\",\n \"IdCardNumber\": \"620000198802020000\",\n \"IdCardType\": \"ID_CARD\"\n }\n}",
113
113
  "output": "{\n \"Response\": {\n \"Error\": {\n \"Code\": \"FailedOperation\",\n \"Message\": \"流程ID和合同组ID不能同时为空,请检查参数后再试\"\n },\n \"RequestId\": \"s1700727885657576147\"\n }\n}",
114
114
  "title": "错误示例-为个人用户生成H5批量签署链接,没有指定合同流程ID信息,也没有指定合同组ID信息"
115
+ },
116
+ {
117
+ "document": "1. 创建批量签署链接的合同签署方,必须都是动态签署人且未补充。\n2. 批量签署的合同数量不少于1份,不超过100份\n3. 上述合同签署方类型必须一致,均为待C端签署人签署状态\n4. 企业已经购买了专业版或以上版本套餐\n5. 获取领取链接通过指定RecipientId定位签署方,可以从发起合同的返回结果中获取",
118
+ "input": "POST / HTTP/1.1\nHost: essbasic.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ChannelCreateBatchQuickSignUrl\n<公共请求参数>\n\n{\n \"Agent\": {\n \"ProxyOrganizationOpenId\": \"org_dianziqian\",\n \"AppId\": \"yDRSRUUgygj6rq7wUuO4zjECxndqQApl\"\n },\n \"ApproverSignTypes\": [\n 1,\n 3\n ],\n \"FlowApproverInfo\": {\n \"ApproverType\": \"PERSON\"\n },\n \"FlowIds\": [\n \"yDwFkUUckpstin4sUuZjBEY5Ia2XB7sz\",\n \"yDwFkUUckpstzjhfUugNAWf1KibXqS26\"\n ],\n \"JumpUrl\": \"https://abc.com\",\n \"SignatureTypes\": [\n 0,\n 1\n ]\n}",
119
+ "output": "{\n \"Response\": {\n \"FlowApproverUrlInfo\": {\n \"ApproverType\": \"PERSON\",\n \"LongUrl\": \"https://quick.qian.tencent.cn/guide?Code=yDwi0**BWW4MYlpI&CodeType=QUICK&shortKey=yDwi**KF45&token=C**E\",\n \"Mobile\": \"\",\n \"Name\": \"\",\n \"SignUrl\": \"https://test.essurl.cn/C**E\"\n },\n \"RequestId\": \"s16986**08\"\n }\n}",
120
+ "title": "发起合同后,获取C端签署人的H5批量领取链接"
115
121
  }
116
122
  ],
117
123
  "ChannelCreateBatchSignUrl": [
@@ -1027,7 +1027,7 @@
1027
1027
  "example": "3edappId",
1028
1028
  "member": "string",
1029
1029
  "name": "MiniProgramAppId",
1030
- "required": true,
1030
+ "required": false,
1031
1031
  "type": "string"
1032
1032
  },
1033
1033
  {
@@ -9423,7 +9423,7 @@
9423
9423
  "example": "3edappId",
9424
9424
  "member": "string",
9425
9425
  "name": "MiniProgramAppId",
9426
- "required": true,
9426
+ "required": false,
9427
9427
  "type": "string"
9428
9428
  },
9429
9429
  {
@@ -381,7 +381,7 @@ def doDescribeDeviceChannel(args, parsed_globals):
381
381
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
382
382
 
383
383
 
384
- def doDeleteRecordBackupTemplate(args, parsed_globals):
384
+ def doAddRecordRetrieveTask(args, parsed_globals):
385
385
  g_param = parse_global_arg(parsed_globals)
386
386
 
387
387
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -410,11 +410,11 @@ def doDeleteRecordBackupTemplate(args, parsed_globals):
410
410
  client = mod.IssClient(cred, g_param[OptionsDefine.Region], profile)
411
411
  client._sdkVersion += ("_CLI_" + __version__)
412
412
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
413
- model = models.DeleteRecordBackupTemplateRequest()
413
+ model = models.AddRecordRetrieveTaskRequest()
414
414
  model.from_json_string(json.dumps(args))
415
415
  start_time = time.time()
416
416
  while True:
417
- rsp = client.DeleteRecordBackupTemplate(model)
417
+ rsp = client.AddRecordRetrieveTask(model)
418
418
  result = rsp.to_json_string()
419
419
  try:
420
420
  json_obj = json.loads(result)
@@ -1577,6 +1577,58 @@ def doDescribeAITaskResult(args, parsed_globals):
1577
1577
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1578
1578
 
1579
1579
 
1580
+ def doControlDevicePTZ(args, parsed_globals):
1581
+ g_param = parse_global_arg(parsed_globals)
1582
+
1583
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1584
+ cred = credential.CVMRoleCredential()
1585
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1586
+ cred = credential.STSAssumeRoleCredential(
1587
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1588
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1589
+ )
1590
+ 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):
1591
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1592
+ else:
1593
+ cred = credential.Credential(
1594
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1595
+ )
1596
+ http_profile = HttpProfile(
1597
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1598
+ reqMethod="POST",
1599
+ endpoint=g_param[OptionsDefine.Endpoint],
1600
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1601
+ )
1602
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1603
+ if g_param[OptionsDefine.Language]:
1604
+ profile.language = g_param[OptionsDefine.Language]
1605
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1606
+ client = mod.IssClient(cred, g_param[OptionsDefine.Region], profile)
1607
+ client._sdkVersion += ("_CLI_" + __version__)
1608
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1609
+ model = models.ControlDevicePTZRequest()
1610
+ model.from_json_string(json.dumps(args))
1611
+ start_time = time.time()
1612
+ while True:
1613
+ rsp = client.ControlDevicePTZ(model)
1614
+ result = rsp.to_json_string()
1615
+ try:
1616
+ json_obj = json.loads(result)
1617
+ except TypeError as e:
1618
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1619
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1620
+ break
1621
+ cur_time = time.time()
1622
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1623
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1624
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1625
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1626
+ else:
1627
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1628
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1629
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1630
+
1631
+
1580
1632
  def doDeleteAITask(args, parsed_globals):
1581
1633
  g_param = parse_global_arg(parsed_globals)
1582
1634
 
@@ -2097,7 +2149,7 @@ def doDescribeDomain(args, parsed_globals):
2097
2149
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2098
2150
 
2099
2151
 
2100
- def doControlDeviceStream(args, parsed_globals):
2152
+ def doDeleteRecordBackupTemplate(args, parsed_globals):
2101
2153
  g_param = parse_global_arg(parsed_globals)
2102
2154
 
2103
2155
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2126,11 +2178,11 @@ def doControlDeviceStream(args, parsed_globals):
2126
2178
  client = mod.IssClient(cred, g_param[OptionsDefine.Region], profile)
2127
2179
  client._sdkVersion += ("_CLI_" + __version__)
2128
2180
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2129
- model = models.ControlDeviceStreamRequest()
2181
+ model = models.DeleteRecordBackupTemplateRequest()
2130
2182
  model.from_json_string(json.dumps(args))
2131
2183
  start_time = time.time()
2132
2184
  while True:
2133
- rsp = client.ControlDeviceStream(model)
2185
+ rsp = client.DeleteRecordBackupTemplate(model)
2134
2186
  result = rsp.to_json_string()
2135
2187
  try:
2136
2188
  json_obj = json.loads(result)
@@ -2409,6 +2461,58 @@ def doBatchOperateDevice(args, parsed_globals):
2409
2461
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2410
2462
 
2411
2463
 
2464
+ def doCallISAPI(args, parsed_globals):
2465
+ g_param = parse_global_arg(parsed_globals)
2466
+
2467
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
2468
+ cred = credential.CVMRoleCredential()
2469
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
2470
+ cred = credential.STSAssumeRoleCredential(
2471
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
2472
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
2473
+ )
2474
+ 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):
2475
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
2476
+ else:
2477
+ cred = credential.Credential(
2478
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
2479
+ )
2480
+ http_profile = HttpProfile(
2481
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
2482
+ reqMethod="POST",
2483
+ endpoint=g_param[OptionsDefine.Endpoint],
2484
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
2485
+ )
2486
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
2487
+ if g_param[OptionsDefine.Language]:
2488
+ profile.language = g_param[OptionsDefine.Language]
2489
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
2490
+ client = mod.IssClient(cred, g_param[OptionsDefine.Region], profile)
2491
+ client._sdkVersion += ("_CLI_" + __version__)
2492
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
2493
+ model = models.CallISAPIRequest()
2494
+ model.from_json_string(json.dumps(args))
2495
+ start_time = time.time()
2496
+ while True:
2497
+ rsp = client.CallISAPI(model)
2498
+ result = rsp.to_json_string()
2499
+ try:
2500
+ json_obj = json.loads(result)
2501
+ except TypeError as e:
2502
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
2503
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
2504
+ break
2505
+ cur_time = time.time()
2506
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
2507
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
2508
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
2509
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
2510
+ else:
2511
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
2512
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
2513
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2514
+
2515
+
2412
2516
  def doDescribeRecordPlan(args, parsed_globals):
2413
2517
  g_param = parse_global_arg(parsed_globals)
2414
2518
 
@@ -3137,7 +3241,7 @@ def doListDevices(args, parsed_globals):
3137
3241
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3138
3242
 
3139
3243
 
3140
- def doControlDevicePTZ(args, parsed_globals):
3244
+ def doControlDeviceStream(args, parsed_globals):
3141
3245
  g_param = parse_global_arg(parsed_globals)
3142
3246
 
3143
3247
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3166,11 +3270,11 @@ def doControlDevicePTZ(args, parsed_globals):
3166
3270
  client = mod.IssClient(cred, g_param[OptionsDefine.Region], profile)
3167
3271
  client._sdkVersion += ("_CLI_" + __version__)
3168
3272
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
3169
- model = models.ControlDevicePTZRequest()
3273
+ model = models.ControlDeviceStreamRequest()
3170
3274
  model.from_json_string(json.dumps(args))
3171
3275
  start_time = time.time()
3172
3276
  while True:
3173
- rsp = client.ControlDevicePTZ(model)
3277
+ rsp = client.ControlDeviceStream(model)
3174
3278
  result = rsp.to_json_string()
3175
3279
  try:
3176
3280
  json_obj = json.loads(result)
@@ -4073,58 +4177,6 @@ def doListGatewayDevices(args, parsed_globals):
4073
4177
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4074
4178
 
4075
4179
 
4076
- def doAddRecordRetrieveTask(args, parsed_globals):
4077
- g_param = parse_global_arg(parsed_globals)
4078
-
4079
- if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
4080
- cred = credential.CVMRoleCredential()
4081
- elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
4082
- cred = credential.STSAssumeRoleCredential(
4083
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
4084
- g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
4085
- )
4086
- 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):
4087
- cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
4088
- else:
4089
- cred = credential.Credential(
4090
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
4091
- )
4092
- http_profile = HttpProfile(
4093
- reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
4094
- reqMethod="POST",
4095
- endpoint=g_param[OptionsDefine.Endpoint],
4096
- proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
4097
- )
4098
- profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
4099
- if g_param[OptionsDefine.Language]:
4100
- profile.language = g_param[OptionsDefine.Language]
4101
- mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
4102
- client = mod.IssClient(cred, g_param[OptionsDefine.Region], profile)
4103
- client._sdkVersion += ("_CLI_" + __version__)
4104
- models = MODELS_MAP[g_param[OptionsDefine.Version]]
4105
- model = models.AddRecordRetrieveTaskRequest()
4106
- model.from_json_string(json.dumps(args))
4107
- start_time = time.time()
4108
- while True:
4109
- rsp = client.AddRecordRetrieveTask(model)
4110
- result = rsp.to_json_string()
4111
- try:
4112
- json_obj = json.loads(result)
4113
- except TypeError as e:
4114
- json_obj = json.loads(result.decode('utf-8')) # python3.3
4115
- if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
4116
- break
4117
- cur_time = time.time()
4118
- if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
4119
- raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
4120
- (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
4121
- search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
4122
- else:
4123
- print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
4124
- time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
4125
- FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4126
-
4127
-
4128
4180
  def doControlRecord(args, parsed_globals):
4129
4181
  g_param = parse_global_arg(parsed_globals)
4130
4182
 
@@ -4403,7 +4455,7 @@ ACTION_MAP = {
4403
4455
  "ControlRecordTimeline": doControlRecordTimeline,
4404
4456
  "DeleteUserDevice": doDeleteUserDevice,
4405
4457
  "DescribeDeviceChannel": doDescribeDeviceChannel,
4406
- "DeleteRecordBackupTemplate": doDeleteRecordBackupTemplate,
4458
+ "AddRecordRetrieveTask": doAddRecordRetrieveTask,
4407
4459
  "DescribeDomainRegion": doDescribeDomainRegion,
4408
4460
  "DeleteGateway": doDeleteGateway,
4409
4461
  "ListRecordBackupTemplates": doListRecordBackupTemplates,
@@ -4426,6 +4478,7 @@ ACTION_MAP = {
4426
4478
  "DescribeUserDevice": doDescribeUserDevice,
4427
4479
  "DeleteDomain": doDeleteDomain,
4428
4480
  "DescribeAITaskResult": doDescribeAITaskResult,
4481
+ "ControlDevicePTZ": doControlDevicePTZ,
4429
4482
  "DeleteAITask": doDeleteAITask,
4430
4483
  "ListRecordPlanChannels": doListRecordPlanChannels,
4431
4484
  "DescribeCNAME": doDescribeCNAME,
@@ -4436,12 +4489,13 @@ ACTION_MAP = {
4436
4489
  "DescribeRecordPlaybackUrl": doDescribeRecordPlaybackUrl,
4437
4490
  "UpdateDeviceOrganization": doUpdateDeviceOrganization,
4438
4491
  "DescribeDomain": doDescribeDomain,
4439
- "ControlDeviceStream": doControlDeviceStream,
4492
+ "DeleteRecordBackupTemplate": doDeleteRecordBackupTemplate,
4440
4493
  "DescribeVideoDownloadUrl": doDescribeVideoDownloadUrl,
4441
4494
  "RefreshDeviceChannel": doRefreshDeviceChannel,
4442
4495
  "DeleteRecordRetrieveTask": doDeleteRecordRetrieveTask,
4443
4496
  "ControlDevicePreset": doControlDevicePreset,
4444
4497
  "BatchOperateDevice": doBatchOperateDevice,
4498
+ "CallISAPI": doCallISAPI,
4445
4499
  "DescribeRecordPlan": doDescribeRecordPlan,
4446
4500
  "UpdateRecordPlan": doUpdateRecordPlan,
4447
4501
  "DescribeGateway": doDescribeGateway,
@@ -4456,7 +4510,7 @@ ACTION_MAP = {
4456
4510
  "ListOrganizationChannelNumbers": doListOrganizationChannelNumbers,
4457
4511
  "ListGateways": doListGateways,
4458
4512
  "ListDevices": doListDevices,
4459
- "ControlDevicePTZ": doControlDevicePTZ,
4513
+ "ControlDeviceStream": doControlDeviceStream,
4460
4514
  "UpdateAITaskStatus": doUpdateAITaskStatus,
4461
4515
  "UpdateAITask": doUpdateAITask,
4462
4516
  "QueryForbidPlayChannelList": doQueryForbidPlayChannelList,
@@ -4474,7 +4528,6 @@ ACTION_MAP = {
4474
4528
  "DeleteRecordBackupPlan": doDeleteRecordBackupPlan,
4475
4529
  "DescribeStreamAuth": doDescribeStreamAuth,
4476
4530
  "ListGatewayDevices": doListGatewayDevices,
4477
- "AddRecordRetrieveTask": doAddRecordRetrieveTask,
4478
4531
  "ControlRecord": doControlRecord,
4479
4532
  "AddStreamAuth": doAddStreamAuth,
4480
4533
  "ListRecordBackupPlanDevices": doListRecordBackupPlanDevices,
@@ -70,6 +70,13 @@
70
70
  "output": "BatchOperateDeviceResponse",
71
71
  "status": "online"
72
72
  },
73
+ "CallISAPI": {
74
+ "document": "本接口可基于海康ISUP 5.0协议实现透传ISAPI的请求数据,调用接口前需确保设备采用ISUP协议成功注册至本平台",
75
+ "input": "CallISAPIRequest",
76
+ "name": "ISAPI 透传异步回调",
77
+ "output": "CallISAPIResponse",
78
+ "status": "online"
79
+ },
73
80
  "CheckDomain": {
74
81
  "document": "用于检测域名是否备案。",
75
82
  "input": "CheckDomainRequest",
@@ -2452,6 +2459,61 @@
2452
2459
  ],
2453
2460
  "usage": "out"
2454
2461
  },
2462
+ "CallISAPIRequest": {
2463
+ "document": "CallISAPI请求参数结构体",
2464
+ "members": [
2465
+ {
2466
+ "disabled": false,
2467
+ "document": "设备ID",
2468
+ "example": "abdsaie-dasd-dasd-************",
2469
+ "member": "string",
2470
+ "name": "DeviceId",
2471
+ "required": true,
2472
+ "type": "string"
2473
+ },
2474
+ {
2475
+ "disabled": false,
2476
+ "document": "url 资源",
2477
+ "example": "GET /ISAPI/ContentMgmt/InputProxy/channels/status",
2478
+ "member": "string",
2479
+ "name": "Url",
2480
+ "required": true,
2481
+ "type": "string"
2482
+ },
2483
+ {
2484
+ "disabled": false,
2485
+ "document": "输入参数",
2486
+ "example": "xml",
2487
+ "member": "string",
2488
+ "name": "InputData",
2489
+ "required": false,
2490
+ "type": "string"
2491
+ }
2492
+ ],
2493
+ "type": "object"
2494
+ },
2495
+ "CallISAPIResponse": {
2496
+ "document": "CallISAPI返回参数结构体",
2497
+ "members": [
2498
+ {
2499
+ "disabled": false,
2500
+ "document": "返回数据",
2501
+ "example": " ",
2502
+ "member": "ISAPIOutputData",
2503
+ "name": "Data",
2504
+ "output_required": false,
2505
+ "type": "object",
2506
+ "value_allowed_null": false
2507
+ },
2508
+ {
2509
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
2510
+ "member": "string",
2511
+ "name": "RequestId",
2512
+ "type": "string"
2513
+ }
2514
+ ],
2515
+ "type": "object"
2516
+ },
2455
2517
  "CarAIResultInfo": {
2456
2518
  "document": "车辆车牌识别结果信息",
2457
2519
  "members": [
@@ -6150,6 +6212,22 @@
6150
6212
  ],
6151
6213
  "usage": "out"
6152
6214
  },
6215
+ "ISAPIOutputData": {
6216
+ "document": "ISUP智能安全接入 API返回数据",
6217
+ "members": [
6218
+ {
6219
+ "disabled": false,
6220
+ "document": "输出参数\n注意:此字段可能返回 null,表示取不到有效值。",
6221
+ "example": "无",
6222
+ "member": "string",
6223
+ "name": "OutputData",
6224
+ "output_required": false,
6225
+ "type": "string",
6226
+ "value_allowed_null": true
6227
+ }
6228
+ ],
6229
+ "usage": "out"
6230
+ },
6153
6231
  "LifeCycleData": {
6154
6232
  "document": "生命周期,云文件生命周期设置,管理文件冷、热存储的时间",
6155
6233
  "members": [
@@ -116,6 +116,14 @@
116
116
  "title": "成功"
117
117
  }
118
118
  ],
119
+ "CallISAPI": [
120
+ {
121
+ "document": "调用成功",
122
+ "input": "POST / HTTP/1.1\nHost: iss.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CallISAPI\n<公共请求参数>\n\n{\n \"DeviceId\": \"73dfd1e2-3210-4dc4-b8b3-b5d548865e07\",\n \"Url\": \"GET /ISAPI/ContentMgmt/InputProxy/channels/status\"\n}",
123
+ "output": "{\n \"Response\": {\n \"Data\": {\n \"OutputData\": \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n<ResponseStatus version=\\\"2.0\\\" xmlns=\\\"http://www.hikvision.com/ver20/XMLSchema\\\">\\n<requestURL>/ISAPI/ContentMgmt/InputProxy/channels/status</requestURL>\\n<statusCode>4</statusCode>\\n<statusString>Invalid Operation</statusString>\\n<subStatusCode>notSupport</subStatusCode>\\n</ResponseStatus>\\n\"\n },\n \"RequestId\": \"8088ea32-0ee1-4ed4-bf9b-d539501c0aed\"\n }\n}",
124
+ "title": "成功"
125
+ }
126
+ ],
119
127
  "CheckDomain": [
120
128
  {
121
129
  "document": " ",