tccli 3.0.1352.1__py2.py3-none-any.whl → 3.0.1353.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.
- tccli/__init__.py +1 -1
- tccli/services/aiart/v20221229/api.json +3 -3
- tccli/services/apm/v20210622/api.json +1 -1
- tccli/services/cdn/v20180606/api.json +0 -3
- tccli/services/cdn/v20180606/examples.json +2 -2
- tccli/services/cfg/v20210820/api.json +11 -0
- tccli/services/cfs/v20190719/api.json +46 -0
- tccli/services/csip/v20221121/api.json +21 -3
- tccli/services/csip/v20221121/examples.json +1 -1
- tccli/services/eb/v20210416/api.json +17 -8
- tccli/services/eb/v20210416/examples.json +1 -1
- tccli/services/ess/v20201111/api.json +1 -1
- tccli/services/iai/v20180301/api.json +143 -135
- tccli/services/iai/v20180301/examples.json +18 -12
- tccli/services/iai/v20200303/api.json +4 -4
- tccli/services/igtm/v20231024/api.json +139 -139
- tccli/services/iotvideo/v20191126/api.json +1 -1
- tccli/services/iotvideo/v20201215/api.json +1 -1
- tccli/services/iotvideo/v20211125/api.json +1 -1
- tccli/services/lighthouse/v20200324/api.json +10 -0
- tccli/services/lke/v20231130/api.json +2 -2
- tccli/services/lkeap/v20240522/api.json +3 -3
- tccli/services/monitor/v20180724/api.json +7 -7
- tccli/services/monitor/v20180724/examples.json +2 -2
- tccli/services/tcbr/v20220217/api.json +10 -0
- tccli/services/tke/v20180525/api.json +49 -1
- tccli/services/trro/v20220325/api.json +1 -1
- tccli/services/trtc/trtc_client.py +459 -35
- tccli/services/trtc/v20190722/api.json +1068 -81
- tccli/services/trtc/v20190722/examples.json +64 -0
- tccli/services/tts/v20190823/api.json +1 -1
- tccli/services/vod/v20180717/examples.json +17 -17
- tccli/services/wedata/v20210820/api.json +501 -3
- tccli/services/wedata/v20210820/examples.json +86 -0
- tccli/services/wedata/wedata_client.py +440 -69
- {tccli-3.0.1352.1.dist-info → tccli-3.0.1353.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1352.1.dist-info → tccli-3.0.1353.1.dist-info}/RECORD +40 -40
- {tccli-3.0.1352.1.dist-info → tccli-3.0.1353.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1352.1.dist-info → tccli-3.0.1353.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1352.1.dist-info → tccli-3.0.1353.1.dist-info}/license_files/LICENSE +0 -0
@@ -17,7 +17,7 @@ from tencentcloud.trtc.v20190722 import models as models_v20190722
|
|
17
17
|
from jmespath import search
|
18
18
|
import time
|
19
19
|
|
20
|
-
def
|
20
|
+
def doCreateCloudModeration(args, parsed_globals):
|
21
21
|
g_param = parse_global_arg(parsed_globals)
|
22
22
|
|
23
23
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -46,11 +46,11 @@ def doDescribeRoomInfo(args, parsed_globals):
|
|
46
46
|
client = mod.TrtcClient(cred, g_param[OptionsDefine.Region], profile)
|
47
47
|
client._sdkVersion += ("_CLI_" + __version__)
|
48
48
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
49
|
-
model = models.
|
49
|
+
model = models.CreateCloudModerationRequest()
|
50
50
|
model.from_json_string(json.dumps(args))
|
51
51
|
start_time = time.time()
|
52
52
|
while True:
|
53
|
-
rsp = client.
|
53
|
+
rsp = client.CreateCloudModeration(model)
|
54
54
|
result = rsp.to_json_string()
|
55
55
|
try:
|
56
56
|
json_obj = json.loads(result)
|
@@ -277,7 +277,7 @@ def doCreateBasicModeration(args, parsed_globals):
|
|
277
277
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
278
278
|
|
279
279
|
|
280
|
-
def
|
280
|
+
def doDescribeRoomInfo(args, parsed_globals):
|
281
281
|
g_param = parse_global_arg(parsed_globals)
|
282
282
|
|
283
283
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -306,11 +306,11 @@ def doStopAIConversation(args, parsed_globals):
|
|
306
306
|
client = mod.TrtcClient(cred, g_param[OptionsDefine.Region], profile)
|
307
307
|
client._sdkVersion += ("_CLI_" + __version__)
|
308
308
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
309
|
-
model = models.
|
309
|
+
model = models.DescribeRoomInfoRequest()
|
310
310
|
model.from_json_string(json.dumps(args))
|
311
311
|
start_time = time.time()
|
312
312
|
while True:
|
313
|
-
rsp = client.
|
313
|
+
rsp = client.DescribeRoomInfo(model)
|
314
314
|
result = rsp.to_json_string()
|
315
315
|
try:
|
316
316
|
json_obj = json.loads(result)
|
@@ -641,7 +641,7 @@ def doDescribeTRTCMarketScaleMetricData(args, parsed_globals):
|
|
641
641
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
642
642
|
|
643
643
|
|
644
|
-
def
|
644
|
+
def doDeleteVoicePrint(args, parsed_globals):
|
645
645
|
g_param = parse_global_arg(parsed_globals)
|
646
646
|
|
647
647
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -670,11 +670,11 @@ def doStartAIConversation(args, parsed_globals):
|
|
670
670
|
client = mod.TrtcClient(cred, g_param[OptionsDefine.Region], profile)
|
671
671
|
client._sdkVersion += ("_CLI_" + __version__)
|
672
672
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
673
|
-
model = models.
|
673
|
+
model = models.DeleteVoicePrintRequest()
|
674
674
|
model.from_json_string(json.dumps(args))
|
675
675
|
start_time = time.time()
|
676
676
|
while True:
|
677
|
-
rsp = client.
|
677
|
+
rsp = client.DeleteVoicePrint(model)
|
678
678
|
result = rsp.to_json_string()
|
679
679
|
try:
|
680
680
|
json_obj = json.loads(result)
|
@@ -693,7 +693,7 @@ def doStartAIConversation(args, parsed_globals):
|
|
693
693
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
694
694
|
|
695
695
|
|
696
|
-
def
|
696
|
+
def doDescribeTRTCRealTimeScaleData(args, parsed_globals):
|
697
697
|
g_param = parse_global_arg(parsed_globals)
|
698
698
|
|
699
699
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -722,11 +722,63 @@ def doDeleteVoicePrint(args, parsed_globals):
|
|
722
722
|
client = mod.TrtcClient(cred, g_param[OptionsDefine.Region], profile)
|
723
723
|
client._sdkVersion += ("_CLI_" + __version__)
|
724
724
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
725
|
-
model = models.
|
725
|
+
model = models.DescribeTRTCRealTimeScaleDataRequest()
|
726
726
|
model.from_json_string(json.dumps(args))
|
727
727
|
start_time = time.time()
|
728
728
|
while True:
|
729
|
-
rsp = client.
|
729
|
+
rsp = client.DescribeTRTCRealTimeScaleData(model)
|
730
|
+
result = rsp.to_json_string()
|
731
|
+
try:
|
732
|
+
json_obj = json.loads(result)
|
733
|
+
except TypeError as e:
|
734
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
735
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
736
|
+
break
|
737
|
+
cur_time = time.time()
|
738
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
739
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
740
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
741
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
742
|
+
else:
|
743
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
744
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
745
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
746
|
+
|
747
|
+
|
748
|
+
def doDescribeAIConversation(args, parsed_globals):
|
749
|
+
g_param = parse_global_arg(parsed_globals)
|
750
|
+
|
751
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
752
|
+
cred = credential.CVMRoleCredential()
|
753
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
754
|
+
cred = credential.STSAssumeRoleCredential(
|
755
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
756
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
757
|
+
)
|
758
|
+
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):
|
759
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
760
|
+
else:
|
761
|
+
cred = credential.Credential(
|
762
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
763
|
+
)
|
764
|
+
http_profile = HttpProfile(
|
765
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
766
|
+
reqMethod="POST",
|
767
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
768
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
769
|
+
)
|
770
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
771
|
+
if g_param[OptionsDefine.Language]:
|
772
|
+
profile.language = g_param[OptionsDefine.Language]
|
773
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
774
|
+
client = mod.TrtcClient(cred, g_param[OptionsDefine.Region], profile)
|
775
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
776
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
777
|
+
model = models.DescribeAIConversationRequest()
|
778
|
+
model.from_json_string(json.dumps(args))
|
779
|
+
start_time = time.time()
|
780
|
+
while True:
|
781
|
+
rsp = client.DescribeAIConversation(model)
|
730
782
|
result = rsp.to_json_string()
|
731
783
|
try:
|
732
784
|
json_obj = json.loads(result)
|
@@ -849,6 +901,58 @@ def doStartStreamIngest(args, parsed_globals):
|
|
849
901
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
850
902
|
|
851
903
|
|
904
|
+
def doDescribeCloudModeration(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('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
913
|
+
)
|
914
|
+
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):
|
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.TrtcClient(cred, g_param[OptionsDefine.Region], profile)
|
931
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
932
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
933
|
+
model = models.DescribeCloudModerationRequest()
|
934
|
+
model.from_json_string(json.dumps(args))
|
935
|
+
start_time = time.time()
|
936
|
+
while True:
|
937
|
+
rsp = client.DescribeCloudModeration(model)
|
938
|
+
result = rsp.to_json_string()
|
939
|
+
try:
|
940
|
+
json_obj = json.loads(result)
|
941
|
+
except TypeError as e:
|
942
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
943
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
944
|
+
break
|
945
|
+
cur_time = time.time()
|
946
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
947
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
948
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
949
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
950
|
+
else:
|
951
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
952
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
953
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
954
|
+
|
955
|
+
|
852
956
|
def doUpdateStreamIngest(args, parsed_globals):
|
853
957
|
g_param = parse_global_arg(parsed_globals)
|
854
958
|
|
@@ -1057,7 +1161,7 @@ def doCreatePicture(args, parsed_globals):
|
|
1057
1161
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1058
1162
|
|
1059
1163
|
|
1060
|
-
def
|
1164
|
+
def doStartAIConversation(args, parsed_globals):
|
1061
1165
|
g_param = parse_global_arg(parsed_globals)
|
1062
1166
|
|
1063
1167
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1086,11 +1190,11 @@ def doDescribeTRTCRealTimeScaleData(args, parsed_globals):
|
|
1086
1190
|
client = mod.TrtcClient(cred, g_param[OptionsDefine.Region], profile)
|
1087
1191
|
client._sdkVersion += ("_CLI_" + __version__)
|
1088
1192
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1089
|
-
model = models.
|
1193
|
+
model = models.StartAIConversationRequest()
|
1090
1194
|
model.from_json_string(json.dumps(args))
|
1091
1195
|
start_time = time.time()
|
1092
1196
|
while True:
|
1093
|
-
rsp = client.
|
1197
|
+
rsp = client.StartAIConversation(model)
|
1094
1198
|
result = rsp.to_json_string()
|
1095
1199
|
try:
|
1096
1200
|
json_obj = json.loads(result)
|
@@ -1629,6 +1733,58 @@ def doStopWebRecord(args, parsed_globals):
|
|
1629
1733
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1630
1734
|
|
1631
1735
|
|
1736
|
+
def doDescribeCloudSliceTask(args, parsed_globals):
|
1737
|
+
g_param = parse_global_arg(parsed_globals)
|
1738
|
+
|
1739
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1740
|
+
cred = credential.CVMRoleCredential()
|
1741
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1742
|
+
cred = credential.STSAssumeRoleCredential(
|
1743
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1744
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1745
|
+
)
|
1746
|
+
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):
|
1747
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1748
|
+
else:
|
1749
|
+
cred = credential.Credential(
|
1750
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1751
|
+
)
|
1752
|
+
http_profile = HttpProfile(
|
1753
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1754
|
+
reqMethod="POST",
|
1755
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
1756
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1757
|
+
)
|
1758
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1759
|
+
if g_param[OptionsDefine.Language]:
|
1760
|
+
profile.language = g_param[OptionsDefine.Language]
|
1761
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1762
|
+
client = mod.TrtcClient(cred, g_param[OptionsDefine.Region], profile)
|
1763
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1764
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1765
|
+
model = models.DescribeCloudSliceTaskRequest()
|
1766
|
+
model.from_json_string(json.dumps(args))
|
1767
|
+
start_time = time.time()
|
1768
|
+
while True:
|
1769
|
+
rsp = client.DescribeCloudSliceTask(model)
|
1770
|
+
result = rsp.to_json_string()
|
1771
|
+
try:
|
1772
|
+
json_obj = json.loads(result)
|
1773
|
+
except TypeError as e:
|
1774
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1775
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1776
|
+
break
|
1777
|
+
cur_time = time.time()
|
1778
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1779
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1780
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1781
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1782
|
+
else:
|
1783
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1784
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1785
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1786
|
+
|
1787
|
+
|
1632
1788
|
def doCreateCloudRecording(args, parsed_globals):
|
1633
1789
|
g_param = parse_global_arg(parsed_globals)
|
1634
1790
|
|
@@ -1681,7 +1837,7 @@ def doCreateCloudRecording(args, parsed_globals):
|
|
1681
1837
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1682
1838
|
|
1683
1839
|
|
1684
|
-
def
|
1840
|
+
def doDeleteCloudModeration(args, parsed_globals):
|
1685
1841
|
g_param = parse_global_arg(parsed_globals)
|
1686
1842
|
|
1687
1843
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1710,11 +1866,11 @@ def doDescribeAIConversation(args, parsed_globals):
|
|
1710
1866
|
client = mod.TrtcClient(cred, g_param[OptionsDefine.Region], profile)
|
1711
1867
|
client._sdkVersion += ("_CLI_" + __version__)
|
1712
1868
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1713
|
-
model = models.
|
1869
|
+
model = models.DeleteCloudModerationRequest()
|
1714
1870
|
model.from_json_string(json.dumps(args))
|
1715
1871
|
start_time = time.time()
|
1716
1872
|
while True:
|
1717
|
-
rsp = client.
|
1873
|
+
rsp = client.DeleteCloudModeration(model)
|
1718
1874
|
result = rsp.to_json_string()
|
1719
1875
|
try:
|
1720
1876
|
json_obj = json.loads(result)
|
@@ -1785,6 +1941,58 @@ def doDescribeScaleInfo(args, parsed_globals):
|
|
1785
1941
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1786
1942
|
|
1787
1943
|
|
1944
|
+
def doStopAIConversation(args, parsed_globals):
|
1945
|
+
g_param = parse_global_arg(parsed_globals)
|
1946
|
+
|
1947
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1948
|
+
cred = credential.CVMRoleCredential()
|
1949
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1950
|
+
cred = credential.STSAssumeRoleCredential(
|
1951
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1952
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1953
|
+
)
|
1954
|
+
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):
|
1955
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1956
|
+
else:
|
1957
|
+
cred = credential.Credential(
|
1958
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1959
|
+
)
|
1960
|
+
http_profile = HttpProfile(
|
1961
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1962
|
+
reqMethod="POST",
|
1963
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
1964
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1965
|
+
)
|
1966
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1967
|
+
if g_param[OptionsDefine.Language]:
|
1968
|
+
profile.language = g_param[OptionsDefine.Language]
|
1969
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1970
|
+
client = mod.TrtcClient(cred, g_param[OptionsDefine.Region], profile)
|
1971
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1972
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1973
|
+
model = models.StopAIConversationRequest()
|
1974
|
+
model.from_json_string(json.dumps(args))
|
1975
|
+
start_time = time.time()
|
1976
|
+
while True:
|
1977
|
+
rsp = client.StopAIConversation(model)
|
1978
|
+
result = rsp.to_json_string()
|
1979
|
+
try:
|
1980
|
+
json_obj = json.loads(result)
|
1981
|
+
except TypeError as e:
|
1982
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1983
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1984
|
+
break
|
1985
|
+
cur_time = time.time()
|
1986
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1987
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1988
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1989
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1990
|
+
else:
|
1991
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1992
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1993
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1994
|
+
|
1995
|
+
|
1788
1996
|
def doDescribeRelayUsage(args, parsed_globals):
|
1789
1997
|
g_param = parse_global_arg(parsed_globals)
|
1790
1998
|
|
@@ -1941,6 +2149,58 @@ def doDescribeTrtcMcuTranscodeTime(args, parsed_globals):
|
|
1941
2149
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1942
2150
|
|
1943
2151
|
|
2152
|
+
def doModifyCloudSliceTask(args, parsed_globals):
|
2153
|
+
g_param = parse_global_arg(parsed_globals)
|
2154
|
+
|
2155
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
2156
|
+
cred = credential.CVMRoleCredential()
|
2157
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2158
|
+
cred = credential.STSAssumeRoleCredential(
|
2159
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2160
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2161
|
+
)
|
2162
|
+
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):
|
2163
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
2164
|
+
else:
|
2165
|
+
cred = credential.Credential(
|
2166
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
2167
|
+
)
|
2168
|
+
http_profile = HttpProfile(
|
2169
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
2170
|
+
reqMethod="POST",
|
2171
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
2172
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
2173
|
+
)
|
2174
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
2175
|
+
if g_param[OptionsDefine.Language]:
|
2176
|
+
profile.language = g_param[OptionsDefine.Language]
|
2177
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
2178
|
+
client = mod.TrtcClient(cred, g_param[OptionsDefine.Region], profile)
|
2179
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
2180
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2181
|
+
model = models.ModifyCloudSliceTaskRequest()
|
2182
|
+
model.from_json_string(json.dumps(args))
|
2183
|
+
start_time = time.time()
|
2184
|
+
while True:
|
2185
|
+
rsp = client.ModifyCloudSliceTask(model)
|
2186
|
+
result = rsp.to_json_string()
|
2187
|
+
try:
|
2188
|
+
json_obj = json.loads(result)
|
2189
|
+
except TypeError as e:
|
2190
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
2191
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
2192
|
+
break
|
2193
|
+
cur_time = time.time()
|
2194
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
2195
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
2196
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
2197
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
2198
|
+
else:
|
2199
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
2200
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
2201
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2202
|
+
|
2203
|
+
|
1944
2204
|
def doStopMCUMixTranscodeByStrRoomId(args, parsed_globals):
|
1945
2205
|
g_param = parse_global_arg(parsed_globals)
|
1946
2206
|
|
@@ -2045,6 +2305,58 @@ def doStopStreamIngest(args, parsed_globals):
|
|
2045
2305
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2046
2306
|
|
2047
2307
|
|
2308
|
+
def doDescribeUnusualEvent(args, parsed_globals):
|
2309
|
+
g_param = parse_global_arg(parsed_globals)
|
2310
|
+
|
2311
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
2312
|
+
cred = credential.CVMRoleCredential()
|
2313
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2314
|
+
cred = credential.STSAssumeRoleCredential(
|
2315
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2316
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2317
|
+
)
|
2318
|
+
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):
|
2319
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
2320
|
+
else:
|
2321
|
+
cred = credential.Credential(
|
2322
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
2323
|
+
)
|
2324
|
+
http_profile = HttpProfile(
|
2325
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
2326
|
+
reqMethod="POST",
|
2327
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
2328
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
2329
|
+
)
|
2330
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
2331
|
+
if g_param[OptionsDefine.Language]:
|
2332
|
+
profile.language = g_param[OptionsDefine.Language]
|
2333
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
2334
|
+
client = mod.TrtcClient(cred, g_param[OptionsDefine.Region], profile)
|
2335
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
2336
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2337
|
+
model = models.DescribeUnusualEventRequest()
|
2338
|
+
model.from_json_string(json.dumps(args))
|
2339
|
+
start_time = time.time()
|
2340
|
+
while True:
|
2341
|
+
rsp = client.DescribeUnusualEvent(model)
|
2342
|
+
result = rsp.to_json_string()
|
2343
|
+
try:
|
2344
|
+
json_obj = json.loads(result)
|
2345
|
+
except TypeError as e:
|
2346
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
2347
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
2348
|
+
break
|
2349
|
+
cur_time = time.time()
|
2350
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
2351
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
2352
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
2353
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
2354
|
+
else:
|
2355
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
2356
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
2357
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2358
|
+
|
2359
|
+
|
2048
2360
|
def doStartMCUMixTranscodeByStrRoomId(args, parsed_globals):
|
2049
2361
|
g_param = parse_global_arg(parsed_globals)
|
2050
2362
|
|
@@ -2565,7 +2877,7 @@ def doModifyPicture(args, parsed_globals):
|
|
2565
2877
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2566
2878
|
|
2567
2879
|
|
2568
|
-
def
|
2880
|
+
def doUpdateVoicePrint(args, parsed_globals):
|
2569
2881
|
g_param = parse_global_arg(parsed_globals)
|
2570
2882
|
|
2571
2883
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2594,11 +2906,11 @@ def doDescribeAITranscription(args, parsed_globals):
|
|
2594
2906
|
client = mod.TrtcClient(cred, g_param[OptionsDefine.Region], profile)
|
2595
2907
|
client._sdkVersion += ("_CLI_" + __version__)
|
2596
2908
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2597
|
-
model = models.
|
2909
|
+
model = models.UpdateVoicePrintRequest()
|
2598
2910
|
model.from_json_string(json.dumps(args))
|
2599
2911
|
start_time = time.time()
|
2600
2912
|
while True:
|
2601
|
-
rsp = client.
|
2913
|
+
rsp = client.UpdateVoicePrint(model)
|
2602
2914
|
result = rsp.to_json_string()
|
2603
2915
|
try:
|
2604
2916
|
json_obj = json.loads(result)
|
@@ -2721,6 +3033,58 @@ def doDescribeTRTCRealTimeQualityData(args, parsed_globals):
|
|
2721
3033
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2722
3034
|
|
2723
3035
|
|
3036
|
+
def doCreateCloudSliceTask(args, parsed_globals):
|
3037
|
+
g_param = parse_global_arg(parsed_globals)
|
3038
|
+
|
3039
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
3040
|
+
cred = credential.CVMRoleCredential()
|
3041
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3042
|
+
cred = credential.STSAssumeRoleCredential(
|
3043
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3044
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3045
|
+
)
|
3046
|
+
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):
|
3047
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
3048
|
+
else:
|
3049
|
+
cred = credential.Credential(
|
3050
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
3051
|
+
)
|
3052
|
+
http_profile = HttpProfile(
|
3053
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
3054
|
+
reqMethod="POST",
|
3055
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
3056
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
3057
|
+
)
|
3058
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
3059
|
+
if g_param[OptionsDefine.Language]:
|
3060
|
+
profile.language = g_param[OptionsDefine.Language]
|
3061
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
3062
|
+
client = mod.TrtcClient(cred, g_param[OptionsDefine.Region], profile)
|
3063
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
3064
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3065
|
+
model = models.CreateCloudSliceTaskRequest()
|
3066
|
+
model.from_json_string(json.dumps(args))
|
3067
|
+
start_time = time.time()
|
3068
|
+
while True:
|
3069
|
+
rsp = client.CreateCloudSliceTask(model)
|
3070
|
+
result = rsp.to_json_string()
|
3071
|
+
try:
|
3072
|
+
json_obj = json.loads(result)
|
3073
|
+
except TypeError as e:
|
3074
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
3075
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
3076
|
+
break
|
3077
|
+
cur_time = time.time()
|
3078
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
3079
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
3080
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
3081
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
3082
|
+
else:
|
3083
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
3084
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
3085
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3086
|
+
|
3087
|
+
|
2724
3088
|
def doDescribeWebRecord(args, parsed_globals):
|
2725
3089
|
g_param = parse_global_arg(parsed_globals)
|
2726
3090
|
|
@@ -2825,7 +3189,7 @@ def doDescribePicture(args, parsed_globals):
|
|
2825
3189
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2826
3190
|
|
2827
3191
|
|
2828
|
-
def
|
3192
|
+
def doDescribeAITranscription(args, parsed_globals):
|
2829
3193
|
g_param = parse_global_arg(parsed_globals)
|
2830
3194
|
|
2831
3195
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2854,11 +3218,11 @@ def doUpdateVoicePrint(args, parsed_globals):
|
|
2854
3218
|
client = mod.TrtcClient(cred, g_param[OptionsDefine.Region], profile)
|
2855
3219
|
client._sdkVersion += ("_CLI_" + __version__)
|
2856
3220
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2857
|
-
model = models.
|
3221
|
+
model = models.DescribeAITranscriptionRequest()
|
2858
3222
|
model.from_json_string(json.dumps(args))
|
2859
3223
|
start_time = time.time()
|
2860
3224
|
while True:
|
2861
|
-
rsp = client.
|
3225
|
+
rsp = client.DescribeAITranscription(model)
|
2862
3226
|
result = rsp.to_json_string()
|
2863
3227
|
try:
|
2864
3228
|
json_obj = json.loads(result)
|
@@ -3033,7 +3397,7 @@ def doStopPublishCdnStream(args, parsed_globals):
|
|
3033
3397
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3034
3398
|
|
3035
3399
|
|
3036
|
-
def
|
3400
|
+
def doDeleteCloudSliceTask(args, parsed_globals):
|
3037
3401
|
g_param = parse_global_arg(parsed_globals)
|
3038
3402
|
|
3039
3403
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3062,11 +3426,63 @@ def doDescribeUnusualEvent(args, parsed_globals):
|
|
3062
3426
|
client = mod.TrtcClient(cred, g_param[OptionsDefine.Region], profile)
|
3063
3427
|
client._sdkVersion += ("_CLI_" + __version__)
|
3064
3428
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3065
|
-
model = models.
|
3429
|
+
model = models.DeleteCloudSliceTaskRequest()
|
3066
3430
|
model.from_json_string(json.dumps(args))
|
3067
3431
|
start_time = time.time()
|
3068
3432
|
while True:
|
3069
|
-
rsp = client.
|
3433
|
+
rsp = client.DeleteCloudSliceTask(model)
|
3434
|
+
result = rsp.to_json_string()
|
3435
|
+
try:
|
3436
|
+
json_obj = json.loads(result)
|
3437
|
+
except TypeError as e:
|
3438
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
3439
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
3440
|
+
break
|
3441
|
+
cur_time = time.time()
|
3442
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
3443
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
3444
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
3445
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
3446
|
+
else:
|
3447
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
3448
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
3449
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3450
|
+
|
3451
|
+
|
3452
|
+
def doModifyCloudModeration(args, parsed_globals):
|
3453
|
+
g_param = parse_global_arg(parsed_globals)
|
3454
|
+
|
3455
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
3456
|
+
cred = credential.CVMRoleCredential()
|
3457
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3458
|
+
cred = credential.STSAssumeRoleCredential(
|
3459
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3460
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3461
|
+
)
|
3462
|
+
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):
|
3463
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
3464
|
+
else:
|
3465
|
+
cred = credential.Credential(
|
3466
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
3467
|
+
)
|
3468
|
+
http_profile = HttpProfile(
|
3469
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
3470
|
+
reqMethod="POST",
|
3471
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
3472
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
3473
|
+
)
|
3474
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
3475
|
+
if g_param[OptionsDefine.Language]:
|
3476
|
+
profile.language = g_param[OptionsDefine.Language]
|
3477
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
3478
|
+
client = mod.TrtcClient(cred, g_param[OptionsDefine.Region], profile)
|
3479
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
3480
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3481
|
+
model = models.ModifyCloudModerationRequest()
|
3482
|
+
model.from_json_string(json.dumps(args))
|
3483
|
+
start_time = time.time()
|
3484
|
+
while True:
|
3485
|
+
rsp = client.ModifyCloudModeration(model)
|
3070
3486
|
result = rsp.to_json_string()
|
3071
3487
|
try:
|
3072
3488
|
json_obj = json.loads(result)
|
@@ -3200,27 +3616,29 @@ MODELS_MAP = {
|
|
3200
3616
|
}
|
3201
3617
|
|
3202
3618
|
ACTION_MAP = {
|
3203
|
-
"
|
3619
|
+
"CreateCloudModeration": doCreateCloudModeration,
|
3204
3620
|
"StopAITranscription": doStopAITranscription,
|
3205
3621
|
"UpdateAIConversation": doUpdateAIConversation,
|
3206
3622
|
"DescribeTrtcUsage": doDescribeTrtcUsage,
|
3207
3623
|
"CreateBasicModeration": doCreateBasicModeration,
|
3208
|
-
"
|
3624
|
+
"DescribeRoomInfo": doDescribeRoomInfo,
|
3209
3625
|
"DescribeTRTCMarketQualityMetricData": doDescribeTRTCMarketQualityMetricData,
|
3210
3626
|
"DeleteCloudRecording": doDeleteCloudRecording,
|
3211
3627
|
"StartPublishCdnStream": doStartPublishCdnStream,
|
3212
3628
|
"DescribeCallDetailInfo": doDescribeCallDetailInfo,
|
3213
3629
|
"DescribeStreamIngest": doDescribeStreamIngest,
|
3214
3630
|
"DescribeTRTCMarketScaleMetricData": doDescribeTRTCMarketScaleMetricData,
|
3215
|
-
"StartAIConversation": doStartAIConversation,
|
3216
3631
|
"DeleteVoicePrint": doDeleteVoicePrint,
|
3632
|
+
"DescribeTRTCRealTimeScaleData": doDescribeTRTCRealTimeScaleData,
|
3633
|
+
"DescribeAIConversation": doDescribeAIConversation,
|
3217
3634
|
"DescribeRecordingUsage": doDescribeRecordingUsage,
|
3218
3635
|
"StartStreamIngest": doStartStreamIngest,
|
3636
|
+
"DescribeCloudModeration": doDescribeCloudModeration,
|
3219
3637
|
"UpdateStreamIngest": doUpdateStreamIngest,
|
3220
3638
|
"DeletePicture": doDeletePicture,
|
3221
3639
|
"DescribeTRTCRealTimeQualityMetricData": doDescribeTRTCRealTimeQualityMetricData,
|
3222
3640
|
"CreatePicture": doCreatePicture,
|
3223
|
-
"
|
3641
|
+
"StartAIConversation": doStartAIConversation,
|
3224
3642
|
"RemoveUser": doRemoveUser,
|
3225
3643
|
"DeleteBasicModeration": doDeleteBasicModeration,
|
3226
3644
|
"ModifyCloudRecording": doModifyCloudRecording,
|
@@ -3231,14 +3649,18 @@ ACTION_MAP = {
|
|
3231
3649
|
"DescribeTRTCMarketScaleData": doDescribeTRTCMarketScaleData,
|
3232
3650
|
"RegisterVoicePrint": doRegisterVoicePrint,
|
3233
3651
|
"StopWebRecord": doStopWebRecord,
|
3652
|
+
"DescribeCloudSliceTask": doDescribeCloudSliceTask,
|
3234
3653
|
"CreateCloudRecording": doCreateCloudRecording,
|
3235
|
-
"
|
3654
|
+
"DeleteCloudModeration": doDeleteCloudModeration,
|
3236
3655
|
"DescribeScaleInfo": doDescribeScaleInfo,
|
3656
|
+
"StopAIConversation": doStopAIConversation,
|
3237
3657
|
"DescribeRelayUsage": doDescribeRelayUsage,
|
3238
3658
|
"DescribeUserInfo": doDescribeUserInfo,
|
3239
3659
|
"DescribeTrtcMcuTranscodeTime": doDescribeTrtcMcuTranscodeTime,
|
3660
|
+
"ModifyCloudSliceTask": doModifyCloudSliceTask,
|
3240
3661
|
"StopMCUMixTranscodeByStrRoomId": doStopMCUMixTranscodeByStrRoomId,
|
3241
3662
|
"StopStreamIngest": doStopStreamIngest,
|
3663
|
+
"DescribeUnusualEvent": doDescribeUnusualEvent,
|
3242
3664
|
"StartMCUMixTranscodeByStrRoomId": doStartMCUMixTranscodeByStrRoomId,
|
3243
3665
|
"RemoveUserByStrRoomId": doRemoveUserByStrRoomId,
|
3244
3666
|
"DescribeMixTranscodingUsage": doDescribeMixTranscodingUsage,
|
@@ -3249,16 +3671,18 @@ ACTION_MAP = {
|
|
3249
3671
|
"DismissRoomByStrRoomId": doDismissRoomByStrRoomId,
|
3250
3672
|
"DescribeTrtcRoomUsage": doDescribeTrtcRoomUsage,
|
3251
3673
|
"ModifyPicture": doModifyPicture,
|
3252
|
-
"
|
3674
|
+
"UpdateVoicePrint": doUpdateVoicePrint,
|
3253
3675
|
"UpdatePublishCdnStream": doUpdatePublishCdnStream,
|
3254
3676
|
"DescribeTRTCRealTimeQualityData": doDescribeTRTCRealTimeQualityData,
|
3677
|
+
"CreateCloudSliceTask": doCreateCloudSliceTask,
|
3255
3678
|
"DescribeWebRecord": doDescribeWebRecord,
|
3256
3679
|
"DescribePicture": doDescribePicture,
|
3257
|
-
"
|
3680
|
+
"DescribeAITranscription": doDescribeAITranscription,
|
3258
3681
|
"DescribeTRTCMarketQualityData": doDescribeTRTCMarketQualityData,
|
3259
3682
|
"ControlAIConversation": doControlAIConversation,
|
3260
3683
|
"StopPublishCdnStream": doStopPublishCdnStream,
|
3261
|
-
"
|
3684
|
+
"DeleteCloudSliceTask": doDeleteCloudSliceTask,
|
3685
|
+
"ModifyCloudModeration": doModifyCloudModeration,
|
3262
3686
|
"DescribeTRTCRealTimeScaleMetricData": doDescribeTRTCRealTimeScaleMetricData,
|
3263
3687
|
"StopMCUMixTranscode": doStopMCUMixTranscode,
|
3264
3688
|
|