tccli 3.0.1216.1__py2.py3-none-any.whl → 3.0.1217.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/argparser.py +1 -1
- tccli/command.py +2 -2
- tccli/credentials.py +25 -0
- tccli/main.py +6 -2
- tccli/plugins/sso/__init__.py +61 -0
- tccli/plugins/sso/configs.py +4 -0
- tccli/plugins/sso/configure.py +45 -0
- tccli/plugins/sso/login.py +144 -0
- tccli/plugins/sso/logout.py +21 -0
- tccli/plugins/sso/terminal.py +161 -0
- tccli/plugins/sso/texts.py +40 -0
- tccli/services/__init__.py +6 -0
- tccli/services/acp/v20220105/api.json +7 -7
- tccli/services/acp/v20220105/examples.json +2 -2
- tccli/services/aiart/v20221229/api.json +29 -29
- tccli/services/aiart/v20221229/examples.json +8 -8
- tccli/services/apigateway/v20180808/api.json +18 -17
- tccli/services/apigateway/v20180808/examples.json +12 -12
- tccli/services/apm/v20210622/api.json +98 -4
- tccli/services/asr/v20190614/api.json +18 -17
- tccli/services/asr/v20190614/examples.json +13 -13
- tccli/services/autoscaling/v20180419/api.json +371 -309
- tccli/services/autoscaling/v20180419/examples.json +17 -17
- tccli/services/batch/v20170312/api.json +7 -7
- tccli/services/bda/v20200324/api.json +39 -31
- tccli/services/bda/v20200324/examples.json +9 -9
- tccli/services/bh/__init__.py +4 -0
- tccli/services/bh/bh_client.py +3428 -0
- tccli/services/bh/v20230418/api.json +8180 -0
- tccli/services/bh/v20230418/examples.json +519 -0
- tccli/services/bi/v20220105/api.json +48 -0
- tccli/services/billing/v20180709/api.json +26 -24
- tccli/services/bsca/v20210811/api.json +1 -1
- tccli/services/btoe/v20210514/api.json +4 -4
- tccli/services/btoe/v20210514/examples.json +2 -2
- tccli/services/ca/v20230228/api.json +60 -0
- tccli/services/cam/v20190116/api.json +11 -11
- tccli/services/cat/v20180409/api.json +9 -0
- tccli/services/cbs/v20170312/api.json +200 -188
- tccli/services/cbs/v20170312/examples.json +4 -4
- tccli/services/ccc/v20200210/api.json +390 -323
- tccli/services/ccc/v20200210/examples.json +15 -15
- tccli/services/cdb/cdb_client.py +13 -13
- tccli/services/cdb/v20170320/api.json +295 -270
- tccli/services/cdb/v20170320/examples.json +38 -38
- tccli/services/cdc/v20201214/api.json +283 -270
- tccli/services/cdc/v20201214/examples.json +26 -26
- tccli/services/cds/v20180420/api.json +82 -76
- tccli/services/cds/v20180420/examples.json +1 -1
- tccli/services/cdwch/v20200915/api.json +1 -1
- tccli/services/cdwdoris/v20211228/api.json +42 -2
- tccli/services/cdz/v20221123/api.json +41 -5
- tccli/services/cfg/v20210820/api.json +31 -0
- tccli/services/cfs/v20190719/api.json +89 -1
- tccli/services/cfs/v20190719/examples.json +1 -1
- tccli/services/cfw/cfw_client.py +0 -53
- tccli/services/cfw/v20190904/api.json +1849 -1999
- tccli/services/cfw/v20190904/examples.json +157 -159
- tccli/services/ckafka/v20190819/api.json +104 -75
- tccli/services/clb/v20180317/api.json +48 -26
- tccli/services/clb/v20180317/examples.json +1 -1
- tccli/services/cloudapp/v20220530/api.json +5 -1
- tccli/services/cloudaudit/v20190319/api.json +58 -44
- tccli/services/cloudaudit/v20190319/examples.json +6 -6
- tccli/services/cloudstudio/v20230508/api.json +38 -37
- tccli/services/cloudstudio/v20230508/examples.json +4 -4
- tccli/services/cls/cls_client.py +216 -4
- tccli/services/cls/v20201016/api.json +536 -47
- tccli/services/cls/v20201016/examples.json +34 -2
- tccli/services/csip/v20221121/api.json +2562 -2382
- tccli/services/csip/v20221121/examples.json +108 -108
- tccli/services/cvm/v20170312/api.json +149 -112
- tccli/services/cvm/v20170312/examples.json +2 -2
- tccli/services/cwp/cwp_client.py +4 -110
- tccli/services/cwp/v20180228/api.json +6338 -6146
- tccli/services/cwp/v20180228/examples.json +342 -370
- tccli/services/cynosdb/v20190107/api.json +93 -81
- tccli/services/cynosdb/v20190107/examples.json +70 -70
- tccli/services/dasb/v20191018/api.json +796 -651
- tccli/services/dasb/v20191018/examples.json +101 -101
- tccli/services/dcdb/dcdb_client.py +114 -61
- tccli/services/dcdb/v20180411/api.json +141 -7
- tccli/services/dcdb/v20180411/examples.json +32 -0
- tccli/services/dlc/v20210125/api.json +21 -11
- tccli/services/dnspod/dnspod_client.py +417 -46
- tccli/services/dnspod/v20210323/api.json +751 -30
- tccli/services/dnspod/v20210323/examples.json +62 -0
- tccli/services/dts/v20211206/api.json +4 -4
- tccli/services/ecm/v20190719/api.json +2 -2
- tccli/services/emr/v20190103/api.json +339 -114
- tccli/services/emr/v20190103/examples.json +64 -82
- tccli/services/es/v20180416/api.json +29 -0
- tccli/services/es/v20180416/examples.json +1 -1
- tccli/services/ess/v20201111/api.json +49 -31
- tccli/services/ess/v20201111/examples.json +20 -8
- tccli/services/essbasic/v20210526/api.json +54 -49
- tccli/services/essbasic/v20210526/examples.json +36 -18
- tccli/services/facefusion/v20181201/api.json +47 -45
- tccli/services/facefusion/v20181201/examples.json +2 -2
- tccli/services/facefusion/v20220927/api.json +54 -48
- tccli/services/facefusion/v20220927/examples.json +5 -5
- tccli/services/faceid/v20180301/api.json +497 -496
- tccli/services/faceid/v20180301/examples.json +219 -101
- tccli/services/fmu/v20191213/api.json +59 -67
- tccli/services/fmu/v20191213/examples.json +22 -22
- tccli/services/ft/v20200304/api.json +53 -57
- tccli/services/ft/v20200304/examples.json +14 -14
- tccli/services/gme/v20180711/api.json +21 -11
- tccli/services/gme/v20180711/examples.json +1 -1
- tccli/services/hai/v20230812/api.json +116 -9
- tccli/services/hai/v20230812/examples.json +4 -4
- tccli/services/hunyuan/hunyuan_client.py +436 -12
- tccli/services/hunyuan/v20230901/api.json +1482 -118
- tccli/services/hunyuan/v20230901/examples.json +82 -18
- tccli/services/iai/v20180301/api.json +23 -19
- tccli/services/iai/v20180301/examples.json +2 -2
- tccli/services/iai/v20200303/api.json +530 -511
- tccli/services/iai/v20200303/examples.json +116 -86
- tccli/services/ig/__init__.py +4 -0
- tccli/services/ig/ig_client.py +195 -0
- tccli/services/ig/v20210518/api.json +83 -0
- tccli/services/ig/v20210518/examples.json +13 -0
- tccli/services/ioa/ioa_client.py +53 -0
- tccli/services/ioa/v20220601/api.json +662 -413
- tccli/services/ioa/v20220601/examples.json +24 -10
- tccli/services/iotexplorer/v20190423/api.json +33 -13
- tccli/services/iotexplorer/v20190423/examples.json +3 -3
- tccli/services/iotvideo/iotvideo_client.py +106 -0
- tccli/services/iotvideo/v20191126/api.json +256 -24
- tccli/services/iotvideo/v20191126/examples.json +19 -3
- tccli/services/iotvideo/v20201215/api.json +1 -1
- tccli/services/iotvideo/v20201215/examples.json +1 -1
- tccli/services/iotvideo/v20211125/api.json +1 -1
- tccli/services/iotvideo/v20211125/examples.json +2 -2
- tccli/services/iss/iss_client.py +69 -122
- tccli/services/iss/v20230517/api.json +10 -54
- tccli/services/iss/v20230517/examples.json +0 -14
- tccli/services/kms/v20190118/api.json +301 -268
- tccli/services/kms/v20190118/examples.json +45 -51
- tccli/services/lcic/lcic_client.py +159 -0
- tccli/services/lcic/v20220817/api.json +273 -1
- tccli/services/lcic/v20220817/examples.json +24 -0
- tccli/services/lighthouse/v20200324/api.json +56 -0
- tccli/services/live/live_client.py +159 -0
- tccli/services/live/v20180801/api.json +244 -0
- tccli/services/live/v20180801/examples.json +24 -0
- tccli/services/lke/v20231130/api.json +17 -17
- tccli/services/lke/v20231130/examples.json +19 -25
- tccli/services/mariadb/v20170312/api.json +7 -7
- tccli/services/market/v20191010/api.json +3 -3
- tccli/services/market/v20191010/examples.json +2 -2
- tccli/services/mmps/v20200710/api.json +47 -47
- tccli/services/mmps/v20200710/examples.json +3 -3
- tccli/services/mongodb/v20190725/api.json +4 -4
- tccli/services/monitor/v20180724/api.json +46 -19
- tccli/services/mps/v20190612/api.json +282 -5
- tccli/services/mps/v20190612/examples.json +25 -1
- tccli/services/mqtt/v20240516/api.json +2 -2
- tccli/services/mrs/v20200910/api.json +72 -34
- tccli/services/mrs/v20200910/examples.json +2 -2
- tccli/services/ms/v20180408/api.json +535 -506
- tccli/services/ms/v20180408/examples.json +25 -25
- tccli/services/oceanus/v20190422/api.json +130 -0
- tccli/services/ocr/ocr_client.py +232 -20
- tccli/services/ocr/v20181119/api.json +2265 -760
- tccli/services/ocr/v20181119/examples.json +200 -180
- tccli/services/omics/v20221128/api.json +614 -553
- tccli/services/omics/v20221128/examples.json +9 -9
- tccli/services/organization/v20210331/api.json +13 -4
- tccli/services/organization/v20210331/examples.json +2 -2
- tccli/services/partners/v20180321/api.json +244 -234
- tccli/services/partners/v20180321/examples.json +19 -19
- tccli/services/privatedns/privatedns_client.py +428 -4
- tccli/services/privatedns/v20201028/api.json +815 -11
- tccli/services/privatedns/v20201028/examples.json +64 -0
- tccli/services/pts/v20210728/api.json +18 -0
- tccli/services/pts/v20210728/examples.json +1 -1
- tccli/services/rce/rce_client.py +53 -0
- tccli/services/rce/v20201103/api.json +146 -0
- tccli/services/rce/v20201103/examples.json +8 -0
- tccli/services/redis/v20180412/api.json +42 -42
- tccli/services/redis/v20180412/examples.json +19 -19
- tccli/services/rum/v20210622/api.json +9 -0
- tccli/services/scf/v20180416/api.json +15 -15
- tccli/services/scf/v20180416/examples.json +1 -1
- tccli/services/smop/v20201203/api.json +46 -42
- tccli/services/smop/v20201203/examples.json +2 -2
- tccli/services/soe/v20180724/api.json +10 -10
- tccli/services/sqlserver/v20180328/api.json +21 -8
- tccli/services/sqlserver/v20180328/examples.json +5 -5
- tccli/services/ssl/v20191205/api.json +97 -4
- tccli/services/ssm/v20190923/api.json +292 -231
- tccli/services/ssm/v20190923/examples.json +42 -42
- tccli/services/tat/v20201028/api.json +97 -97
- tccli/services/tat/v20201028/examples.json +20 -26
- tccli/services/tchd/v20230306/api.json +5 -5
- tccli/services/tchd/v20230306/examples.json +3 -3
- tccli/services/tcr/v20190924/api.json +1 -1
- tccli/services/tcr/v20190924/examples.json +1 -1
- tccli/services/tcss/v20201101/api.json +1973 -1426
- tccli/services/tcss/v20201101/examples.json +346 -364
- tccli/services/tdmq/v20200217/api.json +539 -401
- tccli/services/tdmq/v20200217/examples.json +104 -104
- tccli/services/tds/v20220801/api.json +4 -4
- tccli/services/tem/v20210701/api.json +287 -271
- tccli/services/tem/v20210701/examples.json +59 -59
- tccli/services/teo/v20220901/api.json +37 -9
- tccli/services/teo/v20220901/examples.json +13 -7
- tccli/services/thpc/v20230321/api.json +5 -5
- tccli/services/tke/tke_client.py +217 -58
- tccli/services/tke/v20180525/api.json +36 -27
- tccli/services/tke/v20180525/examples.json +1 -1
- tccli/services/tke/v20220501/api.json +176 -0
- tccli/services/tke/v20220501/examples.json +24 -0
- tccli/services/tmt/v20180321/api.json +38 -8
- tccli/services/trp/v20210515/api.json +86 -74
- tccli/services/trp/v20210515/examples.json +65 -65
- tccli/services/trro/v20220325/api.json +72 -71
- tccli/services/trro/v20220325/examples.json +8 -8
- tccli/services/trtc/trtc_client.py +8 -61
- tccli/services/trtc/v20190722/api.json +72 -30
- tccli/services/trtc/v20190722/examples.json +3 -11
- tccli/services/tse/tse_client.py +110 -4
- tccli/services/tse/v20201207/api.json +122 -7
- tccli/services/tse/v20201207/examples.json +25 -9
- tccli/services/vclm/v20240523/api.json +225 -82
- tccli/services/vclm/v20240523/examples.json +13 -19
- tccli/services/vod/v20180717/api.json +431 -4
- tccli/services/vod/v20180717/examples.json +25 -5
- tccli/services/vod/v20240718/api.json +11 -11
- tccli/services/vod/v20240718/examples.json +4 -4
- tccli/services/vod/vod_client.py +53 -0
- tccli/services/vpc/v20170312/api.json +1090 -862
- tccli/services/vpc/v20170312/examples.json +74 -66
- tccli/services/vpc/vpc_client.py +61 -8
- tccli/services/waf/v20180125/api.json +2540 -2177
- tccli/services/waf/v20180125/examples.json +216 -284
- tccli/services/waf/waf_client.py +172 -119
- tccli/services/wav/v20210129/api.json +48 -48
- tccli/services/wav/v20210129/examples.json +4 -4
- tccli/services/wedata/v20210820/api.json +909 -25
- tccli/services/wedata/v20210820/examples.json +28 -4
- tccli/services/wedata/wedata_client.py +159 -0
- tccli/services/weilingwith/v20230427/api.json +6 -6
- tccli/services/weilingwith/v20230427/examples.json +3 -3
- tccli/sso.py +229 -0
- {tccli-3.0.1216.1.dist-info → tccli-3.0.1217.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1216.1.dist-info → tccli-3.0.1217.1.dist-info}/RECORD +252 -235
- {tccli-3.0.1216.1.dist-info → tccli-3.0.1217.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1216.1.dist-info → tccli-3.0.1217.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1216.1.dist-info → tccli-3.0.1217.1.dist-info}/license_files/LICENSE +0 -0
tccli/services/waf/waf_client.py
CHANGED
@@ -381,7 +381,7 @@ def doDeleteIpAccessControl(args, parsed_globals):
|
|
381
381
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
382
382
|
|
383
383
|
|
384
|
-
def
|
384
|
+
def doDescribeAreaBanAreas(args, parsed_globals):
|
385
385
|
g_param = parse_global_arg(parsed_globals)
|
386
386
|
|
387
387
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -410,11 +410,11 @@ def doDescribeAntiInfoLeakRules(args, parsed_globals):
|
|
410
410
|
client = mod.WafClient(cred, g_param[OptionsDefine.Region], profile)
|
411
411
|
client._sdkVersion += ("_CLI_" + __version__)
|
412
412
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
413
|
-
model = models.
|
413
|
+
model = models.DescribeAreaBanAreasRequest()
|
414
414
|
model.from_json_string(json.dumps(args))
|
415
415
|
start_time = time.time()
|
416
416
|
while True:
|
417
|
-
rsp = client.
|
417
|
+
rsp = client.DescribeAreaBanAreas(model)
|
418
418
|
result = rsp.to_json_string()
|
419
419
|
try:
|
420
420
|
json_obj = json.loads(result)
|
@@ -433,7 +433,7 @@ def doDescribeAntiInfoLeakRules(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 doModifyCustomRule(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,11 @@ def doDescribeAreaBanAreas(args, parsed_globals):
|
|
462
462
|
client = mod.WafClient(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.ModifyCustomRuleRequest()
|
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.ModifyCustomRule(model)
|
470
470
|
result = rsp.to_json_string()
|
471
471
|
try:
|
472
472
|
json_obj = json.loads(result)
|
@@ -485,7 +485,7 @@ def doDescribeAreaBanAreas(args, parsed_globals):
|
|
485
485
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
486
486
|
|
487
487
|
|
488
|
-
def
|
488
|
+
def doDescribeFindDomainList(args, parsed_globals):
|
489
489
|
g_param = parse_global_arg(parsed_globals)
|
490
490
|
|
491
491
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -514,11 +514,11 @@ def doModifyCustomRule(args, parsed_globals):
|
|
514
514
|
client = mod.WafClient(cred, g_param[OptionsDefine.Region], profile)
|
515
515
|
client._sdkVersion += ("_CLI_" + __version__)
|
516
516
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
517
|
-
model = models.
|
517
|
+
model = models.DescribeFindDomainListRequest()
|
518
518
|
model.from_json_string(json.dumps(args))
|
519
519
|
start_time = time.time()
|
520
520
|
while True:
|
521
|
-
rsp = client.
|
521
|
+
rsp = client.DescribeFindDomainList(model)
|
522
522
|
result = rsp.to_json_string()
|
523
523
|
try:
|
524
524
|
json_obj = json.loads(result)
|
@@ -537,7 +537,7 @@ def doModifyCustomRule(args, parsed_globals):
|
|
537
537
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
538
538
|
|
539
539
|
|
540
|
-
def
|
540
|
+
def doModifyInstanceQpsLimit(args, parsed_globals):
|
541
541
|
g_param = parse_global_arg(parsed_globals)
|
542
542
|
|
543
543
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -566,11 +566,11 @@ def doDescribeFindDomainList(args, parsed_globals):
|
|
566
566
|
client = mod.WafClient(cred, g_param[OptionsDefine.Region], profile)
|
567
567
|
client._sdkVersion += ("_CLI_" + __version__)
|
568
568
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
569
|
-
model = models.
|
569
|
+
model = models.ModifyInstanceQpsLimitRequest()
|
570
570
|
model.from_json_string(json.dumps(args))
|
571
571
|
start_time = time.time()
|
572
572
|
while True:
|
573
|
-
rsp = client.
|
573
|
+
rsp = client.ModifyInstanceQpsLimit(model)
|
574
574
|
result = rsp.to_json_string()
|
575
575
|
try:
|
576
576
|
json_obj = json.loads(result)
|
@@ -589,7 +589,7 @@ def doDescribeFindDomainList(args, parsed_globals):
|
|
589
589
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
590
590
|
|
591
591
|
|
592
|
-
def
|
592
|
+
def doDescribeApiListVersionTwo(args, parsed_globals):
|
593
593
|
g_param = parse_global_arg(parsed_globals)
|
594
594
|
|
595
595
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -618,11 +618,11 @@ def doModifyInstanceQpsLimit(args, parsed_globals):
|
|
618
618
|
client = mod.WafClient(cred, g_param[OptionsDefine.Region], profile)
|
619
619
|
client._sdkVersion += ("_CLI_" + __version__)
|
620
620
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
621
|
-
model = models.
|
621
|
+
model = models.DescribeApiListVersionTwoRequest()
|
622
622
|
model.from_json_string(json.dumps(args))
|
623
623
|
start_time = time.time()
|
624
624
|
while True:
|
625
|
-
rsp = client.
|
625
|
+
rsp = client.DescribeApiListVersionTwo(model)
|
626
626
|
result = rsp.to_json_string()
|
627
627
|
try:
|
628
628
|
json_obj = json.loads(result)
|
@@ -641,7 +641,7 @@ def doModifyInstanceQpsLimit(args, parsed_globals):
|
|
641
641
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
642
642
|
|
643
643
|
|
644
|
-
def
|
644
|
+
def doDescribeUserSignatureRuleV2(args, parsed_globals):
|
645
645
|
g_param = parse_global_arg(parsed_globals)
|
646
646
|
|
647
647
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -670,11 +670,11 @@ def doDescribeApiListVersionTwo(args, parsed_globals):
|
|
670
670
|
client = mod.WafClient(cred, g_param[OptionsDefine.Region], profile)
|
671
671
|
client._sdkVersion += ("_CLI_" + __version__)
|
672
672
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
673
|
-
model = models.
|
673
|
+
model = models.DescribeUserSignatureRuleV2Request()
|
674
674
|
model.from_json_string(json.dumps(args))
|
675
675
|
start_time = time.time()
|
676
676
|
while True:
|
677
|
-
rsp = client.
|
677
|
+
rsp = client.DescribeUserSignatureRuleV2(model)
|
678
678
|
result = rsp.to_json_string()
|
679
679
|
try:
|
680
680
|
json_obj = json.loads(result)
|
@@ -693,7 +693,7 @@ def doDescribeApiListVersionTwo(args, parsed_globals):
|
|
693
693
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
694
694
|
|
695
695
|
|
696
|
-
def
|
696
|
+
def doDescribeAutoDenyIP(args, parsed_globals):
|
697
697
|
g_param = parse_global_arg(parsed_globals)
|
698
698
|
|
699
699
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -722,11 +722,11 @@ def doDescribeSpartaProtectionInfo(args, parsed_globals):
|
|
722
722
|
client = mod.WafClient(cred, g_param[OptionsDefine.Region], profile)
|
723
723
|
client._sdkVersion += ("_CLI_" + __version__)
|
724
724
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
725
|
-
model = models.
|
725
|
+
model = models.DescribeAutoDenyIPRequest()
|
726
726
|
model.from_json_string(json.dumps(args))
|
727
727
|
start_time = time.time()
|
728
728
|
while True:
|
729
|
-
rsp = client.
|
729
|
+
rsp = client.DescribeAutoDenyIP(model)
|
730
730
|
result = rsp.to_json_string()
|
731
731
|
try:
|
732
732
|
json_obj = json.loads(result)
|
@@ -745,7 +745,7 @@ def doDescribeSpartaProtectionInfo(args, parsed_globals):
|
|
745
745
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
746
746
|
|
747
747
|
|
748
|
-
def
|
748
|
+
def doDeleteCustomWhiteRule(args, parsed_globals):
|
749
749
|
g_param = parse_global_arg(parsed_globals)
|
750
750
|
|
751
751
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -774,11 +774,11 @@ def doDescribeAutoDenyIP(args, parsed_globals):
|
|
774
774
|
client = mod.WafClient(cred, g_param[OptionsDefine.Region], profile)
|
775
775
|
client._sdkVersion += ("_CLI_" + __version__)
|
776
776
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
777
|
-
model = models.
|
777
|
+
model = models.DeleteCustomWhiteRuleRequest()
|
778
778
|
model.from_json_string(json.dumps(args))
|
779
779
|
start_time = time.time()
|
780
780
|
while True:
|
781
|
-
rsp = client.
|
781
|
+
rsp = client.DeleteCustomWhiteRule(model)
|
782
782
|
result = rsp.to_json_string()
|
783
783
|
try:
|
784
784
|
json_obj = json.loads(result)
|
@@ -797,7 +797,7 @@ def doDescribeAutoDenyIP(args, parsed_globals):
|
|
797
797
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
798
798
|
|
799
799
|
|
800
|
-
def
|
800
|
+
def doGetAttackDownloadRecords(args, parsed_globals):
|
801
801
|
g_param = parse_global_arg(parsed_globals)
|
802
802
|
|
803
803
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -826,11 +826,11 @@ def doDeleteCustomWhiteRule(args, parsed_globals):
|
|
826
826
|
client = mod.WafClient(cred, g_param[OptionsDefine.Region], profile)
|
827
827
|
client._sdkVersion += ("_CLI_" + __version__)
|
828
828
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
829
|
-
model = models.
|
829
|
+
model = models.GetAttackDownloadRecordsRequest()
|
830
830
|
model.from_json_string(json.dumps(args))
|
831
831
|
start_time = time.time()
|
832
832
|
while True:
|
833
|
-
rsp = client.
|
833
|
+
rsp = client.GetAttackDownloadRecords(model)
|
834
834
|
result = rsp.to_json_string()
|
835
835
|
try:
|
836
836
|
json_obj = json.loads(result)
|
@@ -849,7 +849,7 @@ def doDeleteCustomWhiteRule(args, parsed_globals):
|
|
849
849
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
850
850
|
|
851
851
|
|
852
|
-
def
|
852
|
+
def doDescribeApiDetail(args, parsed_globals):
|
853
853
|
g_param = parse_global_arg(parsed_globals)
|
854
854
|
|
855
855
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -878,11 +878,11 @@ def doGetAttackDownloadRecords(args, parsed_globals):
|
|
878
878
|
client = mod.WafClient(cred, g_param[OptionsDefine.Region], profile)
|
879
879
|
client._sdkVersion += ("_CLI_" + __version__)
|
880
880
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
881
|
-
model = models.
|
881
|
+
model = models.DescribeApiDetailRequest()
|
882
882
|
model.from_json_string(json.dumps(args))
|
883
883
|
start_time = time.time()
|
884
884
|
while True:
|
885
|
-
rsp = client.
|
885
|
+
rsp = client.DescribeApiDetail(model)
|
886
886
|
result = rsp.to_json_string()
|
887
887
|
try:
|
888
888
|
json_obj = json.loads(result)
|
@@ -901,7 +901,7 @@ def doGetAttackDownloadRecords(args, parsed_globals):
|
|
901
901
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
902
902
|
|
903
903
|
|
904
|
-
def
|
904
|
+
def doDescribeScanIp(args, parsed_globals):
|
905
905
|
g_param = parse_global_arg(parsed_globals)
|
906
906
|
|
907
907
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -930,11 +930,11 @@ def doDescribeApiDetail(args, parsed_globals):
|
|
930
930
|
client = mod.WafClient(cred, g_param[OptionsDefine.Region], profile)
|
931
931
|
client._sdkVersion += ("_CLI_" + __version__)
|
932
932
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
933
|
-
model = models.
|
933
|
+
model = models.DescribeScanIpRequest()
|
934
934
|
model.from_json_string(json.dumps(args))
|
935
935
|
start_time = time.time()
|
936
936
|
while True:
|
937
|
-
rsp = client.
|
937
|
+
rsp = client.DescribeScanIp(model)
|
938
938
|
result = rsp.to_json_string()
|
939
939
|
try:
|
940
940
|
json_obj = json.loads(result)
|
@@ -3605,7 +3605,7 @@ def doModifyHost(args, parsed_globals):
|
|
3605
3605
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3606
3606
|
|
3607
3607
|
|
3608
|
-
def
|
3608
|
+
def doDescribeUserSignatureClass(args, parsed_globals):
|
3609
3609
|
g_param = parse_global_arg(parsed_globals)
|
3610
3610
|
|
3611
3611
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3634,11 +3634,11 @@ def doModifyBotStatus(args, parsed_globals):
|
|
3634
3634
|
client = mod.WafClient(cred, g_param[OptionsDefine.Region], profile)
|
3635
3635
|
client._sdkVersion += ("_CLI_" + __version__)
|
3636
3636
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3637
|
-
model = models.
|
3637
|
+
model = models.DescribeUserSignatureClassRequest()
|
3638
3638
|
model.from_json_string(json.dumps(args))
|
3639
3639
|
start_time = time.time()
|
3640
3640
|
while True:
|
3641
|
-
rsp = client.
|
3641
|
+
rsp = client.DescribeUserSignatureClass(model)
|
3642
3642
|
result = rsp.to_json_string()
|
3643
3643
|
try:
|
3644
3644
|
json_obj = json.loads(result)
|
@@ -3657,7 +3657,7 @@ def doModifyBotStatus(args, parsed_globals):
|
|
3657
3657
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3658
3658
|
|
3659
3659
|
|
3660
|
-
def
|
3660
|
+
def doModifyBotStatus(args, parsed_globals):
|
3661
3661
|
g_param = parse_global_arg(parsed_globals)
|
3662
3662
|
|
3663
3663
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3686,11 +3686,11 @@ def doModifyProtectionStatus(args, parsed_globals):
|
|
3686
3686
|
client = mod.WafClient(cred, g_param[OptionsDefine.Region], profile)
|
3687
3687
|
client._sdkVersion += ("_CLI_" + __version__)
|
3688
3688
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3689
|
-
model = models.
|
3689
|
+
model = models.ModifyBotStatusRequest()
|
3690
3690
|
model.from_json_string(json.dumps(args))
|
3691
3691
|
start_time = time.time()
|
3692
3692
|
while True:
|
3693
|
-
rsp = client.
|
3693
|
+
rsp = client.ModifyBotStatus(model)
|
3694
3694
|
result = rsp.to_json_string()
|
3695
3695
|
try:
|
3696
3696
|
json_obj = json.loads(result)
|
@@ -3709,7 +3709,7 @@ def doModifyProtectionStatus(args, parsed_globals):
|
|
3709
3709
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3710
3710
|
|
3711
3711
|
|
3712
|
-
def
|
3712
|
+
def doModifyProtectionStatus(args, parsed_globals):
|
3713
3713
|
g_param = parse_global_arg(parsed_globals)
|
3714
3714
|
|
3715
3715
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3738,11 +3738,11 @@ def doDescribeCiphersDetail(args, parsed_globals):
|
|
3738
3738
|
client = mod.WafClient(cred, g_param[OptionsDefine.Region], profile)
|
3739
3739
|
client._sdkVersion += ("_CLI_" + __version__)
|
3740
3740
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3741
|
-
model = models.
|
3741
|
+
model = models.ModifyProtectionStatusRequest()
|
3742
3742
|
model.from_json_string(json.dumps(args))
|
3743
3743
|
start_time = time.time()
|
3744
3744
|
while True:
|
3745
|
-
rsp = client.
|
3745
|
+
rsp = client.ModifyProtectionStatus(model)
|
3746
3746
|
result = rsp.to_json_string()
|
3747
3747
|
try:
|
3748
3748
|
json_obj = json.loads(result)
|
@@ -3761,7 +3761,7 @@ def doDescribeCiphersDetail(args, parsed_globals):
|
|
3761
3761
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3762
3762
|
|
3763
3763
|
|
3764
|
-
def
|
3764
|
+
def doDescribeCiphersDetail(args, parsed_globals):
|
3765
3765
|
g_param = parse_global_arg(parsed_globals)
|
3766
3766
|
|
3767
3767
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3790,11 +3790,11 @@ def doModifyAreaBanStatus(args, parsed_globals):
|
|
3790
3790
|
client = mod.WafClient(cred, g_param[OptionsDefine.Region], profile)
|
3791
3791
|
client._sdkVersion += ("_CLI_" + __version__)
|
3792
3792
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3793
|
-
model = models.
|
3793
|
+
model = models.DescribeCiphersDetailRequest()
|
3794
3794
|
model.from_json_string(json.dumps(args))
|
3795
3795
|
start_time = time.time()
|
3796
3796
|
while True:
|
3797
|
-
rsp = client.
|
3797
|
+
rsp = client.DescribeCiphersDetail(model)
|
3798
3798
|
result = rsp.to_json_string()
|
3799
3799
|
try:
|
3800
3800
|
json_obj = json.loads(result)
|
@@ -3813,7 +3813,7 @@ def doModifyAreaBanStatus(args, parsed_globals):
|
|
3813
3813
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3814
3814
|
|
3815
3815
|
|
3816
|
-
def
|
3816
|
+
def doModifyAreaBanStatus(args, parsed_globals):
|
3817
3817
|
g_param = parse_global_arg(parsed_globals)
|
3818
3818
|
|
3819
3819
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3842,11 +3842,11 @@ def doModifyIpAccessControl(args, parsed_globals):
|
|
3842
3842
|
client = mod.WafClient(cred, g_param[OptionsDefine.Region], profile)
|
3843
3843
|
client._sdkVersion += ("_CLI_" + __version__)
|
3844
3844
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3845
|
-
model = models.
|
3845
|
+
model = models.ModifyAreaBanStatusRequest()
|
3846
3846
|
model.from_json_string(json.dumps(args))
|
3847
3847
|
start_time = time.time()
|
3848
3848
|
while True:
|
3849
|
-
rsp = client.
|
3849
|
+
rsp = client.ModifyAreaBanStatus(model)
|
3850
3850
|
result = rsp.to_json_string()
|
3851
3851
|
try:
|
3852
3852
|
json_obj = json.loads(result)
|
@@ -3865,7 +3865,7 @@ def doModifyIpAccessControl(args, parsed_globals):
|
|
3865
3865
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3866
3866
|
|
3867
3867
|
|
3868
|
-
def
|
3868
|
+
def doModifyIpAccessControl(args, parsed_globals):
|
3869
3869
|
g_param = parse_global_arg(parsed_globals)
|
3870
3870
|
|
3871
3871
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3894,11 +3894,11 @@ def doDescribeAntiFakeRules(args, parsed_globals):
|
|
3894
3894
|
client = mod.WafClient(cred, g_param[OptionsDefine.Region], profile)
|
3895
3895
|
client._sdkVersion += ("_CLI_" + __version__)
|
3896
3896
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3897
|
-
model = models.
|
3897
|
+
model = models.ModifyIpAccessControlRequest()
|
3898
3898
|
model.from_json_string(json.dumps(args))
|
3899
3899
|
start_time = time.time()
|
3900
3900
|
while True:
|
3901
|
-
rsp = client.
|
3901
|
+
rsp = client.ModifyIpAccessControl(model)
|
3902
3902
|
result = rsp.to_json_string()
|
3903
3903
|
try:
|
3904
3904
|
json_obj = json.loads(result)
|
@@ -3917,7 +3917,7 @@ def doDescribeAntiFakeRules(args, parsed_globals):
|
|
3917
3917
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3918
3918
|
|
3919
3919
|
|
3920
|
-
def
|
3920
|
+
def doDescribeAntiFakeRules(args, parsed_globals):
|
3921
3921
|
g_param = parse_global_arg(parsed_globals)
|
3922
3922
|
|
3923
3923
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3946,11 +3946,11 @@ def doImportIpAccessControl(args, parsed_globals):
|
|
3946
3946
|
client = mod.WafClient(cred, g_param[OptionsDefine.Region], profile)
|
3947
3947
|
client._sdkVersion += ("_CLI_" + __version__)
|
3948
3948
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3949
|
-
model = models.
|
3949
|
+
model = models.DescribeAntiFakeRulesRequest()
|
3950
3950
|
model.from_json_string(json.dumps(args))
|
3951
3951
|
start_time = time.time()
|
3952
3952
|
while True:
|
3953
|
-
rsp = client.
|
3953
|
+
rsp = client.DescribeAntiFakeRules(model)
|
3954
3954
|
result = rsp.to_json_string()
|
3955
3955
|
try:
|
3956
3956
|
json_obj = json.loads(result)
|
@@ -3969,7 +3969,7 @@ def doImportIpAccessControl(args, parsed_globals):
|
|
3969
3969
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3970
3970
|
|
3971
3971
|
|
3972
|
-
def
|
3972
|
+
def doImportIpAccessControl(args, parsed_globals):
|
3973
3973
|
g_param = parse_global_arg(parsed_globals)
|
3974
3974
|
|
3975
3975
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3998,11 +3998,11 @@ def doDeleteDomainWhiteRules(args, parsed_globals):
|
|
3998
3998
|
client = mod.WafClient(cred, g_param[OptionsDefine.Region], profile)
|
3999
3999
|
client._sdkVersion += ("_CLI_" + __version__)
|
4000
4000
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4001
|
-
model = models.
|
4001
|
+
model = models.ImportIpAccessControlRequest()
|
4002
4002
|
model.from_json_string(json.dumps(args))
|
4003
4003
|
start_time = time.time()
|
4004
4004
|
while True:
|
4005
|
-
rsp = client.
|
4005
|
+
rsp = client.ImportIpAccessControl(model)
|
4006
4006
|
result = rsp.to_json_string()
|
4007
4007
|
try:
|
4008
4008
|
json_obj = json.loads(result)
|
@@ -4021,7 +4021,7 @@ def doDeleteDomainWhiteRules(args, parsed_globals):
|
|
4021
4021
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4022
4022
|
|
4023
4023
|
|
4024
|
-
def
|
4024
|
+
def doDeleteDomainWhiteRules(args, parsed_globals):
|
4025
4025
|
g_param = parse_global_arg(parsed_globals)
|
4026
4026
|
|
4027
4027
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -4050,11 +4050,11 @@ def doDescribeAccessHistogram(args, parsed_globals):
|
|
4050
4050
|
client = mod.WafClient(cred, g_param[OptionsDefine.Region], profile)
|
4051
4051
|
client._sdkVersion += ("_CLI_" + __version__)
|
4052
4052
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4053
|
-
model = models.
|
4053
|
+
model = models.DeleteDomainWhiteRulesRequest()
|
4054
4054
|
model.from_json_string(json.dumps(args))
|
4055
4055
|
start_time = time.time()
|
4056
4056
|
while True:
|
4057
|
-
rsp = client.
|
4057
|
+
rsp = client.DeleteDomainWhiteRules(model)
|
4058
4058
|
result = rsp.to_json_string()
|
4059
4059
|
try:
|
4060
4060
|
json_obj = json.loads(result)
|
@@ -4073,7 +4073,7 @@ def doDescribeAccessHistogram(args, parsed_globals):
|
|
4073
4073
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4074
4074
|
|
4075
4075
|
|
4076
|
-
def
|
4076
|
+
def doDescribeAccessHistogram(args, parsed_globals):
|
4077
4077
|
g_param = parse_global_arg(parsed_globals)
|
4078
4078
|
|
4079
4079
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -4102,11 +4102,11 @@ def doDeleteDownloadRecord(args, parsed_globals):
|
|
4102
4102
|
client = mod.WafClient(cred, g_param[OptionsDefine.Region], profile)
|
4103
4103
|
client._sdkVersion += ("_CLI_" + __version__)
|
4104
4104
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4105
|
-
model = models.
|
4105
|
+
model = models.DescribeAccessHistogramRequest()
|
4106
4106
|
model.from_json_string(json.dumps(args))
|
4107
4107
|
start_time = time.time()
|
4108
4108
|
while True:
|
4109
|
-
rsp = client.
|
4109
|
+
rsp = client.DescribeAccessHistogram(model)
|
4110
4110
|
result = rsp.to_json_string()
|
4111
4111
|
try:
|
4112
4112
|
json_obj = json.loads(result)
|
@@ -4385,58 +4385,6 @@ def doDescribeFlowTrend(args, parsed_globals):
|
|
4385
4385
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4386
4386
|
|
4387
4387
|
|
4388
|
-
def doDescribeAntiFakeUrl(args, parsed_globals):
|
4389
|
-
g_param = parse_global_arg(parsed_globals)
|
4390
|
-
|
4391
|
-
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
4392
|
-
cred = credential.CVMRoleCredential()
|
4393
|
-
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
4394
|
-
cred = credential.STSAssumeRoleCredential(
|
4395
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
4396
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
4397
|
-
)
|
4398
|
-
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):
|
4399
|
-
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
4400
|
-
else:
|
4401
|
-
cred = credential.Credential(
|
4402
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
4403
|
-
)
|
4404
|
-
http_profile = HttpProfile(
|
4405
|
-
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
4406
|
-
reqMethod="POST",
|
4407
|
-
endpoint=g_param[OptionsDefine.Endpoint],
|
4408
|
-
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
4409
|
-
)
|
4410
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
4411
|
-
if g_param[OptionsDefine.Language]:
|
4412
|
-
profile.language = g_param[OptionsDefine.Language]
|
4413
|
-
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
4414
|
-
client = mod.WafClient(cred, g_param[OptionsDefine.Region], profile)
|
4415
|
-
client._sdkVersion += ("_CLI_" + __version__)
|
4416
|
-
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4417
|
-
model = models.DescribeAntiFakeUrlRequest()
|
4418
|
-
model.from_json_string(json.dumps(args))
|
4419
|
-
start_time = time.time()
|
4420
|
-
while True:
|
4421
|
-
rsp = client.DescribeAntiFakeUrl(model)
|
4422
|
-
result = rsp.to_json_string()
|
4423
|
-
try:
|
4424
|
-
json_obj = json.loads(result)
|
4425
|
-
except TypeError as e:
|
4426
|
-
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
4427
|
-
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
4428
|
-
break
|
4429
|
-
cur_time = time.time()
|
4430
|
-
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
4431
|
-
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
4432
|
-
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
4433
|
-
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
4434
|
-
else:
|
4435
|
-
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
4436
|
-
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
4437
|
-
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4438
|
-
|
4439
|
-
|
4440
4388
|
def doDescribeUserClbWafRegions(args, parsed_globals):
|
4441
4389
|
g_param = parse_global_arg(parsed_globals)
|
4442
4390
|
|
@@ -5425,6 +5373,58 @@ def doPostAttackDownloadTask(args, parsed_globals):
|
|
5425
5373
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
5426
5374
|
|
5427
5375
|
|
5376
|
+
def doDescribeSpartaProtectionInfo(args, parsed_globals):
|
5377
|
+
g_param = parse_global_arg(parsed_globals)
|
5378
|
+
|
5379
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
5380
|
+
cred = credential.CVMRoleCredential()
|
5381
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
5382
|
+
cred = credential.STSAssumeRoleCredential(
|
5383
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
5384
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
5385
|
+
)
|
5386
|
+
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):
|
5387
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
5388
|
+
else:
|
5389
|
+
cred = credential.Credential(
|
5390
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
5391
|
+
)
|
5392
|
+
http_profile = HttpProfile(
|
5393
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
5394
|
+
reqMethod="POST",
|
5395
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
5396
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
5397
|
+
)
|
5398
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
5399
|
+
if g_param[OptionsDefine.Language]:
|
5400
|
+
profile.language = g_param[OptionsDefine.Language]
|
5401
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
5402
|
+
client = mod.WafClient(cred, g_param[OptionsDefine.Region], profile)
|
5403
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
5404
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
5405
|
+
model = models.DescribeSpartaProtectionInfoRequest()
|
5406
|
+
model.from_json_string(json.dumps(args))
|
5407
|
+
start_time = time.time()
|
5408
|
+
while True:
|
5409
|
+
rsp = client.DescribeSpartaProtectionInfo(model)
|
5410
|
+
result = rsp.to_json_string()
|
5411
|
+
try:
|
5412
|
+
json_obj = json.loads(result)
|
5413
|
+
except TypeError as e:
|
5414
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
5415
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
5416
|
+
break
|
5417
|
+
cur_time = time.time()
|
5418
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
5419
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
5420
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
5421
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
5422
|
+
else:
|
5423
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
5424
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
5425
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
5426
|
+
|
5427
|
+
|
5428
5428
|
def doDescribeCustomWhiteRule(args, parsed_globals):
|
5429
5429
|
g_param = parse_global_arg(parsed_globals)
|
5430
5430
|
|
@@ -7245,6 +7245,58 @@ def doDescribeUserSignatureRule(args, parsed_globals):
|
|
7245
7245
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
7246
7246
|
|
7247
7247
|
|
7248
|
+
def doBatchOperateUserSignatureRules(args, parsed_globals):
|
7249
|
+
g_param = parse_global_arg(parsed_globals)
|
7250
|
+
|
7251
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
7252
|
+
cred = credential.CVMRoleCredential()
|
7253
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
7254
|
+
cred = credential.STSAssumeRoleCredential(
|
7255
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
7256
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
7257
|
+
)
|
7258
|
+
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):
|
7259
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
7260
|
+
else:
|
7261
|
+
cred = credential.Credential(
|
7262
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
7263
|
+
)
|
7264
|
+
http_profile = HttpProfile(
|
7265
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
7266
|
+
reqMethod="POST",
|
7267
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
7268
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
7269
|
+
)
|
7270
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
7271
|
+
if g_param[OptionsDefine.Language]:
|
7272
|
+
profile.language = g_param[OptionsDefine.Language]
|
7273
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
7274
|
+
client = mod.WafClient(cred, g_param[OptionsDefine.Region], profile)
|
7275
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
7276
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
7277
|
+
model = models.BatchOperateUserSignatureRulesRequest()
|
7278
|
+
model.from_json_string(json.dumps(args))
|
7279
|
+
start_time = time.time()
|
7280
|
+
while True:
|
7281
|
+
rsp = client.BatchOperateUserSignatureRules(model)
|
7282
|
+
result = rsp.to_json_string()
|
7283
|
+
try:
|
7284
|
+
json_obj = json.loads(result)
|
7285
|
+
except TypeError as e:
|
7286
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
7287
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
7288
|
+
break
|
7289
|
+
cur_time = time.time()
|
7290
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
7291
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
7292
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
7293
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
7294
|
+
else:
|
7295
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
7296
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
7297
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
7298
|
+
|
7299
|
+
|
7248
7300
|
def doFreshAntiFakeUrl(args, parsed_globals):
|
7249
7301
|
g_param = parse_global_arg(parsed_globals)
|
7250
7302
|
|
@@ -7575,17 +7627,17 @@ ACTION_MAP = {
|
|
7575
7627
|
"GetAttackTotalCount": doGetAttackTotalCount,
|
7576
7628
|
"DescribeBatchIpAccessControl": doDescribeBatchIpAccessControl,
|
7577
7629
|
"DeleteIpAccessControl": doDeleteIpAccessControl,
|
7578
|
-
"DescribeAntiInfoLeakRules": doDescribeAntiInfoLeakRules,
|
7579
7630
|
"DescribeAreaBanAreas": doDescribeAreaBanAreas,
|
7580
7631
|
"ModifyCustomRule": doModifyCustomRule,
|
7581
7632
|
"DescribeFindDomainList": doDescribeFindDomainList,
|
7582
7633
|
"ModifyInstanceQpsLimit": doModifyInstanceQpsLimit,
|
7583
7634
|
"DescribeApiListVersionTwo": doDescribeApiListVersionTwo,
|
7584
|
-
"
|
7635
|
+
"DescribeUserSignatureRuleV2": doDescribeUserSignatureRuleV2,
|
7585
7636
|
"DescribeAutoDenyIP": doDescribeAutoDenyIP,
|
7586
7637
|
"DeleteCustomWhiteRule": doDeleteCustomWhiteRule,
|
7587
7638
|
"GetAttackDownloadRecords": doGetAttackDownloadRecords,
|
7588
7639
|
"DescribeApiDetail": doDescribeApiDetail,
|
7640
|
+
"DescribeScanIp": doDescribeScanIp,
|
7589
7641
|
"DeleteCustomRule": doDeleteCustomRule,
|
7590
7642
|
"ModifyAntiFakeUrl": doModifyAntiFakeUrl,
|
7591
7643
|
"ModifySpartaProtection": doModifySpartaProtection,
|
@@ -7637,6 +7689,7 @@ ACTION_MAP = {
|
|
7637
7689
|
"DescribeSession": doDescribeSession,
|
7638
7690
|
"DescribeTopAttackDomain": doDescribeTopAttackDomain,
|
7639
7691
|
"ModifyHost": doModifyHost,
|
7692
|
+
"DescribeUserSignatureClass": doDescribeUserSignatureClass,
|
7640
7693
|
"ModifyBotStatus": doModifyBotStatus,
|
7641
7694
|
"ModifyProtectionStatus": doModifyProtectionStatus,
|
7642
7695
|
"DescribeCiphersDetail": doDescribeCiphersDetail,
|
@@ -7646,13 +7699,11 @@ ACTION_MAP = {
|
|
7646
7699
|
"ImportIpAccessControl": doImportIpAccessControl,
|
7647
7700
|
"DeleteDomainWhiteRules": doDeleteDomainWhiteRules,
|
7648
7701
|
"DescribeAccessHistogram": doDescribeAccessHistogram,
|
7649
|
-
"DeleteDownloadRecord": doDeleteDownloadRecord,
|
7650
7702
|
"DescribeTlsVersion": doDescribeTlsVersion,
|
7651
7703
|
"ModifyAntiInfoLeakRules": doModifyAntiInfoLeakRules,
|
7652
7704
|
"CreateIpAccessControl": doCreateIpAccessControl,
|
7653
7705
|
"AddAntiFakeUrl": doAddAntiFakeUrl,
|
7654
7706
|
"DescribeFlowTrend": doDescribeFlowTrend,
|
7655
|
-
"DescribeAntiFakeUrl": doDescribeAntiFakeUrl,
|
7656
7707
|
"DescribeUserClbWafRegions": doDescribeUserClbWafRegions,
|
7657
7708
|
"DescribeObjects": doDescribeObjects,
|
7658
7709
|
"ModifyDomainWhiteRule": doModifyDomainWhiteRule,
|
@@ -7672,6 +7723,7 @@ ACTION_MAP = {
|
|
7672
7723
|
"ModifyDomainsCLSStatus": doModifyDomainsCLSStatus,
|
7673
7724
|
"RefreshAccessCheckResult": doRefreshAccessCheckResult,
|
7674
7725
|
"PostAttackDownloadTask": doPostAttackDownloadTask,
|
7726
|
+
"DescribeSpartaProtectionInfo": doDescribeSpartaProtectionInfo,
|
7675
7727
|
"DescribeCustomWhiteRule": doDescribeCustomWhiteRule,
|
7676
7728
|
"DescribeHost": doDescribeHost,
|
7677
7729
|
"ModifyUserSignatureRuleV2": doModifyUserSignatureRuleV2,
|
@@ -7707,6 +7759,7 @@ ACTION_MAP = {
|
|
7707
7759
|
"UpsertSession": doUpsertSession,
|
7708
7760
|
"DescribeCCAutoStatus": doDescribeCCAutoStatus,
|
7709
7761
|
"DescribeUserSignatureRule": doDescribeUserSignatureRule,
|
7762
|
+
"BatchOperateUserSignatureRules": doBatchOperateUserSignatureRules,
|
7710
7763
|
"FreshAntiFakeUrl": doFreshAntiFakeUrl,
|
7711
7764
|
"DescribeDomainRules": doDescribeDomainRules,
|
7712
7765
|
"ModifyApiSecEventChange": doModifyApiSecEventChange,
|