tccli 3.0.1102.1__py2.py3-none-any.whl → 3.0.1104.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/examples/aiart/v20221229/ImageToImage.md +1 -1
- tccli/examples/csip/v20221121/DescribeDbAssets.md +7 -0
- tccli/examples/csip/v20221121/DescribeOrganizationUserInfo.md +12 -1
- tccli/examples/cwp/v20180228/DescribePublicProxyInstallCommand.md +4 -4
- tccli/examples/cynosdb/v20190107/CreateCLSDelivery.md +18 -0
- tccli/examples/cynosdb/v20190107/DeleteCLSDelivery.md +18 -0
- tccli/examples/cynosdb/v20190107/DescribeInstanceCLSLogDelivery.md +18 -0
- tccli/examples/cynosdb/v20190107/StartCLSDelivery.md +18 -0
- tccli/examples/cynosdb/v20190107/StopCLSDelivery.md +18 -0
- tccli/examples/ess/v20201111/CreateUserVerifyUrl.md +29 -0
- tccli/examples/ess/v20201111/DescribeUserVerifyStatus.md +23 -0
- tccli/examples/hai/v20230812/DescribeInstances.md +3 -2
- tccli/examples/hunyuan/v20230901/QueryHunyuanImageJob.md +33 -0
- tccli/examples/hunyuan/v20230901/SubmitHunyuanImageJob.md +21 -0
- tccli/examples/iotexplorer/v20190423/CreateTRTCSignaturesWithRoomId.md +30 -0
- tccli/examples/iotexplorer/v20190423/DescribeCloudStorageAIServiceTask.md +36 -0
- tccli/examples/iotexplorer/v20190423/DescribeCloudStorageAIServiceTasks.md +3 -0
- tccli/examples/iotexplorer/v20190423/DismissRoomByStrRoomIdFromTRTC.md +20 -0
- tccli/examples/iotexplorer/v20190423/GenerateCloudStorageAIServiceTaskFileURL.md +24 -0
- tccli/examples/iotexplorer/v20190423/RemoveUserByRoomIdFromTRTC.md +21 -0
- tccli/examples/lighthouse/v20200324/DescribeInstancesDeniedActions.md +11 -6
- tccli/examples/live/v20180801/DescribeLivePadProcessorList.md +25 -0
- tccli/examples/live/v20180801/StopLivePadProcessor.md +23 -0
- tccli/examples/mrs/v20200910/DrugInstructionObject.md +98 -0
- tccli/examples/ssl/v20191205/DescribeDownloadCertificateUrl.md +23 -0
- tccli/examples/tke/v20220501/CreateNodePool.md +33 -0
- tccli/examples/tke/v20220501/DeleteNodePool.md +21 -0
- tccli/examples/tke/v20220501/DescribeNodePools.md +9 -3
- tccli/examples/tke/v20220501/ModifyNodePool.md +32 -0
- tccli/examples/waf/v20180125/CreateIpAccessControl.md +27 -0
- tccli/examples/waf/v20180125/DeleteIpAccessControlV2.md +25 -0
- tccli/examples/waf/v20180125/ImportIpAccessControl.md +30 -0
- tccli/examples/waf/v20180125/ModifyIpAccessControl.md +28 -0
- tccli/services/aiart/v20221229/api.json +3 -3
- tccli/services/aiart/v20221229/examples.json +1 -1
- tccli/services/apm/v20210622/api.json +1 -1
- tccli/services/batch/v20170312/api.json +1 -1
- tccli/services/billing/v20180709/api.json +2 -2
- tccli/services/captcha/v20190722/api.json +2 -2
- tccli/services/ccc/v20200210/api.json +3 -3
- tccli/services/cdb/v20170320/api.json +2 -2
- tccli/services/clb/v20180317/api.json +2 -2
- tccli/services/cls/v20201016/api.json +2 -2
- tccli/services/csip/v20221121/api.json +80 -2
- tccli/services/csip/v20221121/examples.json +4 -4
- tccli/services/cvm/v20170312/api.json +1 -1
- tccli/services/cwp/v20180228/api.json +17 -5
- tccli/services/cwp/v20180228/examples.json +2 -2
- tccli/services/cynosdb/cynosdb_client.py +269 -4
- tccli/services/cynosdb/v20190107/api.json +131 -0
- tccli/services/cynosdb/v20190107/examples.json +40 -0
- tccli/services/dlc/v20210125/api.json +70 -1
- tccli/services/ess/ess_client.py +110 -4
- tccli/services/ess/v20201111/api.json +185 -5
- tccli/services/ess/v20201111/examples.json +16 -0
- tccli/services/essbasic/v20210526/api.json +4 -4
- tccli/services/faceid/v20180301/api.json +1 -1
- tccli/services/fmu/v20191213/api.json +1 -1
- tccli/services/hai/v20230812/api.json +2 -2
- tccli/services/hai/v20230812/examples.json +1 -1
- tccli/services/hunyuan/hunyuan_client.py +110 -4
- tccli/services/hunyuan/v20230901/api.json +188 -4
- tccli/services/hunyuan/v20230901/examples.json +16 -0
- tccli/services/iotexplorer/iotexplorer_client.py +298 -33
- tccli/services/iotexplorer/v20190423/api.json +359 -20
- tccli/services/iotexplorer/v20190423/examples.json +41 -1
- tccli/services/iss/v20230517/api.json +10 -0
- tccli/services/lighthouse/v20200324/api.json +45 -33
- tccli/services/lighthouse/v20200324/examples.json +3 -3
- tccli/services/live/live_client.py +114 -8
- tccli/services/live/v20180801/api.json +124 -0
- tccli/services/live/v20180801/examples.json +16 -0
- tccli/services/lke/v20231130/api.json +109 -3
- tccli/services/mrs/mrs_client.py +53 -0
- tccli/services/mrs/v20200910/api.json +1649 -415
- tccli/services/mrs/v20200910/examples.json +8 -0
- tccli/services/ocr/v20181119/api.json +1 -1
- tccli/services/rce/rce_client.py +0 -53
- tccli/services/rce/v20201103/api.json +0 -197
- tccli/services/rce/v20201103/examples.json +0 -8
- tccli/services/ssl/ssl_client.py +57 -4
- tccli/services/ssl/v20191205/api.json +63 -0
- tccli/services/ssl/v20191205/examples.json +8 -0
- tccli/services/ssm/v20190923/api.json +1 -1
- tccli/services/tdmq/v20200217/api.json +40 -10
- tccli/services/teo/v20220901/api.json +34 -0
- tccli/services/tke/tke_client.py +171 -12
- tccli/services/tke/v20180525/api.json +1 -1
- tccli/services/tke/v20220501/api.json +1403 -86
- tccli/services/tke/v20220501/examples.json +25 -1
- tccli/services/trtc/v20190722/api.json +6 -9
- tccli/services/tse/v20201207/api.json +2 -2
- tccli/services/vpc/v20170312/api.json +1 -0
- tccli/services/waf/v20180125/api.json +396 -0
- tccli/services/waf/v20180125/examples.json +32 -0
- tccli/services/waf/waf_client.py +216 -4
- {tccli-3.0.1102.1.dist-info → tccli-3.0.1104.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1102.1.dist-info → tccli-3.0.1104.1.dist-info}/RECORD +102 -77
- {tccli-3.0.1102.1.dist-info → tccli-3.0.1104.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1102.1.dist-info → tccli-3.0.1104.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1102.1.dist-info → tccli-3.0.1104.1.dist-info}/license_files/LICENSE +0 -0
tccli/services/waf/waf_client.py
CHANGED
@@ -485,6 +485,58 @@ def doModifyCustomRule(args, parsed_globals):
|
|
485
485
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
486
486
|
|
487
487
|
|
488
|
+
def doDescribeFindDomainList(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.WafClient(cred, g_param[OptionsDefine.Region], profile)
|
515
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
516
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
517
|
+
model = models.DescribeFindDomainListRequest()
|
518
|
+
model.from_json_string(json.dumps(args))
|
519
|
+
start_time = time.time()
|
520
|
+
while True:
|
521
|
+
rsp = client.DescribeFindDomainList(model)
|
522
|
+
result = rsp.to_json_string()
|
523
|
+
try:
|
524
|
+
json_obj = json.loads(result)
|
525
|
+
except TypeError as e:
|
526
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
527
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
528
|
+
break
|
529
|
+
cur_time = time.time()
|
530
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
531
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
532
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
533
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
534
|
+
else:
|
535
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
536
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
537
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
538
|
+
|
539
|
+
|
488
540
|
def doModifyInstanceQpsLimit(args, parsed_globals):
|
489
541
|
g_param = parse_global_arg(parsed_globals)
|
490
542
|
|
@@ -2461,6 +2513,58 @@ def doDescribeCertificateVerifyResult(args, parsed_globals):
|
|
2461
2513
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2462
2514
|
|
2463
2515
|
|
2516
|
+
def doDeleteIpAccessControlV2(args, parsed_globals):
|
2517
|
+
g_param = parse_global_arg(parsed_globals)
|
2518
|
+
|
2519
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
2520
|
+
cred = credential.CVMRoleCredential()
|
2521
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2522
|
+
cred = credential.STSAssumeRoleCredential(
|
2523
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2524
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2525
|
+
)
|
2526
|
+
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):
|
2527
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
2528
|
+
else:
|
2529
|
+
cred = credential.Credential(
|
2530
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
2531
|
+
)
|
2532
|
+
http_profile = HttpProfile(
|
2533
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
2534
|
+
reqMethod="POST",
|
2535
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
2536
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
2537
|
+
)
|
2538
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
2539
|
+
if g_param[OptionsDefine.Language]:
|
2540
|
+
profile.language = g_param[OptionsDefine.Language]
|
2541
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
2542
|
+
client = mod.WafClient(cred, g_param[OptionsDefine.Region], profile)
|
2543
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
2544
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2545
|
+
model = models.DeleteIpAccessControlV2Request()
|
2546
|
+
model.from_json_string(json.dumps(args))
|
2547
|
+
start_time = time.time()
|
2548
|
+
while True:
|
2549
|
+
rsp = client.DeleteIpAccessControlV2(model)
|
2550
|
+
result = rsp.to_json_string()
|
2551
|
+
try:
|
2552
|
+
json_obj = json.loads(result)
|
2553
|
+
except TypeError as e:
|
2554
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
2555
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
2556
|
+
break
|
2557
|
+
cur_time = time.time()
|
2558
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
2559
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
2560
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
2561
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
2562
|
+
else:
|
2563
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
2564
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
2565
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2566
|
+
|
2567
|
+
|
2464
2568
|
def doSwitchElasticMode(args, parsed_globals):
|
2465
2569
|
g_param = parse_global_arg(parsed_globals)
|
2466
2570
|
|
@@ -3501,6 +3605,58 @@ def doModifyAreaBanStatus(args, parsed_globals):
|
|
3501
3605
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3502
3606
|
|
3503
3607
|
|
3608
|
+
def doModifyIpAccessControl(args, parsed_globals):
|
3609
|
+
g_param = parse_global_arg(parsed_globals)
|
3610
|
+
|
3611
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
3612
|
+
cred = credential.CVMRoleCredential()
|
3613
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3614
|
+
cred = credential.STSAssumeRoleCredential(
|
3615
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3616
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3617
|
+
)
|
3618
|
+
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):
|
3619
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
3620
|
+
else:
|
3621
|
+
cred = credential.Credential(
|
3622
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
3623
|
+
)
|
3624
|
+
http_profile = HttpProfile(
|
3625
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
3626
|
+
reqMethod="POST",
|
3627
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
3628
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
3629
|
+
)
|
3630
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
3631
|
+
if g_param[OptionsDefine.Language]:
|
3632
|
+
profile.language = g_param[OptionsDefine.Language]
|
3633
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
3634
|
+
client = mod.WafClient(cred, g_param[OptionsDefine.Region], profile)
|
3635
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
3636
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3637
|
+
model = models.ModifyIpAccessControlRequest()
|
3638
|
+
model.from_json_string(json.dumps(args))
|
3639
|
+
start_time = time.time()
|
3640
|
+
while True:
|
3641
|
+
rsp = client.ModifyIpAccessControl(model)
|
3642
|
+
result = rsp.to_json_string()
|
3643
|
+
try:
|
3644
|
+
json_obj = json.loads(result)
|
3645
|
+
except TypeError as e:
|
3646
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
3647
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
3648
|
+
break
|
3649
|
+
cur_time = time.time()
|
3650
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
3651
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
3652
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
3653
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
3654
|
+
else:
|
3655
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
3656
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
3657
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3658
|
+
|
3659
|
+
|
3504
3660
|
def doDescribeAntiFakeRules(args, parsed_globals):
|
3505
3661
|
g_param = parse_global_arg(parsed_globals)
|
3506
3662
|
|
@@ -3553,7 +3709,7 @@ def doDescribeAntiFakeRules(args, parsed_globals):
|
|
3553
3709
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3554
3710
|
|
3555
3711
|
|
3556
|
-
def
|
3712
|
+
def doImportIpAccessControl(args, parsed_globals):
|
3557
3713
|
g_param = parse_global_arg(parsed_globals)
|
3558
3714
|
|
3559
3715
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3582,11 +3738,11 @@ def doDescribeFindDomainList(args, parsed_globals):
|
|
3582
3738
|
client = mod.WafClient(cred, g_param[OptionsDefine.Region], profile)
|
3583
3739
|
client._sdkVersion += ("_CLI_" + __version__)
|
3584
3740
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3585
|
-
model = models.
|
3741
|
+
model = models.ImportIpAccessControlRequest()
|
3586
3742
|
model.from_json_string(json.dumps(args))
|
3587
3743
|
start_time = time.time()
|
3588
3744
|
while True:
|
3589
|
-
rsp = client.
|
3745
|
+
rsp = client.ImportIpAccessControl(model)
|
3590
3746
|
result = rsp.to_json_string()
|
3591
3747
|
try:
|
3592
3748
|
json_obj = json.loads(result)
|
@@ -3865,6 +4021,58 @@ def doModifyAntiInfoLeakRules(args, parsed_globals):
|
|
3865
4021
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3866
4022
|
|
3867
4023
|
|
4024
|
+
def doCreateIpAccessControl(args, parsed_globals):
|
4025
|
+
g_param = parse_global_arg(parsed_globals)
|
4026
|
+
|
4027
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
4028
|
+
cred = credential.CVMRoleCredential()
|
4029
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
4030
|
+
cred = credential.STSAssumeRoleCredential(
|
4031
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
4032
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
4033
|
+
)
|
4034
|
+
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):
|
4035
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
4036
|
+
else:
|
4037
|
+
cred = credential.Credential(
|
4038
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
4039
|
+
)
|
4040
|
+
http_profile = HttpProfile(
|
4041
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
4042
|
+
reqMethod="POST",
|
4043
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
4044
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
4045
|
+
)
|
4046
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
4047
|
+
if g_param[OptionsDefine.Language]:
|
4048
|
+
profile.language = g_param[OptionsDefine.Language]
|
4049
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
4050
|
+
client = mod.WafClient(cred, g_param[OptionsDefine.Region], profile)
|
4051
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
4052
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4053
|
+
model = models.CreateIpAccessControlRequest()
|
4054
|
+
model.from_json_string(json.dumps(args))
|
4055
|
+
start_time = time.time()
|
4056
|
+
while True:
|
4057
|
+
rsp = client.CreateIpAccessControl(model)
|
4058
|
+
result = rsp.to_json_string()
|
4059
|
+
try:
|
4060
|
+
json_obj = json.loads(result)
|
4061
|
+
except TypeError as e:
|
4062
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
4063
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
4064
|
+
break
|
4065
|
+
cur_time = time.time()
|
4066
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
4067
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
4068
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
4069
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
4070
|
+
else:
|
4071
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
4072
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
4073
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4074
|
+
|
4075
|
+
|
3868
4076
|
def doAddAntiFakeUrl(args, parsed_globals):
|
3869
4077
|
g_param = parse_global_arg(parsed_globals)
|
3870
4078
|
|
@@ -6953,6 +7161,7 @@ ACTION_MAP = {
|
|
6953
7161
|
"DeleteIpAccessControl": doDeleteIpAccessControl,
|
6954
7162
|
"DescribeAntiInfoLeakRules": doDescribeAntiInfoLeakRules,
|
6955
7163
|
"ModifyCustomRule": doModifyCustomRule,
|
7164
|
+
"DescribeFindDomainList": doDescribeFindDomainList,
|
6956
7165
|
"ModifyInstanceQpsLimit": doModifyInstanceQpsLimit,
|
6957
7166
|
"DescribeSpartaProtectionInfo": doDescribeSpartaProtectionInfo,
|
6958
7167
|
"DescribeAutoDenyIP": doDescribeAutoDenyIP,
|
@@ -6991,6 +7200,7 @@ ACTION_MAP = {
|
|
6991
7200
|
"DescribePeakPoints": doDescribePeakPoints,
|
6992
7201
|
"ModifyCustomWhiteRule": doModifyCustomWhiteRule,
|
6993
7202
|
"DescribeCertificateVerifyResult": doDescribeCertificateVerifyResult,
|
7203
|
+
"DeleteIpAccessControlV2": doDeleteIpAccessControlV2,
|
6994
7204
|
"SwitchElasticMode": doSwitchElasticMode,
|
6995
7205
|
"ModifyInstanceRenewFlag": doModifyInstanceRenewFlag,
|
6996
7206
|
"DescribeUserLevel": doDescribeUserLevel,
|
@@ -7011,13 +7221,15 @@ ACTION_MAP = {
|
|
7011
7221
|
"ModifyProtectionStatus": doModifyProtectionStatus,
|
7012
7222
|
"DescribeCiphersDetail": doDescribeCiphersDetail,
|
7013
7223
|
"ModifyAreaBanStatus": doModifyAreaBanStatus,
|
7224
|
+
"ModifyIpAccessControl": doModifyIpAccessControl,
|
7014
7225
|
"DescribeAntiFakeRules": doDescribeAntiFakeRules,
|
7015
|
-
"
|
7226
|
+
"ImportIpAccessControl": doImportIpAccessControl,
|
7016
7227
|
"DeleteDomainWhiteRules": doDeleteDomainWhiteRules,
|
7017
7228
|
"DescribeAccessHistogram": doDescribeAccessHistogram,
|
7018
7229
|
"DeleteDownloadRecord": doDeleteDownloadRecord,
|
7019
7230
|
"DescribeTlsVersion": doDescribeTlsVersion,
|
7020
7231
|
"ModifyAntiInfoLeakRules": doModifyAntiInfoLeakRules,
|
7232
|
+
"CreateIpAccessControl": doCreateIpAccessControl,
|
7021
7233
|
"AddAntiFakeUrl": doAddAntiFakeUrl,
|
7022
7234
|
"DescribeFlowTrend": doDescribeFlowTrend,
|
7023
7235
|
"DescribeAntiFakeUrl": doDescribeAntiFakeUrl,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: tccli
|
3
|
-
Version: 3.0.
|
3
|
+
Version: 3.0.1104.1
|
4
4
|
Summary: Universal Command Line Environment for Tencent Cloud
|
5
5
|
Project-URL: Bug Tracker, https://github.com/TencentCloud/tencentcloud-cli/issues
|
6
6
|
Project-URL: Homepage, https://github.com/TencentCloud/tencentcloud-cli
|
@@ -13,7 +13,7 @@ Classifier: Programming Language :: Python :: 2.7
|
|
13
13
|
Classifier: Programming Language :: Python :: 3
|
14
14
|
Requires-Dist: jmespath==0.10.0
|
15
15
|
Requires-Dist: six==1.16.0
|
16
|
-
Requires-Dist: tencentcloud-sdk-python>=3.0.
|
16
|
+
Requires-Dist: tencentcloud-sdk-python>=3.0.1104
|
17
17
|
Description-Content-Type: text/markdown
|
18
18
|
|
19
19
|
# 命令行工具简介
|