tccli 3.0.1215.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/configure.py +46 -1
- 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 -3
- 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 +118 -4
- tccli/services/asr/v20190614/api.json +21 -20
- 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 +80 -4
- tccli/services/bi/v20220105/examples.json +1 -1
- tccli/services/billing/billing_client.py +53 -0
- tccli/services/billing/v20180709/api.json +330 -24
- tccli/services/billing/v20180709/examples.json +8 -0
- tccli/services/bsca/v20210811/api.json +223 -18
- tccli/services/bsca/v20210811/examples.json +4 -4
- 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/ccc_client.py +53 -0
- tccli/services/ccc/v20200210/api.json +541 -325
- tccli/services/ccc/v20200210/examples.json +26 -18
- tccli/services/cdb/cdb_client.py +13 -13
- tccli/services/cdb/v20170320/api.json +308 -274
- 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/cdn/v20180606/api.json +5 -3
- 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 +54 -4
- 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 +1895 -2011
- tccli/services/cfw/v20190904/examples.json +175 -171
- tccli/services/ciam/v20220331/api.json +316 -315
- tccli/services/ciam/v20220331/examples.json +49 -49
- 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/cloudaudit_client.py +30 -30
- tccli/services/cloudaudit/v20190319/api.json +254 -211
- tccli/services/cloudaudit/v20190319/examples.json +19 -19
- 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 +935 -147
- tccli/services/cls/v20201016/examples.json +43 -5
- tccli/services/csip/v20221121/api.json +2566 -2386
- tccli/services/csip/v20221121/examples.json +108 -108
- tccli/services/cvm/v20170312/api.json +191 -112
- tccli/services/cvm/v20170312/examples.json +2 -2
- tccli/services/cwp/cwp_client.py +4 -110
- tccli/services/cwp/v20180228/api.json +6498 -6252
- tccli/services/cwp/v20180228/examples.json +372 -412
- tccli/services/cynosdb/v20190107/api.json +170 -110
- tccli/services/cynosdb/v20190107/examples.json +91 -91
- tccli/services/dasb/v20191018/api.json +859 -637
- 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/domain/v20180808/api.json +3 -3
- tccli/services/domain/v20180808/examples.json +3 -3
- tccli/services/dts/v20211206/api.json +4 -4
- tccli/services/eb/v20210416/api.json +15 -15
- tccli/services/eb/v20210416/examples.json +1 -1
- 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/es_client.py +249 -37
- tccli/services/es/v20180416/api.json +550 -0
- tccli/services/es/v20180416/examples.json +33 -1
- tccli/services/ess/ess_client.py +53 -0
- tccli/services/ess/v20201111/api.json +192 -38
- tccli/services/ess/v20201111/examples.json +35 -9
- tccli/services/essbasic/essbasic_client.py +106 -0
- tccli/services/essbasic/v20210526/api.json +287 -60
- tccli/services/essbasic/v20210526/examples.json +58 -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/gaap/v20180529/api.json +44 -26
- tccli/services/gaap/v20180529/examples.json +24 -30
- 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 +73 -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 +279 -9
- 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 +10 -12
- 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 +2263 -758
- 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/organization_client.py +352 -34
- tccli/services/organization/v20210331/api.json +464 -4
- tccli/services/organization/v20210331/examples.json +49 -1
- 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/region/v20220627/api.json +1 -1
- tccli/services/rum/v20210622/api.json +9 -0
- tccli/services/scf/scf_client.py +269 -4
- tccli/services/scf/v20180416/api.json +569 -15
- tccli/services/scf/v20180416/examples.json +47 -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 +98 -5
- tccli/services/ssm/v20190923/api.json +292 -231
- tccli/services/ssm/v20190923/examples.json +42 -42
- tccli/services/tat/v20201028/api.json +124 -122
- tccli/services/tat/v20201028/examples.json +24 -30
- 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 +1984 -1437
- tccli/services/tcss/v20201101/examples.json +350 -368
- tccli/services/tdmq/v20200217/api.json +603 -464
- tccli/services/tdmq/v20200217/examples.json +105 -105
- tccli/services/tds/v20220801/api.json +4 -4
- tccli/services/tem/v20210701/api.json +429 -372
- tccli/services/tem/v20210701/examples.json +85 -85
- tccli/services/teo/teo_client.py +277 -12
- tccli/services/teo/v20220901/api.json +1029 -124
- tccli/services/teo/v20220901/examples.json +84 -8
- tccli/services/thpc/v20230321/api.json +5 -5
- tccli/services/tke/tke_client.py +270 -58
- tccli/services/tke/v20180525/api.json +79 -27
- tccli/services/tke/v20180525/examples.json +9 -1
- tccli/services/tke/v20220501/api.json +176 -0
- tccli/services/tke/v20220501/examples.json +24 -0
- tccli/services/tms/tms_client.py +4 -57
- tccli/services/tms/v20201229/api.json +0 -354
- tccli/services/tms/v20201229/examples.json +0 -8
- 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 +293 -52
- 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 +1195 -892
- tccli/services/vpc/v20170312/examples.json +84 -68
- tccli/services/vpc/vpc_client.py +168 -62
- tccli/services/waf/v20180125/api.json +2611 -2187
- tccli/services/waf/v20180125/examples.json +224 -284
- tccli/services/waf/waf_client.py +225 -119
- tccli/services/wav/v20210129/api.json +48 -48
- tccli/services/wav/v20210129/examples.json +4 -4
- tccli/services/wedata/v20210820/api.json +1595 -25
- tccli/services/wedata/v20210820/examples.json +44 -4
- tccli/services/wedata/wedata_client.py +265 -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.1215.1.dist-info → tccli-3.0.1217.1.dist-info}/METADATA +6 -2
- {tccli-3.0.1215.1.dist-info → tccli-3.0.1217.1.dist-info}/RECORD +278 -265
- tccli/services/cr/__init__.py +0 -4
- tccli/services/cr/cr_client.py +0 -1626
- tccli/services/cr/v20180321/api.json +0 -2829
- tccli/services/cr/v20180321/examples.json +0 -235
- {tccli-3.0.1215.1.dist-info → tccli-3.0.1217.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1215.1.dist-info → tccli-3.0.1217.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1215.1.dist-info → tccli-3.0.1217.1.dist-info}/license_files/LICENSE +0 -0
@@ -202,7 +202,7 @@
|
|
202
202
|
{
|
203
203
|
"document": "查询一个或多个CDH实例的详细信息",
|
204
204
|
"input": "https://cvm.tencentcloudapi.com/?Action=DescribeHosts\n&Filters.0.Name=zone\n&Filters.0.Values.0=ap-guangzhou-2\n&Offset=0\n&Limit=20\n&<公共请求参数>",
|
205
|
-
"output": "{\n \"Response\": {\n \"TotalCount\": 1,\n \"HostSet\": [\n {\n \"Placement\": {\n \"Zone\": \"ap-guangzhou-
|
205
|
+
"output": "{\n \"Response\": {\n \"TotalCount\": 1,\n \"HostSet\": [\n {\n \"Placement\": {\n \"Zone\": \"ap-guangzhou-5\",\n \"ProjectId\": 0\n },\n \"HostId\": \"host-8th3ybbw\",\n \"HostType\": \"HM50\",\n \"HostName\": \"myHost\",\n \"CageId\": \"\",\n \"HostChargeType\": \"PREPAID\",\n \"RenewFlag\": \"NOTIFY_AND_AUTO_RENEW\",\n \"CreatedTime\": \"2024-09-30T03:17:49Z\",\n \"ExpiredTime\": \"2024-11-30T03:17:51Z\",\n \"InstanceIds\": [\n \"ins-flx4u4ck\",\n \"ins-p5s3wcq2\"\n ],\n \"HostState\": \"RUNNING\",\n \"Tags\": [],\n \"HostResource\": {\n \"CpuTotal\": 336,\n \"CpuAvailable\": 18,\n \"MemTotal\": 700,\n \"MemAvailable\": 40,\n \"DiskTotal\": 0,\n \"DiskAvailable\": 0,\n \"DiskType\": \"\",\n \"GpuTotal\": 0,\n \"GpuAvailable\": 0\n }\n }\n ],\n \"RequestId\": \"6EF60BEC-0242-43AF-BB20-270359FB54A7\"\n }\n}",
|
206
206
|
"title": "查询CDH实例列表"
|
207
207
|
}
|
208
208
|
],
|
@@ -316,7 +316,7 @@
|
|
316
316
|
{
|
317
317
|
"document": "",
|
318
318
|
"input": "POST / HTTP/1.1\nHost: cvm.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeInstancesActionTimer\n<公共请求参数>\n\n{\n \"InstanceIds\": [\n \"ins-37qv3ucj\"\n ]\n}",
|
319
|
-
"output": "{\n \"Response\": {\n \"ActionTimers\": [\n {\n \"
|
319
|
+
"output": "{\n \"Response\": {\n \"ActionTimers\": [\n {\n \"ActionTime\": \"2024-10-23T11:26:40Z\",\n \"ActionTimerId\": \"913d357c-ac08-449d-b283-5999f4fb7965\",\n \"Externals\": {},\n \"InstanceId\": \"ins-gs4iu6u3\",\n \"Status\": \"UNDO\",\n \"TimerAction\": \"TerminateInstances\"\n }\n ],\n \"RequestId\": \"a247225e-261b-4289-8426-feadc9a3c39c\"\n }\n}",
|
320
320
|
"title": "查询定时任务"
|
321
321
|
}
|
322
322
|
],
|
tccli/services/cwp/cwp_client.py
CHANGED
@@ -20453,58 +20453,6 @@ def doDescribeLicenseList(args, parsed_globals):
|
|
20453
20453
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
20454
20454
|
|
20455
20455
|
|
20456
|
-
def doCreateCloudProtectServiceOrderRecord(args, parsed_globals):
|
20457
|
-
g_param = parse_global_arg(parsed_globals)
|
20458
|
-
|
20459
|
-
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
20460
|
-
cred = credential.CVMRoleCredential()
|
20461
|
-
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
20462
|
-
cred = credential.STSAssumeRoleCredential(
|
20463
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
20464
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
20465
|
-
)
|
20466
|
-
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):
|
20467
|
-
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
20468
|
-
else:
|
20469
|
-
cred = credential.Credential(
|
20470
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
20471
|
-
)
|
20472
|
-
http_profile = HttpProfile(
|
20473
|
-
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
20474
|
-
reqMethod="POST",
|
20475
|
-
endpoint=g_param[OptionsDefine.Endpoint],
|
20476
|
-
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
20477
|
-
)
|
20478
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
20479
|
-
if g_param[OptionsDefine.Language]:
|
20480
|
-
profile.language = g_param[OptionsDefine.Language]
|
20481
|
-
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
20482
|
-
client = mod.CwpClient(cred, g_param[OptionsDefine.Region], profile)
|
20483
|
-
client._sdkVersion += ("_CLI_" + __version__)
|
20484
|
-
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
20485
|
-
model = models.CreateCloudProtectServiceOrderRecordRequest()
|
20486
|
-
model.from_json_string(json.dumps(args))
|
20487
|
-
start_time = time.time()
|
20488
|
-
while True:
|
20489
|
-
rsp = client.CreateCloudProtectServiceOrderRecord(model)
|
20490
|
-
result = rsp.to_json_string()
|
20491
|
-
try:
|
20492
|
-
json_obj = json.loads(result)
|
20493
|
-
except TypeError as e:
|
20494
|
-
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
20495
|
-
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
20496
|
-
break
|
20497
|
-
cur_time = time.time()
|
20498
|
-
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
20499
|
-
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
20500
|
-
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
20501
|
-
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
20502
|
-
else:
|
20503
|
-
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
20504
|
-
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
20505
|
-
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
20506
|
-
|
20507
|
-
|
20508
20456
|
def doStartBaselineDetect(args, parsed_globals):
|
20509
20457
|
g_param = parse_global_arg(parsed_globals)
|
20510
20458
|
|
@@ -21181,58 +21129,6 @@ def doDescribeVulLabels(args, parsed_globals):
|
|
21181
21129
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
21182
21130
|
|
21183
21131
|
|
21184
|
-
def doDescribeHistoryService(args, parsed_globals):
|
21185
|
-
g_param = parse_global_arg(parsed_globals)
|
21186
|
-
|
21187
|
-
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
21188
|
-
cred = credential.CVMRoleCredential()
|
21189
|
-
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
21190
|
-
cred = credential.STSAssumeRoleCredential(
|
21191
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
21192
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
21193
|
-
)
|
21194
|
-
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):
|
21195
|
-
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
21196
|
-
else:
|
21197
|
-
cred = credential.Credential(
|
21198
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
21199
|
-
)
|
21200
|
-
http_profile = HttpProfile(
|
21201
|
-
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
21202
|
-
reqMethod="POST",
|
21203
|
-
endpoint=g_param[OptionsDefine.Endpoint],
|
21204
|
-
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
21205
|
-
)
|
21206
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
21207
|
-
if g_param[OptionsDefine.Language]:
|
21208
|
-
profile.language = g_param[OptionsDefine.Language]
|
21209
|
-
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
21210
|
-
client = mod.CwpClient(cred, g_param[OptionsDefine.Region], profile)
|
21211
|
-
client._sdkVersion += ("_CLI_" + __version__)
|
21212
|
-
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
21213
|
-
model = models.DescribeHistoryServiceRequest()
|
21214
|
-
model.from_json_string(json.dumps(args))
|
21215
|
-
start_time = time.time()
|
21216
|
-
while True:
|
21217
|
-
rsp = client.DescribeHistoryService(model)
|
21218
|
-
result = rsp.to_json_string()
|
21219
|
-
try:
|
21220
|
-
json_obj = json.loads(result)
|
21221
|
-
except TypeError as e:
|
21222
|
-
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
21223
|
-
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
21224
|
-
break
|
21225
|
-
cur_time = time.time()
|
21226
|
-
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
21227
|
-
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
21228
|
-
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
21229
|
-
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
21230
|
-
else:
|
21231
|
-
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
21232
|
-
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
21233
|
-
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
21234
|
-
|
21235
|
-
|
21236
21132
|
def doStopBaselineDetect(args, parsed_globals):
|
21237
21133
|
g_param = parse_global_arg(parsed_globals)
|
21238
21134
|
|
@@ -21909,7 +21805,7 @@ def doDescribeRansomDefenseStrategyMachines(args, parsed_globals):
|
|
21909
21805
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
21910
21806
|
|
21911
21807
|
|
21912
|
-
def
|
21808
|
+
def doDescribeHistoryService(args, parsed_globals):
|
21913
21809
|
g_param = parse_global_arg(parsed_globals)
|
21914
21810
|
|
21915
21811
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -21938,11 +21834,11 @@ def doDescribeCloudProtectServiceOrderList(args, parsed_globals):
|
|
21938
21834
|
client = mod.CwpClient(cred, g_param[OptionsDefine.Region], profile)
|
21939
21835
|
client._sdkVersion += ("_CLI_" + __version__)
|
21940
21836
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
21941
|
-
model = models.
|
21837
|
+
model = models.DescribeHistoryServiceRequest()
|
21942
21838
|
model.from_json_string(json.dumps(args))
|
21943
21839
|
start_time = time.time()
|
21944
21840
|
while True:
|
21945
|
-
rsp = client.
|
21841
|
+
rsp = client.DescribeHistoryService(model)
|
21946
21842
|
result = rsp.to_json_string()
|
21947
21843
|
try:
|
21948
21844
|
json_obj = json.loads(result)
|
@@ -27253,7 +27149,6 @@ ACTION_MAP = {
|
|
27253
27149
|
"ExportVulDetectionReport": doExportVulDetectionReport,
|
27254
27150
|
"ModifyWarningHostConfig": doModifyWarningHostConfig,
|
27255
27151
|
"DescribeLicenseList": doDescribeLicenseList,
|
27256
|
-
"CreateCloudProtectServiceOrderRecord": doCreateCloudProtectServiceOrderRecord,
|
27257
27152
|
"StartBaselineDetect": doStartBaselineDetect,
|
27258
27153
|
"DescribeSecurityProtectionStat": doDescribeSecurityProtectionStat,
|
27259
27154
|
"TrustMalwares": doTrustMalwares,
|
@@ -27267,7 +27162,6 @@ ACTION_MAP = {
|
|
27267
27162
|
"DescribeSecurityBroadcasts": doDescribeSecurityBroadcasts,
|
27268
27163
|
"DescribeAssetTypes": doDescribeAssetTypes,
|
27269
27164
|
"DescribeVulLabels": doDescribeVulLabels,
|
27270
|
-
"DescribeHistoryService": doDescribeHistoryService,
|
27271
27165
|
"StopBaselineDetect": doStopBaselineDetect,
|
27272
27166
|
"ExportRansomDefenseBackupList": doExportRansomDefenseBackupList,
|
27273
27167
|
"DescribeAssetDiskList": doDescribeAssetDiskList,
|
@@ -27281,7 +27175,7 @@ ACTION_MAP = {
|
|
27281
27175
|
"RemoveLocalStorageItem": doRemoveLocalStorageItem,
|
27282
27176
|
"DescribeBashPolicies": doDescribeBashPolicies,
|
27283
27177
|
"DescribeRansomDefenseStrategyMachines": doDescribeRansomDefenseStrategyMachines,
|
27284
|
-
"
|
27178
|
+
"DescribeHistoryService": doDescribeHistoryService,
|
27285
27179
|
"DescribeVulCountByDates": doDescribeVulCountByDates,
|
27286
27180
|
"ExportVulEffectHostList": doExportVulEffectHostList,
|
27287
27181
|
"DescribeVulStoreList": doDescribeVulStoreList,
|