tccli 3.0.1102.1__py2.py3-none-any.whl → 3.0.1104.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 (102) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/examples/aiart/v20221229/ImageToImage.md +1 -1
  3. tccli/examples/csip/v20221121/DescribeDbAssets.md +7 -0
  4. tccli/examples/csip/v20221121/DescribeOrganizationUserInfo.md +12 -1
  5. tccli/examples/cwp/v20180228/DescribePublicProxyInstallCommand.md +4 -4
  6. tccli/examples/cynosdb/v20190107/CreateCLSDelivery.md +18 -0
  7. tccli/examples/cynosdb/v20190107/DeleteCLSDelivery.md +18 -0
  8. tccli/examples/cynosdb/v20190107/DescribeInstanceCLSLogDelivery.md +18 -0
  9. tccli/examples/cynosdb/v20190107/StartCLSDelivery.md +18 -0
  10. tccli/examples/cynosdb/v20190107/StopCLSDelivery.md +18 -0
  11. tccli/examples/ess/v20201111/CreateUserVerifyUrl.md +29 -0
  12. tccli/examples/ess/v20201111/DescribeUserVerifyStatus.md +23 -0
  13. tccli/examples/hai/v20230812/DescribeInstances.md +3 -2
  14. tccli/examples/hunyuan/v20230901/QueryHunyuanImageJob.md +33 -0
  15. tccli/examples/hunyuan/v20230901/SubmitHunyuanImageJob.md +21 -0
  16. tccli/examples/iotexplorer/v20190423/CreateTRTCSignaturesWithRoomId.md +30 -0
  17. tccli/examples/iotexplorer/v20190423/DescribeCloudStorageAIServiceTask.md +36 -0
  18. tccli/examples/iotexplorer/v20190423/DescribeCloudStorageAIServiceTasks.md +3 -0
  19. tccli/examples/iotexplorer/v20190423/DismissRoomByStrRoomIdFromTRTC.md +20 -0
  20. tccli/examples/iotexplorer/v20190423/GenerateCloudStorageAIServiceTaskFileURL.md +24 -0
  21. tccli/examples/iotexplorer/v20190423/RemoveUserByRoomIdFromTRTC.md +21 -0
  22. tccli/examples/lighthouse/v20200324/DescribeInstancesDeniedActions.md +11 -6
  23. tccli/examples/live/v20180801/DescribeLivePadProcessorList.md +25 -0
  24. tccli/examples/live/v20180801/StopLivePadProcessor.md +23 -0
  25. tccli/examples/mrs/v20200910/DrugInstructionObject.md +98 -0
  26. tccli/examples/ssl/v20191205/DescribeDownloadCertificateUrl.md +23 -0
  27. tccli/examples/tke/v20220501/CreateNodePool.md +33 -0
  28. tccli/examples/tke/v20220501/DeleteNodePool.md +21 -0
  29. tccli/examples/tke/v20220501/DescribeNodePools.md +9 -3
  30. tccli/examples/tke/v20220501/ModifyNodePool.md +32 -0
  31. tccli/examples/waf/v20180125/CreateIpAccessControl.md +27 -0
  32. tccli/examples/waf/v20180125/DeleteIpAccessControlV2.md +25 -0
  33. tccli/examples/waf/v20180125/ImportIpAccessControl.md +30 -0
  34. tccli/examples/waf/v20180125/ModifyIpAccessControl.md +28 -0
  35. tccli/services/aiart/v20221229/api.json +3 -3
  36. tccli/services/aiart/v20221229/examples.json +1 -1
  37. tccli/services/apm/v20210622/api.json +1 -1
  38. tccli/services/batch/v20170312/api.json +1 -1
  39. tccli/services/billing/v20180709/api.json +2 -2
  40. tccli/services/captcha/v20190722/api.json +2 -2
  41. tccli/services/ccc/v20200210/api.json +3 -3
  42. tccli/services/cdb/v20170320/api.json +2 -2
  43. tccli/services/clb/v20180317/api.json +2 -2
  44. tccli/services/cls/v20201016/api.json +2 -2
  45. tccli/services/csip/v20221121/api.json +80 -2
  46. tccli/services/csip/v20221121/examples.json +4 -4
  47. tccli/services/cvm/v20170312/api.json +1 -1
  48. tccli/services/cwp/v20180228/api.json +17 -5
  49. tccli/services/cwp/v20180228/examples.json +2 -2
  50. tccli/services/cynosdb/cynosdb_client.py +269 -4
  51. tccli/services/cynosdb/v20190107/api.json +131 -0
  52. tccli/services/cynosdb/v20190107/examples.json +40 -0
  53. tccli/services/dlc/v20210125/api.json +70 -1
  54. tccli/services/ess/ess_client.py +110 -4
  55. tccli/services/ess/v20201111/api.json +185 -5
  56. tccli/services/ess/v20201111/examples.json +16 -0
  57. tccli/services/essbasic/v20210526/api.json +4 -4
  58. tccli/services/faceid/v20180301/api.json +1 -1
  59. tccli/services/fmu/v20191213/api.json +1 -1
  60. tccli/services/hai/v20230812/api.json +2 -2
  61. tccli/services/hai/v20230812/examples.json +1 -1
  62. tccli/services/hunyuan/hunyuan_client.py +110 -4
  63. tccli/services/hunyuan/v20230901/api.json +188 -4
  64. tccli/services/hunyuan/v20230901/examples.json +16 -0
  65. tccli/services/iotexplorer/iotexplorer_client.py +298 -33
  66. tccli/services/iotexplorer/v20190423/api.json +359 -20
  67. tccli/services/iotexplorer/v20190423/examples.json +41 -1
  68. tccli/services/iss/v20230517/api.json +10 -0
  69. tccli/services/lighthouse/v20200324/api.json +45 -33
  70. tccli/services/lighthouse/v20200324/examples.json +3 -3
  71. tccli/services/live/live_client.py +114 -8
  72. tccli/services/live/v20180801/api.json +124 -0
  73. tccli/services/live/v20180801/examples.json +16 -0
  74. tccli/services/lke/v20231130/api.json +109 -3
  75. tccli/services/mrs/mrs_client.py +53 -0
  76. tccli/services/mrs/v20200910/api.json +1649 -415
  77. tccli/services/mrs/v20200910/examples.json +8 -0
  78. tccli/services/ocr/v20181119/api.json +1 -1
  79. tccli/services/rce/rce_client.py +0 -53
  80. tccli/services/rce/v20201103/api.json +0 -197
  81. tccli/services/rce/v20201103/examples.json +0 -8
  82. tccli/services/ssl/ssl_client.py +57 -4
  83. tccli/services/ssl/v20191205/api.json +63 -0
  84. tccli/services/ssl/v20191205/examples.json +8 -0
  85. tccli/services/ssm/v20190923/api.json +1 -1
  86. tccli/services/tdmq/v20200217/api.json +40 -10
  87. tccli/services/teo/v20220901/api.json +34 -0
  88. tccli/services/tke/tke_client.py +171 -12
  89. tccli/services/tke/v20180525/api.json +1 -1
  90. tccli/services/tke/v20220501/api.json +1403 -86
  91. tccli/services/tke/v20220501/examples.json +25 -1
  92. tccli/services/trtc/v20190722/api.json +6 -9
  93. tccli/services/tse/v20201207/api.json +2 -2
  94. tccli/services/vpc/v20170312/api.json +1 -0
  95. tccli/services/waf/v20180125/api.json +396 -0
  96. tccli/services/waf/v20180125/examples.json +32 -0
  97. tccli/services/waf/waf_client.py +216 -4
  98. {tccli-3.0.1102.1.dist-info → tccli-3.0.1104.1.dist-info}/METADATA +2 -2
  99. {tccli-3.0.1102.1.dist-info → tccli-3.0.1104.1.dist-info}/RECORD +102 -77
  100. {tccli-3.0.1102.1.dist-info → tccli-3.0.1104.1.dist-info}/WHEEL +0 -0
  101. {tccli-3.0.1102.1.dist-info → tccli-3.0.1104.1.dist-info}/entry_points.txt +0 -0
  102. {tccli-3.0.1102.1.dist-info → tccli-3.0.1104.1.dist-info}/license_files/LICENSE +0 -0
