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.
- tccli/__init__.py +1 -1
- tccli/examples/cls/v20201016/DeleteDataTransform.md +1 -1
- tccli/examples/cls/v20201016/ModifyConfigExtra.md +2 -2
- tccli/examples/iotexplorer/v20190423/CreateTRTCSignaturesWithRoomId.md +30 -0
- tccli/examples/iotexplorer/v20190423/DescribeCloudStorageAIServiceTask.md +36 -0
- tccli/examples/iotexplorer/v20190423/DescribeCloudStorageAIServiceTasks.md +3 -0
- tccli/examples/iotexplorer/v20190423/DismissRoomByStrRoomIdFromTRTC.md +20 -0
- tccli/examples/iotexplorer/v20190423/GenerateCloudStorageAIServiceTaskFileURL.md +24 -0
- tccli/examples/iotexplorer/v20190423/RemoveUserByRoomIdFromTRTC.md +21 -0
- tccli/examples/lighthouse/v20200324/DescribeInstancesDeniedActions.md +11 -6
- tccli/examples/mrs/v20200910/DrugInstructionObject.md +0 -0
- tccli/examples/rum/v20210622/DescribeError.md +1 -1
- tccli/examples/rum/v20210622/ModifyProject.md +1 -1
- tccli/examples/teo/v20220901/DescribeSecurityIPGroup.md +30 -0
- tccli/examples/trtc/v20190722/CreateCloudRecording.md +2 -2
- tccli/examples/waf/v20180125/CreateIpAccessControl.md +27 -0
- tccli/examples/waf/v20180125/DeleteIpAccessControlV2.md +25 -0
- tccli/examples/waf/v20180125/ImportIpAccessControl.md +30 -0
- tccli/examples/waf/v20180125/ModifyIpAccessControl.md +28 -0
- tccli/services/captcha/v20190722/api.json +2 -2
- tccli/services/ccc/v20200210/api.json +3 -3
- tccli/services/cdn/v20180606/api.json +1 -1
- tccli/services/clb/v20180317/api.json +1 -1
- tccli/services/cls/v20201016/api.json +78 -56
- tccli/services/cls/v20201016/examples.json +2 -2
- tccli/services/cvm/v20170312/api.json +2 -0
- tccli/services/dlc/v20210125/api.json +70 -1
- tccli/services/ess/v20201111/api.json +9 -0
- tccli/services/essbasic/v20210526/api.json +19 -1
- tccli/services/fmu/v20191213/api.json +1 -1
- tccli/services/hunyuan/v20230901/api.json +2 -2
- tccli/services/iotexplorer/iotexplorer_client.py +298 -33
- tccli/services/iotexplorer/v20190423/api.json +359 -20
- tccli/services/iotexplorer/v20190423/examples.json +41 -1
- tccli/services/iss/v20230517/api.json +10 -0
- tccli/services/lighthouse/v20200324/api.json +30 -28
- tccli/services/lighthouse/v20200324/examples.json +3 -3
- tccli/services/lke/v20231130/api.json +1 -1
- tccli/services/monitor/v20180724/api.json +39 -39
- tccli/services/mrs/mrs_client.py +53 -0
- tccli/services/mrs/v20200910/api.json +1649 -415
- tccli/services/mrs/v20200910/examples.json +8 -0
- tccli/services/ocr/v20181119/api.json +1 -1
- tccli/services/rce/rce_client.py +0 -53
- tccli/services/rce/v20201103/api.json +0 -197
- tccli/services/rce/v20201103/examples.json +0 -8
- tccli/services/rum/v20210622/api.json +26 -11
- tccli/services/rum/v20210622/examples.json +16 -16
- tccli/services/tdmq/v20200217/api.json +141 -1
- tccli/services/teo/teo_client.py +53 -0
- tccli/services/teo/v20220901/api.json +55 -2
- tccli/services/teo/v20220901/examples.json +8 -0
- tccli/services/tke/v20180525/api.json +1 -1
- tccli/services/trtc/v20190722/api.json +25 -7
- tccli/services/trtc/v20190722/examples.json +1 -1
- tccli/services/tse/v20201207/api.json +2 -2
- tccli/services/vod/v20180717/api.json +2 -2
- tccli/services/waf/v20180125/api.json +396 -0
- tccli/services/waf/v20180125/examples.json +32 -0
- tccli/services/waf/waf_client.py +216 -4
- {tccli-3.0.1101.1.dist-info → tccli-3.0.1103.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1101.1.dist-info → tccli-3.0.1103.1.dist-info}/RECORD +65 -54
- {tccli-3.0.1101.1.dist-info → tccli-3.0.1103.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1101.1.dist-info → tccli-3.0.1103.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1101.1.dist-info → tccli-3.0.1103.1.dist-info}/license_files/LICENSE +0 -0
tccli/services/mrs/mrs_client.py
CHANGED
@@ -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,
|