tccli 3.0.845.1__py2.py3-none-any.whl → 3.0.847.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 (59) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/billing/v20180709/api.json +18 -62
  3. tccli/services/billing/v20180709/examples.json +8 -8
  4. tccli/services/cat/v20180409/api.json +0 -28
  5. tccli/services/cat/v20180409/examples.json +7 -7
  6. tccli/services/ccc/v20200210/api.json +16 -7
  7. tccli/services/ccc/v20200210/examples.json +2 -2
  8. tccli/services/cdb/v20170320/api.json +71 -50
  9. tccli/services/cdb/v20170320/examples.json +4 -4
  10. tccli/services/cdn/v20180606/api.json +1 -11
  11. tccli/services/cdn/v20180606/examples.json +1 -1
  12. tccli/services/ckafka/v20190819/api.json +8 -5
  13. tccli/services/ckafka/v20190819/examples.json +3 -3
  14. tccli/services/cls/v20201016/api.json +44 -33
  15. tccli/services/cls/v20201016/examples.json +3 -3
  16. tccli/services/cvm/v20170312/api.json +2 -4
  17. tccli/services/dbbrain/v20210527/api.json +36 -30
  18. tccli/services/dcdb/dcdb_client.py +53 -0
  19. tccli/services/dcdb/v20180411/api.json +812 -157
  20. tccli/services/dcdb/v20180411/examples.json +8 -0
  21. tccli/services/dlc/v20210125/api.json +9 -0
  22. tccli/services/emr/v20190103/api.json +9 -29
  23. tccli/services/ess/ess_client.py +273 -8
  24. tccli/services/ess/v20201111/api.json +639 -89
  25. tccli/services/ess/v20201111/examples.json +58 -6
  26. tccli/services/essbasic/essbasic_client.py +159 -0
  27. tccli/services/essbasic/v20210526/api.json +287 -3
  28. tccli/services/essbasic/v20210526/examples.json +24 -0
  29. tccli/services/iotexplorer/v20190423/api.json +25 -33
  30. tccli/services/iotexplorer/v20190423/examples.json +9 -9
  31. tccli/services/mariadb/mariadb_client.py +53 -0
  32. tccli/services/mariadb/v20170312/api.json +520 -0
  33. tccli/services/mariadb/v20170312/examples.json +8 -0
  34. tccli/services/monitor/v20180724/api.json +10 -11
  35. tccli/services/monitor/v20180724/examples.json +5 -5
  36. tccli/services/mps/v20190612/api.json +2 -7
  37. tccli/services/ocr/v20181119/api.json +73 -89
  38. tccli/services/ocr/v20181119/examples.json +23 -23
  39. tccli/services/redis/redis_client.py +53 -0
  40. tccli/services/redis/v20180412/api.json +214 -0
  41. tccli/services/redis/v20180412/examples.json +8 -0
  42. tccli/services/tcss/v20201101/api.json +40 -7
  43. tccli/services/tcss/v20201101/examples.json +3 -3
  44. tccli/services/tdid/v20210519/api.json +68 -68
  45. tccli/services/tiw/tiw_client.py +1403 -78
  46. tccli/services/tiw/v20190919/api.json +2439 -461
  47. tccli/services/tiw/v20190919/examples.json +200 -0
  48. tccli/services/trtc/v20190722/api.json +41 -29
  49. tccli/services/trtc/v20190722/examples.json +10 -10
  50. tccli/services/vpc/v20170312/api.json +15 -27
  51. tccli/services/vpc/v20170312/examples.json +6 -6
  52. tccli/services/waf/v20180125/api.json +50 -6
  53. tccli/services/waf/v20180125/examples.json +2 -2
  54. {tccli-3.0.845.1.dist-info → tccli-3.0.847.1.dist-info}/METADATA +2 -2
  55. {tccli-3.0.845.1.dist-info → tccli-3.0.847.1.dist-info}/RECORD +59 -59
  56. {tccli-3.0.845.1.dist-info → tccli-3.0.847.1.dist-info}/LICENSE +0 -0
  57. {tccli-3.0.845.1.dist-info → tccli-3.0.847.1.dist-info}/WHEEL +0 -0
  58. {tccli-3.0.845.1.dist-info → tccli-3.0.847.1.dist-info}/entry_points.txt +0 -0
  59. {tccli-3.0.845.1.dist-info → tccli-3.0.847.1.dist-info}/top_level.txt +0 -0
@@ -17,6 +17,58 @@ from tencentcloud.tiw.v20190919 import models as models_v20190919
17
17
  from jmespath import search
18
18
  import time
19
19
 
