tccli-intl-en 3.1.11.1__py2.py3-none-any.whl → 3.1.39.1__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tccli/__init__.py +1 -1
- tccli/services/__init__.py +9 -0
- tccli/services/advisor/advisor_client.py +56 -0
- tccli/services/advisor/v20200721/api.json +34 -0
- tccli/services/advisor/v20200721/examples.json +8 -0
- tccli/services/ai3d/__init__.py +4 -0
- tccli/services/ai3d/ai3d_client.py +266 -0
- tccli/services/ai3d/v20250513/api.json +264 -0
- tccli/services/ai3d/v20250513/examples.json +20 -0
- tccli/services/autoscaling/v20180419/api.json +41 -13
- tccli/services/billing/billing_client.py +172 -4
- tccli/services/billing/v20180709/api.json +332 -1
- tccli/services/billing/v20180709/examples.json +24 -0
- tccli/services/ccc/v20200210/api.json +71 -26
- tccli/services/cdb/cdb_client.py +1128 -288
- tccli/services/cdb/v20170320/api.json +2166 -335
- tccli/services/cdb/v20170320/examples.json +126 -6
- tccli/services/cdn/v20180606/api.json +22 -22
- tccli/services/cdn/v20180606/examples.json +1 -1
- tccli/services/ckafka/ckafka_client.py +120 -8
- tccli/services/ckafka/v20190819/api.json +525 -180
- tccli/services/ckafka/v20190819/examples.json +30 -20
- tccli/services/clb/v20180317/api.json +87 -87
- tccli/services/csip/csip_client.py +392 -0
- tccli/services/csip/v20221121/api.json +2050 -284
- tccli/services/csip/v20221121/examples.json +56 -0
- tccli/services/cvm/v20170312/api.json +23 -23
- tccli/services/cvm/v20170312/examples.json +32 -32
- tccli/services/emr/v20190103/api.json +6 -6
- tccli/services/faceid/v20180301/api.json +102 -52
- tccli/services/faceid/v20180301/examples.json +3 -9
- tccli/services/hunyuan/__init__.py +4 -0
- tccli/services/hunyuan/hunyuan_client.py +714 -0
- tccli/services/hunyuan/v20230901/api.json +1131 -0
- tccli/services/hunyuan/v20230901/examples.json +84 -0
- tccli/services/lighthouse/lighthouse_client.py +360 -24
- tccli/services/lighthouse/v20200324/api.json +488 -0
- tccli/services/lighthouse/v20200324/examples.json +54 -0
- tccli/services/lkeap/v20240522/api.json +36 -0
- tccli/services/lkeap/v20240522/examples.json +1 -1
- tccli/services/mdl/mdl_client.py +192 -24
- tccli/services/mdl/v20200326/api.json +761 -77
- tccli/services/mdl/v20200326/examples.json +24 -0
- tccli/services/mdp/v20200527/api.json +191 -28
- tccli/services/mongodb/v20190725/api.json +39 -39
- tccli/services/monitor/v20180724/api.json +5 -5
- tccli/services/mps/mps_client.py +397 -61
- tccli/services/mps/v20190612/api.json +1190 -132
- tccli/services/mps/v20190612/examples.json +76 -22
- tccli/services/mqtt/__init__.py +4 -0
- tccli/services/mqtt/mqtt_client.py +1610 -0
- tccli/services/mqtt/v20240516/api.json +3057 -0
- tccli/services/mqtt/v20240516/examples.json +213 -0
- tccli/services/ocr/v20181119/api.json +23 -3
- tccli/services/ocr/v20181119/examples.json +6 -6
- tccli/services/redis/v20180412/api.json +12 -12
- tccli/services/ses/ses_client.py +348 -12
- tccli/services/ses/v20201002/api.json +1197 -256
- tccli/services/ses/v20201002/examples.json +78 -24
- tccli/services/tcsas/tcsas_client.py +2281 -209
- tccli/services/tcsas/v20250106/api.json +8410 -3423
- tccli/services/tcsas/v20250106/examples.json +308 -12
- tccli/services/tdmq/v20200217/api.json +4 -4
- tccli/services/teo/teo_client.py +56 -0
- tccli/services/teo/v20220901/api.json +111 -12
- tccli/services/teo/v20220901/examples.json +8 -0
- tccli/services/tke/tke_client.py +168 -0
- tccli/services/tke/v20180525/api.json +227 -0
- tccli/services/tke/v20180525/examples.json +24 -0
- tccli/services/trocket/v20230308/api.json +96 -96
- tccli/services/trtc/v20190722/api.json +212 -144
- tccli/services/trtc/v20190722/examples.json +7 -7
- tccli/services/vod/v20180717/api.json +2929 -296
- tccli/services/vod/v20180717/examples.json +40 -6
- tccli/services/vod/vod_client.py +280 -0
- tccli/services/vpc/v20170312/api.json +80 -13
- tccli/services/vpc/v20170312/examples.json +17 -9
- tccli/services/vpc/vpc_client.py +64 -8
- {tccli_intl_en-3.1.11.1.dist-info → tccli_intl_en-3.1.39.1.dist-info}/METADATA +2 -2
- {tccli_intl_en-3.1.11.1.dist-info → tccli_intl_en-3.1.39.1.dist-info}/RECORD +84 -72
- {tccli_intl_en-3.1.11.1.dist-info → tccli_intl_en-3.1.39.1.dist-info}/WHEEL +1 -1
- {tccli_intl_en-3.1.11.1.dist-info → tccli_intl_en-3.1.39.1.dist-info}/LICENSE +0 -0
- {tccli_intl_en-3.1.11.1.dist-info → tccli_intl_en-3.1.39.1.dist-info}/entry_points.txt +0 -0
- {tccli_intl_en-3.1.11.1.dist-info → tccli_intl_en-3.1.39.1.dist-info}/top_level.txt +0 -0
tccli/services/ses/ses_client.py
CHANGED
|
@@ -182,6 +182,61 @@ def doCreateEmailIdentity(args, parsed_globals):
|
|
|
182
182
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
183
183
|
|
|
184
184
|
|
|
185
|
+
def doCreateReceiverDetailWithData(args, parsed_globals):
|
|
186
|
+
g_param = parse_global_arg(parsed_globals)
|
|
187
|
+
|
|
188
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
189
|
+
cred = credential.CVMRoleCredential()
|
|
190
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
191
|
+
cred = credential.STSAssumeRoleCredential(
|
|
192
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
193
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
194
|
+
)
|
|
195
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
196
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
197
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
198
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
199
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
200
|
+
else:
|
|
201
|
+
cred = credential.Credential(
|
|
202
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
203
|
+
)
|
|
204
|
+
http_profile = HttpProfile(
|
|
205
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
206
|
+
reqMethod="POST",
|
|
207
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
208
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
209
|
+
)
|
|
210
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
211
|
+
if g_param[OptionsDefine.Language]:
|
|
212
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
213
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
214
|
+
client = mod.SesClient(cred, g_param[OptionsDefine.Region], profile)
|
|
215
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
216
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
217
|
+
model = models.CreateReceiverDetailWithDataRequest()
|
|
218
|
+
model.from_json_string(json.dumps(args))
|
|
219
|
+
start_time = time.time()
|
|
220
|
+
while True:
|
|
221
|
+
rsp = client.CreateReceiverDetailWithData(model)
|
|
222
|
+
result = rsp.to_json_string()
|
|
223
|
+
try:
|
|
224
|
+
json_obj = json.loads(result)
|
|
225
|
+
except TypeError as e:
|
|
226
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
227
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
228
|
+
break
|
|
229
|
+
cur_time = time.time()
|
|
230
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
231
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
232
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
233
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
234
|
+
else:
|
|
235
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
236
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
237
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
238
|
+
|
|
239
|
+
|
|
185
240
|
def doGetSendEmailStatus(args, parsed_globals):
|
|
186
241
|
g_param = parse_global_arg(parsed_globals)
|
|
187
242
|
|
|
@@ -237,6 +292,61 @@ def doGetSendEmailStatus(args, parsed_globals):
|
|
|
237
292
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
238
293
|
|
|
239
294
|
|
|
295
|
+
def doListReceiverDetails(args, parsed_globals):
|
|
296
|
+
g_param = parse_global_arg(parsed_globals)
|
|
297
|
+
|
|
298
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
299
|
+
cred = credential.CVMRoleCredential()
|
|
300
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
301
|
+
cred = credential.STSAssumeRoleCredential(
|
|
302
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
303
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
304
|
+
)
|
|
305
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
306
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
307
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
308
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
309
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
310
|
+
else:
|
|
311
|
+
cred = credential.Credential(
|
|
312
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
313
|
+
)
|
|
314
|
+
http_profile = HttpProfile(
|
|
315
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
316
|
+
reqMethod="POST",
|
|
317
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
318
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
319
|
+
)
|
|
320
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
321
|
+
if g_param[OptionsDefine.Language]:
|
|
322
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
323
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
324
|
+
client = mod.SesClient(cred, g_param[OptionsDefine.Region], profile)
|
|
325
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
326
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
327
|
+
model = models.ListReceiverDetailsRequest()
|
|
328
|
+
model.from_json_string(json.dumps(args))
|
|
329
|
+
start_time = time.time()
|
|
330
|
+
while True:
|
|
331
|
+
rsp = client.ListReceiverDetails(model)
|
|
332
|
+
result = rsp.to_json_string()
|
|
333
|
+
try:
|
|
334
|
+
json_obj = json.loads(result)
|
|
335
|
+
except TypeError as e:
|
|
336
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
337
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
338
|
+
break
|
|
339
|
+
cur_time = time.time()
|
|
340
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
341
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
342
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
343
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
344
|
+
else:
|
|
345
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
346
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
347
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
348
|
+
|
|
349
|
+
|
|
240
350
|
def doCreateReceiver(args, parsed_globals):
|
|
241
351
|
g_param = parse_global_arg(parsed_globals)
|
|
242
352
|
|
|
@@ -292,6 +402,61 @@ def doCreateReceiver(args, parsed_globals):
|
|
|
292
402
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
293
403
|
|
|
294
404
|
|
|
405
|
+
def doGetEmailTemplate(args, parsed_globals):
|
|
406
|
+
g_param = parse_global_arg(parsed_globals)
|
|
407
|
+
|
|
408
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
409
|
+
cred = credential.CVMRoleCredential()
|
|
410
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
411
|
+
cred = credential.STSAssumeRoleCredential(
|
|
412
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
413
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
414
|
+
)
|
|
415
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
416
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
417
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
418
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
419
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
420
|
+
else:
|
|
421
|
+
cred = credential.Credential(
|
|
422
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
423
|
+
)
|
|
424
|
+
http_profile = HttpProfile(
|
|
425
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
426
|
+
reqMethod="POST",
|
|
427
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
428
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
429
|
+
)
|
|
430
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
431
|
+
if g_param[OptionsDefine.Language]:
|
|
432
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
433
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
434
|
+
client = mod.SesClient(cred, g_param[OptionsDefine.Region], profile)
|
|
435
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
436
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
437
|
+
model = models.GetEmailTemplateRequest()
|
|
438
|
+
model.from_json_string(json.dumps(args))
|
|
439
|
+
start_time = time.time()
|
|
440
|
+
while True:
|
|
441
|
+
rsp = client.GetEmailTemplate(model)
|
|
442
|
+
result = rsp.to_json_string()
|
|
443
|
+
try:
|
|
444
|
+
json_obj = json.loads(result)
|
|
445
|
+
except TypeError as e:
|
|
446
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
447
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
448
|
+
break
|
|
449
|
+
cur_time = time.time()
|
|
450
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
451
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
452
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
453
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
454
|
+
else:
|
|
455
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
456
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
457
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
458
|
+
|
|
459
|
+
|
|
295
460
|
def doGetEmailIdentity(args, parsed_globals):
|
|
296
461
|
g_param = parse_global_arg(parsed_globals)
|
|
297
462
|
|
|
@@ -347,7 +512,7 @@ def doGetEmailIdentity(args, parsed_globals):
|
|
|
347
512
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
348
513
|
|
|
349
514
|
|
|
350
|
-
def
|
|
515
|
+
def doUpdateCustomBlackList(args, parsed_globals):
|
|
351
516
|
g_param = parse_global_arg(parsed_globals)
|
|
352
517
|
|
|
353
518
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -379,11 +544,11 @@ def doGetEmailTemplate(args, parsed_globals):
|
|
|
379
544
|
client = mod.SesClient(cred, g_param[OptionsDefine.Region], profile)
|
|
380
545
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
381
546
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
382
|
-
model = models.
|
|
547
|
+
model = models.UpdateCustomBlackListRequest()
|
|
383
548
|
model.from_json_string(json.dumps(args))
|
|
384
549
|
start_time = time.time()
|
|
385
550
|
while True:
|
|
386
|
-
rsp = client.
|
|
551
|
+
rsp = client.UpdateCustomBlackList(model)
|
|
387
552
|
result = rsp.to_json_string()
|
|
388
553
|
try:
|
|
389
554
|
json_obj = json.loads(result)
|
|
@@ -402,7 +567,7 @@ def doGetEmailTemplate(args, parsed_globals):
|
|
|
402
567
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
403
568
|
|
|
404
569
|
|
|
405
|
-
def
|
|
570
|
+
def doListBlackEmailAddress(args, parsed_globals):
|
|
406
571
|
g_param = parse_global_arg(parsed_globals)
|
|
407
572
|
|
|
408
573
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -434,11 +599,11 @@ def doGetStatisticsReport(args, parsed_globals):
|
|
|
434
599
|
client = mod.SesClient(cred, g_param[OptionsDefine.Region], profile)
|
|
435
600
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
436
601
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
437
|
-
model = models.
|
|
602
|
+
model = models.ListBlackEmailAddressRequest()
|
|
438
603
|
model.from_json_string(json.dumps(args))
|
|
439
604
|
start_time = time.time()
|
|
440
605
|
while True:
|
|
441
|
-
rsp = client.
|
|
606
|
+
rsp = client.ListBlackEmailAddress(model)
|
|
442
607
|
result = rsp.to_json_string()
|
|
443
608
|
try:
|
|
444
609
|
json_obj = json.loads(result)
|
|
@@ -1007,6 +1172,61 @@ def doUpdateAddressUnsubscribeConfig(args, parsed_globals):
|
|
|
1007
1172
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1008
1173
|
|
|
1009
1174
|
|
|
1175
|
+
def doCreateCustomBlacklist(args, parsed_globals):
|
|
1176
|
+
g_param = parse_global_arg(parsed_globals)
|
|
1177
|
+
|
|
1178
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
1179
|
+
cred = credential.CVMRoleCredential()
|
|
1180
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
1181
|
+
cred = credential.STSAssumeRoleCredential(
|
|
1182
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
1183
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
1184
|
+
)
|
|
1185
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
1186
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
1187
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
1188
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
1189
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
1190
|
+
else:
|
|
1191
|
+
cred = credential.Credential(
|
|
1192
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
1193
|
+
)
|
|
1194
|
+
http_profile = HttpProfile(
|
|
1195
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
1196
|
+
reqMethod="POST",
|
|
1197
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
1198
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
1199
|
+
)
|
|
1200
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
1201
|
+
if g_param[OptionsDefine.Language]:
|
|
1202
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
1203
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
1204
|
+
client = mod.SesClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1205
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
1206
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1207
|
+
model = models.CreateCustomBlacklistRequest()
|
|
1208
|
+
model.from_json_string(json.dumps(args))
|
|
1209
|
+
start_time = time.time()
|
|
1210
|
+
while True:
|
|
1211
|
+
rsp = client.CreateCustomBlacklist(model)
|
|
1212
|
+
result = rsp.to_json_string()
|
|
1213
|
+
try:
|
|
1214
|
+
json_obj = json.loads(result)
|
|
1215
|
+
except TypeError as e:
|
|
1216
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
1217
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
1218
|
+
break
|
|
1219
|
+
cur_time = time.time()
|
|
1220
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
1221
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
1222
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
1223
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
1224
|
+
else:
|
|
1225
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
1226
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
1227
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1228
|
+
|
|
1229
|
+
|
|
1010
1230
|
def doDeleteEmailTemplate(args, parsed_globals):
|
|
1011
1231
|
g_param = parse_global_arg(parsed_globals)
|
|
1012
1232
|
|
|
@@ -1282,6 +1502,61 @@ def doCreateEmailTemplate(args, parsed_globals):
|
|
|
1282
1502
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1283
1503
|
|
|
1284
1504
|
|
|
1505
|
+
def doDeleteCustomBlackList(args, parsed_globals):
|
|
1506
|
+
g_param = parse_global_arg(parsed_globals)
|
|
1507
|
+
|
|
1508
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
1509
|
+
cred = credential.CVMRoleCredential()
|
|
1510
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
1511
|
+
cred = credential.STSAssumeRoleCredential(
|
|
1512
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
1513
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
1514
|
+
)
|
|
1515
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
1516
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
1517
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
1518
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
1519
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
1520
|
+
else:
|
|
1521
|
+
cred = credential.Credential(
|
|
1522
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
1523
|
+
)
|
|
1524
|
+
http_profile = HttpProfile(
|
|
1525
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
1526
|
+
reqMethod="POST",
|
|
1527
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
1528
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
1529
|
+
)
|
|
1530
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
1531
|
+
if g_param[OptionsDefine.Language]:
|
|
1532
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
1533
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
1534
|
+
client = mod.SesClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1535
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
1536
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1537
|
+
model = models.DeleteCustomBlackListRequest()
|
|
1538
|
+
model.from_json_string(json.dumps(args))
|
|
1539
|
+
start_time = time.time()
|
|
1540
|
+
while True:
|
|
1541
|
+
rsp = client.DeleteCustomBlackList(model)
|
|
1542
|
+
result = rsp.to_json_string()
|
|
1543
|
+
try:
|
|
1544
|
+
json_obj = json.loads(result)
|
|
1545
|
+
except TypeError as e:
|
|
1546
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
1547
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
1548
|
+
break
|
|
1549
|
+
cur_time = time.time()
|
|
1550
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
1551
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
1552
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
1553
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
1554
|
+
else:
|
|
1555
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
1556
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
1557
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1558
|
+
|
|
1559
|
+
|
|
1285
1560
|
def doListSendTasks(args, parsed_globals):
|
|
1286
1561
|
g_param = parse_global_arg(parsed_globals)
|
|
1287
1562
|
|
|
@@ -1392,7 +1667,7 @@ def doSendEmail(args, parsed_globals):
|
|
|
1392
1667
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1393
1668
|
|
|
1394
1669
|
|
|
1395
|
-
def
|
|
1670
|
+
def doListCustomBlacklist(args, parsed_globals):
|
|
1396
1671
|
g_param = parse_global_arg(parsed_globals)
|
|
1397
1672
|
|
|
1398
1673
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -1424,11 +1699,66 @@ def doListBlackEmailAddress(args, parsed_globals):
|
|
|
1424
1699
|
client = mod.SesClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1425
1700
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
1426
1701
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1427
|
-
model = models.
|
|
1702
|
+
model = models.ListCustomBlacklistRequest()
|
|
1428
1703
|
model.from_json_string(json.dumps(args))
|
|
1429
1704
|
start_time = time.time()
|
|
1430
1705
|
while True:
|
|
1431
|
-
rsp = client.
|
|
1706
|
+
rsp = client.ListCustomBlacklist(model)
|
|
1707
|
+
result = rsp.to_json_string()
|
|
1708
|
+
try:
|
|
1709
|
+
json_obj = json.loads(result)
|
|
1710
|
+
except TypeError as e:
|
|
1711
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
1712
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
1713
|
+
break
|
|
1714
|
+
cur_time = time.time()
|
|
1715
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
1716
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
1717
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
1718
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
1719
|
+
else:
|
|
1720
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
1721
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
1722
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1723
|
+
|
|
1724
|
+
|
|
1725
|
+
def doGetStatisticsReport(args, parsed_globals):
|
|
1726
|
+
g_param = parse_global_arg(parsed_globals)
|
|
1727
|
+
|
|
1728
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
1729
|
+
cred = credential.CVMRoleCredential()
|
|
1730
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
1731
|
+
cred = credential.STSAssumeRoleCredential(
|
|
1732
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
1733
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
1734
|
+
)
|
|
1735
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) \
|
|
1736
|
+
and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) \
|
|
1737
|
+
and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) \
|
|
1738
|
+
and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
|
1739
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
1740
|
+
else:
|
|
1741
|
+
cred = credential.Credential(
|
|
1742
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
1743
|
+
)
|
|
1744
|
+
http_profile = HttpProfile(
|
|
1745
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
1746
|
+
reqMethod="POST",
|
|
1747
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
1748
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
1749
|
+
)
|
|
1750
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="TC3-HMAC-SHA256")
|
|
1751
|
+
if g_param[OptionsDefine.Language]:
|
|
1752
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
1753
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
1754
|
+
client = mod.SesClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1755
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
1756
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1757
|
+
model = models.GetStatisticsReportRequest()
|
|
1758
|
+
model.from_json_string(json.dumps(args))
|
|
1759
|
+
start_time = time.time()
|
|
1760
|
+
while True:
|
|
1761
|
+
rsp = client.GetStatisticsReport(model)
|
|
1432
1762
|
result = rsp.to_json_string()
|
|
1433
1763
|
try:
|
|
1434
1764
|
json_obj = json.loads(result)
|
|
@@ -1626,11 +1956,14 @@ ACTION_MAP = {
|
|
|
1626
1956
|
"ListEmailIdentities": doListEmailIdentities,
|
|
1627
1957
|
"CreateEmailAddress": doCreateEmailAddress,
|
|
1628
1958
|
"CreateEmailIdentity": doCreateEmailIdentity,
|
|
1959
|
+
"CreateReceiverDetailWithData": doCreateReceiverDetailWithData,
|
|
1629
1960
|
"GetSendEmailStatus": doGetSendEmailStatus,
|
|
1961
|
+
"ListReceiverDetails": doListReceiverDetails,
|
|
1630
1962
|
"CreateReceiver": doCreateReceiver,
|
|
1631
|
-
"GetEmailIdentity": doGetEmailIdentity,
|
|
1632
1963
|
"GetEmailTemplate": doGetEmailTemplate,
|
|
1633
|
-
"
|
|
1964
|
+
"GetEmailIdentity": doGetEmailIdentity,
|
|
1965
|
+
"UpdateCustomBlackList": doUpdateCustomBlackList,
|
|
1966
|
+
"ListBlackEmailAddress": doListBlackEmailAddress,
|
|
1634
1967
|
"ListAddressUnsubscribeConfig": doListAddressUnsubscribeConfig,
|
|
1635
1968
|
"UpdateEmailTemplate": doUpdateEmailTemplate,
|
|
1636
1969
|
"UpdateEmailIdentity": doUpdateEmailIdentity,
|
|
@@ -1641,14 +1974,17 @@ ACTION_MAP = {
|
|
|
1641
1974
|
"BatchSendEmail": doBatchSendEmail,
|
|
1642
1975
|
"UpdateEmailSmtpPassWord": doUpdateEmailSmtpPassWord,
|
|
1643
1976
|
"UpdateAddressUnsubscribeConfig": doUpdateAddressUnsubscribeConfig,
|
|
1977
|
+
"CreateCustomBlacklist": doCreateCustomBlacklist,
|
|
1644
1978
|
"DeleteEmailTemplate": doDeleteEmailTemplate,
|
|
1645
1979
|
"DeleteAddressUnsubscribeConfig": doDeleteAddressUnsubscribeConfig,
|
|
1646
1980
|
"ListEmailTemplates": doListEmailTemplates,
|
|
1647
1981
|
"DeleteBlackList": doDeleteBlackList,
|
|
1648
1982
|
"CreateEmailTemplate": doCreateEmailTemplate,
|
|
1983
|
+
"DeleteCustomBlackList": doDeleteCustomBlackList,
|
|
1649
1984
|
"ListSendTasks": doListSendTasks,
|
|
1650
1985
|
"SendEmail": doSendEmail,
|
|
1651
|
-
"
|
|
1986
|
+
"ListCustomBlacklist": doListCustomBlacklist,
|
|
1987
|
+
"GetStatisticsReport": doGetStatisticsReport,
|
|
1652
1988
|
"CreateReceiverDetail": doCreateReceiverDetail,
|
|
1653
1989
|
"ListReceivers": doListReceivers,
|
|
1654
1990
|
"DeleteEmailAddress": doDeleteEmailAddress,
|