tccli 3.0.1236.1__py2.py3-none-any.whl → 3.0.1238.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/services/__init__.py +3 -0
- tccli/services/aca/__init__.py +4 -0
- tccli/services/aca/aca_client.py +578 -0
- tccli/services/aca/v20210323/api.json +3715 -0
- tccli/services/aca/v20210323/examples.json +69 -0
- tccli/services/aiart/v20221229/api.json +18 -9
- tccli/services/aiart/v20221229/examples.json +2 -2
- tccli/services/apm/v20210622/api.json +25 -22
- tccli/services/apm/v20210622/examples.json +16 -22
- tccli/services/ba/v20200720/api.json +3 -2
- tccli/services/batch/v20170312/api.json +641 -566
- tccli/services/batch/v20170312/examples.json +7 -7
- tccli/services/bi/v20220105/api.json +9 -0
- tccli/services/billing/v20180709/api.json +2 -2
- tccli/services/bpaas/v20181217/examples.json +1 -1
- tccli/services/cam/v20190116/api.json +116 -99
- tccli/services/cam/v20190116/examples.json +11 -11
- tccli/services/ccc/v20200210/api.json +40 -1
- tccli/services/ccc/v20200210/examples.json +1 -1
- tccli/services/cdb/cdb_client.py +53 -0
- tccli/services/cdb/v20170320/api.json +257 -207
- tccli/services/cdb/v20170320/examples.json +18 -10
- tccli/services/cdwch/v20200915/api.json +6 -6
- tccli/services/cdwdoris/v20211228/api.json +16 -5
- tccli/services/cdwdoris/v20211228/examples.json +1 -1
- tccli/services/cfg/v20210820/api.json +29 -13
- tccli/services/cfg/v20210820/examples.json +1 -1
- tccli/services/cfs/v20190719/api.json +84 -84
- tccli/services/cfs/v20190719/examples.json +6 -6
- tccli/services/chdfs/v20201112/api.json +18 -17
- tccli/services/chdfs/v20201112/examples.json +2 -2
- tccli/services/clb/v20180317/api.json +184 -162
- tccli/services/cloudapp/v20220530/api.json +11 -1
- tccli/services/cloudapp/v20220530/examples.json +3 -3
- tccli/services/cloudaudit/v20190319/api.json +64 -53
- tccli/services/cloudaudit/v20190319/examples.json +5 -5
- tccli/services/cls/v20201016/api.json +21 -21
- tccli/services/cls/v20201016/examples.json +1 -1
- tccli/services/config/v20220802/api.json +2 -0
- tccli/services/config/v20220802/examples.json +2 -2
- tccli/services/cvm/v20170312/api.json +5 -5
- tccli/services/cynosdb/cynosdb_client.py +53 -0
- tccli/services/cynosdb/v20190107/api.json +110 -0
- tccli/services/cynosdb/v20190107/examples.json +8 -0
- tccli/services/dcdb/v20180411/api.json +390 -387
- tccli/services/dcdb/v20180411/examples.json +14 -14
- tccli/services/dlc/v20210125/api.json +162 -7
- tccli/services/dlc/v20210125/examples.json +1 -1
- tccli/services/domain/v20180808/api.json +55 -54
- tccli/services/domain/v20180808/examples.json +38 -32
- tccli/services/dsgc/v20190723/api.json +1796 -1623
- tccli/services/dsgc/v20190723/examples.json +217 -211
- tccli/services/dts/v20180330/api.json +143 -106
- tccli/services/dts/v20211206/api.json +57 -46
- tccli/services/dts/v20211206/examples.json +1 -1
- tccli/services/ecm/v20190719/api.json +6 -6
- tccli/services/emr/v20190103/api.json +80 -20
- tccli/services/ess/ess_client.py +118 -12
- tccli/services/ess/v20201111/api.json +320 -37
- tccli/services/ess/v20201111/examples.json +19 -3
- tccli/services/essbasic/essbasic_client.py +167 -8
- tccli/services/essbasic/v20210526/api.json +528 -55
- tccli/services/essbasic/v20210526/examples.json +46 -16
- tccli/services/facefusion/v20220927/api.json +12 -1
- tccli/services/fmu/v20191213/api.json +8 -8
- tccli/services/gaap/v20180529/api.json +200 -209
- tccli/services/gwlb/v20240906/api.json +16 -16
- tccli/services/gwlb/v20240906/examples.json +2 -2
- tccli/services/hai/v20230812/api.json +1 -1
- tccli/services/hunyuan/v20230901/api.json +6 -6
- tccli/services/iss/v20230517/api.json +11 -11
- tccli/services/iss/v20230517/examples.json +31 -31
- tccli/services/keewidb/v20220308/api.json +92 -82
- tccli/services/keewidb/v20220308/examples.json +5 -5
- tccli/services/lcic/v20220817/api.json +3 -3
- tccli/services/lcic/v20220817/examples.json +2 -2
- tccli/services/lighthouse/v20200324/api.json +18 -18
- tccli/services/lighthouse/v20200324/examples.json +6 -6
- tccli/services/live/v20180801/api.json +32 -14
- tccli/services/lke/v20231130/examples.json +1 -1
- tccli/services/mariadb/v20170312/api.json +285 -263
- tccli/services/mariadb/v20170312/examples.json +12 -12
- tccli/services/mongodb/v20180408/api.json +52 -40
- tccli/services/mongodb/v20180408/examples.json +4 -4
- tccli/services/mongodb/v20190725/api.json +119 -109
- tccli/services/mongodb/v20190725/examples.json +5 -5
- tccli/services/monitor/monitor_client.py +106 -0
- tccli/services/monitor/v20180724/api.json +222 -0
- tccli/services/monitor/v20180724/examples.json +17 -1
- tccli/services/mps/mps_client.py +228 -16
- tccli/services/mps/v20190612/api.json +385 -23
- tccli/services/mps/v20190612/examples.json +32 -0
- tccli/services/mqtt/v20240516/api.json +1 -1
- tccli/services/mqtt/v20240516/examples.json +1 -1
- tccli/services/msp/v20180319/api.json +2 -2
- tccli/services/ocr/v20181119/api.json +11 -1
- tccli/services/omics/v20221128/api.json +14 -2
- tccli/services/organization/v20210331/api.json +45 -18
- tccli/services/privatedns/v20201028/api.json +90 -81
- tccli/services/privatedns/v20201028/examples.json +18 -18
- tccli/services/pts/v20210728/api.json +8 -0
- tccli/services/redis/redis_client.py +106 -0
- tccli/services/redis/v20180412/api.json +178 -16
- tccli/services/redis/v20180412/examples.json +16 -0
- tccli/services/region/v20220627/api.json +5 -3
- tccli/services/region/v20220627/examples.json +1 -1
- tccli/services/ssl/v20191205/api.json +6 -4
- tccli/services/ssl/v20191205/examples.json +1 -1
- tccli/services/sts/v20180813/examples.json +1 -1
- tccli/services/tag/v20180813/api.json +4 -5
- tccli/services/tcb/v20180608/api.json +36 -16
- tccli/services/tdid/v20210519/api.json +30 -38
- tccli/services/tdid/v20210519/examples.json +5 -5
- tccli/services/tdmq/tdmq_client.py +53 -0
- tccli/services/tdmq/v20200217/api.json +64 -1
- tccli/services/tdmq/v20200217/examples.json +9 -1
- tccli/services/teo/teo_client.py +485 -8
- tccli/services/teo/v20220901/api.json +837 -39
- tccli/services/teo/v20220901/examples.json +108 -0
- tccli/services/thpc/v20211109/api.json +32 -34
- tccli/services/thpc/v20220401/api.json +31 -33
- tccli/services/thpc/v20230321/api.json +55 -57
- tccli/services/thpc/v20230321/examples.json +1 -1
- tccli/services/tiia/v20190529/api.json +307 -293
- tccli/services/tiia/v20190529/examples.json +41 -41
- tccli/services/tione/v20211111/api.json +4 -4
- tccli/services/tione/v20211111/examples.json +2 -2
- tccli/services/tke/v20180525/api.json +1 -1
- tccli/services/trocket/trocket_client.py +53 -0
- tccli/services/trocket/v20230308/api.json +119 -3
- tccli/services/trocket/v20230308/examples.json +14 -0
- tccli/services/tse/v20201207/api.json +188 -120
- tccli/services/tse/v20201207/examples.json +30 -30
- tccli/services/tsf/v20180326/api.json +826 -745
- tccli/services/tsf/v20180326/examples.json +99 -111
- tccli/services/vclm/v20240523/api.json +1 -1
- tccli/services/vdb/v20230616/api.json +80 -80
- tccli/services/vdb/v20230616/examples.json +1 -1
- tccli/services/vpc/v20170312/api.json +64 -44
- tccli/services/vpc/v20170312/examples.json +6 -6
- tccli/services/vrs/v20200824/api.json +3 -2
- tccli/services/wedata/v20210820/api.json +550 -40
- tccli/services/wedata/v20210820/examples.json +10 -4
- {tccli-3.0.1236.1.dist-info → tccli-3.0.1238.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1236.1.dist-info → tccli-3.0.1238.1.dist-info}/RECORD +149 -145
- {tccli-3.0.1236.1.dist-info → tccli-3.0.1238.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1236.1.dist-info → tccli-3.0.1238.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1236.1.dist-info → tccli-3.0.1238.1.dist-info}/license_files/LICENSE +0 -0
tccli/services/mps/mps_client.py
CHANGED
@@ -17,7 +17,7 @@ from tencentcloud.mps.v20190612 import models as models_v20190612
|
|
17
17
|
from jmespath import search
|
18
18
|
import time
|
19
19
|
|
20
|
-
def
|
20
|
+
def doCreateImageSpriteTemplate(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,63 @@ def doCreateSnapshotByTimeOffsetTemplate(args, parsed_globals):
|
|
46
46
|
client = mod.MpsClient(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.CreateImageSpriteTemplateRequest()
|
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.CreateImageSpriteTemplate(model)
|
54
|
+
result = rsp.to_json_string()
|
55
|
+
try:
|
56
|
+
json_obj = json.loads(result)
|
57
|
+
except TypeError as e:
|
58
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
59
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
60
|
+
break
|
61
|
+
cur_time = time.time()
|
62
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
63
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
64
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
65
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
66
|
+
else:
|
67
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
68
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
69
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
70
|
+
|
71
|
+
|
72
|
+
def doDeleteAnimatedGraphicsTemplate(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.MpsClient(cred, g_param[OptionsDefine.Region], profile)
|
99
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
100
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
101
|
+
model = models.DeleteAnimatedGraphicsTemplateRequest()
|
102
|
+
model.from_json_string(json.dumps(args))
|
103
|
+
start_time = time.time()
|
104
|
+
while True:
|
105
|
+
rsp = client.DeleteAnimatedGraphicsTemplate(model)
|
54
106
|
result = rsp.to_json_string()
|
55
107
|
try:
|
56
108
|
json_obj = json.loads(result)
|
@@ -173,6 +225,58 @@ def doCreateAnimatedGraphicsTemplate(args, parsed_globals):
|
|
173
225
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
174
226
|
|
175
227
|
|
228
|
+
def doModifyLiveRecordTemplate(args, parsed_globals):
|
229
|
+
g_param = parse_global_arg(parsed_globals)
|
230
|
+
|
231
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
232
|
+
cred = credential.CVMRoleCredential()
|
233
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
234
|
+
cred = credential.STSAssumeRoleCredential(
|
235
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
236
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
237
|
+
)
|
238
|
+
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):
|
239
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
240
|
+
else:
|
241
|
+
cred = credential.Credential(
|
242
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
243
|
+
)
|
244
|
+
http_profile = HttpProfile(
|
245
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
246
|
+
reqMethod="POST",
|
247
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
248
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
249
|
+
)
|
250
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
251
|
+
if g_param[OptionsDefine.Language]:
|
252
|
+
profile.language = g_param[OptionsDefine.Language]
|
253
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
254
|
+
client = mod.MpsClient(cred, g_param[OptionsDefine.Region], profile)
|
255
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
256
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
257
|
+
model = models.ModifyLiveRecordTemplateRequest()
|
258
|
+
model.from_json_string(json.dumps(args))
|
259
|
+
start_time = time.time()
|
260
|
+
while True:
|
261
|
+
rsp = client.ModifyLiveRecordTemplate(model)
|
262
|
+
result = rsp.to_json_string()
|
263
|
+
try:
|
264
|
+
json_obj = json.loads(result)
|
265
|
+
except TypeError as e:
|
266
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
267
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
268
|
+
break
|
269
|
+
cur_time = time.time()
|
270
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
271
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
272
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
273
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
274
|
+
else:
|
275
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
276
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
277
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
278
|
+
|
279
|
+
|
176
280
|
def doEditMedia(args, parsed_globals):
|
177
281
|
g_param = parse_global_arg(parsed_globals)
|
178
282
|
|
@@ -277,7 +381,7 @@ def doDescribeStreamLinkEvent(args, parsed_globals):
|
|
277
381
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
278
382
|
|
279
383
|
|
280
|
-
def
|
384
|
+
def doCreateSnapshotByTimeOffsetTemplate(args, parsed_globals):
|
281
385
|
g_param = parse_global_arg(parsed_globals)
|
282
386
|
|
283
387
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -306,11 +410,11 @@ def doDeleteAnimatedGraphicsTemplate(args, parsed_globals):
|
|
306
410
|
client = mod.MpsClient(cred, g_param[OptionsDefine.Region], profile)
|
307
411
|
client._sdkVersion += ("_CLI_" + __version__)
|
308
412
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
309
|
-
model = models.
|
413
|
+
model = models.CreateSnapshotByTimeOffsetTemplateRequest()
|
310
414
|
model.from_json_string(json.dumps(args))
|
311
415
|
start_time = time.time()
|
312
416
|
while True:
|
313
|
-
rsp = client.
|
417
|
+
rsp = client.CreateSnapshotByTimeOffsetTemplate(model)
|
314
418
|
result = rsp.to_json_string()
|
315
419
|
try:
|
316
420
|
json_obj = json.loads(result)
|
@@ -953,6 +1057,58 @@ def doBatchDeleteStreamLinkFlow(args, parsed_globals):
|
|
953
1057
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
954
1058
|
|
955
1059
|
|
1060
|
+
def doDescribeLiveRecordTemplates(args, parsed_globals):
|
1061
|
+
g_param = parse_global_arg(parsed_globals)
|
1062
|
+
|
1063
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1064
|
+
cred = credential.CVMRoleCredential()
|
1065
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1066
|
+
cred = credential.STSAssumeRoleCredential(
|
1067
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1068
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1069
|
+
)
|
1070
|
+
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):
|
1071
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1072
|
+
else:
|
1073
|
+
cred = credential.Credential(
|
1074
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1075
|
+
)
|
1076
|
+
http_profile = HttpProfile(
|
1077
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1078
|
+
reqMethod="POST",
|
1079
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
1080
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1081
|
+
)
|
1082
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1083
|
+
if g_param[OptionsDefine.Language]:
|
1084
|
+
profile.language = g_param[OptionsDefine.Language]
|
1085
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1086
|
+
client = mod.MpsClient(cred, g_param[OptionsDefine.Region], profile)
|
1087
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1088
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1089
|
+
model = models.DescribeLiveRecordTemplatesRequest()
|
1090
|
+
model.from_json_string(json.dumps(args))
|
1091
|
+
start_time = time.time()
|
1092
|
+
while True:
|
1093
|
+
rsp = client.DescribeLiveRecordTemplates(model)
|
1094
|
+
result = rsp.to_json_string()
|
1095
|
+
try:
|
1096
|
+
json_obj = json.loads(result)
|
1097
|
+
except TypeError as e:
|
1098
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1099
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1100
|
+
break
|
1101
|
+
cur_time = time.time()
|
1102
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1103
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1104
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1105
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1106
|
+
else:
|
1107
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1108
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1109
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1110
|
+
|
1111
|
+
|
956
1112
|
def doDeleteSnapshotByTimeOffsetTemplate(args, parsed_globals):
|
957
1113
|
g_param = parse_global_arg(parsed_globals)
|
958
1114
|
|
@@ -3449,7 +3605,7 @@ def doDescribeStreamLinkActivateState(args, parsed_globals):
|
|
3449
3605
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3450
3606
|
|
3451
3607
|
|
3452
|
-
def
|
3608
|
+
def doCreateWatermarkTemplate(args, parsed_globals):
|
3453
3609
|
g_param = parse_global_arg(parsed_globals)
|
3454
3610
|
|
3455
3611
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3478,11 +3634,11 @@ def doCreateImageSpriteTemplate(args, parsed_globals):
|
|
3478
3634
|
client = mod.MpsClient(cred, g_param[OptionsDefine.Region], profile)
|
3479
3635
|
client._sdkVersion += ("_CLI_" + __version__)
|
3480
3636
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3481
|
-
model = models.
|
3637
|
+
model = models.CreateWatermarkTemplateRequest()
|
3482
3638
|
model.from_json_string(json.dumps(args))
|
3483
3639
|
start_time = time.time()
|
3484
3640
|
while True:
|
3485
|
-
rsp = client.
|
3641
|
+
rsp = client.CreateWatermarkTemplate(model)
|
3486
3642
|
result = rsp.to_json_string()
|
3487
3643
|
try:
|
3488
3644
|
json_obj = json.loads(result)
|
@@ -4281,7 +4437,7 @@ def doDescribeWatermarkTemplates(args, parsed_globals):
|
|
4281
4437
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4282
4438
|
|
4283
4439
|
|
4284
|
-
def
|
4440
|
+
def doCreateLiveRecordTemplate(args, parsed_globals):
|
4285
4441
|
g_param = parse_global_arg(parsed_globals)
|
4286
4442
|
|
4287
4443
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -4310,11 +4466,11 @@ def doCreateWatermarkTemplate(args, parsed_globals):
|
|
4310
4466
|
client = mod.MpsClient(cred, g_param[OptionsDefine.Region], profile)
|
4311
4467
|
client._sdkVersion += ("_CLI_" + __version__)
|
4312
4468
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4313
|
-
model = models.
|
4469
|
+
model = models.CreateLiveRecordTemplateRequest()
|
4314
4470
|
model.from_json_string(json.dumps(args))
|
4315
4471
|
start_time = time.time()
|
4316
4472
|
while True:
|
4317
|
-
rsp = client.
|
4473
|
+
rsp = client.CreateLiveRecordTemplate(model)
|
4318
4474
|
result = rsp.to_json_string()
|
4319
4475
|
try:
|
4320
4476
|
json_obj = json.loads(result)
|
@@ -4957,6 +5113,58 @@ def doProcessLiveStream(args, parsed_globals):
|
|
4957
5113
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4958
5114
|
|
4959
5115
|
|
5116
|
+
def doDeleteLiveRecordTemplate(args, parsed_globals):
|
5117
|
+
g_param = parse_global_arg(parsed_globals)
|
5118
|
+
|
5119
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
5120
|
+
cred = credential.CVMRoleCredential()
|
5121
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
5122
|
+
cred = credential.STSAssumeRoleCredential(
|
5123
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
5124
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
5125
|
+
)
|
5126
|
+
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):
|
5127
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
5128
|
+
else:
|
5129
|
+
cred = credential.Credential(
|
5130
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
5131
|
+
)
|
5132
|
+
http_profile = HttpProfile(
|
5133
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
5134
|
+
reqMethod="POST",
|
5135
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
5136
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
5137
|
+
)
|
5138
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
5139
|
+
if g_param[OptionsDefine.Language]:
|
5140
|
+
profile.language = g_param[OptionsDefine.Language]
|
5141
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
5142
|
+
client = mod.MpsClient(cred, g_param[OptionsDefine.Region], profile)
|
5143
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
5144
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
5145
|
+
model = models.DeleteLiveRecordTemplateRequest()
|
5146
|
+
model.from_json_string(json.dumps(args))
|
5147
|
+
start_time = time.time()
|
5148
|
+
while True:
|
5149
|
+
rsp = client.DeleteLiveRecordTemplate(model)
|
5150
|
+
result = rsp.to_json_string()
|
5151
|
+
try:
|
5152
|
+
json_obj = json.loads(result)
|
5153
|
+
except TypeError as e:
|
5154
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
5155
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
5156
|
+
break
|
5157
|
+
cur_time = time.time()
|
5158
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
5159
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
5160
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
5161
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
5162
|
+
else:
|
5163
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
5164
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
5165
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
5166
|
+
|
5167
|
+
|
4960
5168
|
def doDeleteSampleSnapshotTemplate(args, parsed_globals):
|
4961
5169
|
g_param = parse_global_arg(parsed_globals)
|
4962
5170
|
|
@@ -5696,12 +5904,14 @@ MODELS_MAP = {
|
|
5696
5904
|
}
|
5697
5905
|
|
5698
5906
|
ACTION_MAP = {
|
5699
|
-
"
|
5907
|
+
"CreateImageSpriteTemplate": doCreateImageSpriteTemplate,
|
5908
|
+
"DeleteAnimatedGraphicsTemplate": doDeleteAnimatedGraphicsTemplate,
|
5700
5909
|
"DescribeStreamLinkFlowRealtimeStatus": doDescribeStreamLinkFlowRealtimeStatus,
|
5701
5910
|
"CreateAnimatedGraphicsTemplate": doCreateAnimatedGraphicsTemplate,
|
5911
|
+
"ModifyLiveRecordTemplate": doModifyLiveRecordTemplate,
|
5702
5912
|
"EditMedia": doEditMedia,
|
5703
5913
|
"DescribeStreamLinkEvent": doDescribeStreamLinkEvent,
|
5704
|
-
"
|
5914
|
+
"CreateSnapshotByTimeOffsetTemplate": doCreateSnapshotByTimeOffsetTemplate,
|
5705
5915
|
"DescribeAIAnalysisTemplates": doDescribeAIAnalysisTemplates,
|
5706
5916
|
"DeleteTranscodeTemplate": doDeleteTranscodeTemplate,
|
5707
5917
|
"DescribeTaskDetail": doDescribeTaskDetail,
|
@@ -5714,6 +5924,7 @@ ACTION_MAP = {
|
|
5714
5924
|
"DescribeSampleSnapshotTemplates": doDescribeSampleSnapshotTemplates,
|
5715
5925
|
"DescribeStreamLinkFlowStatistics": doDescribeStreamLinkFlowStatistics,
|
5716
5926
|
"BatchDeleteStreamLinkFlow": doBatchDeleteStreamLinkFlow,
|
5927
|
+
"DescribeLiveRecordTemplates": doDescribeLiveRecordTemplates,
|
5717
5928
|
"DeleteSnapshotByTimeOffsetTemplate": doDeleteSnapshotByTimeOffsetTemplate,
|
5718
5929
|
"EnableWorkflow": doEnableWorkflow,
|
5719
5930
|
"RecognizeMediaForZhiXue": doRecognizeMediaForZhiXue,
|
@@ -5762,7 +5973,7 @@ ACTION_MAP = {
|
|
5762
5973
|
"ModifyWatermarkTemplate": doModifyWatermarkTemplate,
|
5763
5974
|
"DeleteWordSamples": doDeleteWordSamples,
|
5764
5975
|
"DescribeStreamLinkActivateState": doDescribeStreamLinkActivateState,
|
5765
|
-
"
|
5976
|
+
"CreateWatermarkTemplate": doCreateWatermarkTemplate,
|
5766
5977
|
"DescribePersonSamples": doDescribePersonSamples,
|
5767
5978
|
"ParseNotification": doParseNotification,
|
5768
5979
|
"DeleteAIRecognitionTemplate": doDeleteAIRecognitionTemplate,
|
@@ -5778,7 +5989,7 @@ ACTION_MAP = {
|
|
5778
5989
|
"ModifyWordSample": doModifyWordSample,
|
5779
5990
|
"DescribeImageSpriteTemplates": doDescribeImageSpriteTemplates,
|
5780
5991
|
"DescribeWatermarkTemplates": doDescribeWatermarkTemplates,
|
5781
|
-
"
|
5992
|
+
"CreateLiveRecordTemplate": doCreateLiveRecordTemplate,
|
5782
5993
|
"ModifyStreamLinkOutputInfo": doModifyStreamLinkOutputInfo,
|
5783
5994
|
"DescribeContentReviewTemplates": doDescribeContentReviewTemplates,
|
5784
5995
|
"WithdrawsWatermark": doWithdrawsWatermark,
|
@@ -5791,6 +6002,7 @@ ACTION_MAP = {
|
|
5791
6002
|
"EnableSchedule": doEnableSchedule,
|
5792
6003
|
"CreateVideoDatabaseEntryTask": doCreateVideoDatabaseEntryTask,
|
5793
6004
|
"ProcessLiveStream": doProcessLiveStream,
|
6005
|
+
"DeleteLiveRecordTemplate": doDeleteLiveRecordTemplate,
|
5794
6006
|
"DeleteSampleSnapshotTemplate": doDeleteSampleSnapshotTemplate,
|
5795
6007
|
"DescribeStreamLinkFlowMediaStatistics": doDescribeStreamLinkFlowMediaStatistics,
|
5796
6008
|
"CreateStreamLinkEvent": doCreateStreamLinkEvent,
|