@@ -490,6 +490,13 @@
490
490
  "output": "DescribeLivePackageInfoResponse",
491
491
  "status": "online"
492
492
  },
493
+ "DescribeLivePadProcessorList": {
494
+ "document": "使用该接口查询垫片流。垫片流状态更新存在一定延迟,可间隔30秒以上查询,避免频繁查询该接口。",
495
+ "input": "DescribeLivePadProcessorListRequest",
496
+ "name": "查询垫片流列表",
497
+ "output": "DescribeLivePadProcessorListResponse",
498
+ "status": "online"
499
+ },
493
500
  "DescribeLivePadRules": {
494
501
  "document": "获取直播垫片规则列表。",
495
502
  "input": "DescribeLivePadRulesRequest",
@@ -1029,6 +1036,13 @@
1029
1036
  "output": "StartLiveStreamMonitorResponse",
1030
1037
  "status": "online"
1031
1038
  },
1039
+ "StopLivePadProcessor": {
1040
+ "document": "使用该接口停止垫片流。",
1041
+ "input": "StopLivePadProcessorRequest",
1042
+ "name": "停止垫片流",
1043
+ "output": "StopLivePadProcessorResponse",
1044
+ "status": "online"
1045
+ },
1032
1046
  "StopLiveRecord": {
1033
1047
  "document": "说明:录制后的文件存放于点播平台。用户如需使用录制功能,需首先自行开通点播账号并确保账号可用。录制文件存放后,相关费用(含存储以及下行播放流量)按照点播平台计费方式收取,请参考对应文档。",
1034
1048
  "input": "StopLiveRecordRequest",
@@ -6853,6 +6867,52 @@
6853
6867
  ],
