tccli 3.0.1101.1__py2.py3-none-any.whl → 3.0.1103.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 (65) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/examples/cls/v20201016/DeleteDataTransform.md +1 -1
  3. tccli/examples/cls/v20201016/ModifyConfigExtra.md +2 -2
  4. tccli/examples/iotexplorer/v20190423/CreateTRTCSignaturesWithRoomId.md +30 -0
  5. tccli/examples/iotexplorer/v20190423/DescribeCloudStorageAIServiceTask.md +36 -0
  6. tccli/examples/iotexplorer/v20190423/DescribeCloudStorageAIServiceTasks.md +3 -0
  7. tccli/examples/iotexplorer/v20190423/DismissRoomByStrRoomIdFromTRTC.md +20 -0
  8. tccli/examples/iotexplorer/v20190423/GenerateCloudStorageAIServiceTaskFileURL.md +24 -0
  9. tccli/examples/iotexplorer/v20190423/RemoveUserByRoomIdFromTRTC.md +21 -0
  10. tccli/examples/lighthouse/v20200324/DescribeInstancesDeniedActions.md +11 -6
  11. tccli/examples/mrs/v20200910/DrugInstructionObject.md +0 -0
  12. tccli/examples/rum/v20210622/DescribeError.md +1 -1
  13. tccli/examples/rum/v20210622/ModifyProject.md +1 -1
  14. tccli/examples/teo/v20220901/DescribeSecurityIPGroup.md +30 -0
  15. tccli/examples/trtc/v20190722/CreateCloudRecording.md +2 -2
  16. tccli/examples/waf/v20180125/CreateIpAccessControl.md +27 -0
  17. tccli/examples/waf/v20180125/DeleteIpAccessControlV2.md +25 -0
  18. tccli/examples/waf/v20180125/ImportIpAccessControl.md +30 -0
  19. tccli/examples/waf/v20180125/ModifyIpAccessControl.md +28 -0
  20. tccli/services/captcha/v20190722/api.json +2 -2
  21. tccli/services/ccc/v20200210/api.json +3 -3
  22. tccli/services/cdn/v20180606/api.json +1 -1
  23. tccli/services/clb/v20180317/api.json +1 -1
  24. tccli/services/cls/v20201016/api.json +78 -56
  25. tccli/services/cls/v20201016/examples.json +2 -2
  26. tccli/services/cvm/v20170312/api.json +2 -0
  27. tccli/services/dlc/v20210125/api.json +70 -1
  28. tccli/services/ess/v20201111/api.json +9 -0
  29. tccli/services/essbasic/v20210526/api.json +19 -1
  30. tccli/services/fmu/v20191213/api.json +1 -1
  31. tccli/services/hunyuan/v20230901/api.json +2 -2
  32. tccli/services/iotexplorer/iotexplorer_client.py +298 -33
  33. tccli/services/iotexplorer/v20190423/api.json +359 -20
  34. tccli/services/iotexplorer/v20190423/examples.json +41 -1
  35. tccli/services/iss/v20230517/api.json +10 -0
  36. tccli/services/lighthouse/v20200324/api.json +30 -28
  37. tccli/services/lighthouse/v20200324/examples.json +3 -3
  38. tccli/services/lke/v20231130/api.json +1 -1
  39. tccli/services/monitor/v20180724/api.json +39 -39
  40. tccli/services/mrs/mrs_client.py +53 -0
  41. tccli/services/mrs/v20200910/api.json +1649 -415
  42. tccli/services/mrs/v20200910/examples.json +8 -0
  43. tccli/services/ocr/v20181119/api.json +1 -1
  44. tccli/services/rce/rce_client.py +0 -53
  45. tccli/services/rce/v20201103/api.json +0 -197
  46. tccli/services/rce/v20201103/examples.json +0 -8
  47. tccli/services/rum/v20210622/api.json +26 -11
  48. tccli/services/rum/v20210622/examples.json +16 -16
  49. tccli/services/tdmq/v20200217/api.json +141 -1
  50. tccli/services/teo/teo_client.py +53 -0
  51. tccli/services/teo/v20220901/api.json +55 -2
  52. tccli/services/teo/v20220901/examples.json +8 -0
  53. tccli/services/tke/v20180525/api.json +1 -1
  54. tccli/services/trtc/v20190722/api.json +25 -7
  55. tccli/services/trtc/v20190722/examples.json +1 -1
  56. tccli/services/tse/v20201207/api.json +2 -2
  57. tccli/services/vod/v20180717/api.json +2 -2
  58. tccli/services/waf/v20180125/api.json +396 -0
  59. tccli/services/waf/v20180125/examples.json +32 -0
  60. tccli/services/waf/waf_client.py +216 -4
  61. {tccli-3.0.1101.1.dist-info → tccli-3.0.1103.1.dist-info}/METADATA +2 -2
  62. {tccli-3.0.1101.1.dist-info → tccli-3.0.1103.1.dist-info}/RECORD +65 -54
  63. {tccli-3.0.1101.1.dist-info → tccli-3.0.1103.1.dist-info}/WHEEL +0 -0
  64. {tccli-3.0.1101.1.dist-info → tccli-3.0.1103.1.dist-info}/entry_points.txt +0 -0
  65. {tccli-3.0.1101.1.dist-info → tccli-3.0.1103.1.dist-info}/license_files/LICENSE +0 -0
@@ -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,