tccli 3.0.875.1__py2.py3-none-any.whl → 3.0.877.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/aa/v20200224/api.json +39 -0
- tccli/services/acp/v20220105/api.json +115 -0
- tccli/services/advisor/v20200721/api.json +30 -0
- tccli/services/af/v20200226/api.json +114 -0
- tccli/services/afc/v20200226/api.json +83 -0
- tccli/services/aiart/v20221229/api.json +25 -0
- tccli/services/ame/v20190916/api.json +329 -0
- tccli/services/ams/v20201229/api.json +151 -0
- tccli/services/anicloud/v20220923/api.json +36 -0
- tccli/services/antiddos/v20200309/api.json +928 -0
- tccli/services/apigateway/v20180808/api.json +1115 -0
- tccli/services/apm/v20210622/api.json +130 -0
- tccli/services/asr/v20190614/api.json +161 -2
- tccli/services/asw/v20200722/api.json +84 -0
- tccli/services/autoscaling/v20180419/api.json +564 -0
- tccli/services/ba/v20200720/api.json +10 -0
- tccli/services/batch/v20170312/api.json +514 -6
- tccli/services/bda/v20200324/api.json +186 -0
- tccli/services/bi/v20220105/api.json +28 -0
- tccli/services/billing/v20180709/api.json +515 -0
- tccli/services/bm/v20180423/api.json +542 -0
- tccli/services/bma/v20210624/api.json +322 -1
- tccli/services/bma/v20221115/api.json +137 -1
- tccli/services/bmeip/v20180625/api.json +134 -0
- tccli/services/bmlb/v20180625/api.json +633 -0
- tccli/services/bmvpc/v20180625/api.json +454 -0
- tccli/services/bpaas/v20181217/api.json +54 -0
- tccli/services/bsca/v20210811/api.json +86 -0
- tccli/services/btoe/v20210514/api.json +75 -0
- tccli/services/cam/v20190116/api.json +531 -5
- tccli/services/cam/v20190116/examples.json +4 -4
- tccli/services/captcha/v20190722/api.json +220 -0
- tccli/services/car/v20220110/api.json +15 -0
- tccli/services/cat/v20180409/api.json +135 -0
- tccli/services/cbs/v20170312/api.json +376 -0
- tccli/services/ccc/v20200210/api.json +497 -0
- tccli/services/cdb/cdb_client.py +53 -0
- tccli/services/cdb/v20170320/api.json +1574 -13
- tccli/services/cdb/v20170320/examples.json +10 -2
- tccli/services/cdc/v20201214/api.json +266 -0
- tccli/services/cdn/v20180606/api.json +1591 -171
- tccli/services/cds/v20180420/api.json +45 -0
- tccli/services/cdwch/v20200915/api.json +241 -0
- tccli/services/cfg/v20210820/api.json +203 -11
- tccli/services/cfg/v20210820/examples.json +2 -2
- tccli/services/cfs/v20190719/api.json +358 -0
- tccli/services/cfw/v20190904/api.json +764 -27
- tccli/services/cfw/v20190904/examples.json +7 -7
- tccli/services/chdfs/v20201112/api.json +128 -0
- tccli/services/ciam/v20220331/api.json +211 -0
- tccli/services/cii/v20210408/api.json +155 -0
- tccli/services/ckafka/v20190819/api.json +1388 -0
- tccli/services/clb/v20180317/api.json +873 -7
- tccli/services/cloudaudit/v20190319/api.json +158 -0
- tccli/services/cloudhsm/v20191112/api.json +159 -0
- tccli/services/cloudstudio/v20210524/api.json +201 -0
- tccli/services/cls/v20201016/api.json +719 -6
- tccli/services/cme/v20191029/api.json +736 -0
- tccli/services/cmq/v20190304/api.json +155 -0
- tccli/services/cpdp/v20190820/api.json +4099 -0
- tccli/services/csip/v20221121/api.json +207 -0
- tccli/services/cvm/v20170312/api.json +905 -6
- tccli/services/cwp/cwp_client.py +163 -4
- tccli/services/cwp/v20180228/api.json +3090 -0
- tccli/services/cwp/v20180228/examples.json +24 -0
- tccli/services/cynosdb/v20190107/api.json +936 -0
- tccli/services/dasb/v20191018/api.json +538 -0
- tccli/services/dayu/v20180709/api.json +1067 -0
- tccli/services/dbbrain/v20191016/api.json +353 -0
- tccli/services/dbbrain/v20210527/api.json +594 -0
- tccli/services/dbdc/v20201029/api.json +173 -0
- tccli/services/dc/v20180410/api.json +274 -0
- tccli/services/dcdb/v20180411/api.json +714 -0
- tccli/services/dlc/v20210125/api.json +987 -0
- tccli/services/dnspod/v20210323/api.json +622 -0
- tccli/services/domain/v20180808/api.json +229 -0
- tccli/services/drm/v20181115/api.json +76 -0
- tccli/services/ds/v20180523/api.json +99 -0
- tccli/services/dts/v20180330/api.json +228 -0
- tccli/services/dts/v20211206/api.json +548 -0
- tccli/services/eb/v20210416/api.json +256 -0
- tccli/services/ecc/v20181213/api.json +70 -0
- tccli/services/ecdn/v20191012/api.json +217 -0
- tccli/services/ecm/v20190719/api.json +1127 -0
- tccli/services/eiam/v20210420/api.json +348 -0
- tccli/services/eis/v20210601/api.json +86 -0
- tccli/services/emr/v20190103/api.json +754 -0
- tccli/services/es/v20180416/api.json +582 -0
- tccli/services/ess/v20201111/api.json +624 -1
- tccli/services/essbasic/v20210526/api.json +625 -3
- tccli/services/facefusion/v20181201/api.json +66 -0
- tccli/services/facefusion/v20220927/api.json +38 -0
- tccli/services/faceid/v20180301/api.json +370 -0
- tccli/services/fmu/v20191213/api.json +72 -0
- tccli/services/ft/v20200304/api.json +45 -0
- tccli/services/gaap/v20180529/api.json +880 -0
- tccli/services/gme/v20180711/api.json +267 -0
- tccli/services/goosefs/v20220519/api.json +14 -0
- tccli/services/gs/v20191118/api.json +45 -1
- tccli/services/hasim/v20210716/api.json +261 -0
- tccli/services/hcm/v20181106/api.json +27 -0
- tccli/services/iai/v20180301/api.json +363 -0
- tccli/services/iai/v20200303/api.json +376 -0
- tccli/services/icr/v20211014/api.json +49 -0
- tccli/services/ie/v20200304/api.json +401 -0
- tccli/services/iecp/v20210914/api.json +923 -0
- tccli/services/ims/v20200713/api.json +102 -0
- tccli/services/ims/v20201229/api.json +110 -0
- tccli/services/iot/v20180123/api.json +322 -0
- tccli/services/iotcloud/v20210408/api.json +508 -0
- tccli/services/iotexplorer/v20190423/api.json +660 -0
- tccli/services/iottid/v20190411/api.json +38 -0
- tccli/services/iotvideo/v20191126/api.json +398 -0
- tccli/services/iotvideo/v20201215/api.json +583 -0
- tccli/services/iotvideo/v20211125/api.json +692 -0
- tccli/services/iotvideoindustry/v20201201/api.json +639 -0
- tccli/services/irp/v20220805/api.json +152 -0
- tccli/services/ivld/v20210903/api.json +258 -0
- tccli/services/keewidb/v20220308/api.json +424 -0
- tccli/services/kms/v20190118/api.json +230 -0
- tccli/services/lcic/v20220817/api.json +414 -0
- tccli/services/lighthouse/v20200324/api.json +541 -2
- tccli/services/lighthouse/v20200324/examples.json +1 -1
- tccli/services/live/v20180801/api.json +1253 -66
- tccli/services/live/v20180801/examples.json +16 -16
- tccli/services/mariadb/v20170312/api.json +643 -0
- tccli/services/market/v20191010/api.json +13 -0
- tccli/services/memcached/v20190318/api.json +39 -0
- tccli/services/mmps/v20200710/api.json +175 -0
- tccli/services/mna/v20210119/api.json +120 -0
- tccli/services/mongodb/v20190725/api.json +440 -0
- tccli/services/monitor/v20180724/api.json +1599 -3
- tccli/services/monitor/v20180724/examples.json +1 -1
- tccli/services/mps/v20190612/api.json +2136 -115
- tccli/services/mps/v20190612/examples.json +2 -2
- tccli/services/mrs/v20200910/api.json +1016 -0
- tccli/services/ms/v20180408/api.json +183 -0
- tccli/services/msp/v20180319/api.json +54 -0
- tccli/services/nlp/v20190408/api.json +189 -0
- tccli/services/nlp/v20190408/examples.json +1 -1
- tccli/services/oceanus/v20190422/api.json +373 -0
- tccli/services/ocr/v20181119/api.json +1585 -7
- tccli/services/omics/v20221128/api.json +176 -0
- tccli/services/organization/v20181225/api.json +75 -0
- tccli/services/organization/v20210331/api.json +155 -0
- tccli/services/partners/v20180321/api.json +281 -0
- tccli/services/pds/v20210701/api.json +12 -0
- tccli/services/postgres/v20170312/api.json +823 -0
- tccli/services/privatedns/v20201028/api.json +162 -0
- tccli/services/pts/v20210728/api.json +620 -0
- tccli/services/rce/v20201103/api.json +85 -0
- tccli/services/redis/v20180412/api.json +867 -14
- tccli/services/redis/v20180412/examples.json +2 -2
- tccli/services/region/v20220627/api.json +30 -0
- tccli/services/rkp/v20191209/api.json +50 -0
- tccli/services/rum/v20210622/api.json +706 -0
- tccli/services/scf/v20180416/api.json +583 -0
- tccli/services/ses/v20201002/api.json +178 -0
- tccli/services/smh/v20210712/api.json +99 -0
- tccli/services/smop/v20201203/api.json +24 -0
- tccli/services/smpn/v20190822/api.json +32 -0
- tccli/services/sms/v20190711/api.json +153 -0
- tccli/services/sms/v20210111/api.json +168 -0
- tccli/services/soe/v20180724/api.json +114 -0
- tccli/services/sqlserver/v20180328/api.json +1012 -0
- tccli/services/ssa/v20180608/api.json +580 -0
- tccli/services/ssl/v20191205/api.json +412 -0
- tccli/services/sslpod/v20190605/api.json +75 -0
- tccli/services/ssm/v20190923/api.json +168 -0
- tccli/services/sts/v20180813/api.json +47 -0
- tccli/services/taf/v20200210/api.json +55 -0
- tccli/services/tag/v20180813/api.json +217 -0
- tccli/services/tan/v20220420/api.json +3 -0
- tccli/services/tat/v20201028/api.json +213 -0
- tccli/services/tbaas/v20180416/api.json +353 -0
- tccli/services/tbp/v20190311/api.json +41 -0
- tccli/services/tbp/v20190627/api.json +34 -0
- tccli/services/tcaplusdb/v20190823/api.json +554 -0
- tccli/services/tcbr/v20220217/api.json +188 -0
- tccli/services/tcm/v20210413/api.json +235 -0
- tccli/services/tcr/v20190924/api.json +711 -0
- tccli/services/tcss/v20201101/api.json +3101 -24
- tccli/services/tcss/v20201101/examples.json +6 -6
- tccli/services/tdcpg/v20211118/api.json +179 -0
- tccli/services/tdid/v20210519/api.json +369 -0
- tccli/services/tdmq/v20200217/api.json +1166 -0
- tccli/services/tds/v20220801/api.json +61 -0
- tccli/services/tem/v20210701/api.json +747 -0
- tccli/services/teo/v20220106/api.json +81 -0
- tccli/services/teo/v20220901/api.json +1234 -17
- tccli/services/thpc/v20211109/api.json +93 -0
- tccli/services/thpc/v20220401/api.json +216 -0
- tccli/services/thpc/v20230321/api.json +222 -0
- tccli/services/tic/v20201117/api.json +76 -0
- tccli/services/tics/v20181115/api.json +60 -0
- tccli/services/tiia/v20190529/api.json +229 -0
- tccli/services/tione/v20191022/api.json +228 -0
- tccli/services/tione/v20211111/api.json +945 -0
- tccli/services/tiw/v20190919/api.json +472 -0
- tccli/services/tke/v20180525/api.json +1751 -0
- tccli/services/tms/v20201229/api.json +49 -0
- tccli/services/tmt/v20180321/api.json +70 -0
- tccli/services/tourism/v20230215/api.json +16 -0
- tccli/services/trdp/v20220726/api.json +77 -0
- tccli/services/trp/v20210515/api.json +468 -0
- tccli/services/trro/v20220325/api.json +187 -0
- tccli/services/trtc/v20190722/api.json +501 -0
- tccli/services/tse/v20201207/api.json +185 -0
- tccli/services/tsf/tsf_client.py +57 -4
- tccli/services/tsf/v20180326/api.json +2409 -0
- tccli/services/tsf/v20180326/examples.json +8 -0
- tccli/services/tsw/v20210412/api.json +2 -0
- tccli/services/tts/v20190823/api.json +43 -0
- tccli/services/ump/v20200918/api.json +168 -0
- tccli/services/vm/v20201229/api.json +147 -0
- tccli/services/vm/v20210922/api.json +154 -0
- tccli/services/vms/v20200902/api.json +15 -0
- tccli/services/vod/v20180717/api.json +2787 -0
- tccli/services/vpc/v20170312/api.json +2175 -0
- tccli/services/vpc/v20170312/examples.json +16 -0
- tccli/services/vpc/vpc_client.py +114 -8
- tccli/services/vrs/v20200824/api.json +35 -0
- tccli/services/waf/v20180125/api.json +607 -0
- tccli/services/wav/v20210129/api.json +395 -0
- tccli/services/wedata/v20210820/api.json +2154 -0
- tccli/services/yinsuda/v20220527/api.json +194 -0
- tccli/services/yunsou/v20191115/api.json +50 -0
- {tccli-3.0.875.1.dist-info → tccli-3.0.877.1.dist-info}/METADATA +2 -2
- {tccli-3.0.875.1.dist-info → tccli-3.0.877.1.dist-info}/RECORD +234 -234
- {tccli-3.0.875.1.dist-info → tccli-3.0.877.1.dist-info}/LICENSE +0 -0
- {tccli-3.0.875.1.dist-info → tccli-3.0.877.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.875.1.dist-info → tccli-3.0.877.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.875.1.dist-info → tccli-3.0.877.1.dist-info}/top_level.txt +0 -0
tccli/services/cwp/cwp_client.py
CHANGED
@@ -1577,6 +1577,58 @@ def doDeletePrivilegeEvents(args, parsed_globals):
|
|
1577
1577
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1578
1578
|
|
1579
1579
|
|
1580
|
+
def doDescribeLogStorageRecord(args, parsed_globals):
|
1581
|
+
g_param = parse_global_arg(parsed_globals)
|
1582
|
+
|
1583
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1584
|
+
cred = credential.CVMRoleCredential()
|
1585
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1586
|
+
cred = credential.STSAssumeRoleCredential(
|
1587
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1588
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
1589
|
+
)
|
1590
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
1591
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1592
|
+
else:
|
1593
|
+
cred = credential.Credential(
|
1594
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1595
|
+
)
|
1596
|
+
http_profile = HttpProfile(
|
1597
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1598
|
+
reqMethod="POST",
|
1599
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
1600
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1601
|
+
)
|
1602
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1603
|
+
if g_param[OptionsDefine.Language]:
|
1604
|
+
profile.language = g_param[OptionsDefine.Language]
|
1605
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1606
|
+
client = mod.CwpClient(cred, g_param[OptionsDefine.Region], profile)
|
1607
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1608
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1609
|
+
model = models.DescribeLogStorageRecordRequest()
|
1610
|
+
model.from_json_string(json.dumps(args))
|
1611
|
+
start_time = time.time()
|
1612
|
+
while True:
|
1613
|
+
rsp = client.DescribeLogStorageRecord(model)
|
1614
|
+
result = rsp.to_json_string()
|
1615
|
+
try:
|
1616
|
+
json_obj = json.loads(result)
|
1617
|
+
except TypeError as e:
|
1618
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1619
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1620
|
+
break
|
1621
|
+
cur_time = time.time()
|
1622
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1623
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1624
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1625
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1626
|
+
else:
|
1627
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1628
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1629
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1630
|
+
|
1631
|
+
|
1580
1632
|
def doExportAttackLogs(args, parsed_globals):
|
1581
1633
|
g_param = parse_global_arg(parsed_globals)
|
1582
1634
|
|
@@ -6673,6 +6725,58 @@ def doExportBruteAttacks(args, parsed_globals):
|
|
6673
6725
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
6674
6726
|
|
6675
6727
|
|
6728
|
+
def doDescribeLogStorageConfig(args, parsed_globals):
|
6729
|
+
g_param = parse_global_arg(parsed_globals)
|
6730
|
+
|
6731
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
6732
|
+
cred = credential.CVMRoleCredential()
|
6733
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
6734
|
+
cred = credential.STSAssumeRoleCredential(
|
6735
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
6736
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
6737
|
+
)
|
6738
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
6739
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
6740
|
+
else:
|
6741
|
+
cred = credential.Credential(
|
6742
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
6743
|
+
)
|
6744
|
+
http_profile = HttpProfile(
|
6745
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
6746
|
+
reqMethod="POST",
|
6747
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
6748
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
6749
|
+
)
|
6750
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
6751
|
+
if g_param[OptionsDefine.Language]:
|
6752
|
+
profile.language = g_param[OptionsDefine.Language]
|
6753
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
6754
|
+
client = mod.CwpClient(cred, g_param[OptionsDefine.Region], profile)
|
6755
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
6756
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
6757
|
+
model = models.DescribeLogStorageConfigRequest()
|
6758
|
+
model.from_json_string(json.dumps(args))
|
6759
|
+
start_time = time.time()
|
6760
|
+
while True:
|
6761
|
+
rsp = client.DescribeLogStorageConfig(model)
|
6762
|
+
result = rsp.to_json_string()
|
6763
|
+
try:
|
6764
|
+
json_obj = json.loads(result)
|
6765
|
+
except TypeError as e:
|
6766
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
6767
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
6768
|
+
break
|
6769
|
+
cur_time = time.time()
|
6770
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
6771
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
6772
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
6773
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
6774
|
+
else:
|
6775
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
6776
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
6777
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
6778
|
+
|
6779
|
+
|
6676
6780
|
def doModifyBanMode(args, parsed_globals):
|
6677
6781
|
g_param = parse_global_arg(parsed_globals)
|
6678
6782
|
|
@@ -7245,6 +7349,58 @@ def doExportMalwares(args, parsed_globals):
|
|
7245
7349
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
7246
7350
|
|
7247
7351
|
|
7352
|
+
def doDescribeBaselineHostDetectList(args, parsed_globals):
|
7353
|
+
g_param = parse_global_arg(parsed_globals)
|
7354
|
+
|
7355
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
7356
|
+
cred = credential.CVMRoleCredential()
|
7357
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
7358
|
+
cred = credential.STSAssumeRoleCredential(
|
7359
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
7360
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
7361
|
+
)
|
7362
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
7363
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
7364
|
+
else:
|
7365
|
+
cred = credential.Credential(
|
7366
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
7367
|
+
)
|
7368
|
+
http_profile = HttpProfile(
|
7369
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
7370
|
+
reqMethod="POST",
|
7371
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
7372
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
7373
|
+
)
|
7374
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
7375
|
+
if g_param[OptionsDefine.Language]:
|
7376
|
+
profile.language = g_param[OptionsDefine.Language]
|
7377
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
7378
|
+
client = mod.CwpClient(cred, g_param[OptionsDefine.Region], profile)
|
7379
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
7380
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
7381
|
+
model = models.DescribeBaselineHostDetectListRequest()
|
7382
|
+
model.from_json_string(json.dumps(args))
|
7383
|
+
start_time = time.time()
|
7384
|
+
while True:
|
7385
|
+
rsp = client.DescribeBaselineHostDetectList(model)
|
7386
|
+
result = rsp.to_json_string()
|
7387
|
+
try:
|
7388
|
+
json_obj = json.loads(result)
|
7389
|
+
except TypeError as e:
|
7390
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
7391
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
7392
|
+
break
|
7393
|
+
cur_time = time.time()
|
7394
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
7395
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
7396
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
7397
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
7398
|
+
else:
|
7399
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
7400
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
7401
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
7402
|
+
|
7403
|
+
|
7248
7404
|
def doExportBaselineHostDetectList(args, parsed_globals):
|
7249
7405
|
g_param = parse_global_arg(parsed_globals)
|
7250
7406
|
|
@@ -12237,7 +12393,7 @@ def doDescribeScanVulSetting(args, parsed_globals):
|
|
12237
12393
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
12238
12394
|
|
12239
12395
|
|
12240
|
-
def
|
12396
|
+
def doModifyLogStorageConfig(args, parsed_globals):
|
12241
12397
|
g_param = parse_global_arg(parsed_globals)
|
12242
12398
|
|
12243
12399
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -12266,11 +12422,11 @@ def doDescribeBaselineHostDetectList(args, parsed_globals):
|
|
12266
12422
|
client = mod.CwpClient(cred, g_param[OptionsDefine.Region], profile)
|
12267
12423
|
client._sdkVersion += ("_CLI_" + __version__)
|
12268
12424
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
12269
|
-
model = models.
|
12425
|
+
model = models.ModifyLogStorageConfigRequest()
|
12270
12426
|
model.from_json_string(json.dumps(args))
|
12271
12427
|
start_time = time.time()
|
12272
12428
|
while True:
|
12273
|
-
rsp = client.
|
12429
|
+
rsp = client.ModifyLogStorageConfig(model)
|
12274
12430
|
result = rsp.to_json_string()
|
12275
12431
|
try:
|
12276
12432
|
json_obj = json.loads(result)
|
@@ -14202,6 +14358,7 @@ ACTION_MAP = {
|
|
14202
14358
|
"DescribeBashRules": doDescribeBashRules,
|
14203
14359
|
"DescribeBaselineRuleList": doDescribeBaselineRuleList,
|
14204
14360
|
"DeletePrivilegeEvents": doDeletePrivilegeEvents,
|
14361
|
+
"DescribeLogStorageRecord": doDescribeLogStorageRecord,
|
14205
14362
|
"ExportAttackLogs": doExportAttackLogs,
|
14206
14363
|
"DescribeBaselineHostTop": doDescribeBaselineHostTop,
|
14207
14364
|
"DescribeBanRegions": doDescribeBanRegions,
|
@@ -14300,6 +14457,7 @@ ACTION_MAP = {
|
|
14300
14457
|
"DescribeSaveOrUpdateWarnings": doDescribeSaveOrUpdateWarnings,
|
14301
14458
|
"ExportBaselineRuleDetectList": doExportBaselineRuleDetectList,
|
14302
14459
|
"ExportBruteAttacks": doExportBruteAttacks,
|
14460
|
+
"DescribeLogStorageConfig": doDescribeLogStorageConfig,
|
14303
14461
|
"ModifyBanMode": doModifyBanMode,
|
14304
14462
|
"UpdateMachineTags": doUpdateMachineTags,
|
14305
14463
|
"ModifyWebPageProtectDir": doModifyWebPageProtectDir,
|
@@ -14311,6 +14469,7 @@ ACTION_MAP = {
|
|
14311
14469
|
"DescribeBaselinePolicyList": doDescribeBaselinePolicyList,
|
14312
14470
|
"DescribeProtectDirList": doDescribeProtectDirList,
|
14313
14471
|
"ExportMalwares": doExportMalwares,
|
14472
|
+
"DescribeBaselineHostDetectList": doDescribeBaselineHostDetectList,
|
14314
14473
|
"ExportBaselineHostDetectList": doExportBaselineHostDetectList,
|
14315
14474
|
"ExportWebPageEventList": doExportWebPageEventList,
|
14316
14475
|
"DescribeBruteAttackList": doDescribeBruteAttackList,
|
@@ -14407,7 +14566,7 @@ ACTION_MAP = {
|
|
14407
14566
|
"DescribeMalWareList": doDescribeMalWareList,
|
14408
14567
|
"DeleteAttackLogs": doDeleteAttackLogs,
|
14409
14568
|
"DescribeScanVulSetting": doDescribeScanVulSetting,
|
14410
|
-
"
|
14569
|
+
"ModifyLogStorageConfig": doModifyLogStorageConfig,
|
14411
14570
|
"DescribeAssetInitServiceList": doDescribeAssetInitServiceList,
|
14412
14571
|
"DescribeExpertServiceList": doDescribeExpertServiceList,
|
14413
14572
|
"DescribeBaselineItemIgnoreList": doDescribeBaselineItemIgnoreList,
|