6854
6868
  "type": "object"
6855
6869
  },
6870
+ "DescribeLivePadProcessorListRequest": {
6871
+ "document": "DescribeLivePadProcessorList请求参数结构体",
6872
+ "members": [
6873
+ {
6874
+ "disabled": false,
6875
+ "document": "推流路径,与推流和播放地址中的AppName保持一致,默认为 live。",
6876
+ "example": "live",
6877
+ "member": "string",
6878
+ "name": "AppName",
6879
+ "required": true,
6880
+ "type": "string"
6881
+ },
6882
+ {
6883
+ "disabled": false,
6884
+ "document": "您的推流域名。",
6885
+ "example": "5000.livepush.myqcloud.com",
6886
+ "member": "string",
6887
+ "name": "PushDomainName",
6888
+ "required": true,
6889
+ "type": "string"
6890
+ }
6891
+ ],
6892
+ "type": "object"
6893
+ },
6894
+ "DescribeLivePadProcessorListResponse": {
6895
+ "document": "DescribeLivePadProcessorList返回参数结构体",
6896
+ "members": [
6897
+ {
6898
+ "disabled": false,
6899
+ "document": "当前正在拉取垫片的流名称列表。\n注意:此字段可能返回 null,表示取不到有效值。",
6900
+ "example": "[\"test1\",\"test2\"]",
6901
+ "member": "string",
6902
+ "name": "StreamNameList",
6903
+ "output_required": false,
6904
+ "type": "list",
6905
+ "value_allowed_null": true
6906
+ },
6907
+ {
6908
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
6909
+ "member": "string",
6910
+ "name": "RequestId",
6911
+ "type": "string"
6912
+ }
6913
+ ],
6914
+ "type": "object"
6915
+ },
6856
6916
  "DescribeLivePadRulesRequest": {
6857
6917
  "document": "DescribeLivePadRules请求参数结构体",
6858
6918
  "members": [],
@@ -16039,6 +16099,70 @@
16039
16099
  ],
16040
16100
  "type": "object"
16041
16101
  },
