tccli 3.0.830.1__py2.py3-none-any.whl → 3.0.832.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 (40) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/__init__.py +3 -0
  3. tccli/services/asr/v20190614/api.json +4 -4
  4. tccli/services/bma/v20221115/api.json +9 -0
  5. tccli/services/bma/v20221115/examples.json +2 -2
  6. tccli/services/ccc/v20200210/api.json +9 -0
  7. tccli/services/ccc/v20200210/examples.json +2 -2
  8. tccli/services/cdc/v20201214/examples.json +1 -1
  9. tccli/services/ckafka/v20190819/api.json +1 -20
  10. tccli/services/ckafka/v20190819/examples.json +1 -1
  11. tccli/services/cwp/cwp_client.py +2179 -642
  12. tccli/services/cwp/v20180228/api.json +3069 -479
  13. tccli/services/cwp/v20180228/examples.json +247 -3
  14. tccli/services/dlc/dlc_client.py +341 -23
  15. tccli/services/dlc/v20210125/api.json +505 -0
  16. tccli/services/dlc/v20210125/examples.json +48 -0
  17. tccli/services/ess/ess_client.py +163 -4
  18. tccli/services/ess/v20201111/api.json +304 -0
  19. tccli/services/ess/v20201111/examples.json +24 -0
  20. tccli/services/essbasic/v20210526/api.json +68 -150
  21. tccli/services/essbasic/v20210526/examples.json +17 -17
  22. tccli/services/gme/gme_client.py +277 -12
  23. tccli/services/gme/v20180711/api.json +386 -0
  24. tccli/services/gme/v20180711/examples.json +40 -0
  25. tccli/services/intlpartnersmgt/__init__.py +4 -0
  26. tccli/services/intlpartnersmgt/intlpartnersmgt_client.py +724 -0
  27. tccli/services/intlpartnersmgt/v20220928/api.json +1054 -0
  28. tccli/services/intlpartnersmgt/v20220928/examples.json +93 -0
  29. tccli/services/live/v20180801/api.json +10 -10
  30. tccli/services/live/v20180801/examples.json +3 -3
  31. tccli/services/tdmq/v20200217/api.json +23 -44
  32. tccli/services/tdmq/v20200217/examples.json +3 -3
  33. tccli/services/trtc/v20190722/api.json +2 -2
  34. tccli/services/tse/v20201207/api.json +42 -1
  35. {tccli-3.0.830.1.dist-info → tccli-3.0.832.1.dist-info}/METADATA +2 -2
  36. {tccli-3.0.830.1.dist-info → tccli-3.0.832.1.dist-info}/RECORD +40 -36
  37. {tccli-3.0.830.1.dist-info → tccli-3.0.832.1.dist-info}/LICENSE +0 -0
  38. {tccli-3.0.830.1.dist-info → tccli-3.0.832.1.dist-info}/WHEEL +0 -0
  39. {tccli-3.0.830.1.dist-info → tccli-3.0.832.1.dist-info}/entry_points.txt +0 -0
  40. {tccli-3.0.830.1.dist-info → tccli-3.0.832.1.dist-info}/top_level.txt +0 -0
@@ -154,7 +154,7 @@
154
154
  {
155
155
  "document": "停用子客企业的印章",
156
156
  "input": "POST / HTTP/1.1\nHost: essbasic.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ChannelUpdateSealStatus\n<公共请求参数>\n\n{\n \"Agent\": {\n \"ProxyAppId\": \"d2b****b66f954d7cc\",\n \"ProxyOrganizationOpenId\": \"yDxAyUyK****cb7u0jQn0Zh7f7\",\n \"ProxyOperator\": {\n \"OpenId\": \"732aaef****541b89c49e0cc\"\n },\n \"AppId\": \"ed68bc6***********0214e4e\"\n },\n \"SealId\": \"yDRTZxxxxxJNR\",\n \"Status\": \"DISABLE\",\n \"Reason\": \"变更原因-停用\"\n}",
157
- "output": "{\n \"Response\": {\n \"RequestId\": \"xx\"\n }\n}",
157
+ "output": "{\n \"Response\": {\n \"RequestId\": \"s187098654322345\"\n }\n}",
158
158
  "title": "停用印章"
159
159
  }
160
160
  ],
@@ -210,15 +210,15 @@
210
210
  ],
