tccli 3.0.1139.1__py2.py3-none-any.whl → 3.0.1141.1__py2.py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- tccli/__init__.py +1 -1
- tccli/services/cynosdb/v20190107/api.json +113 -33
- tccli/services/cynosdb/v20190107/examples.json +3 -3
- tccli/services/domain/v20180808/api.json +30 -30
- tccli/services/emr/v20190103/api.json +11 -2
- tccli/services/ess/v20201111/api.json +23 -14
- tccli/services/ess/v20201111/examples.json +4 -4
- tccli/services/essbasic/v20210526/api.json +13 -13
- tccli/services/essbasic/v20210526/examples.json +2 -2
- tccli/services/iotexplorer/v20190423/api.json +49 -0
- tccli/services/iss/iss_client.py +114 -8
- tccli/services/iss/v20230517/api.json +221 -0
- tccli/services/iss/v20230517/examples.json +16 -0
- tccli/services/mmps/v20200710/api.json +3 -3
- tccli/services/monitor/v20180724/api.json +1 -1
- tccli/services/scf/v20180416/api.json +10 -10
- tccli/services/ses/ses_client.py +228 -16
- tccli/services/ses/v20201002/api.json +266 -0
- tccli/services/ses/v20201002/examples.json +32 -0
- tccli/services/ssl/v20191205/api.json +76 -25
- tccli/services/ssl/v20191205/examples.json +3 -3
- tccli/services/tcr/v20190924/api.json +5 -1
- tccli/services/tcr/v20190924/examples.json +1 -1
- tccli/services/tdmq/v20200217/api.json +2 -2
- tccli/services/vpc/v20170312/api.json +2086 -217
- tccli/services/vpc/v20170312/examples.json +151 -1
- tccli/services/vpc/vpc_client.py +1180 -226
- tccli/services/waf/v20180125/api.json +0 -43
- tccli/services/waf/v20180125/examples.json +0 -8
- tccli/services/waf/waf_client.py +0 -53
- tccli/services/wedata/v20210820/api.json +360 -0
- tccli/services/wedata/v20210820/examples.json +28 -0
- tccli/services/wedata/wedata_client.py +114 -8
- {tccli-3.0.1139.1.dist-info → tccli-3.0.1141.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1139.1.dist-info → tccli-3.0.1141.1.dist-info}/RECORD +38 -38
- {tccli-3.0.1139.1.dist-info → tccli-3.0.1141.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1139.1.dist-info → tccli-3.0.1141.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1139.1.dist-info → tccli-3.0.1141.1.dist-info}/license_files/LICENSE +0 -0
tccli/services/ses/ses_client.py
CHANGED
@@ -433,7 +433,7 @@ def doGetEmailTemplate(args, parsed_globals):
|
|
433
433
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
434
434
|
|
435
435
|
|
436
|
-
def
|
436
|
+
def doUpdateCustomBlackList(args, parsed_globals):
|
437
437
|
g_param = parse_global_arg(parsed_globals)
|
438
438
|
|
439
439
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -462,11 +462,63 @@ def doGetStatisticsReport(args, parsed_globals):
|
|
462
462
|
client = mod.SesClient(cred, g_param[OptionsDefine.Region], profile)
|
463
463
|
client._sdkVersion += ("_CLI_" + __version__)
|
464
464
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
465
|
-
model = models.
|
465
|
+
model = models.UpdateCustomBlackListRequest()
|
466
466
|
model.from_json_string(json.dumps(args))
|
467
467
|
start_time = time.time()
|
468
468
|
while True:
|
469
|
-
rsp = client.
|
469
|
+
rsp = client.UpdateCustomBlackList(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 doListBlackEmailAddress(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('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
497
|
+
)
|
498
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
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.SesClient(cred, g_param[OptionsDefine.Region], profile)
|
515
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
516
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
517
|
+
model = models.ListBlackEmailAddressRequest()
|
518
|
+
model.from_json_string(json.dumps(args))
|
519
|
+
start_time = time.time()
|
520
|
+
while True:
|
521
|
+
rsp = client.ListBlackEmailAddress(model)
|
470
522
|
result = rsp.to_json_string()
|
471
523
|
try:
|
472
524
|
json_obj = json.loads(result)
|
@@ -901,6 +953,58 @@ def doUpdateEmailSmtpPassWord(args, parsed_globals):
|
|
901
953
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
902
954
|
|
903
955
|
|
956
|
+
def doCreateCustomBlacklist(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('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
965
|
+
)
|
966
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
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.SesClient(cred, g_param[OptionsDefine.Region], profile)
|
983
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
984
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
985
|
+
model = models.CreateCustomBlacklistRequest()
|
986
|
+
model.from_json_string(json.dumps(args))
|
987
|
+
start_time = time.time()
|
988
|
+
while True:
|
989
|
+
rsp = client.CreateCustomBlacklist(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
|
+
|
904
1008
|
def doDeleteEmailTemplate(args, parsed_globals):
|
905
1009
|
g_param = parse_global_arg(parsed_globals)
|
906
1010
|
|
@@ -1005,7 +1109,7 @@ def doListEmailTemplates(args, parsed_globals):
|
|
1005
1109
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1006
1110
|
|
1007
1111
|
|
1008
|
-
def
|
1112
|
+
def doDeleteBlackList(args, parsed_globals):
|
1009
1113
|
g_param = parse_global_arg(parsed_globals)
|
1010
1114
|
|
1011
1115
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1034,11 +1138,11 @@ def doListSendTasks(args, parsed_globals):
|
|
1034
1138
|
client = mod.SesClient(cred, g_param[OptionsDefine.Region], profile)
|
1035
1139
|
client._sdkVersion += ("_CLI_" + __version__)
|
1036
1140
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1037
|
-
model = models.
|
1141
|
+
model = models.DeleteBlackListRequest()
|
1038
1142
|
model.from_json_string(json.dumps(args))
|
1039
1143
|
start_time = time.time()
|
1040
1144
|
while True:
|
1041
|
-
rsp = client.
|
1145
|
+
rsp = client.DeleteBlackList(model)
|
1042
1146
|
result = rsp.to_json_string()
|
1043
1147
|
try:
|
1044
1148
|
json_obj = json.loads(result)
|
@@ -1109,7 +1213,7 @@ def doCreateEmailTemplate(args, parsed_globals):
|
|
1109
1213
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1110
1214
|
|
1111
1215
|
|
1112
|
-
def
|
1216
|
+
def doDeleteCustomBlackList(args, parsed_globals):
|
1113
1217
|
g_param = parse_global_arg(parsed_globals)
|
1114
1218
|
|
1115
1219
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1138,11 +1242,63 @@ def doDeleteBlackList(args, parsed_globals):
|
|
1138
1242
|
client = mod.SesClient(cred, g_param[OptionsDefine.Region], profile)
|
1139
1243
|
client._sdkVersion += ("_CLI_" + __version__)
|
1140
1244
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1141
|
-
model = models.
|
1245
|
+
model = models.DeleteCustomBlackListRequest()
|
1142
1246
|
model.from_json_string(json.dumps(args))
|
1143
1247
|
start_time = time.time()
|
1144
1248
|
while True:
|
1145
|
-
rsp = client.
|
1249
|
+
rsp = client.DeleteCustomBlackList(model)
|
1250
|
+
result = rsp.to_json_string()
|
1251
|
+
try:
|
1252
|
+
json_obj = json.loads(result)
|
1253
|
+
except TypeError as e:
|
1254
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1255
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1256
|
+
break
|
1257
|
+
cur_time = time.time()
|
1258
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1259
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1260
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1261
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1262
|
+
else:
|
1263
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1264
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1265
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1266
|
+
|
1267
|
+
|
1268
|
+
def doListSendTasks(args, parsed_globals):
|
1269
|
+
g_param = parse_global_arg(parsed_globals)
|
1270
|
+
|
1271
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1272
|
+
cred = credential.CVMRoleCredential()
|
1273
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1274
|
+
cred = credential.STSAssumeRoleCredential(
|
1275
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1276
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1277
|
+
)
|
1278
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
1279
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1280
|
+
else:
|
1281
|
+
cred = credential.Credential(
|
1282
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1283
|
+
)
|
1284
|
+
http_profile = HttpProfile(
|
1285
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1286
|
+
reqMethod="POST",
|
1287
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
1288
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1289
|
+
)
|
1290
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1291
|
+
if g_param[OptionsDefine.Language]:
|
1292
|
+
profile.language = g_param[OptionsDefine.Language]
|
1293
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1294
|
+
client = mod.SesClient(cred, g_param[OptionsDefine.Region], profile)
|
1295
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1296
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1297
|
+
model = models.ListSendTasksRequest()
|
1298
|
+
model.from_json_string(json.dumps(args))
|
1299
|
+
start_time = time.time()
|
1300
|
+
while True:
|
1301
|
+
rsp = client.ListSendTasks(model)
|
1146
1302
|
result = rsp.to_json_string()
|
1147
1303
|
try:
|
1148
1304
|
json_obj = json.loads(result)
|
@@ -1213,7 +1369,7 @@ def doSendEmail(args, parsed_globals):
|
|
1213
1369
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1214
1370
|
|
1215
1371
|
|
1216
|
-
def
|
1372
|
+
def doListCustomBlacklist(args, parsed_globals):
|
1217
1373
|
g_param = parse_global_arg(parsed_globals)
|
1218
1374
|
|
1219
1375
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1242,11 +1398,63 @@ def doListBlackEmailAddress(args, parsed_globals):
|
|
1242
1398
|
client = mod.SesClient(cred, g_param[OptionsDefine.Region], profile)
|
1243
1399
|
client._sdkVersion += ("_CLI_" + __version__)
|
1244
1400
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1245
|
-
model = models.
|
1401
|
+
model = models.ListCustomBlacklistRequest()
|
1246
1402
|
model.from_json_string(json.dumps(args))
|
1247
1403
|
start_time = time.time()
|
1248
1404
|
while True:
|
1249
|
-
rsp = client.
|
1405
|
+
rsp = client.ListCustomBlacklist(model)
|
1406
|
+
result = rsp.to_json_string()
|
1407
|
+
try:
|
1408
|
+
json_obj = json.loads(result)
|
1409
|
+
except TypeError as e:
|
1410
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1411
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1412
|
+
break
|
1413
|
+
cur_time = time.time()
|
1414
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1415
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1416
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1417
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1418
|
+
else:
|
1419
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1420
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1421
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1422
|
+
|
1423
|
+
|
1424
|
+
def doGetStatisticsReport(args, parsed_globals):
|
1425
|
+
g_param = parse_global_arg(parsed_globals)
|
1426
|
+
|
1427
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1428
|
+
cred = credential.CVMRoleCredential()
|
1429
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1430
|
+
cred = credential.STSAssumeRoleCredential(
|
1431
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1432
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1433
|
+
)
|
1434
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
1435
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1436
|
+
else:
|
1437
|
+
cred = credential.Credential(
|
1438
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1439
|
+
)
|
1440
|
+
http_profile = HttpProfile(
|
1441
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1442
|
+
reqMethod="POST",
|
1443
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
1444
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1445
|
+
)
|
1446
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1447
|
+
if g_param[OptionsDefine.Language]:
|
1448
|
+
profile.language = g_param[OptionsDefine.Language]
|
1449
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1450
|
+
client = mod.SesClient(cred, g_param[OptionsDefine.Region], profile)
|
1451
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1452
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1453
|
+
model = models.GetStatisticsReportRequest()
|
1454
|
+
model.from_json_string(json.dumps(args))
|
1455
|
+
start_time = time.time()
|
1456
|
+
while True:
|
1457
|
+
rsp = client.GetStatisticsReport(model)
|
1250
1458
|
result = rsp.to_json_string()
|
1251
1459
|
try:
|
1252
1460
|
json_obj = json.loads(result)
|
@@ -1440,7 +1648,8 @@ ACTION_MAP = {
|
|
1440
1648
|
"CreateReceiver": doCreateReceiver,
|
1441
1649
|
"GetEmailIdentity": doGetEmailIdentity,
|
1442
1650
|
"GetEmailTemplate": doGetEmailTemplate,
|
1443
|
-
"
|
1651
|
+
"UpdateCustomBlackList": doUpdateCustomBlackList,
|
1652
|
+
"ListBlackEmailAddress": doListBlackEmailAddress,
|
1444
1653
|
"UpdateEmailTemplate": doUpdateEmailTemplate,
|
1445
1654
|
"UpdateEmailIdentity": doUpdateEmailIdentity,
|
1446
1655
|
"DeleteEmailIdentity": doDeleteEmailIdentity,
|
@@ -1449,13 +1658,16 @@ ACTION_MAP = {
|
|
1449
1658
|
"CreateEmailIdentity": doCreateEmailIdentity,
|
1450
1659
|
"BatchSendEmail": doBatchSendEmail,
|
1451
1660
|
"UpdateEmailSmtpPassWord": doUpdateEmailSmtpPassWord,
|
1661
|
+
"CreateCustomBlacklist": doCreateCustomBlacklist,
|
1452
1662
|
"DeleteEmailTemplate": doDeleteEmailTemplate,
|
1453
1663
|
"ListEmailTemplates": doListEmailTemplates,
|
1454
|
-
"ListSendTasks": doListSendTasks,
|
1455
|
-
"CreateEmailTemplate": doCreateEmailTemplate,
|
1456
1664
|
"DeleteBlackList": doDeleteBlackList,
|
1665
|
+
"CreateEmailTemplate": doCreateEmailTemplate,
|
1666
|
+
"DeleteCustomBlackList": doDeleteCustomBlackList,
|
1667
|
+
"ListSendTasks": doListSendTasks,
|
1457
1668
|
"SendEmail": doSendEmail,
|
1458
|
-
"
|
1669
|
+
"ListCustomBlacklist": doListCustomBlacklist,
|
1670
|
+
"GetStatisticsReport": doGetStatisticsReport,
|
1459
1671
|
"CreateReceiverDetail": doCreateReceiverDetail,
|
1460
1672
|
"ListReceivers": doListReceivers,
|
1461
1673
|
"DeleteEmailAddress": doDeleteEmailAddress,
|
@@ -7,6 +7,13 @@
|
|
7
7
|
"output": "BatchSendEmailResponse",
|
8
8
|
"status": "online"
|
9
9
|
},
|
10
|
+
"CreateCustomBlacklist": {
|
11
|
+
"document": "添加自定义黑名单",
|
12
|
+
"input": "CreateCustomBlacklistRequest",
|
13
|
+
"name": "批量增加自定义黑名单",
|
14
|
+
"output": "CreateCustomBlacklistResponse",
|
15
|
+
"status": "online"
|
16
|
+
},
|
10
17
|
"CreateEmailAddress": {
|
11
18
|
"document": "在验证了发信域名之后,您需要一个发信地址来发送邮件。例如发信域名是mail.qcloud.com,那么发信地址可以为 service@mail.qcloud.com。如果您想要收件人在收件箱列表中显示您的别名,例如\"腾讯云邮件通知\"。那么发信地址为: 别名 空格 尖括号 邮箱地址。请注意中间需要有空格",
|
12
19
|
"input": "CreateEmailAddressRequest",
|
@@ -56,6 +63,13 @@
|
|
56
63
|
"output": "DeleteBlackListResponse",
|
57
64
|
"status": "online"
|
58
65
|
},
|
66
|
+
"DeleteCustomBlackList": {
|
67
|
+
"document": "删除自定义黑名单邮箱地址",
|
68
|
+
"input": "DeleteCustomBlackListRequest",
|
69
|
+
"name": "删除自定义黑名单",
|
70
|
+
"output": "DeleteCustomBlackListResponse",
|
71
|
+
"status": "online"
|
72
|
+
},
|
59
73
|
"DeleteEmailAddress": {
|
60
74
|
"document": "删除发信人地址",
|
61
75
|
"input": "DeleteEmailAddressRequest",
|
@@ -119,6 +133,13 @@
|
|
119
133
|
"output": "ListBlackEmailAddressResponse",
|
120
134
|
"status": "online"
|
121
135
|
},
|
136
|
+
"ListCustomBlacklist": {
|
137
|
+
"document": "获取自定义黑名单列表",
|
138
|
+
"input": "ListCustomBlacklistRequest",
|
139
|
+
"name": "获取自定义黑名单列表",
|
140
|
+
"output": "ListCustomBlacklistResponse",
|
141
|
+
"status": "online"
|
142
|
+
},
|
122
143
|
"ListEmailAddress": {
|
123
144
|
"document": "获取发信地址列表",
|
124
145
|
"input": "ListEmailAddressRequest",
|
@@ -168,6 +189,13 @@
|
|
168
189
|
"output": "SendEmailResponse",
|
169
190
|
"status": "online"
|
170
191
|
},
|
192
|
+
"UpdateCustomBlackList": {
|
193
|
+
"document": "更新自定义黑名单",
|
194
|
+
"input": "UpdateCustomBlackListRequest",
|
195
|
+
"name": "更新自定义黑名单",
|
196
|
+
"output": "UpdateCustomBlackListResponse",
|
197
|
+
"status": "online"
|
198
|
+
},
|
171
199
|
"UpdateEmailIdentity": {
|
172
200
|
"document": "您已经成功配置好了您的DNS,接下来请求腾讯云验证您的DNS配置是否正确",
|
173
201
|
"input": "UpdateEmailIdentityRequest",
|
@@ -357,6 +385,62 @@
|
|
357
385
|
],
|
358
386
|
"type": "object"
|
359
387
|
},
|
388
|
+
"BlackAddressDetail": {
|
389
|
+
"document": "黑名单详情",
|
390
|
+
"members": [
|
391
|
+
{
|
392
|
+
"disabled": false,
|
393
|
+
"document": "黑名单地址id\n注意:此字段可能返回 null,表示取不到有效值。",
|
394
|
+
"example": "1",
|
395
|
+
"member": "uint64",
|
396
|
+
"name": "Id",
|
397
|
+
"output_required": false,
|
398
|
+
"type": "int",
|
399
|
+
"value_allowed_null": true
|
400
|
+
},
|
401
|
+
{
|
402
|
+
"disabled": false,
|
403
|
+
"document": "邮箱地址\n注意:此字段可能返回 null,表示取不到有效值。",
|
404
|
+
"example": "a@mail.com",
|
405
|
+
"member": "string",
|
406
|
+
"name": "Email",
|
407
|
+
"output_required": false,
|
408
|
+
"type": "string",
|
409
|
+
"value_allowed_null": true
|
410
|
+
},
|
411
|
+
{
|
412
|
+
"disabled": false,
|
413
|
+
"document": "创建时间\n注意:此字段可能返回 null,表示取不到有效值。",
|
414
|
+
"example": "无",
|
415
|
+
"member": "string",
|
416
|
+
"name": "CreateTime",
|
417
|
+
"output_required": false,
|
418
|
+
"type": "string",
|
419
|
+
"value_allowed_null": true
|
420
|
+
},
|
421
|
+
{
|
422
|
+
"disabled": false,
|
423
|
+
"document": "过期时间\n注意:此字段可能返回 null,表示取不到有效值。",
|
424
|
+
"example": "2024-06-19",
|
425
|
+
"member": "string",
|
426
|
+
"name": "ExpireDate",
|
427
|
+
"output_required": false,
|
428
|
+
"type": "string",
|
429
|
+
"value_allowed_null": true
|
430
|
+
},
|
431
|
+
{
|
432
|
+
"disabled": false,
|
433
|
+
"document": "黑名单状态,0:已过期,1:生效中\n注意:此字段可能返回 null,表示取不到有效值。",
|
434
|
+
"example": "1",
|
435
|
+
"member": "uint64",
|
436
|
+
"name": "Status",
|
437
|
+
"output_required": false,
|
438
|
+
"type": "int",
|
439
|
+
"value_allowed_null": true
|
440
|
+
}
|
441
|
+
],
|
442
|
+
"usage": "out"
|
443
|
+
},
|
360
444
|
"BlackEmailAddress": {
|
361
445
|
"document": "邮箱黑名单结构,包含被拉黑的邮箱地址和被拉黑时间,以及被拉黑的理由",
|
362
446
|
"members": [
|
@@ -393,6 +477,42 @@
|
|
393
477
|
],
|
394
478
|
"usage": "out"
|
395
479
|
},
|
480
|
+
"CreateCustomBlacklistRequest": {
|
481
|
+
"document": "CreateCustomBlacklist请求参数结构体",
|
482
|
+
"members": [
|
483
|
+
{
|
484
|
+
"disabled": false,
|
485
|
+
"document": "添加到黑名单的邮件地址",
|
486
|
+
"example": "[ \"a@gmail.com\" , \"b@gmail.com\"]",
|
487
|
+
"member": "string",
|
488
|
+
"name": "Emails",
|
489
|
+
"required": true,
|
490
|
+
"type": "list"
|
491
|
+
},
|
492
|
+
{
|
493
|
+
"disabled": false,
|
494
|
+
"document": "过期日期",
|
495
|
+
"example": "\"2024-06-19\"",
|
496
|
+
"member": "date",
|
497
|
+
"name": "ExpireDate",
|
498
|
+
"required": false,
|
499
|
+
"type": "string"
|
500
|
+
}
|
501
|
+
],
|
502
|
+
"type": "object"
|
503
|
+
},
|
504
|
+
"CreateCustomBlacklistResponse": {
|
505
|
+
"document": "CreateCustomBlacklist返回参数结构体",
|
506
|
+
"members": [
|
507
|
+
{
|
508
|
+
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
509
|
+
"member": "string",
|
510
|
+
"name": "RequestId",
|
511
|
+
"type": "string"
|
512
|
+
}
|
513
|
+
],
|
514
|
+
"type": "object"
|
515
|
+
},
|
396
516
|
"CreateEmailAddressRequest": {
|
397
517
|
"document": "CreateEmailAddress请求参数结构体",
|
398
518
|
"members": [
|
@@ -766,6 +886,33 @@
|
|
766
886
|
],
|
767
887
|
"type": "object"
|
768
888
|
},
|
889
|
+
"DeleteCustomBlackListRequest": {
|
890
|
+
"document": "DeleteCustomBlackList请求参数结构体",
|
891
|
+
"members": [
|
892
|
+
{
|
893
|
+
"disabled": false,
|
894
|
+
"document": "需要删除的邮箱地址",
|
895
|
+
"example": "[\"a@mail.com\",\"b@mail.com\"]",
|
896
|
+
"member": "string",
|
897
|
+
"name": "Emails",
|
898
|
+
"required": true,
|
899
|
+
"type": "list"
|
900
|
+
}
|
901
|
+
],
|
902
|
+
"type": "object"
|
903
|
+
},
|
904
|
+
"DeleteCustomBlackListResponse": {
|
905
|
+
"document": "DeleteCustomBlackList返回参数结构体",
|
906
|
+
"members": [
|
907
|
+
{
|
908
|
+
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
909
|
+
"member": "string",
|
910
|
+
"name": "RequestId",
|
911
|
+
"type": "string"
|
912
|
+
}
|
913
|
+
],
|
914
|
+
"type": "object"
|
915
|
+
},
|
769
916
|
"DeleteEmailAddressRequest": {
|
770
917
|
"document": "DeleteEmailAddress请求参数结构体",
|
771
918
|
"members": [
|
@@ -1316,6 +1463,80 @@
|
|
1316
1463
|
],
|
1317
1464
|
"type": "object"
|
1318
1465
|
},
|
1466
|
+
"ListCustomBlacklistRequest": {
|
1467
|
+
"document": "ListCustomBlacklist请求参数结构体",
|
1468
|
+
"members": [
|
1469
|
+
{
|
1470
|
+
"disabled": false,
|
1471
|
+
"document": "偏移量,整型,从0开始",
|
1472
|
+
"example": "1",
|
1473
|
+
"member": "uint64",
|
1474
|
+
"name": "Offset",
|
1475
|
+
"required": true,
|
1476
|
+
"type": "int"
|
1477
|
+
},
|
1478
|
+
{
|
1479
|
+
"disabled": false,
|
1480
|
+
"document": "限制数目,整型,不超过100",
|
1481
|
+
"example": "10",
|
1482
|
+
"member": "uint64",
|
1483
|
+
"name": "Limit",
|
1484
|
+
"required": true,
|
1485
|
+
"type": "int"
|
1486
|
+
},
|
1487
|
+
{
|
1488
|
+
"disabled": false,
|
1489
|
+
"document": "筛选黑名单的状态,0:已过期,1:生效中, 2:全部",
|
1490
|
+
"example": "2",
|
1491
|
+
"member": "uint64",
|
1492
|
+
"name": "Status",
|
1493
|
+
"required": true,
|
1494
|
+
"type": "int"
|
1495
|
+
},
|
1496
|
+
{
|
1497
|
+
"disabled": false,
|
1498
|
+
"document": "黑名单中的邮箱地址",
|
1499
|
+
"example": "a@mail.com",
|
1500
|
+
"member": "string",
|
1501
|
+
"name": "Email",
|
1502
|
+
"required": false,
|
1503
|
+
"type": "string"
|
1504
|
+
}
|
1505
|
+
],
|
1506
|
+
"type": "object"
|
1507
|
+
},
|
1508
|
+
"ListCustomBlacklistResponse": {
|
1509
|
+
"document": "ListCustomBlacklist返回参数结构体",
|
1510
|
+
"members": [
|
1511
|
+
{
|
1512
|
+
"disabled": false,
|
1513
|
+
"document": "列表总数",
|
1514
|
+
"example": "10",
|
1515
|
+
"member": "uint64",
|
1516
|
+
"name": "TotalCount",
|
1517
|
+
"output_required": false,
|
1518
|
+
"type": "int",
|
1519
|
+
"value_allowed_null": false
|
1520
|
+
},
|
1521
|
+
{
|
1522
|
+
"disabled": false,
|
1523
|
+
"document": "黑名单列表详情",
|
1524
|
+
"example": "无",
|
1525
|
+
"member": "BlackAddressDetail",
|
1526
|
+
"name": "Data",
|
1527
|
+
"output_required": false,
|
1528
|
+
"type": "list",
|
1529
|
+
"value_allowed_null": false
|
1530
|
+
},
|
1531
|
+
{
|
1532
|
+
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
1533
|
+
"member": "string",
|
1534
|
+
"name": "RequestId",
|
1535
|
+
"type": "string"
|
1536
|
+
}
|
1537
|
+
],
|
1538
|
+
"type": "object"
|
1539
|
+
},
|
1319
1540
|
"ListEmailAddressRequest": {
|
1320
1541
|
"document": "ListEmailAddress请求参数结构体",
|
1321
1542
|
"members": [],
|
@@ -2391,6 +2612,51 @@
|
|
2391
2612
|
],
|
2392
2613
|
"usage": "in"
|
2393
2614
|
},
|
2615
|
+
"UpdateCustomBlackListRequest": {
|
2616
|
+
"document": "UpdateCustomBlackList请求参数结构体",
|
2617
|
+
"members": [
|
2618
|
+
{
|
2619
|
+
"disabled": false,
|
2620
|
+
"document": "需要更改的黑名单id",
|
2621
|
+
"example": "1",
|
2622
|
+
"member": "uint64",
|
2623
|
+
"name": "Id",
|
2624
|
+
"required": true,
|
2625
|
+
"type": "int"
|
2626
|
+
},
|
2627
|
+
{
|
2628
|
+
"disabled": false,
|
2629
|
+
"document": "修改后的邮件地址",
|
2630
|
+
"example": "a@mail.com",
|
2631
|
+
"member": "string",
|
2632
|
+
"name": "Email",
|
2633
|
+
"required": true,
|
2634
|
+
"type": "string"
|
2635
|
+
},
|
2636
|
+
{
|
2637
|
+
"disabled": false,
|
2638
|
+
"document": "过期时间,为空则表示永久有效",
|
2639
|
+
"example": "2024-06-19",
|
2640
|
+
"member": "string",
|
2641
|
+
"name": "ExpireDate",
|
2642
|
+
"required": false,
|
2643
|
+
"type": "string"
|
2644
|
+
}
|
2645
|
+
],
|
2646
|
+
"type": "object"
|
2647
|
+
},
|
2648
|
+
"UpdateCustomBlackListResponse": {
|
2649
|
+
"document": "UpdateCustomBlackList返回参数结构体",
|
2650
|
+
"members": [
|
2651
|
+
{
|
2652
|
+
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
2653
|
+
"member": "string",
|
2654
|
+
"name": "RequestId",
|
2655
|
+
"type": "string"
|
2656
|
+
}
|
2657
|
+
],
|
2658
|
+
"type": "object"
|
2659
|
+
},
|
2394
2660
|
"UpdateEmailIdentityRequest": {
|
2395
2661
|
"document": "UpdateEmailIdentity请求参数结构体",
|
2396
2662
|
"members": [
|