16102
+ "StopLivePadProcessorRequest": {
16103
+ "document": "StopLivePadProcessor请求参数结构体",
16104
+ "members": [
16105
+ {
16106
+ "disabled": false,
16107
+ "document": "推流路径,与推流和播放地址中的AppName保持一致,默认为 live。",
16108
+ "example": "live",
16109
+ "member": "string",
16110
+ "name": "AppName",
16111
+ "required": true,
16112
+ "type": "string"
16113
+ },
16114
+ {
16115
+ "disabled": false,
16116
+ "document": "您的推流域名。",
16117
+ "example": "5000.livepush.myqcloud.com",
16118
+ "member": "string",
16119
+ "name": "PushDomainName",
16120
+ "required": true,
16121
+ "type": "string"
16122
+ },
16123
+ {
16124
+ "disabled": false,
16125
+ "document": "流名称。",
16126
+ "example": "stream1",
16127
+ "member": "string",
16128
+ "name": "StreamName",
16129
+ "required": true,
16130
+ "type": "string"
16131
+ },
16132
+ {
16133
+ "disabled": false,
16134
+ "document": "操作人备注信息。",
16135
+ "example": "admin",
16136
+ "member": "string",
16137
+ "name": "Operator",
16138
+ "required": false,
16139
+ "type": "string"
16140
+ }
16141
+ ],
16142
+ "type": "object"
16143
+ },
16144
+ "StopLivePadProcessorResponse": {
16145
+ "document": "StopLivePadProcessor返回参数结构体",
16146
+ "members": [
16147
+ {
16148
+ "disabled": false,
16149
+ "document": "处理结果信息。\n注意:此字段可能返回 null,表示取不到有效值。",
16150
+ "example": "no match processor stream",
16151
+ "member": "string",
16152
+ "name": "ResultMessage",
16153
+ "output_required": false,
16154
+ "type": "string",
16155
+ "value_allowed_null": true
16156
+ },
16157
+ {
16158
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
16159
+ "member": "string",
16160
+ "name": "RequestId",
16161
+ "type": "string"
16162
+ }
16163
+ ],
16164
+ "type": "object"
16165
+ },
16042
16166
  "StopLiveRecordRequest": {
16043
16167
  "document": "StopLiveRecord请求参数结构体",
16044
16168
  "members": [
@@ -584,6 +584,14 @@
584
584
  "title": "查询直播套餐包信息"
585
585
  }
586
586
  ],
587
+ "DescribeLivePadProcessorList": [
588
+ {
589
+ "document": "查询正在拉垫片的流。",
590
+ "input": "POST / HTTP/1.1\nHost:live.tencentcloudapi.com\nContent-Type:application/json\nX-TC-Action: DescribeLivePadProcessorList\n<公共请求参数>\n\n{\n \"PushDomainName\": \"5000.livepush.com\",\n \"AppName\": \"live\"\n}",
591
+ "output": "{\n \"Response\": {\n \"StreamNameList\": [\n \"test1\",\n \"test2\"\n ],\n \"RequestId\": \"1047d0dc-6dc8-4898-a7f3-03726a822b0e\"\n }\n}",
592
+ "title": "请求示例"
593
+ }
594
+ ],
587
595
  "DescribeLivePadRules": [
588
596
  {
589
597
  "document": "",
@@ -1200,6 +1208,14 @@
1200
1208
  "title": "启动一个直播监播任务"
1201
1209
  }
1202
1210
  ],