20
+ def doDescribeWhiteboardBucketConfig(args, parsed_globals):
21
+ g_param = parse_global_arg(parsed_globals)
22
+
23
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
24
+ cred = credential.CVMRoleCredential()
25
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
26
+ cred = credential.STSAssumeRoleCredential(
27
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
28
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
29
+ )
30
+ elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
31
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
32
+ else:
33
+ cred = credential.Credential(
34
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
35
+ )
36
+ http_profile = HttpProfile(
37
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
38
+ reqMethod="POST",
39
+ endpoint=g_param[OptionsDefine.Endpoint],
40
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
41
+ )
42
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
43
+ if g_param[OptionsDefine.Language]:
44
+ profile.language = g_param[OptionsDefine.Language]
45
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
46
+ client = mod.TiwClient(cred, g_param[OptionsDefine.Region], profile)
47
+ client._sdkVersion += ("_CLI_" + __version__)
48
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
49
+ model = models.DescribeWhiteboardBucketConfigRequest()
50
+ model.from_json_string(json.dumps(args))
51
+ start_time = time.time()
52
+ while True:
53
+ rsp = client.DescribeWhiteboardBucketConfig(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
+
20
72
  def doSetOnlineRecordCallback(args, parsed_globals):
21
73
  g_param = parse_global_arg(parsed_globals)
22
74
 
@@ -46,11 +98,1155 @@ def doSetOnlineRecordCallback(args, parsed_globals):
46
98
  client = mod.TiwClient(cred, g_param[OptionsDefine.Region], profile)
47
99
  client._sdkVersion += ("_CLI_" + __version__)
48
100
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
49
- model = models.SetOnlineRecordCallbackRequest()
101
+ model = models.SetOnlineRecordCallbackRequest()
102
+ model.from_json_string(json.dumps(args))
103
+ start_time = time.time()
104
+ while True:
105
+ rsp = client.SetOnlineRecordCallback(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
+
124
+ def doDescribeBoardSDKLog(args, parsed_globals):
125
+ g_param = parse_global_arg(parsed_globals)
126
+
127
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
128
+ cred = credential.CVMRoleCredential()
129
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
130
+ cred = credential.STSAssumeRoleCredential(
131
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
132
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
133
+ )
134
+ elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
135
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
136
+ else:
137
+ cred = credential.Credential(
138
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
139
+ )
140
+ http_profile = HttpProfile(
141
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
142
+ reqMethod="POST",
143
+ endpoint=g_param[OptionsDefine.Endpoint],
144
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
145
+ )
146
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
147
+ if g_param[OptionsDefine.Language]:
148
+ profile.language = g_param[OptionsDefine.Language]
149
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
150
+ client = mod.TiwClient(cred, g_param[OptionsDefine.Region], profile)
151
+ client._sdkVersion += ("_CLI_" + __version__)
152
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
153
+ model = models.DescribeBoardSDKLogRequest()
154
+ model.from_json_string(json.dumps(args))
155
+ start_time = time.time()
156
+ while True:
157
+ rsp = client.DescribeBoardSDKLog(model)
158
+ result = rsp.to_json_string()
159
+ try:
160
+ json_obj = json.loads(result)
161
+ except TypeError as e:
162
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
163
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
164
+ break
165
+ cur_time = time.time()
166
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
167
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
168
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
169
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
170
+ else:
171
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
172
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
173
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
174
+
175
+
176
+ def doDescribeUserList(args, parsed_globals):
177
+ g_param = parse_global_arg(parsed_globals)
178
+
179
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
180
+ cred = credential.CVMRoleCredential()
181
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
182
+ cred = credential.STSAssumeRoleCredential(
183
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
184
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
185
+ )
186
+ elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
187
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
188
+ else:
189
+ cred = credential.Credential(
190
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
191
+ )
192
+ http_profile = HttpProfile(
193
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
194
+ reqMethod="POST",
195
+ endpoint=g_param[OptionsDefine.Endpoint],
196
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
197
+ )
198
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
199
+ if g_param[OptionsDefine.Language]:
200
+ profile.language = g_param[OptionsDefine.Language]
201
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
202
+ client = mod.TiwClient(cred, g_param[OptionsDefine.Region], profile)
203
+ client._sdkVersion += ("_CLI_" + __version__)
204
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
205
+ model = models.DescribeUserListRequest()
206
+ model.from_json_string(json.dumps(args))
207
+ start_time = time.time()
208
+ while True:
209
+ rsp = client.DescribeUserList(model)
210
+ result = rsp.to_json_string()
211
+ try:
212
+ json_obj = json.loads(result)
213
+ except TypeError as e:
214
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
215
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
216
+ break
217
+ cur_time = time.time()
218
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
219
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
220
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
221
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
222
+ else:
223
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
224
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
225
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
226
+
227
+
228
+ def doSetVideoGenerationTaskCallback(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('-', '_')]
237
+ )
238
+ elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_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.TiwClient(cred, g_param[OptionsDefine.Region], profile)
255
+ client._sdkVersion += ("_CLI_" + __version__)
256
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
257
+ model = models.SetVideoGenerationTaskCallbackRequest()
258
+ model.from_json_string(json.dumps(args))
259
+ start_time = time.time()
260
+ while True:
261
+ rsp = client.SetVideoGenerationTaskCallback(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
+
280
+ def doCreateVideoGenerationTask(args, parsed_globals):
281
+ g_param = parse_global_arg(parsed_globals)
282
+
283
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
284
+ cred = credential.CVMRoleCredential()
285
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
286
+ cred = credential.STSAssumeRoleCredential(
287
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
288
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
289
+ )
290
+ elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
291
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
292
+ else:
293
+ cred = credential.Credential(
294
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
295
+ )
296
+ http_profile = HttpProfile(
297
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
298
+ reqMethod="POST",
299
+ endpoint=g_param[OptionsDefine.Endpoint],
300
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
301
+ )
302
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
303
+ if g_param[OptionsDefine.Language]:
304
+ profile.language = g_param[OptionsDefine.Language]
305
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
306
+ client = mod.TiwClient(cred, g_param[OptionsDefine.Region], profile)
307
+ client._sdkVersion += ("_CLI_" + __version__)
308
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
309
+ model = models.CreateVideoGenerationTaskRequest()
310
+ model.from_json_string(json.dumps(args))
311
+ start_time = time.time()
312
+ while True:
313
+ rsp = client.CreateVideoGenerationTask(model)
314
+ result = rsp.to_json_string()
315
+ try:
316
+ json_obj = json.loads(result)
317
+ except TypeError as e:
318
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
319
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
320
+ break
321
+ cur_time = time.time()
322
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
323
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
324
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
325
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
326
+ else:
327
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
328
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
329
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
330
+
331
+
332
+ def doStopOnlineRecord(args, parsed_globals):
333
+ g_param = parse_global_arg(parsed_globals)
334
+
335
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
336
+ cred = credential.CVMRoleCredential()
337
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
338
+ cred = credential.STSAssumeRoleCredential(
339
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
340
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
341
+ )
342
+ elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
343
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
344
+ else:
345
+ cred = credential.Credential(
346
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
347
+ )
348
+ http_profile = HttpProfile(
349
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
350
+ reqMethod="POST",
351
+ endpoint=g_param[OptionsDefine.Endpoint],
352
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
353
+ )
354
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
355
+ if g_param[OptionsDefine.Language]:
356
+ profile.language = g_param[OptionsDefine.Language]
357
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
358
+ client = mod.TiwClient(cred, g_param[OptionsDefine.Region], profile)
359
+ client._sdkVersion += ("_CLI_" + __version__)
360
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
361
+ model = models.StopOnlineRecordRequest()
362
+ model.from_json_string(json.dumps(args))
363
+ start_time = time.time()
364
+ while True:
365
+ rsp = client.StopOnlineRecord(model)
366
+ result = rsp.to_json_string()
367
+ try:
368
+ json_obj = json.loads(result)
369
+ except TypeError as e:
370
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
371
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
372
+ break
373
+ cur_time = time.time()
374
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
375
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
376
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
377
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
378
+ else:
379
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
380
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
381
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
382
+
383
+
384
+ def doDescribeWhiteboardApplicationConfig(args, parsed_globals):
385
+ g_param = parse_global_arg(parsed_globals)
386
+
387
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
388
+ cred = credential.CVMRoleCredential()
389
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
390
+ cred = credential.STSAssumeRoleCredential(
391
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
392
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
393
+ )
394
+ elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
395
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
396
+ else:
397
+ cred = credential.Credential(
398
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
399
+ )
400
+ http_profile = HttpProfile(
401
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
402
+ reqMethod="POST",
403
+ endpoint=g_param[OptionsDefine.Endpoint],
404
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
405
+ )
406
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
407
+ if g_param[OptionsDefine.Language]:
408
+ profile.language = g_param[OptionsDefine.Language]
409
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
410
+ client = mod.TiwClient(cred, g_param[OptionsDefine.Region], profile)
411
+ client._sdkVersion += ("_CLI_" + __version__)
412
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
413
+ model = models.DescribeWhiteboardApplicationConfigRequest()
414
+ model.from_json_string(json.dumps(args))
415
+ start_time = time.time()
416
+ while True:
417
+ rsp = client.DescribeWhiteboardApplicationConfig(model)
418
+ result = rsp.to_json_string()
419
+ try:
420
+ json_obj = json.loads(result)
421
+ except TypeError as e:
422
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
423
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
424
+ break
425
+ cur_time = time.time()
426
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
427
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
428
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
429
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
430
+ else:
431
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
432
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
433
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
434
+
435
+
436
+ def doSetTranscodeCallback(args, parsed_globals):
437
+ g_param = parse_global_arg(parsed_globals)
438
+
439
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
440
+ cred = credential.CVMRoleCredential()
441
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
442
+ cred = credential.STSAssumeRoleCredential(
443
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
444
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
445
+ )
446
+ elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
447
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
448
+ else:
449
+ cred = credential.Credential(
450
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
451
+ )
452
+ http_profile = HttpProfile(
453
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
454
+ reqMethod="POST",
455
+ endpoint=g_param[OptionsDefine.Endpoint],
456
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
457
+ )
458
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
459
+ if g_param[OptionsDefine.Language]:
460
+ profile.language = g_param[OptionsDefine.Language]
461
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
462
+ client = mod.TiwClient(cred, g_param[OptionsDefine.Region], profile)
463
+ client._sdkVersion += ("_CLI_" + __version__)
464
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
465
+ model = models.SetTranscodeCallbackRequest()
466
+ model.from_json_string(json.dumps(args))
467
+ start_time = time.time()
468
+ while True:
469
+ rsp = client.SetTranscodeCallback(model)
470
+ result = rsp.to_json_string()
471
+ try:
472
+ json_obj = json.loads(result)
473
+ except TypeError as e:
474
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
475
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
476
+ break
477
+ cur_time = time.time()
478
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
479
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
480
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
481
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
482
+ else:
483
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
484
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
485
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
486
+
487
+
488
+ def doResumeOnlineRecord(args, parsed_globals):
489
+ g_param = parse_global_arg(parsed_globals)
490
+
491
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
492
+ cred = credential.CVMRoleCredential()
493
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
494
+ cred = credential.STSAssumeRoleCredential(
495
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
496
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
497
+ )
498
+ elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
499
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
500
+ else:
501
+ cred = credential.Credential(
502
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
503
+ )
504
+ http_profile = HttpProfile(
505
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
506
+ reqMethod="POST",
507
+ endpoint=g_param[OptionsDefine.Endpoint],
508
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
509
+ )
510
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
511
+ if g_param[OptionsDefine.Language]:
512
+ profile.language = g_param[OptionsDefine.Language]
513
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
514
+ client = mod.TiwClient(cred, g_param[OptionsDefine.Region], profile)
515
+ client._sdkVersion += ("_CLI_" + __version__)
516
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
517
+ model = models.ResumeOnlineRecordRequest()
518
+ model.from_json_string(json.dumps(args))
519
+ start_time = time.time()
520
+ while True:
521
+ rsp = client.ResumeOnlineRecord(model)
522
+ result = rsp.to_json_string()
523
+ try:
524
+ json_obj = json.loads(result)
525
+ except TypeError as e:
526
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
527
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
528
+ break
529
+ cur_time = time.time()
530
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
531
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
532
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
533
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
534
+ else:
535
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
536
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
537
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
538
+
539
+
540
+ def doDescribeTIWRoomDailyUsage(args, parsed_globals):
541
+ g_param = parse_global_arg(parsed_globals)
542
+
543
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
544
+ cred = credential.CVMRoleCredential()
545
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
546
+ cred = credential.STSAssumeRoleCredential(
547
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
548
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
549
+ )
550
+ elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
551
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
552
+ else:
553
+ cred = credential.Credential(
554
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
555
+ )
556
+ http_profile = HttpProfile(
557
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
558
+ reqMethod="POST",
559
+ endpoint=g_param[OptionsDefine.Endpoint],
560
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
561
+ )
562
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
563
+ if g_param[OptionsDefine.Language]:
564
+ profile.language = g_param[OptionsDefine.Language]
565
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
566
+ client = mod.TiwClient(cred, g_param[OptionsDefine.Region], profile)
567
+ client._sdkVersion += ("_CLI_" + __version__)
568
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
569
+ model = models.DescribeTIWRoomDailyUsageRequest()
570
+ model.from_json_string(json.dumps(args))
571
+ start_time = time.time()
572
+ while True:
573
+ rsp = client.DescribeTIWRoomDailyUsage(model)
574
+ result = rsp.to_json_string()
575
+ try:
576
+ json_obj = json.loads(result)
577
+ except TypeError as e:
578
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
579
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
580
+ break
581
+ cur_time = time.time()
582
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
583
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
584
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
585
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
586
+ else:
587
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
588
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
589
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
590
+
591
+
592
+ def doSetTranscodeCallbackKey(args, parsed_globals):
593
+ g_param = parse_global_arg(parsed_globals)
594
+
595
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
596
+ cred = credential.CVMRoleCredential()
597
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
598
+ cred = credential.STSAssumeRoleCredential(
599
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
600
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
601
+ )
602
+ elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
603
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
604
+ else:
605
+ cred = credential.Credential(
606
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
607
+ )
608
+ http_profile = HttpProfile(
609
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
610
+ reqMethod="POST",
611
+ endpoint=g_param[OptionsDefine.Endpoint],
612
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
613
+ )
614
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
615
+ if g_param[OptionsDefine.Language]:
616
+ profile.language = g_param[OptionsDefine.Language]
617
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
618
+ client = mod.TiwClient(cred, g_param[OptionsDefine.Region], profile)
619
+ client._sdkVersion += ("_CLI_" + __version__)
620
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
621
+ model = models.SetTranscodeCallbackKeyRequest()
622
+ model.from_json_string(json.dumps(args))
623
+ start_time = time.time()
624
+ while True:
625
+ rsp = client.SetTranscodeCallbackKey(model)
626
+ result = rsp.to_json_string()
627
+ try:
628
+ json_obj = json.loads(result)
629
+ except TypeError as e:
630
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
631
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
632
+ break
633
+ cur_time = time.time()
634
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
635
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
636
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
637
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
638
+ else:
639
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
640
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
641
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
642
+
643
+
644
+ def doSetOfflineRecordCallback(args, parsed_globals):
645
+ g_param = parse_global_arg(parsed_globals)
646
+
647
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
648
+ cred = credential.CVMRoleCredential()
649
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
650
+ cred = credential.STSAssumeRoleCredential(
651
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
652
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
653
+ )
654
+ elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
655
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
656
+ else:
657
+ cred = credential.Credential(
658
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
659
+ )
660
+ http_profile = HttpProfile(
661
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
662
+ reqMethod="POST",
663
+ endpoint=g_param[OptionsDefine.Endpoint],
664
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
665
+ )
666
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
667
+ if g_param[OptionsDefine.Language]:
668
+ profile.language = g_param[OptionsDefine.Language]
669
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
670
+ client = mod.TiwClient(cred, g_param[OptionsDefine.Region], profile)
671
+ client._sdkVersion += ("_CLI_" + __version__)
672
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
673
+ model = models.SetOfflineRecordCallbackRequest()
674
+ model.from_json_string(json.dumps(args))
675
+ start_time = time.time()
676
+ while True:
677
+ rsp = client.SetOfflineRecordCallback(model)
678
+ result = rsp.to_json_string()
679
+ try:
680
+ json_obj = json.loads(result)
681
+ except TypeError as e:
682
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
683
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
684
+ break
685
+ cur_time = time.time()
686
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
687
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
688
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
689
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
690
+ else:
691
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
692
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
693
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
694
+
695
+
696
+ def doApplyTiwTrial(args, parsed_globals):
697
+ g_param = parse_global_arg(parsed_globals)
698
+
699
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
700
+ cred = credential.CVMRoleCredential()
701
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
702
+ cred = credential.STSAssumeRoleCredential(
703
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
704
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
705
+ )
706
+ elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
707
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
708
+ else:
709
+ cred = credential.Credential(
710
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
711
+ )
712
+ http_profile = HttpProfile(
713
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
714
+ reqMethod="POST",
715
+ endpoint=g_param[OptionsDefine.Endpoint],
716
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
717
+ )
718
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
719
+ if g_param[OptionsDefine.Language]:
720
+ profile.language = g_param[OptionsDefine.Language]
721
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
722
+ client = mod.TiwClient(cred, g_param[OptionsDefine.Region], profile)
723
+ client._sdkVersion += ("_CLI_" + __version__)
724
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
725
+ model = models.ApplyTiwTrialRequest()
726
+ model.from_json_string(json.dumps(args))
727
+ start_time = time.time()
728
+ while True:
729
+ rsp = client.ApplyTiwTrial(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 doDescribeTranscodeSearch(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('-', '_')]
757
+ )
758
+ elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_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.TiwClient(cred, g_param[OptionsDefine.Region], profile)
775
+ client._sdkVersion += ("_CLI_" + __version__)
776
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
777
+ model = models.DescribeTranscodeSearchRequest()
778
+ model.from_json_string(json.dumps(args))
779
+ start_time = time.time()
780
+ while True:
781
+ rsp = client.DescribeTranscodeSearch(model)
782
+ result = rsp.to_json_string()
783
+ try:
784
+ json_obj = json.loads(result)
785
+ except TypeError as e:
786
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
787
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
788
+ break
789
+ cur_time = time.time()
790
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
791
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
792
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
793
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
794
+ else:
795
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
796
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
797
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
798
+
799
+
800
+ def doModifyApplication(args, parsed_globals):
801
+ g_param = parse_global_arg(parsed_globals)
802
+
803
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
804
+ cred = credential.CVMRoleCredential()
805
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
806
+ cred = credential.STSAssumeRoleCredential(
807
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
808
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
809
+ )
810
+ elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
811
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
812
+ else:
813
+ cred = credential.Credential(
814
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
815
+ )
816
+ http_profile = HttpProfile(
817
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
818
+ reqMethod="POST",
819
+ endpoint=g_param[OptionsDefine.Endpoint],
820
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
821
+ )
822
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
823
+ if g_param[OptionsDefine.Language]:
824
+ profile.language = g_param[OptionsDefine.Language]
825
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
826
+ client = mod.TiwClient(cred, g_param[OptionsDefine.Region], profile)
827
+ client._sdkVersion += ("_CLI_" + __version__)
828
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
829
+ model = models.ModifyApplicationRequest()
830
+ model.from_json_string(json.dumps(args))
831
+ start_time = time.time()
832
+ while True:
833
+ rsp = client.ModifyApplication(model)
834
+ result = rsp.to_json_string()
835
+ try:
836
+ json_obj = json.loads(result)
837
+ except TypeError as e:
838
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
839
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
840
+ break
841
+ cur_time = time.time()
842
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
843
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
844
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
845
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
846
+ else:
847
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
848
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
849
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
850
+
851
+
852
+ def doDescribeUserResources(args, parsed_globals):
853
+ g_param = parse_global_arg(parsed_globals)
854
+
855
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
856
+ cred = credential.CVMRoleCredential()
857
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
858
+ cred = credential.STSAssumeRoleCredential(
859
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
860
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
861
+ )
862
+ elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
863
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
864
+ else:
865
+ cred = credential.Credential(
866
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
867
+ )
868
+ http_profile = HttpProfile(
869
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
870
+ reqMethod="POST",
871
+ endpoint=g_param[OptionsDefine.Endpoint],
872
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
873
+ )
874
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
875
+ if g_param[OptionsDefine.Language]:
876
+ profile.language = g_param[OptionsDefine.Language]
877
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
878
+ client = mod.TiwClient(cred, g_param[OptionsDefine.Region], profile)
879
+ client._sdkVersion += ("_CLI_" + __version__)
880
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
881
+ model = models.DescribeUserResourcesRequest()
882
+ model.from_json_string(json.dumps(args))
883
+ start_time = time.time()
884
+ while True:
885
+ rsp = client.DescribeUserResources(model)
886
+ result = rsp.to_json_string()
887
+ try:
888
+ json_obj = json.loads(result)
889
+ except TypeError as e:
890
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
891
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
892
+ break
893
+ cur_time = time.time()
894
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
895
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
896
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
897
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
898
+ else:
899
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
900
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
901
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
902
+
903
+
904
+ def doDescribeOnlineRecord(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('-', '_')]
913
+ )
914
+ elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_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.TiwClient(cred, g_param[OptionsDefine.Region], profile)
931
+ client._sdkVersion += ("_CLI_" + __version__)
932
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
933
+ model = models.DescribeOnlineRecordRequest()
934
+ model.from_json_string(json.dumps(args))
935
+ start_time = time.time()
936
+ while True:
937
+ rsp = client.DescribeOnlineRecord(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
+
956
+ def doModifyAutoRenewFlag(args, parsed_globals):
957
+ g_param = parse_global_arg(parsed_globals)
958
+
959
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
960
+ cred = credential.CVMRoleCredential()
961
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
962
+ cred = credential.STSAssumeRoleCredential(
963
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
964
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
965
+ )
966
+ elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
967
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
968
+ else:
969
+ cred = credential.Credential(
970
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
971
+ )
972
+ http_profile = HttpProfile(
973
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
974
+ reqMethod="POST",
975
+ endpoint=g_param[OptionsDefine.Endpoint],
976
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
977
+ )
978
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
979
+ if g_param[OptionsDefine.Language]:
980
+ profile.language = g_param[OptionsDefine.Language]
981
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
982
+ client = mod.TiwClient(cred, g_param[OptionsDefine.Region], profile)
983
+ client._sdkVersion += ("_CLI_" + __version__)
984
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
985
+ model = models.ModifyAutoRenewFlagRequest()
986
+ model.from_json_string(json.dumps(args))
987
+ start_time = time.time()
988
+ while True:
989
+ rsp = client.ModifyAutoRenewFlag(model)
990
+ result = rsp.to_json_string()
991
+ try:
992
+ json_obj = json.loads(result)
993
+ except TypeError as e:
994
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
995
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
996
+ break
997
+ cur_time = time.time()
998
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
999
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1000
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1001
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1002
+ else:
1003
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1004
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1005
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1006
+
1007
+
1008
+ def doDescribeOnlineRecordCallback(args, parsed_globals):
1009
+ g_param = parse_global_arg(parsed_globals)
1010
+
1011
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1012
+ cred = credential.CVMRoleCredential()
1013
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1014
+ cred = credential.STSAssumeRoleCredential(
1015
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1016
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
1017
+ )
1018
+ elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
1019
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1020
+ else:
1021
+ cred = credential.Credential(
1022
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1023
+ )
1024
+ http_profile = HttpProfile(
1025
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1026
+ reqMethod="POST",
1027
+ endpoint=g_param[OptionsDefine.Endpoint],
1028
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1029
+ )
1030
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1031
+ if g_param[OptionsDefine.Language]:
1032
+ profile.language = g_param[OptionsDefine.Language]
1033
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1034
+ client = mod.TiwClient(cred, g_param[OptionsDefine.Region], profile)
1035
+ client._sdkVersion += ("_CLI_" + __version__)
1036
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1037
+ model = models.DescribeOnlineRecordCallbackRequest()
1038
+ model.from_json_string(json.dumps(args))
1039
+ start_time = time.time()
1040
+ while True:
1041
+ rsp = client.DescribeOnlineRecordCallback(model)
1042
+ result = rsp.to_json_string()
1043
+ try:
1044
+ json_obj = json.loads(result)
1045
+ except TypeError as e:
1046
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1047
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1048
+ break
1049
+ cur_time = time.time()
1050
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1051
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1052
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1053
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1054
+ else:
1055
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1056
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1057
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1058
+
1059
+
1060
+ def doDescribeApplicationUsage(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('-', '_')]
1069
+ )
1070
+ elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_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.TiwClient(cred, g_param[OptionsDefine.Region], profile)
1087
+ client._sdkVersion += ("_CLI_" + __version__)
1088
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1089
+ model = models.DescribeApplicationUsageRequest()
1090
+ model.from_json_string(json.dumps(args))
1091
+ start_time = time.time()
1092
+ while True:
1093
+ rsp = client.DescribeApplicationUsage(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
+
1112
+ def doCreateApplication(args, parsed_globals):
1113
+ g_param = parse_global_arg(parsed_globals)
1114
+
1115
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1116
+ cred = credential.CVMRoleCredential()
1117
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1118
+ cred = credential.STSAssumeRoleCredential(
1119
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1120
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
1121
+ )
1122
+ elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
1123
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1124
+ else:
1125
+ cred = credential.Credential(
1126
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1127
+ )
1128
+ http_profile = HttpProfile(
1129
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1130
+ reqMethod="POST",
1131
+ endpoint=g_param[OptionsDefine.Endpoint],
1132
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1133
+ )
1134
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1135
+ if g_param[OptionsDefine.Language]:
1136
+ profile.language = g_param[OptionsDefine.Language]
1137
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1138
+ client = mod.TiwClient(cred, g_param[OptionsDefine.Region], profile)
1139
+ client._sdkVersion += ("_CLI_" + __version__)
1140
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1141
+ model = models.CreateApplicationRequest()
1142
+ model.from_json_string(json.dumps(args))
1143
+ start_time = time.time()
1144
+ while True:
1145
+ rsp = client.CreateApplication(model)
1146
+ result = rsp.to_json_string()
1147
+ try:
1148
+ json_obj = json.loads(result)
1149
+ except TypeError as e:
1150
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1151
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1152
+ break
1153
+ cur_time = time.time()
1154
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1155
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1156
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1157
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1158
+ else:
1159
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1160
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1161
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1162
+
1163
+
1164
+ def doDescribeAPIService(args, parsed_globals):
1165
+ g_param = parse_global_arg(parsed_globals)
1166
+
1167
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1168
+ cred = credential.CVMRoleCredential()
1169
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1170
+ cred = credential.STSAssumeRoleCredential(
1171
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1172
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
1173
+ )
1174
+ elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
1175
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1176
+ else:
1177
+ cred = credential.Credential(
1178
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1179
+ )
1180
+ http_profile = HttpProfile(
1181
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1182
+ reqMethod="POST",
1183
+ endpoint=g_param[OptionsDefine.Endpoint],
1184
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1185
+ )
1186
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1187
+ if g_param[OptionsDefine.Language]:
1188
+ profile.language = g_param[OptionsDefine.Language]
1189
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1190
+ client = mod.TiwClient(cred, g_param[OptionsDefine.Region], profile)
1191
+ client._sdkVersion += ("_CLI_" + __version__)
1192
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1193
+ model = models.DescribeAPIServiceRequest()
1194
+ model.from_json_string(json.dumps(args))
1195
+ start_time = time.time()
1196
+ while True:
1197
+ rsp = client.DescribeAPIService(model)
1198
+ result = rsp.to_json_string()
1199
+ try:
1200
+ json_obj = json.loads(result)
1201
+ except TypeError as e:
1202
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1203
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1204
+ break
1205
+ cur_time = time.time()
1206
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1207
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1208
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1209
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1210
+ else:
1211
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1212
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1213
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1214
+
1215
+
1216
+ def doDescribeWhiteboardPushCallback(args, parsed_globals):
1217
+ g_param = parse_global_arg(parsed_globals)
1218
+
1219
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1220
+ cred = credential.CVMRoleCredential()
1221
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1222
+ cred = credential.STSAssumeRoleCredential(
1223
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1224
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
1225
+ )
1226
+ elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
1227
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1228
+ else:
1229
+ cred = credential.Credential(
1230
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1231
+ )
1232
+ http_profile = HttpProfile(
1233
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1234
+ reqMethod="POST",
1235
+ endpoint=g_param[OptionsDefine.Endpoint],
1236
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1237
+ )
1238
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1239
+ if g_param[OptionsDefine.Language]:
1240
+ profile.language = g_param[OptionsDefine.Language]
1241
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1242
+ client = mod.TiwClient(cred, g_param[OptionsDefine.Region], profile)
1243
+ client._sdkVersion += ("_CLI_" + __version__)
1244
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1245
+ model = models.DescribeWhiteboardPushCallbackRequest()
50
1246
  model.from_json_string(json.dumps(args))
51
1247
  start_time = time.time()
52
1248
  while True:
53
- rsp = client.SetOnlineRecordCallback(model)
1249
+ rsp = client.DescribeWhiteboardPushCallback(model)
54
1250
  result = rsp.to_json_string()
55
1251
  try:
56
1252
  json_obj = json.loads(result)
@@ -69,7 +1265,7 @@ def doSetOnlineRecordCallback(args, parsed_globals):
69
1265
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
70
1266
 
71
1267
 
72
- def doSetVideoGenerationTaskCallback(args, parsed_globals):
1268
+ def doDescribeApplicationInfos(args, parsed_globals):
73
1269
  g_param = parse_global_arg(parsed_globals)
74
1270
 
75
1271
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -98,11 +1294,11 @@ def doSetVideoGenerationTaskCallback(args, parsed_globals):
98
1294
  client = mod.TiwClient(cred, g_param[OptionsDefine.Region], profile)
99
1295
  client._sdkVersion += ("_CLI_" + __version__)
100
1296
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
101
- model = models.SetVideoGenerationTaskCallbackRequest()
1297
+ model = models.DescribeApplicationInfosRequest()
102
1298
  model.from_json_string(json.dumps(args))
103
1299
  start_time = time.time()
104
1300
  while True:
105
- rsp = client.SetVideoGenerationTaskCallback(model)
1301
+ rsp = client.DescribeApplicationInfos(model)
106
1302
  result = rsp.to_json_string()
107
1303
  try:
108
1304
  json_obj = json.loads(result)
@@ -121,7 +1317,7 @@ def doSetVideoGenerationTaskCallback(args, parsed_globals):
121
1317
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
122
1318
 
123
1319
 
124
- def doCreateVideoGenerationTask(args, parsed_globals):
1320
+ def doDescribeOfflineRecordCallback(args, parsed_globals):
125
1321
  g_param = parse_global_arg(parsed_globals)
126
1322
 
127
1323
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -150,11 +1346,11 @@ def doCreateVideoGenerationTask(args, parsed_globals):
150
1346
  client = mod.TiwClient(cred, g_param[OptionsDefine.Region], profile)
151
1347
  client._sdkVersion += ("_CLI_" + __version__)
152
1348
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
153
- model = models.CreateVideoGenerationTaskRequest()
1349
+ model = models.DescribeOfflineRecordCallbackRequest()
154
1350
  model.from_json_string(json.dumps(args))
155
1351
  start_time = time.time()
156
1352
  while True:
157
- rsp = client.CreateVideoGenerationTask(model)
1353
+ rsp = client.DescribeOfflineRecordCallback(model)
158
1354
  result = rsp.to_json_string()
159
1355
  try:
160
1356
  json_obj = json.loads(result)
@@ -173,7 +1369,7 @@ def doCreateVideoGenerationTask(args, parsed_globals):
173
1369
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
174
1370
 
175
1371
 
176
- def doStopOnlineRecord(args, parsed_globals):
1372
+ def doDescribePostpaidUsage(args, parsed_globals):
177
1373
  g_param = parse_global_arg(parsed_globals)
178
1374
 
179
1375
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -202,11 +1398,11 @@ def doStopOnlineRecord(args, parsed_globals):
202
1398
  client = mod.TiwClient(cred, g_param[OptionsDefine.Region], profile)
203
1399
  client._sdkVersion += ("_CLI_" + __version__)
204
1400
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
205
- model = models.StopOnlineRecordRequest()
1401
+ model = models.DescribePostpaidUsageRequest()
206
1402
  model.from_json_string(json.dumps(args))
207
1403
  start_time = time.time()
208
1404
  while True:
209
- rsp = client.StopOnlineRecord(model)
1405
+ rsp = client.DescribePostpaidUsage(model)
210
1406
  result = rsp.to_json_string()
211
1407
  try:
212
1408
  json_obj = json.loads(result)
@@ -225,7 +1421,7 @@ def doStopOnlineRecord(args, parsed_globals):
225
1421
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
226
1422
 
227
1423
 
228
- def doSetTranscodeCallback(args, parsed_globals):
1424
+ def doCreateTranscode(args, parsed_globals):
229
1425
  g_param = parse_global_arg(parsed_globals)
230
1426
 
231
1427
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -254,11 +1450,11 @@ def doSetTranscodeCallback(args, parsed_globals):
254
1450
  client = mod.TiwClient(cred, g_param[OptionsDefine.Region], profile)
255
1451
  client._sdkVersion += ("_CLI_" + __version__)
256
1452
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
257
- model = models.SetTranscodeCallbackRequest()
1453
+ model = models.CreateTranscodeRequest()
258
1454
  model.from_json_string(json.dumps(args))
259
1455
  start_time = time.time()
260
1456
  while True:
261
- rsp = client.SetTranscodeCallback(model)
1457
+ rsp = client.CreateTranscode(model)
262
1458
  result = rsp.to_json_string()
263
1459
  try:
264
1460
  json_obj = json.loads(result)
@@ -277,7 +1473,7 @@ def doSetTranscodeCallback(args, parsed_globals):
277
1473
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
278
1474
 
279
1475
 
280
- def doResumeOnlineRecord(args, parsed_globals):
1476
+ def doDescribeVideoGenerationTaskCallback(args, parsed_globals):
281
1477
  g_param = parse_global_arg(parsed_globals)
282
1478
 
283
1479
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -306,11 +1502,11 @@ def doResumeOnlineRecord(args, parsed_globals):
306
1502
  client = mod.TiwClient(cred, g_param[OptionsDefine.Region], profile)
307
1503
  client._sdkVersion += ("_CLI_" + __version__)
308
1504
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
309
- model = models.ResumeOnlineRecordRequest()
1505
+ model = models.DescribeVideoGenerationTaskCallbackRequest()
310
1506
  model.from_json_string(json.dumps(args))
311
1507
  start_time = time.time()
312
1508
  while True:
313
- rsp = client.ResumeOnlineRecord(model)
1509
+ rsp = client.DescribeVideoGenerationTaskCallback(model)
314
1510
  result = rsp.to_json_string()
315
1511
  try:
316
1512
  json_obj = json.loads(result)
@@ -329,7 +1525,7 @@ def doResumeOnlineRecord(args, parsed_globals):
329
1525
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
330
1526
 
331
1527
 
332
- def doSetTranscodeCallbackKey(args, parsed_globals):
1528
+ def doModifyWhiteboardApplicationConfig(args, parsed_globals):
333
1529
  g_param = parse_global_arg(parsed_globals)
334
1530
 
335
1531
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -358,11 +1554,11 @@ def doSetTranscodeCallbackKey(args, parsed_globals):
358
1554
  client = mod.TiwClient(cred, g_param[OptionsDefine.Region], profile)
359
1555
  client._sdkVersion += ("_CLI_" + __version__)
360
1556
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
361
- model = models.SetTranscodeCallbackKeyRequest()
1557
+ model = models.ModifyWhiteboardApplicationConfigRequest()
362
1558
  model.from_json_string(json.dumps(args))
363
1559
  start_time = time.time()
364
1560
  while True:
365
- rsp = client.SetTranscodeCallbackKey(model)
1561
+ rsp = client.ModifyWhiteboardApplicationConfig(model)
366
1562
  result = rsp.to_json_string()
367
1563
  try:
368
1564
  json_obj = json.loads(result)
@@ -381,7 +1577,7 @@ def doSetTranscodeCallbackKey(args, parsed_globals):
381
1577
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
382
1578
 
383
1579
 
384
- def doCreateSnapshotTask(args, parsed_globals):
1580
+ def doSetWhiteboardPushCallback(args, parsed_globals):
385
1581
  g_param = parse_global_arg(parsed_globals)
386
1582
 
387
1583
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -410,11 +1606,11 @@ def doCreateSnapshotTask(args, parsed_globals):
410
1606
  client = mod.TiwClient(cred, g_param[OptionsDefine.Region], profile)
411
1607
  client._sdkVersion += ("_CLI_" + __version__)
412
1608
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
413
- model = models.CreateSnapshotTaskRequest()
1609
+ model = models.SetWhiteboardPushCallbackRequest()
414
1610
  model.from_json_string(json.dumps(args))
415
1611
  start_time = time.time()
416
1612
  while True:
417
- rsp = client.CreateSnapshotTask(model)
1613
+ rsp = client.SetWhiteboardPushCallback(model)
418
1614
  result = rsp.to_json_string()
419
1615
  try:
420
1616
  json_obj = json.loads(result)
@@ -433,7 +1629,7 @@ def doCreateSnapshotTask(args, parsed_globals):
433
1629
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
434
1630
 
435
1631
 
436
- def doDescribeOnlineRecord(args, parsed_globals):
1632
+ def doStartOnlineRecord(args, parsed_globals):
437
1633
  g_param = parse_global_arg(parsed_globals)
438
1634
 
439
1635
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -462,11 +1658,11 @@ def doDescribeOnlineRecord(args, parsed_globals):
462
1658
  client = mod.TiwClient(cred, g_param[OptionsDefine.Region], profile)
463
1659
  client._sdkVersion += ("_CLI_" + __version__)
464
1660
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
465
- model = models.DescribeOnlineRecordRequest()
1661
+ model = models.StartOnlineRecordRequest()
466
1662
  model.from_json_string(json.dumps(args))
467
1663
  start_time = time.time()
468
1664
  while True:
469
- rsp = client.DescribeOnlineRecord(model)
1665
+ rsp = client.StartOnlineRecord(model)
470
1666
  result = rsp.to_json_string()
471
1667
  try:
472
1668
  json_obj = json.loads(result)
@@ -485,7 +1681,7 @@ def doDescribeOnlineRecord(args, parsed_globals):
485
1681
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
486
1682
 
487
1683
 
488
- def doDescribeOnlineRecordCallback(args, parsed_globals):
1684
+ def doDescribeTranscode(args, parsed_globals):
489
1685
  g_param = parse_global_arg(parsed_globals)
490
1686
 
491
1687
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -514,11 +1710,11 @@ def doDescribeOnlineRecordCallback(args, parsed_globals):
514
1710
  client = mod.TiwClient(cred, g_param[OptionsDefine.Region], profile)
515
1711
  client._sdkVersion += ("_CLI_" + __version__)
516
1712
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
517
- model = models.DescribeOnlineRecordCallbackRequest()
1713
+ model = models.DescribeTranscodeRequest()
518
1714
  model.from_json_string(json.dumps(args))
519
1715
  start_time = time.time()
520
1716
  while True:
521
- rsp = client.DescribeOnlineRecordCallback(model)
1717
+ rsp = client.DescribeTranscode(model)
522
1718
  result = rsp.to_json_string()
523
1719
  try:
524
1720
  json_obj = json.loads(result)
@@ -537,7 +1733,7 @@ def doDescribeOnlineRecordCallback(args, parsed_globals):
537
1733
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
538
1734
 
539
1735
 
540
- def doDescribeWhiteboardPushCallback(args, parsed_globals):
1736
+ def doSetOnlineRecordCallbackKey(args, parsed_globals):
541
1737
  g_param = parse_global_arg(parsed_globals)
542
1738
 
543
1739
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -566,11 +1762,11 @@ def doDescribeWhiteboardPushCallback(args, parsed_globals):
566
1762
  client = mod.TiwClient(cred, g_param[OptionsDefine.Region], profile)
567
1763
  client._sdkVersion += ("_CLI_" + __version__)
568
1764
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
569
- model = models.DescribeWhiteboardPushCallbackRequest()
1765
+ model = models.SetOnlineRecordCallbackKeyRequest()
570
1766
  model.from_json_string(json.dumps(args))
571
1767
  start_time = time.time()
572
1768
  while True:
573
- rsp = client.DescribeWhiteboardPushCallback(model)
1769
+ rsp = client.SetOnlineRecordCallbackKey(model)
574
1770
  result = rsp.to_json_string()
575
1771
  try:
576
1772
  json_obj = json.loads(result)
@@ -589,7 +1785,7 @@ def doDescribeWhiteboardPushCallback(args, parsed_globals):
589
1785
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
590
1786
 
591
1787
 
592
- def doStartWhiteboardPush(args, parsed_globals):
1788
+ def doDescribeUsageSummary(args, parsed_globals):
593
1789
  g_param = parse_global_arg(parsed_globals)
594
1790
 
595
1791
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -618,11 +1814,11 @@ def doStartWhiteboardPush(args, parsed_globals):
618
1814
  client = mod.TiwClient(cred, g_param[OptionsDefine.Region], profile)
619
1815
  client._sdkVersion += ("_CLI_" + __version__)
620
1816
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
621
- model = models.StartWhiteboardPushRequest()
1817
+ model = models.DescribeUsageSummaryRequest()
622
1818
  model.from_json_string(json.dumps(args))
623
1819
  start_time = time.time()
624
1820
  while True:
625
- rsp = client.StartWhiteboardPush(model)
1821
+ rsp = client.DescribeUsageSummary(model)
626
1822
  result = rsp.to_json_string()
627
1823
  try:
628
1824
  json_obj = json.loads(result)
@@ -641,7 +1837,7 @@ def doStartWhiteboardPush(args, parsed_globals):
641
1837
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
642
1838
 
643
1839
 
644
- def doDescribeTIWRoomDailyUsage(args, parsed_globals):
1840
+ def doSetWhiteboardPushCallbackKey(args, parsed_globals):
645
1841
  g_param = parse_global_arg(parsed_globals)
646
1842
 
647
1843
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -670,11 +1866,11 @@ def doDescribeTIWRoomDailyUsage(args, parsed_globals):
670
1866
  client = mod.TiwClient(cred, g_param[OptionsDefine.Region], profile)
671
1867
  client._sdkVersion += ("_CLI_" + __version__)
672
1868
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
673
- model = models.DescribeTIWRoomDailyUsageRequest()
1869
+ model = models.SetWhiteboardPushCallbackKeyRequest()
674
1870
  model.from_json_string(json.dumps(args))
675
1871
  start_time = time.time()
676
1872
  while True:
677
- rsp = client.DescribeTIWRoomDailyUsage(model)
1873
+ rsp = client.SetWhiteboardPushCallbackKey(model)
678
1874
  result = rsp.to_json_string()
679
1875
  try:
680
1876
  json_obj = json.loads(result)
@@ -693,7 +1889,7 @@ def doDescribeTIWRoomDailyUsage(args, parsed_globals):
693
1889
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
694
1890
 
695
1891
 
696
- def doCreateTranscode(args, parsed_globals):
1892
+ def doDescribeWhiteboardPushSearch(args, parsed_globals):
697
1893
  g_param = parse_global_arg(parsed_globals)
698
1894
 
699
1895
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -722,11 +1918,11 @@ def doCreateTranscode(args, parsed_globals):
722
1918
  client = mod.TiwClient(cred, g_param[OptionsDefine.Region], profile)
723
1919
  client._sdkVersion += ("_CLI_" + __version__)
724
1920
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
725
- model = models.CreateTranscodeRequest()
1921
+ model = models.DescribeWhiteboardPushSearchRequest()
726
1922
  model.from_json_string(json.dumps(args))
727
1923
  start_time = time.time()
728
1924
  while True:
729
- rsp = client.CreateTranscode(model)
1925
+ rsp = client.DescribeWhiteboardPushSearch(model)
730
1926
  result = rsp.to_json_string()
731
1927
  try:
732
1928
  json_obj = json.loads(result)
@@ -745,7 +1941,7 @@ def doCreateTranscode(args, parsed_globals):
745
1941
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
746
1942
 
747
1943
 
748
- def doDescribeVideoGenerationTaskCallback(args, parsed_globals):
1944
+ def doDescribeUserStatus(args, parsed_globals):
749
1945
  g_param = parse_global_arg(parsed_globals)
750
1946
 
751
1947
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -774,11 +1970,11 @@ def doDescribeVideoGenerationTaskCallback(args, parsed_globals):
774
1970
  client = mod.TiwClient(cred, g_param[OptionsDefine.Region], profile)
775
1971
  client._sdkVersion += ("_CLI_" + __version__)
776
1972
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
777
- model = models.DescribeVideoGenerationTaskCallbackRequest()
1973
+ model = models.DescribeUserStatusRequest()
778
1974
  model.from_json_string(json.dumps(args))
779
1975
  start_time = time.time()
780
1976
  while True:
781
- rsp = client.DescribeVideoGenerationTaskCallback(model)
1977
+ rsp = client.DescribeUserStatus(model)
782
1978
  result = rsp.to_json_string()
783
1979
  try:
784
1980
  json_obj = json.loads(result)
@@ -797,7 +1993,7 @@ def doDescribeVideoGenerationTaskCallback(args, parsed_globals):
797
1993
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
798
1994
 
799
1995
 
800
- def doSetWhiteboardPushCallback(args, parsed_globals):
1996
+ def doCreateSnapshotTask(args, parsed_globals):
801
1997
  g_param = parse_global_arg(parsed_globals)
802
1998
 
803
1999
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -826,11 +2022,11 @@ def doSetWhiteboardPushCallback(args, parsed_globals):
826
2022
  client = mod.TiwClient(cred, g_param[OptionsDefine.Region], profile)
827
2023
  client._sdkVersion += ("_CLI_" + __version__)
828
2024
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
829
- model = models.SetWhiteboardPushCallbackRequest()
2025
+ model = models.CreateSnapshotTaskRequest()
830
2026
  model.from_json_string(json.dumps(args))
831
2027
  start_time = time.time()
832
2028
  while True:
833
- rsp = client.SetWhiteboardPushCallback(model)
2029
+ rsp = client.CreateSnapshotTask(model)
834
2030
  result = rsp.to_json_string()
835
2031
  try:
836
2032
  json_obj = json.loads(result)
@@ -849,7 +2045,7 @@ def doSetWhiteboardPushCallback(args, parsed_globals):
849
2045
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
850
2046
 
851
2047
 
852
- def doStartOnlineRecord(args, parsed_globals):
2048
+ def doDescribeTIWDailyUsage(args, parsed_globals):
853
2049
  g_param = parse_global_arg(parsed_globals)
854
2050
 
855
2051
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -878,11 +2074,11 @@ def doStartOnlineRecord(args, parsed_globals):
878
2074
  client = mod.TiwClient(cred, g_param[OptionsDefine.Region], profile)
879
2075
  client._sdkVersion += ("_CLI_" + __version__)
880
2076
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
881
- model = models.StartOnlineRecordRequest()
2077
+ model = models.DescribeTIWDailyUsageRequest()
882
2078
  model.from_json_string(json.dumps(args))
883
2079
  start_time = time.time()
884
2080
  while True:
885
- rsp = client.StartOnlineRecord(model)
2081
+ rsp = client.DescribeTIWDailyUsage(model)
886
2082
  result = rsp.to_json_string()
887
2083
  try:
888
2084
  json_obj = json.loads(result)
@@ -901,7 +2097,7 @@ def doStartOnlineRecord(args, parsed_globals):
901
2097
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
902
2098
 
903
2099
 
904
- def doSetOnlineRecordCallbackKey(args, parsed_globals):
2100
+ def doStopWhiteboardPush(args, parsed_globals):
905
2101
  g_param = parse_global_arg(parsed_globals)
906
2102
 
907
2103
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -930,11 +2126,11 @@ def doSetOnlineRecordCallbackKey(args, parsed_globals):
930
2126
  client = mod.TiwClient(cred, g_param[OptionsDefine.Region], profile)
931
2127
  client._sdkVersion += ("_CLI_" + __version__)
932
2128
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
933
- model = models.SetOnlineRecordCallbackKeyRequest()
2129
+ model = models.StopWhiteboardPushRequest()
934
2130
  model.from_json_string(json.dumps(args))
935
2131
  start_time = time.time()
936
2132
  while True:
937
- rsp = client.SetOnlineRecordCallbackKey(model)
2133
+ rsp = client.StopWhiteboardPush(model)
938
2134
  result = rsp.to_json_string()
939
2135
  try:
940
2136
  json_obj = json.loads(result)
@@ -953,7 +2149,7 @@ def doSetOnlineRecordCallbackKey(args, parsed_globals):
953
2149
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
954
2150
 
955
2151
 
956
- def doSetWhiteboardPushCallbackKey(args, parsed_globals):
2152
+ def doDescribeIMApplications(args, parsed_globals):
957
2153
  g_param = parse_global_arg(parsed_globals)
958
2154
 
959
2155
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -982,11 +2178,11 @@ def doSetWhiteboardPushCallbackKey(args, parsed_globals):
982
2178
  client = mod.TiwClient(cred, g_param[OptionsDefine.Region], profile)
983
2179
  client._sdkVersion += ("_CLI_" + __version__)
984
2180
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
985
- model = models.SetWhiteboardPushCallbackKeyRequest()
2181
+ model = models.DescribeIMApplicationsRequest()
986
2182
  model.from_json_string(json.dumps(args))
987
2183
  start_time = time.time()
988
2184
  while True:
989
- rsp = client.SetWhiteboardPushCallbackKey(model)
2185
+ rsp = client.DescribeIMApplications(model)
990
2186
  result = rsp.to_json_string()
991
2187
  try:
992
2188
  json_obj = json.loads(result)
@@ -1005,7 +2201,7 @@ def doSetWhiteboardPushCallbackKey(args, parsed_globals):
1005
2201
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1006
2202
 
1007
2203
 
1008
- def doDescribeTranscode(args, parsed_globals):
2204
+ def doDescribeQualityMetrics(args, parsed_globals):
1009
2205
  g_param = parse_global_arg(parsed_globals)
1010
2206
 
1011
2207
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1034,11 +2230,11 @@ def doDescribeTranscode(args, parsed_globals):
1034
2230
  client = mod.TiwClient(cred, g_param[OptionsDefine.Region], profile)
1035
2231
  client._sdkVersion += ("_CLI_" + __version__)
1036
2232
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1037
- model = models.DescribeTranscodeRequest()
2233
+ model = models.DescribeQualityMetricsRequest()
1038
2234
  model.from_json_string(json.dumps(args))
1039
2235
  start_time = time.time()
1040
2236
  while True:
1041
- rsp = client.DescribeTranscode(model)
2237
+ rsp = client.DescribeQualityMetrics(model)
1042
2238
  result = rsp.to_json_string()
1043
2239
  try:
1044
2240
  json_obj = json.loads(result)
@@ -1057,7 +2253,7 @@ def doDescribeTranscode(args, parsed_globals):
1057
2253
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1058
2254
 
1059
2255
 
1060
- def doDescribeTIWDailyUsage(args, parsed_globals):
2256
+ def doDescribeOfflineRecord(args, parsed_globals):
1061
2257
  g_param = parse_global_arg(parsed_globals)
1062
2258
 
1063
2259
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1086,11 +2282,11 @@ def doDescribeTIWDailyUsage(args, parsed_globals):
1086
2282
  client = mod.TiwClient(cred, g_param[OptionsDefine.Region], profile)
1087
2283
  client._sdkVersion += ("_CLI_" + __version__)
1088
2284
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1089
- model = models.DescribeTIWDailyUsageRequest()
2285
+ model = models.DescribeOfflineRecordRequest()
1090
2286
  model.from_json_string(json.dumps(args))
1091
2287
  start_time = time.time()
1092
2288
  while True:
1093
- rsp = client.DescribeTIWDailyUsage(model)
2289
+ rsp = client.DescribeOfflineRecord(model)
1094
2290
  result = rsp.to_json_string()
1095
2291
  try:
1096
2292
  json_obj = json.loads(result)
@@ -1109,7 +2305,7 @@ def doDescribeTIWDailyUsage(args, parsed_globals):
1109
2305
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1110
2306
 
1111
2307
 
1112
- def doStopWhiteboardPush(args, parsed_globals):
2308
+ def doStartWhiteboardPush(args, parsed_globals):
1113
2309
  g_param = parse_global_arg(parsed_globals)
1114
2310
 
1115
2311
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1138,11 +2334,11 @@ def doStopWhiteboardPush(args, parsed_globals):
1138
2334
  client = mod.TiwClient(cred, g_param[OptionsDefine.Region], profile)
1139
2335
  client._sdkVersion += ("_CLI_" + __version__)
1140
2336
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1141
- model = models.StopWhiteboardPushRequest()
2337
+ model = models.StartWhiteboardPushRequest()
1142
2338
  model.from_json_string(json.dumps(args))
1143
2339
  start_time = time.time()
1144
2340
  while True:
1145
- rsp = client.StopWhiteboardPush(model)
2341
+ rsp = client.StartWhiteboardPush(model)
1146
2342
  result = rsp.to_json_string()
1147
2343
  try:
1148
2344
  json_obj = json.loads(result)
@@ -1161,7 +2357,7 @@ def doStopWhiteboardPush(args, parsed_globals):
1161
2357
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1162
2358
 
1163
2359
 
1164
- def doDescribeQualityMetrics(args, parsed_globals):
2360
+ def doPauseOnlineRecord(args, parsed_globals):
1165
2361
  g_param = parse_global_arg(parsed_globals)
1166
2362
 
1167
2363
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1190,11 +2386,11 @@ def doDescribeQualityMetrics(args, parsed_globals):
1190
2386
  client = mod.TiwClient(cred, g_param[OptionsDefine.Region], profile)
1191
2387
  client._sdkVersion += ("_CLI_" + __version__)
1192
2388
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1193
- model = models.DescribeQualityMetricsRequest()
2389
+ model = models.PauseOnlineRecordRequest()
1194
2390
  model.from_json_string(json.dumps(args))
1195
2391
  start_time = time.time()
1196
2392
  while True:
1197
- rsp = client.DescribeQualityMetrics(model)
2393
+ rsp = client.PauseOnlineRecord(model)
1198
2394
  result = rsp.to_json_string()
1199
2395
  try:
1200
2396
  json_obj = json.loads(result)
@@ -1213,7 +2409,7 @@ def doDescribeQualityMetrics(args, parsed_globals):
1213
2409
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1214
2410
 
1215
2411
 
1216
- def doPauseOnlineRecord(args, parsed_globals):
2412
+ def doDescribeTranscodeCallback(args, parsed_globals):
1217
2413
  g_param = parse_global_arg(parsed_globals)
1218
2414
 
1219
2415
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1242,11 +2438,11 @@ def doPauseOnlineRecord(args, parsed_globals):
1242
2438
  client = mod.TiwClient(cred, g_param[OptionsDefine.Region], profile)
1243
2439
  client._sdkVersion += ("_CLI_" + __version__)
1244
2440
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1245
- model = models.PauseOnlineRecordRequest()
2441
+ model = models.DescribeTranscodeCallbackRequest()
1246
2442
  model.from_json_string(json.dumps(args))
1247
2443
  start_time = time.time()
1248
2444
  while True:
1249
- rsp = client.PauseOnlineRecord(model)
2445
+ rsp = client.DescribeTranscodeCallback(model)
1250
2446
  result = rsp.to_json_string()
1251
2447
  try:
1252
2448
  json_obj = json.loads(result)
@@ -1265,7 +2461,7 @@ def doPauseOnlineRecord(args, parsed_globals):
1265
2461
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1266
2462
 
1267
2463
 
1268
- def doDescribeTranscodeCallback(args, parsed_globals):
2464
+ def doDescribeRoomList(args, parsed_globals):
1269
2465
  g_param = parse_global_arg(parsed_globals)
1270
2466
 
1271
2467
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1294,11 +2490,11 @@ def doDescribeTranscodeCallback(args, parsed_globals):
1294
2490
  client = mod.TiwClient(cred, g_param[OptionsDefine.Region], profile)
1295
2491
  client._sdkVersion += ("_CLI_" + __version__)
1296
2492
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1297
- model = models.DescribeTranscodeCallbackRequest()
2493
+ model = models.DescribeRoomListRequest()
1298
2494
  model.from_json_string(json.dumps(args))
1299
2495
  start_time = time.time()
1300
2496
  while True:
1301
- rsp = client.DescribeTranscodeCallback(model)
2497
+ rsp = client.DescribeRoomList(model)
1302
2498
  result = rsp.to_json_string()
1303
2499
  try:
1304
2500
  json_obj = json.loads(result)
@@ -1473,6 +2669,58 @@ def doDescribeVideoGenerationTask(args, parsed_globals):
1473
2669
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1474
2670
 
1475
2671
 
2672
+ def doModifyWhiteboardBucketConfig(args, parsed_globals):
2673
+ g_param = parse_global_arg(parsed_globals)
2674
+
2675
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
2676
+ cred = credential.CVMRoleCredential()
2677
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
2678
+ cred = credential.STSAssumeRoleCredential(
2679
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
2680
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
2681
+ )
2682
+ elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
2683
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
2684
+ else:
2685
+ cred = credential.Credential(
2686
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
2687
+ )
2688
+ http_profile = HttpProfile(
2689
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
2690
+ reqMethod="POST",
2691
+ endpoint=g_param[OptionsDefine.Endpoint],
2692
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
2693
+ )
2694
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
2695
+ if g_param[OptionsDefine.Language]:
2696
+ profile.language = g_param[OptionsDefine.Language]
2697
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
2698
+ client = mod.TiwClient(cred, g_param[OptionsDefine.Region], profile)
2699
+ client._sdkVersion += ("_CLI_" + __version__)
2700
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
2701
+ model = models.ModifyWhiteboardBucketConfigRequest()
2702
+ model.from_json_string(json.dumps(args))
2703
+ start_time = time.time()
2704
+ while True:
2705
+ rsp = client.ModifyWhiteboardBucketConfig(model)
2706
+ result = rsp.to_json_string()
2707
+ try:
2708
+ json_obj = json.loads(result)
2709
+ except TypeError as e:
2710
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
2711
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
2712
+ break
2713
+ cur_time = time.time()
2714
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
2715
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
2716
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
2717
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
2718
+ else:
2719
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
2720
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
2721
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2722
+
2723
+
1476
2724
  def doDescribeSnapshotTask(args, parsed_globals):
1477
2725
  g_param = parse_global_arg(parsed_globals)
1478
2726
 
@@ -1525,6 +2773,58 @@ def doDescribeSnapshotTask(args, parsed_globals):
1525
2773
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1526
2774
 
1527
2775
 
2776
+ def doCreateOfflineRecord(args, parsed_globals):
2777
+ g_param = parse_global_arg(parsed_globals)
2778
+
2779
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
2780
+ cred = credential.CVMRoleCredential()
2781
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
2782
+ cred = credential.STSAssumeRoleCredential(
2783
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
2784
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
2785
+ )
2786
+ elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
2787
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
2788
+ else:
2789
+ cred = credential.Credential(
2790
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
2791
+ )
2792
+ http_profile = HttpProfile(
2793
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
2794
+ reqMethod="POST",
2795
+ endpoint=g_param[OptionsDefine.Endpoint],
2796
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
2797
+ )
2798
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
2799
+ if g_param[OptionsDefine.Language]:
2800
+ profile.language = g_param[OptionsDefine.Language]
2801
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
2802
+ client = mod.TiwClient(cred, g_param[OptionsDefine.Region], profile)
2803
+ client._sdkVersion += ("_CLI_" + __version__)
2804
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
2805
+ model = models.CreateOfflineRecordRequest()
2806
+ model.from_json_string(json.dumps(args))
2807
+ start_time = time.time()
2808
+ while True:
2809
+ rsp = client.CreateOfflineRecord(model)
2810
+ result = rsp.to_json_string()
2811
+ try:
2812
+ json_obj = json.loads(result)
2813
+ except TypeError as e:
2814
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
2815
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
2816
+ break
2817
+ cur_time = time.time()
2818
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
2819
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
2820
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
2821
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
2822
+ else:
2823
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
2824
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
2825
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2826
+
2827
+
1528
2828
  CLIENT_MAP = {
1529
2829
  "v20190919": tiw_client_v20190919,
1530
2830
 
@@ -1536,35 +2836,60 @@ MODELS_MAP = {
1536
2836
  }
1537
2837
 
1538
2838
  ACTION_MAP = {
2839
+ "DescribeWhiteboardBucketConfig": doDescribeWhiteboardBucketConfig,
1539
2840
  "SetOnlineRecordCallback": doSetOnlineRecordCallback,
2841
+ "DescribeBoardSDKLog": doDescribeBoardSDKLog,
2842
+ "DescribeUserList": doDescribeUserList,
1540
2843
  "SetVideoGenerationTaskCallback": doSetVideoGenerationTaskCallback,
1541
2844
  "CreateVideoGenerationTask": doCreateVideoGenerationTask,
1542
2845
  "StopOnlineRecord": doStopOnlineRecord,
2846
+ "DescribeWhiteboardApplicationConfig": doDescribeWhiteboardApplicationConfig,
1543
2847
  "SetTranscodeCallback": doSetTranscodeCallback,
1544
2848
  "ResumeOnlineRecord": doResumeOnlineRecord,
2849
+ "DescribeTIWRoomDailyUsage": doDescribeTIWRoomDailyUsage,
1545
2850
  "SetTranscodeCallbackKey": doSetTranscodeCallbackKey,
1546
- "CreateSnapshotTask": doCreateSnapshotTask,
2851
+ "SetOfflineRecordCallback": doSetOfflineRecordCallback,
2852
+ "ApplyTiwTrial": doApplyTiwTrial,
2853
+ "DescribeTranscodeSearch": doDescribeTranscodeSearch,
2854
+ "ModifyApplication": doModifyApplication,
2855
+ "DescribeUserResources": doDescribeUserResources,
1547
2856
  "DescribeOnlineRecord": doDescribeOnlineRecord,
2857
+ "ModifyAutoRenewFlag": doModifyAutoRenewFlag,
1548
2858
  "DescribeOnlineRecordCallback": doDescribeOnlineRecordCallback,
2859
+ "DescribeApplicationUsage": doDescribeApplicationUsage,
2860
+ "CreateApplication": doCreateApplication,
2861
+ "DescribeAPIService": doDescribeAPIService,
1549
2862
  "DescribeWhiteboardPushCallback": doDescribeWhiteboardPushCallback,
1550
- "StartWhiteboardPush": doStartWhiteboardPush,
1551
- "DescribeTIWRoomDailyUsage": doDescribeTIWRoomDailyUsage,
2863
+ "DescribeApplicationInfos": doDescribeApplicationInfos,
2864
+ "DescribeOfflineRecordCallback": doDescribeOfflineRecordCallback,
2865
+ "DescribePostpaidUsage": doDescribePostpaidUsage,
1552
2866
  "CreateTranscode": doCreateTranscode,
1553
2867
  "DescribeVideoGenerationTaskCallback": doDescribeVideoGenerationTaskCallback,
2868
+ "ModifyWhiteboardApplicationConfig": doModifyWhiteboardApplicationConfig,
1554
2869
  "SetWhiteboardPushCallback": doSetWhiteboardPushCallback,
1555
2870
  "StartOnlineRecord": doStartOnlineRecord,
2871
+ "DescribeTranscode": doDescribeTranscode,
1556
2872
  "SetOnlineRecordCallbackKey": doSetOnlineRecordCallbackKey,
2873
+ "DescribeUsageSummary": doDescribeUsageSummary,
1557
2874
  "SetWhiteboardPushCallbackKey": doSetWhiteboardPushCallbackKey,
1558
- "DescribeTranscode": doDescribeTranscode,
2875
+ "DescribeWhiteboardPushSearch": doDescribeWhiteboardPushSearch,
2876
+ "DescribeUserStatus": doDescribeUserStatus,
2877
+ "CreateSnapshotTask": doCreateSnapshotTask,
1559
2878
  "DescribeTIWDailyUsage": doDescribeTIWDailyUsage,
1560
2879
  "StopWhiteboardPush": doStopWhiteboardPush,
2880
+ "DescribeIMApplications": doDescribeIMApplications,
1561
2881
  "DescribeQualityMetrics": doDescribeQualityMetrics,
2882
+ "DescribeOfflineRecord": doDescribeOfflineRecord,
2883
+ "StartWhiteboardPush": doStartWhiteboardPush,
1562
2884
  "PauseOnlineRecord": doPauseOnlineRecord,
1563
2885
  "DescribeTranscodeCallback": doDescribeTranscodeCallback,
2886
+ "DescribeRoomList": doDescribeRoomList,
1564
2887
  "SetVideoGenerationTaskCallbackKey": doSetVideoGenerationTaskCallbackKey,
1565
2888
  "DescribeWhiteboardPush": doDescribeWhiteboardPush,
1566
2889
  "DescribeVideoGenerationTask": doDescribeVideoGenerationTask,
2890
+ "ModifyWhiteboardBucketConfig": doModifyWhiteboardBucketConfig,
1567
2891
  "DescribeSnapshotTask": doDescribeSnapshotTask,
2892
+ "CreateOfflineRecord": doCreateOfflineRecord,
1568
2893
 
1569
2894
  }
1570
2895