211
211
  "CreateSealByImage": [
212
212
  {
213
- "document": "渠道通过图片为子客代创建印章么,需要电子签人工审核",
213
+ "document": "第三方应用平台通过图片为第三方平台子客企业代创建印章,需要电子签人工审核",
214
214
  "input": "POST / HTTP/1.1\nHost: essbasic.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateSealByImage\n<公共请求参数>\n\n{\n \"SealImage\": \"base64\",\n \"SealName\": \"测试\",\n \"Agent\": {\n \"ProxyAppId\": \"c17bdf*****200fef3d\",\n \"ProxyOperator\": {\n \"OpenId\": \"00498cc8*********xxx3aff766cac\"\n },\n \"ProxyOrganizationOpenId\": \"d7c13a8*********968c0ee248f04\",\n \"AppId\": \"65fb0c59*********382cc5ed0e\"\n }\n}",
215
215
  "output": "{\n \"Response\": {\n \"SealId\": \"\",\n \"RequestId\": \"s16294xxxxx0001803\"\n }\n}",
216
- "title": "渠道通过图片为子客代创建印章"
216
+ "title": "第三方应用平台通过图片为第三方平台子客企业代创建印章"
217
217
  }
218
218
  ],
219
219
  "CreateSignUrls": [
220
220
  {
221
- "document": "创建渠道版APP链接,适用于APP或者小程序跳转",
221
+ "document": "创建链接,适用于APP或者小程序跳转",
222
222
  "input": "POST / HTTP/1.1\nHost: essbasic.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateSignUrls\n<公共请求参数>\n\n{\n \"FlowIds\": [\n \"test-flow-id\"\n ],\n \"Agent\": {\n \"ProxyAppId\": \"test\",\n \"ProxyOrganizationOpenId\": \"test\",\n \"ProxyOperator\": {\n \"OpenId\": \"test\"\n },\n \"AppId\": \"test\"\n },\n \"Endpoint\": \"APP\"\n}",
223
223
  "output": "{\n \"Response\": {\n \"ErrorMessages\": [\n \"test\"\n ],\n \"SignUrlInfos\": [\n {\n \"SignUrl\": \"test\",\n \"OrganizationName\": \"test\",\n \"Name\": \"test\",\n \"ApproverType\": \"test\",\n \"Mobile\": \"test\",\n \"CustomUserId\": \"test\",\n \"Deadline\": 0,\n \"SignOrder\": 0,\n \"SignId\": \"test\",\n \"IdCardNumber\": \"testtesttestx\",\n \"OpenId\": \"test\",\n \"FlowId\": \"test-flow-id\",\n \"FlowGroupId\": \"\"\n }\n ],\n \"RequestId\": \"test\"\n }\n}",
224
224
  "title": "批量创建签署参与者签署H5链接"
@@ -243,8 +243,8 @@
243
243
  "DescribeFlowDetailInfo": [
244
244
  {
245
245
  "document": "查询签署流程合同的详细信息",
246
- "input": "POST / HTTP/1.1\nHost: essbasic.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeFlowDetailInfo\n<公共请求参数>\n\n{\n \"Agent\": {\n \"ProxyOperator\": {\n \"OpenId\": \"渠道经办人id\"\n },\n \"ProxyOrganizationOpenId\": \"渠道企业第三方id\",\n \"AppId\": \"16fd2f7d7xxxxx5f8d501d57b5ec\"\n },\n \"FlowIds\": [\n \"yDxjGUUgydjxxxxxzjERvGKmZJeX\"\n ]\n}",
247
- "output": "{\n \"Response\": {\n \"ApplicationId\": \"16fd2f7d7axxxxxd501d57b5ec\",\n \"FlowInfo\": [\n {\n \"CreateOn\": 1638954201,\n \"CustomData\": \"{\\\"hello\\\": 123}\",\n \"DeadLine\": 1689688460,\n \"FlowApproverInfos\": [\n {\n \"ApproveMessage\": \"\",\n \"ApproveName\": \"签署方1\",\n \"ApproveStatus\": \"PENDING\",\n \"ApproveTime\": 0,\n \"ApproveType\": \"PERSON\",\n \"Mobile\": \"签署方手机号码(11位数字)\",\n \"ProxyOperatorOpenId\": \"us-a9f05aaxxxxxe963ff3f935d7fa39\",\n \"ProxyOrganizationName\": \"渠道侧企业名称\",\n \"ProxyOrganizationOpenId\": \"渠道侧企业第三方id\",\n \"ReceiptId\": \"签署人信息\",\n \"SignOrder\": 1\n },\n {\n \"ApproveMessage\": \"\",\n \"ApproveName\": \"签署方2\",\n \"ApproveStatus\": \"PENDING\",\n \"ApproveTime\": 0,\n \"ApproveType\": \"ORGANIZATION\",\n \"Mobile\": \"签署方手机号码(11位数字)\",\n \"ProxyOperatorOpenId\": \"us-a9f05axxxxxf935d7fa39\",\n \"ProxyOrganizationName\": \"渠道侧企业名称\",\n \"ProxyOrganizationOpenId\": \"渠道侧企业第三方id\",\n \"ReceiptId\": \"签署人信息\",\n \"SignOrder\": 0\n }\n ],\n \"FlowId\": \"yDxjGUUgxxxxxvGKmZJeX\",\n \"FlowMessage\": \"\",\n \"FlowName\": \"示例1\",\n \"FlowStatus\": \"INIT\",\n \"FlowType\": \"示例\"\n }\n ],\n \"ProxyOrganizationOpenId\": \"渠道测第三方id\",\n \"FlowGroupName\": \"\",\n \"FlowGroupId\": \"\",\n \"RequestId\": \"s16399xxxx603599\"\n }\n}",
246
+ "input": "POST / HTTP/1.1\nHost: essbasic.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeFlowDetailInfo\n<公共请求参数>\n\n{\n \"Agent\": {\n \"ProxyOperator\": {\n \"OpenId\": \"子客企业经办人id\"\n },\n \"ProxyOrganizationOpenId\": \"子客企业第三方id\",\n \"AppId\": \"16fd2f7d7xxxxx5f8d501d57b5ec\"\n },\n \"FlowIds\": [\n \"yDxjGUUgydjxxxxxzjERvGKmZJeX\"\n ]\n}",
247
+ "output": "{\n \"Response\": {\n \"ApplicationId\": \"16fd2f7d7axxxxxd501d57b5ec\",\n \"FlowInfo\": [\n {\n \"CreateOn\": 1638954201,\n \"CustomData\": \"{\\\"hello\\\": 123}\",\n \"DeadLine\": 1689688460,\n \"FlowApproverInfos\": [\n {\n \"ApproveMessage\": \"\",\n \"ApproveName\": \"签署方1\",\n \"ApproveStatus\": \"PENDING\",\n \"ApproveTime\": 0,\n \"ApproveType\": \"PERSON\",\n \"Mobile\": \"签署方手机号码(11位数字)\",\n \"ProxyOperatorOpenId\": \"us-a9f05aaxxxxxe963ff3f935d7fa39\",\n \"ProxyOrganizationName\": \"第三方平台子客企业名称\",\n \"ProxyOrganizationOpenId\": \"第三方平台子客企业OpenId\",\n \"ReceiptId\": \"签署人信息\",\n \"SignOrder\": 1\n },\n {\n \"ApproveMessage\": \"\",\n \"ApproveName\": \"签署方2\",\n \"ApproveStatus\": \"PENDING\",\n \"ApproveTime\": 0,\n \"ApproveType\": \"ORGANIZATION\",\n \"Mobile\": \"签署方手机号码(11位数字)\",\n \"ProxyOperatorOpenId\": \"us-a9f05axxxxxf935d7fa39\",\n \"ProxyOrganizationName\": \"第三方平台子客企业名称\",\n \"ProxyOrganizationOpenId\": \"第三方平台子客企业OpenId\",\n \"ReceiptId\": \"签署人信息\",\n \"SignOrder\": 0\n }\n ],\n \"FlowId\": \"yDxjGUUgxxxxxvGKmZJeX\",\n \"FlowMessage\": \"\",\n \"FlowName\": \"示例1\",\n \"FlowStatus\": \"INIT\",\n \"FlowType\": \"示例\"\n }\n ],\n \"ProxyOrganizationOpenId\": \"第三方平台子客企业OpenId\",\n \"FlowGroupName\": \"\",\n \"FlowGroupId\": \"\",\n \"RequestId\": \"s16399xxxx603599\"\n }\n}",
248
248
  "title": "查询签署流程合同的详细信息"
249
249
  }
250
250
  ],
@@ -278,16 +278,16 @@
278
278
  ],
279
279
  "DescribeUsage": [
280
280
  {
281
- "document": "渠道用量查询查询-无需汇总",
282
- "input": "POST / HTTP/1.1\nHost: essbasic.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeUsage\n<公共请求参数>\n\n{\n \"StartDate\": \"2020-07-11\",\n \"EndDate\": \"2020-07-12\",\n \"Agent\": {\n \"AppId\": \"testappid1\"\n },\n \"NeedAggregate\": false\n}",
283
- "output": "{\n \"Response\": {\n \"Total\": 4,\n \"Details\": [\n {\n \"Date\": \"2020-07-11\",\n \"ProxyOrganizationOpenId\": \"org1\",\n \"Usage\": 50,\n \"ProxyOrganizationName\": \"合作企业\",\n \"FlowChannel\": \"test\",\n \"Cancel\": 0\n },\n {\n \"Date\": \"2020-07-12\",\n \"ProxyOrganizationOpenId\": \"org1\",\n \"Usage\": 50,\n \"ProxyOrganizationName\": \"合作企业\",\n \"FlowChannel\": \"test\",\n \"Cancel\": 0\n },\n {\n \"Date\": \"2020-07-11\",\n \"ProxyOrganizationOpenId\": \"org2\",\n \"Usage\": 80,\n \"ProxyOrganizationName\": \"合作企业\",\n \"FlowChannel\": \"test\",\n \"Cancel\": 0\n },\n {\n \"Date\": \"2020-07-12\",\n \"ProxyOrganizationOpenId\": \"org2\",\n \"Usage\": 86,\n \"ProxyOrganizationName\": \"合作企业\",\n \"FlowChannel\": \"test\",\n \"Cancel\": 0\n }\n ],\n \"RequestId\": \"id\"\n }\n}",
284
- "title": "渠道用量查询查询-无需汇总"
285
- },
286
- {
287
- "document": "渠道用量查询-需要汇总",
281
+ "document": "第三方平台用量查询-需要汇总",
288
282
  "input": "POST / HTTP/1.1\nHost: essbasic.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeUsage\n<公共请求参数>\n\n{\n \"StartDate\": \"2020-07-11\",\n \"EndDate\": \"2020-07-12\",\n \"Agent\": {\n \"AppId\": \"testappid1\"\n },\n \"NeedAggregate\": true\n}",
289
283
  "output": "{\n \"Response\": {\n \"Total\": 2,\n \"Details\": [\n {\n \"Date\": \"2020-09-22\",\n \"ProxyOrganizationOpenId\": \"org1\",\n \"Usage\": 100,\n \"ProxyOrganizationName\": \"合作企业\",\n \"FlowChannel\": \"test\",\n \"Cancel\": 0\n },\n {\n \"Date\": \"2020-09-22\",\n \"ProxyOrganizationOpenId\": \"org2\",\n \"Usage\": 166,\n \"ProxyOrganizationName\": \"合作企业\",\n \"FlowChannel\": \"test\",\n \"Cancel\": 0\n }\n ],\n \"RequestId\": \"id\"\n }\n}",
290
- "title": "渠道用量查询-需要汇总"
284
+ "title": "第三方平台用量查询-需要汇总"
285
+ },
286
+ {
287
+ "document": "第三方平台用量查询查询-无需汇总",
288
+ "input": "POST / HTTP/1.1\nHost: essbasic.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeUsage\n<公共请求参数>\n\n{\n \"StartDate\": \"2020-07-11\",\n \"EndDate\": \"2020-07-12\",\n \"Agent\": {\n \"AppId\": \"testappid1\"\n },\n \"NeedAggregate\": false\n}",
289
+ "output": "{\n \"Response\": {\n \"Total\": 4,\n \"Details\": [\n {\n \"Date\": \"2020-07-11\",\n \"ProxyOrganizationOpenId\": \"org1\",\n \"Usage\": 50,\n \"ProxyOrganizationName\": \"合作企业\",\n \"FlowChannel\": \"test\",\n \"Cancel\": 0\n },\n {\n \"Date\": \"2020-07-12\",\n \"ProxyOrganizationOpenId\": \"org1\",\n \"Usage\": 50,\n \"ProxyOrganizationName\": \"合作企业\",\n \"FlowChannel\": \"test\",\n \"Cancel\": 0\n },\n {\n \"Date\": \"2020-07-11\",\n \"ProxyOrganizationOpenId\": \"org2\",\n \"Usage\": 80,\n \"ProxyOrganizationName\": \"合作企业\",\n \"FlowChannel\": \"test\",\n \"Cancel\": 0\n },\n {\n \"Date\": \"2020-07-12\",\n \"ProxyOrganizationOpenId\": \"org2\",\n \"Usage\": 86,\n \"ProxyOrganizationName\": \"合作企业\",\n \"FlowChannel\": \"test\",\n \"Cancel\": 0\n }\n ],\n \"RequestId\": \"id\"\n }\n}",
290
+ "title": "第三方平台用量查询查询-无需汇总"
291
291
  }
292
292
  ],
293
293
  "GetDownloadFlowUrl": [
@@ -337,7 +337,7 @@
337
337
  "SyncProxyOrganization": [
338
338
  {
339
339
  "document": "同步企业信息",
340
- "input": "POST / HTTP/1.1\nHost: essbasic.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: SyncProxyOrganization\n<公共请求参数>\n\n{\n \"ProxyOrganizationName\": \"渠道子客企业名称\",\n \"UniformSocialCreditCode\": \"code\",\n \"BusinessLicense\": \"l\",\n \"ProxyLegalName\": \"name\",\n \"Agent\": {\n \"ProxyOperator\": {\n \"OpenId\": \"proxy-operator-openid\"\n },\n \"ProxyOrganizationOpenId\": \"proxy-organization-openid\",\n \"AppId\": \"test-appid\"\n }\n}",
340
+ "input": "POST / HTTP/1.1\nHost: essbasic.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: SyncProxyOrganization\n<公共请求参数>\n\n{\n \"ProxyOrganizationName\": \"子客企业名称\",\n \"UniformSocialCreditCode\": \"code\",\n \"BusinessLicense\": \"l\",\n \"ProxyLegalName\": \"name\",\n \"Agent\": {\n \"ProxyOperator\": {\n \"OpenId\": \"proxy-operator-openid\"\n },\n \"ProxyOrganizationOpenId\": \"proxy-organization-openid\",\n \"AppId\": \"test-appid\"\n }\n}",
341
341
  "output": "{\n \"Response\": {\n \"RequestId\": \"s16221xxx14775648\"\n }\n}",
342
342
  "title": "同步企业信息"
343
343
  }
@@ -352,8 +352,8 @@
352
352
  ],
353
353
  "UploadFiles": [
354
354
  {
355
- "document": "",
356
- "input": "POST / HTTP/1.1\nHost: essbasic.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: UploadFiles\n<公共请求参数>\n\n{\n \"Agent\": {\n \"ProxyAppId\": \"xx\",\n \"ProxyOperator\": {\n \"OpenId\": \"xx\"\n },\n \"AppId\": \"xx\"\n },\n \"BusinessType\": \"TEMPLATE\",\n \"FileInfos\": [\n {\n \"FileBody\": \"iVBORw0KGgoAAAANSUhxxxxAElEQVR4Xu3dbah1W5eQ7HmoAAAAASUVORK5CYII=\",\n \"FileName\": \"a.pdf\"\n }\n ]\n}",
355
+ "document": "多文件上传",
356
+ "input": "POST / HTTP/1.1\nHost: essbasic.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: UploadFiles\n<公共请求参数>\n\n{\n \"Agent\": {\n \"ProxyAppId\": \"abc\",\n \"ProxyOperator\": {\n \"OpenId\": \"abc\"\n },\n \"AppId\": \"abc\"\n },\n \"BusinessType\": \"TEMPLATE\",\n \"FileInfos\": [\n {\n \"FileBody\": \"iVBORw0KGgoAAAANSUhxxxxAElEQVR4Xu3dbah1W5eQ7HmoAAAAASUVORK5CYII=\",\n \"FileName\": \"a.pdf\"\n }\n ]\n}",
357
357
  "output": "{\n \"Response\": {\n \"FileIds\": [\n \"d54e****************A2b7562\"\n ],\n \"FileUrls\": [\n \"https://a.b.com/d5****************2b7562\"\n ],\n \"TotalCount\": 1,\n \"RequestId\": \"4fecd****************bdbb7e5\"\n }\n}",
358
358
  "title": "多文件上传接口"
359
359
  }
@@ -69,6 +69,58 @@ def doDescribeRoomInfo(args, parsed_globals):
69
69
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
70
70
 
71
71
 
72
+ def doModifyRecordInfo(args, parsed_globals):
73
+ g_param = parse_global_arg(parsed_globals)
74
+
75
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
76
+ cred = credential.CVMRoleCredential()
77
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
78
+ cred = credential.STSAssumeRoleCredential(
79
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
80
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
81
+ )
82
+ elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
83
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
84
+ else:
85
+ cred = credential.Credential(
86
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
87
+ )
88
+ http_profile = HttpProfile(
89
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
90
+ reqMethod="POST",
91
+ endpoint=g_param[OptionsDefine.Endpoint],
92
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
93
+ )
94
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
95
+ if g_param[OptionsDefine.Language]:
96
+ profile.language = g_param[OptionsDefine.Language]
97
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
98
+ client = mod.GmeClient(cred, g_param[OptionsDefine.Region], profile)
99
+ client._sdkVersion += ("_CLI_" + __version__)
100
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
101
+ model = models.ModifyRecordInfoRequest()
102
+ model.from_json_string(json.dumps(args))
103
+ start_time = time.time()
104
+ while True:
105
+ rsp = client.ModifyRecordInfo(model)
106
+ result = rsp.to_json_string()
107
+ try:
108
+ json_obj = json.loads(result)
109
+ except TypeError as e:
110
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
111
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
112
+ break
113
+ cur_time = time.time()
114
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
115
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
116
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
117
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
118
+ else:
119
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
120
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
121
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
122
+
123
+
72
124
  def doDeleteScanUser(args, parsed_globals):
73
125
  g_param = parse_global_arg(parsed_globals)
74
126
 
@@ -277,7 +329,7 @@ def doDescribeUserInAndOutTime(args, parsed_globals):
277
329
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
278
330
 
279
331
 
280
- def doDescribeRealtimeScanConfig(args, parsed_globals):
332
+ def doUpdateScanRooms(args, parsed_globals):
281
333
  g_param = parse_global_arg(parsed_globals)
282
334
 
283
335
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -306,11 +358,11 @@ def doDescribeRealtimeScanConfig(args, parsed_globals):
306
358
  client = mod.GmeClient(cred, g_param[OptionsDefine.Region], profile)
307
359
  client._sdkVersion += ("_CLI_" + __version__)
308
360
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
309
- model = models.DescribeRealtimeScanConfigRequest()
361
+ model = models.UpdateScanRoomsRequest()
310
362
  model.from_json_string(json.dumps(args))
311
363
  start_time = time.time()
312
364
  while True:
313
- rsp = client.DescribeRealtimeScanConfig(model)
365
+ rsp = client.UpdateScanRooms(model)
314
366
  result = rsp.to_json_string()
315
367
  try:
316
368
  json_obj = json.loads(result)
@@ -381,6 +433,58 @@ def doCreateCustomization(args, parsed_globals):
381
433
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
382
434
 
383
435
 
436
+ def doDescribeTaskInfo(args, parsed_globals):
437
+ g_param = parse_global_arg(parsed_globals)
438
+
439
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
440
+ cred = credential.CVMRoleCredential()
441
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
442
+ cred = credential.STSAssumeRoleCredential(
443
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
444
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
445
+ )
446
+ elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
447
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
448
+ else:
449
+ cred = credential.Credential(
450
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
451
+ )
452
+ http_profile = HttpProfile(
453
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
454
+ reqMethod="POST",
455
+ endpoint=g_param[OptionsDefine.Endpoint],
456
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
457
+ )
458
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
459
+ if g_param[OptionsDefine.Language]:
460
+ profile.language = g_param[OptionsDefine.Language]
461
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
462
+ client = mod.GmeClient(cred, g_param[OptionsDefine.Region], profile)
463
+ client._sdkVersion += ("_CLI_" + __version__)
464
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
465
+ model = models.DescribeTaskInfoRequest()
466
+ model.from_json_string(json.dumps(args))
467
+ start_time = time.time()
468
+ while True:
469
+ rsp = client.DescribeTaskInfo(model)
470
+ result = rsp.to_json_string()
471
+ try:
472
+ json_obj = json.loads(result)
473
+ except TypeError as e:
474
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
475
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
476
+ break
477
+ cur_time = time.time()
478
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
479
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
480
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
481
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
482
+ else:
483
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
484
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
485
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
486
+
487
+
384
488
  def doCreateAgeDetectTask(args, parsed_globals):
385
489
  g_param = parse_global_arg(parsed_globals)
386
490
 
@@ -745,7 +849,7 @@ def doModifyCustomization(args, parsed_globals):
745
849
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
746
850
 
747
851
 
748
- def doUpdateScanRooms(args, parsed_globals):
852
+ def doDescribeRealtimeScanConfig(args, parsed_globals):
749
853
  g_param = parse_global_arg(parsed_globals)
750
854
 
751
855
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -774,11 +878,63 @@ def doUpdateScanRooms(args, parsed_globals):
774
878
  client = mod.GmeClient(cred, g_param[OptionsDefine.Region], profile)
775
879
  client._sdkVersion += ("_CLI_" + __version__)
776
880
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
777
- model = models.UpdateScanRoomsRequest()
881
+ model = models.DescribeRealtimeScanConfigRequest()
778
882
  model.from_json_string(json.dumps(args))
779
883
  start_time = time.time()
780
884
  while True:
781
- rsp = client.UpdateScanRooms(model)
885
+ rsp = client.DescribeRealtimeScanConfig(model)
886
+ result = rsp.to_json_string()
887
+ try:
888
+ json_obj = json.loads(result)
889
+ except TypeError as e:
890
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
891
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
892
+ break
893
+ cur_time = time.time()
894
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
895
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
896
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
897
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
898
+ else:
899
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
900
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
901
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
902
+
903
+
904
+ def doDescribeScanResultList(args, parsed_globals):
905
+ g_param = parse_global_arg(parsed_globals)
906
+
907
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
908
+ cred = credential.CVMRoleCredential()
909
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
910
+ cred = credential.STSAssumeRoleCredential(
911
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
912
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
913
+ )
914
+ elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
915
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
916
+ else:
917
+ cred = credential.Credential(
918
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
919
+ )
920
+ http_profile = HttpProfile(
921
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
922
+ reqMethod="POST",
923
+ endpoint=g_param[OptionsDefine.Endpoint],
924
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
925
+ )
926
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
927
+ if g_param[OptionsDefine.Language]:
928
+ profile.language = g_param[OptionsDefine.Language]
929
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
930
+ client = mod.GmeClient(cred, g_param[OptionsDefine.Region], profile)
931
+ client._sdkVersion += ("_CLI_" + __version__)
932
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
933
+ model = models.DescribeScanResultListRequest()
934
+ model.from_json_string(json.dumps(args))
935
+ start_time = time.time()
936
+ while True:
937
+ rsp = client.DescribeScanResultList(model)
782
938
  result = rsp.to_json_string()
783
939
  try:
784
940
  json_obj = json.loads(result)
@@ -849,7 +1005,7 @@ def doCreateApp(args, parsed_globals):
849
1005
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
850
1006
 
851
1007
 
852
- def doDescribeScanResultList(args, parsed_globals):
1008
+ def doStopRecord(args, parsed_globals):
853
1009
  g_param = parse_global_arg(parsed_globals)
854
1010
 
855
1011
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -878,11 +1034,11 @@ def doDescribeScanResultList(args, parsed_globals):
878
1034
  client = mod.GmeClient(cred, g_param[OptionsDefine.Region], profile)
879
1035
  client._sdkVersion += ("_CLI_" + __version__)
880
1036
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
881
- model = models.DescribeScanResultListRequest()
1037
+ model = models.StopRecordRequest()
882
1038
  model.from_json_string(json.dumps(args))
883
1039
  start_time = time.time()
884
1040
  while True:
885
- rsp = client.DescribeScanResultList(model)
1041
+ rsp = client.StopRecord(model)
886
1042
  result = rsp.to_json_string()
887
1043
  try:
888
1044
  json_obj = json.loads(result)
@@ -1005,6 +1161,58 @@ def doModifyCustomizationState(args, parsed_globals):
1005
1161
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1006
1162
 
1007
1163
 
1164
+ def doDescribeRecordInfo(args, parsed_globals):
1165
+ g_param = parse_global_arg(parsed_globals)
1166
+
1167
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1168
+ cred = credential.CVMRoleCredential()
1169
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1170
+ cred = credential.STSAssumeRoleCredential(
1171
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1172
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
1173
+ )
1174
+ elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
1175
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1176
+ else:
1177
+ cred = credential.Credential(
1178
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1179
+ )
1180
+ http_profile = HttpProfile(
1181
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1182
+ reqMethod="POST",
1183
+ endpoint=g_param[OptionsDefine.Endpoint],
1184
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1185
+ )
1186
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1187
+ if g_param[OptionsDefine.Language]:
1188
+ profile.language = g_param[OptionsDefine.Language]
1189
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1190
+ client = mod.GmeClient(cred, g_param[OptionsDefine.Region], profile)
1191
+ client._sdkVersion += ("_CLI_" + __version__)
1192
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1193
+ model = models.DescribeRecordInfoRequest()
1194
+ model.from_json_string(json.dumps(args))
1195
+ start_time = time.time()
1196
+ while True:
1197
+ rsp = client.DescribeRecordInfo(model)
1198
+ result = rsp.to_json_string()
1199
+ try:
1200
+ json_obj = json.loads(result)
1201
+ except TypeError as e:
1202
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1203
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1204
+ break
1205
+ cur_time = time.time()
1206
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1207
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1208
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1209
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1210
+ else:
1211
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1212
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1213
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1214
+
1215
+
1008
1216
  def doModifyUserMicStatus(args, parsed_globals):
1009
1217
  g_param = parse_global_arg(parsed_globals)
1010
1218
 
@@ -1109,6 +1317,58 @@ def doDeleteCustomization(args, parsed_globals):
1109
1317
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1110
1318
 
1111
1319
 
1320
+ def doStartRecord(args, parsed_globals):
1321
+ g_param = parse_global_arg(parsed_globals)
1322
+
1323
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1324
+ cred = credential.CVMRoleCredential()
1325
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1326
+ cred = credential.STSAssumeRoleCredential(
1327
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1328
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
1329
+ )
1330
+ elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
1331
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1332
+ else:
1333
+ cred = credential.Credential(
1334
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1335
+ )
1336
+ http_profile = HttpProfile(
1337
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1338
+ reqMethod="POST",
1339
+ endpoint=g_param[OptionsDefine.Endpoint],
1340
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1341
+ )
1342
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1343
+ if g_param[OptionsDefine.Language]:
1344
+ profile.language = g_param[OptionsDefine.Language]
1345
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1346
+ client = mod.GmeClient(cred, g_param[OptionsDefine.Region], profile)
1347
+ client._sdkVersion += ("_CLI_" + __version__)
1348
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1349
+ model = models.StartRecordRequest()
1350
+ model.from_json_string(json.dumps(args))
1351
+ start_time = time.time()
1352
+ while True:
1353
+ rsp = client.StartRecord(model)
1354
+ result = rsp.to_json_string()
1355
+ try:
1356
+ json_obj = json.loads(result)
1357
+ except TypeError as e:
1358
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1359
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1360
+ break
1361
+ cur_time = time.time()
1362
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1363
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1364
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1365
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1366
+ else:
1367
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1368
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1369
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1370
+
1371
+
1112
1372
  def doModifyAppStatus(args, parsed_globals):
1113
1373
  g_param = parse_global_arg(parsed_globals)
1114
1374
 
@@ -1225,12 +1485,14 @@ MODELS_MAP = {
1225
1485
 
1226
1486
  ACTION_MAP = {
1227
1487
  "DescribeRoomInfo": doDescribeRoomInfo,
1488
+ "ModifyRecordInfo": doModifyRecordInfo,
1228
1489
  "DeleteScanUser": doDeleteScanUser,
1229
1490
  "UpdateScanUsers": doUpdateScanUsers,
1230
1491
  "GetCustomizationList": doGetCustomizationList,
1231
1492
  "DescribeUserInAndOutTime": doDescribeUserInAndOutTime,
1232
- "DescribeRealtimeScanConfig": doDescribeRealtimeScanConfig,
1493
+ "UpdateScanRooms": doUpdateScanRooms,
1233
1494
  "CreateCustomization": doCreateCustomization,
1495
+ "DescribeTaskInfo": doDescribeTaskInfo,
1234
1496
  "CreateAgeDetectTask": doCreateAgeDetectTask,
1235
1497
  "DeleteRoomMember": doDeleteRoomMember,
1236
1498
  "DescribeApplicationData": doDescribeApplicationData,
@@ -1238,13 +1500,16 @@ ACTION_MAP = {
1238
1500
  "CreateScanUser": doCreateScanUser,
1239
1501
  "DescribeAppStatistics": doDescribeAppStatistics,
1240
1502
  "ModifyCustomization": doModifyCustomization,
1241
- "UpdateScanRooms": doUpdateScanRooms,
1242
- "CreateApp": doCreateApp,
1503
+ "DescribeRealtimeScanConfig": doDescribeRealtimeScanConfig,
1243
1504
  "DescribeScanResultList": doDescribeScanResultList,
1505
+ "CreateApp": doCreateApp,
1506
+ "StopRecord": doStopRecord,
1244
1507
  "DescribeApplicationList": doDescribeApplicationList,
1245
1508
  "ModifyCustomizationState": doModifyCustomizationState,
1509
+ "DescribeRecordInfo": doDescribeRecordInfo,
1246
1510
  "ModifyUserMicStatus": doModifyUserMicStatus,
1247
1511
  "DeleteCustomization": doDeleteCustomization,
1512
+ "StartRecord": doStartRecord,
1248
1513
  "ModifyAppStatus": doModifyAppStatus,
1249
1514
  "DescribeAgeDetectTask": doDescribeAgeDetectTask,
1250
1515