1211
+ "StopLivePadProcessor": [
1212
+ {
1213
+ "document": "接口用于停止垫片流。",
1214
+ "input": "POST / HTTP/1.1\nHost:live.tencentcloudapi.com\nContent-Type:application/json\nX-TC-Action: StopLivePadProcessor\n<公共请求参数>\n\n{\n \"PushDomainName\": \"5000.livepush.myqcloud.com\",\n \"AppName\": \"live\",\n \"StreamName\": \"test\"\n}",
1215
+ "output": "{\n \"Response\": {\n \"ResultMessage\": \"success\",\n \"RequestId\": \"1047d0dc-6dc8-4898-a7f3-03726a822b0e\"\n }\n}",
1216
+ "title": "请求示例"
1217
+ }
1218
+ ],
1203
1219
  "StopLiveRecord": [
1204
1220
  {
1205
1221
  "document": "",
@@ -232,7 +232,7 @@
232
232
  "status": "online"
233
233
  },
234
234
  "GetEmbedding": {
235
- "document": "获取特征向量\n本接口有单账号调用上限控制,如您有提高并发限制的需求请 [联系我们](https://cloud.tencent.com/act/event/Online_service) 。",
235
+ "document": "本接口(GetEmbedding)调用文本表示模型,将文本转化为用数值表示的向量形式,可用于文本检索、信息推荐、知识挖掘等场景。\n本接口(GetEmbedding)有单账号调用上限控制,如您有提高并发限制的需求请 [联系我们](https://cloud.tencent.com/act/event/Online_service) 。",
236
236
  "input": "GetEmbeddingRequest",
237
237
  "name": "获取特征向量",
238
238
  "output": "GetEmbeddingResponse",
@@ -456,7 +456,7 @@
456
456
  "status": "online"
457
457
  },
458
458
  "QueryRewrite": {
459
- "document": "多轮改写\n本接口有单账号调用上限控制,如您有提高并发限制的需求请 [联系我们](https://cloud.tencent.com/act/event/Online_service) 。",
459
+ "document": "多轮改写(QueryRewrite)主要用于多轮对话中,进行指代消解和省略补全。使用本接口,无需输入prompt描述,根据对话历史即可生成更精确的用户查询。在应用场景上,本接口可应用于智能问答、对话式搜索等多种场景。\n本接口(QueryRewrite)有单账号调用上限控制,如您有提高并发限制的需求请 [联系我们](https://cloud.tencent.com/act/event/Online_service) 。",
460
460
  "input": "QueryRewriteRequest",
461
461
  "name": "多轮改写",
462
462
  "output": "QueryRewriteResponse",
@@ -7204,6 +7204,16 @@
7204
7204
  "type": "string",
7205
7205
  "value_allowed_null": false
7206
7206
  },
7207
+ {
7208
+ "disabled": false,
7209
+ "document": "当前记录所对应的 Session ID\n注意:此字段可能返回 null,表示取不到有效值。",
7210
+ "example": "无",
7211
+ "member": "string",
7212
+ "name": "SessionId",
7213
+ "output_required": false,
7214
+ "type": "string",
7215
+ "value_allowed_null": true
7216
+ },
7207
7217
  {
7208
7218
  "disabled": false,
7209
7219
  "document": "记录ID",
@@ -7294,6 +7304,16 @@
7294
7304
  "type": "bool",
7295
7305
  "value_allowed_null": false
7296
7306
  },
7307
+ {
7308
+ "disabled": false,
7309
+ "document": "是否展示反馈按钮\n注意:此字段可能返回 null,表示取不到有效值。",
7310
+ "example": "无",
7311
+ "member": "bool",
7312
+ "name": "CanFeedback",
7313
+ "output_required": false,
7314
+ "type": "bool",
7315
+ "value_allowed_null": true
7316
+ },
7297
7317
  {
7298
7318
  "disabled": false,
7299
7319
  "document": "记录类型",
@@ -7353,6 +7373,36 @@
7353
7373
  "output_required": false,
7354
7374
  "type": "object",
7355
7375
  "value_allowed_null": true
7376
+ },
7377
+ {
7378
+ "disabled": false,
7379
+ "document": "回复方式\n注意:此字段可能返回 null,表示取不到有效值。",
7380
+ "example": "无",
7381
+ "member": "uint64",
7382
+ "name": "ReplyMethod",
7383
+ "output_required": false,
7384
+ "type": "int",
7385
+ "value_allowed_null": true
7386
+ },
7387
+ {
7388
+ "disabled": false,
7389
+ "document": "选项卡, 用于多轮对话\n注意:此字段可能返回 null,表示取不到有效值。",
7390
+ "example": "无",
7391
+ "member": "string",
7392
+ "name": "OptionCards",
7393
+ "output_required": false,
7394
+ "type": "list",
7395
+ "value_allowed_null": true
7396
+ },
7397
+ {
7398
+ "disabled": false,
7399
+ "document": "任务信息\n注意:此字段可能返回 null,表示取不到有效值。",
7400
+ "example": "无",
7401
+ "member": "TaskFlowInfo",
7402
+ "name": "TaskFlow",
7403
+ "output_required": false,
7404
+ "type": "object",
7405
+ "value_allowed_null": true
7356
7406
  }
7357
7407
  ],
7358
7408
  "usage": "out"
@@ -7477,7 +7527,7 @@
7477
7527
  },
7478
7528
  {
7479
7529
  "disabled": false,
7480
- "document": "文件下载链接 (支持的文件类型: docx, txt, markdown, pdf)",
7530
+ "document": "文件下载链接 (支持的文件类型: docx, txt, markdown, pdf), 该地址需要外网可以直接无状态访问",
7481
7531
  "example": "https://file.download.com/产品说明.docx",
7482
7532
  "member": "string",
7483
7533
  "name": "Url",
@@ -9009,6 +9059,62 @@
9009
9059
  ],
9010
9060
  "usage": "both"
9011
9061
  },
9062
+ "TaskFlowInfo": {
9063
+ "document": "任务流程信息",
9064
+ "members": [
9065
+ {
9066
+ "disabled": false,
9067
+ "document": "任务流程ID\n注意:此字段可能返回 null,表示取不到有效值。",
9068
+ "example": "无",
9069
+ "member": "string",
9070
+ "name": "TaskFlowId",
9071
+ "output_required": false,
9072
+ "type": "string",
9073
+ "value_allowed_null": true
9074
+ },
9075
+ {
9076
+ "disabled": false,
9077
+ "document": "任务流程名称\n注意:此字段可能返回 null,表示取不到有效值。",
9078
+ "example": "无",
9079
+ "member": "string",
9080
+ "name": "TaskFlowName",
9081
+ "output_required": false,
9082
+ "type": "string",
9083
+ "value_allowed_null": true
9084
+ },
9085
+ {
9086
+ "disabled": false,
9087
+ "document": "Query 重写结果\n注意:此字段可能返回 null,表示取不到有效值。",
9088
+ "example": "无",
9089
+ "member": "string",
9090
+ "name": "QueryRewrite",
9091
+ "output_required": false,
9092
+ "type": "string",
9093
+ "value_allowed_null": true
9094
+ },
9095
+ {
9096
+ "disabled": false,
9097
+ "document": "命中意图\n注意:此字段可能返回 null,表示取不到有效值。",
9098
+ "example": "无",
9099
+ "member": "string",
9100
+ "name": "HitIntent",
9101
+ "output_required": false,
9102
+ "type": "string",
9103
+ "value_allowed_null": true
9104
+ },
9105
+ {
9106
+ "disabled": false,
9107
+ "document": "任务流程回复类型\n0: 任务流回复\n1: 任务流静默\n2: 任务流拉回话术\n3: 任务流自定义回复\n注意:此字段可能返回 null,表示取不到有效值。",
9108
+ "example": "无",
9109
+ "member": "uint64",
9110
+ "name": "Type",
9111
+ "output_required": false,
9112
+ "type": "int",
9113
+ "value_allowed_null": true
9114
+ }
9115
+ ],
9116
+ "usage": "out"
9117
+ },
9012
9118
  "TaskParams": {
9013
9119
  "document": "任务参数",
9014
9120
  "members": [
@@ -69,6 +69,58 @@ def doImageToClass(args, parsed_globals):
69
69
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
70
70
 
71
71
 
72
+ def doDrugInstructionObject(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('-', '_')], endpoint=g_param["sts_cred_endpoint"]
81
+ )
82
+ 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):
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.MrsClient(cred, g_param[OptionsDefine.Region], profile)
99
+ client._sdkVersion += ("_CLI_" + __version__)
100
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
101
+ model = models.DrugInstructionObjectRequest()
102
+ model.from_json_string(json.dumps(args))
103
+ start_time = time.time()
104
+ while True:
105
+ rsp = client.DrugInstructionObject(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 doTurnPDFToObjectAsyncGetResult(args, parsed_globals):
73
125
  g_param = parse_global_arg(parsed_globals)
74
126
 
@@ -549,6 +601,7 @@ MODELS_MAP = {
549
601
 
550
602
  ACTION_MAP = {
551
603
  "ImageToClass": doImageToClass,
604
+ "DrugInstructionObject": doDrugInstructionObject,
552
605
  "TurnPDFToObjectAsyncGetResult": doTurnPDFToObjectAsyncGetResult,
553
606
  "TextToObject": doTextToObject,
554
607
  "ImageMask": doImageMask,