tccli 3.0.1343.1__py2.py3-none-any.whl → 3.0.1345.1__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tccli/__init__.py +1 -1
- tccli/services/__init__.py +6 -0
- tccli/services/aiart/aiart_client.py +167 -61
- tccli/services/aiart/v20221229/api.json +253 -0
- tccli/services/aiart/v20221229/examples.json +16 -0
- tccli/services/ams/v20201229/api.json +46 -46
- tccli/services/ams/v20201229/examples.json +1 -1
- tccli/services/apm/v20210622/api.json +228 -0
- tccli/services/apm/v20210622/examples.json +1 -1
- tccli/services/batch/batch_client.py +53 -0
- tccli/services/batch/v20170312/api.json +127 -2
- tccli/services/batch/v20170312/examples.json +8 -0
- tccli/services/bh/v20230418/api.json +282 -1
- tccli/services/bh/v20230418/examples.json +3 -3
- tccli/services/bi/v20220105/api.json +9 -0
- tccli/services/ccc/ccc_client.py +61 -8
- tccli/services/ccc/v20200210/api.json +130 -0
- tccli/services/ccc/v20200210/examples.json +8 -0
- tccli/services/cdb/v20170320/api.json +103 -103
- tccli/services/cdb/v20170320/examples.json +5 -5
- tccli/services/cdwch/cdwch_client.py +53 -0
- tccli/services/cdwch/v20200915/api.json +410 -0
- tccli/services/cdwch/v20200915/examples.json +8 -0
- tccli/services/cdwdoris/v20211228/api.json +22 -2
- tccli/services/cfg/v20210820/api.json +72 -0
- tccli/services/ckafka/v20190819/api.json +21 -1
- tccli/services/csip/csip_client.py +326 -8
- tccli/services/csip/v20221121/api.json +2015 -335
- tccli/services/csip/v20221121/examples.json +65 -5
- tccli/services/cvm/v20170312/api.json +16 -5
- tccli/services/cvm/v20170312/examples.json +1 -1
- tccli/services/dlc/v20210125/api.json +61 -0
- tccli/services/emr/emr_client.py +167 -8
- tccli/services/emr/v20190103/api.json +831 -15
- tccli/services/emr/v20190103/examples.json +24 -0
- tccli/services/es/v20250101/examples.json +2 -2
- tccli/services/ess/v20201111/api.json +57 -8
- tccli/services/essbasic/v20210526/api.json +23 -3
- tccli/services/gs/v20191118/api.json +41 -2
- tccli/services/gs/v20191118/examples.json +2 -2
- tccli/services/hunyuan/v20230901/api.json +1 -1
- tccli/services/igtm/__init__.py +4 -0
- tccli/services/igtm/igtm_client.py +1373 -0
- tccli/services/igtm/v20231024/api.json +3569 -0
- tccli/services/igtm/v20231024/examples.json +207 -0
- tccli/services/ims/v20201229/api.json +20 -28
- tccli/services/ioa/ioa_client.py +114 -8
- tccli/services/ioa/v20220601/api.json +218 -3
- tccli/services/ioa/v20220601/examples.json +16 -0
- tccli/services/iss/v20230517/api.json +11 -2
- tccli/services/kms/v20190118/api.json +4 -4
- tccli/services/lighthouse/v20200324/api.json +1 -1
- tccli/services/mps/v20190612/api.json +45 -7
- tccli/services/oceanus/v20190422/api.json +168 -8
- tccli/services/ocr/v20181119/api.json +127 -118
- tccli/services/partners/v20180321/api.json +1 -1
- tccli/services/redis/v20180412/api.json +9 -0
- tccli/services/securitylake/__init__.py +4 -0
- tccli/services/securitylake/securitylake_client.py +207 -0
- tccli/services/securitylake/v20240117/api.json +723 -0
- tccli/services/securitylake/v20240117/examples.json +13 -0
- tccli/services/tcbr/v20220217/api.json +70 -0
- tccli/services/tdmq/v20200217/api.json +263 -5
- tccli/services/tdmq/v20200217/examples.json +1 -1
- tccli/services/teo/v20220901/api.json +40 -30
- tccli/services/teo/v20220901/examples.json +19 -19
- tccli/services/tione/tione_client.py +57 -4
- tccli/services/tione/v20211111/api.json +283 -1
- tccli/services/tione/v20211111/examples.json +8 -0
- tccli/services/tke/v20180525/api.json +37 -28
- tccli/services/tms/v20201229/api.json +14 -21
- tccli/services/trocket/v20230308/api.json +81 -81
- tccli/services/trocket/v20230308/examples.json +1 -1
- tccli/services/trtc/v20190722/api.json +29 -0
- tccli/services/tsf/tsf_client.py +61 -8
- tccli/services/tsf/v20180326/api.json +3161 -2106
- tccli/services/tsf/v20180326/examples.json +8 -0
- tccli/services/vdb/v20230616/api.json +49 -0
- tccli/services/vdb/v20230616/examples.json +1 -1
- tccli/services/vm/v20210922/api.json +8 -8
- tccli/services/vpc/v20170312/api.json +1 -1
- tccli/services/waf/v20180125/api.json +52 -2
- tccli/services/wav/v20210129/api.json +10 -10
- tccli/services/wav/v20210129/examples.json +3 -3
- tccli/services/wedata/v20210820/api.json +11 -0
- {tccli-3.0.1343.1.dist-info → tccli-3.0.1345.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1343.1.dist-info → tccli-3.0.1345.1.dist-info}/RECORD +90 -82
- {tccli-3.0.1343.1.dist-info → tccli-3.0.1345.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1343.1.dist-info → tccli-3.0.1345.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1343.1.dist-info → tccli-3.0.1345.1.dist-info}/license_files/LICENSE +0 -0
@@ -2454,6 +2454,28 @@
|
|
2454
2454
|
"required": false,
|
2455
2455
|
"type": "string",
|
2456
2456
|
"value_allowed_null": false
|
2457
|
+
},
|
2458
|
+
{
|
2459
|
+
"disabled": false,
|
2460
|
+
"document": "演练场景",
|
2461
|
+
"example": "[{\"TargetId\": 17, \"TargetDesc\": \"张三\"}]",
|
2462
|
+
"member": "TaskTarget",
|
2463
|
+
"name": "TaskScenario",
|
2464
|
+
"output_required": false,
|
2465
|
+
"required": false,
|
2466
|
+
"type": "list",
|
2467
|
+
"value_allowed_null": false
|
2468
|
+
},
|
2469
|
+
{
|
2470
|
+
"disabled": false,
|
2471
|
+
"document": "演练目的",
|
2472
|
+
"example": "[{\"TargetId\": 23, \"TargetDesc\": \"张三\"}]",
|
2473
|
+
"member": "TaskTarget",
|
2474
|
+
"name": "TaskPurpose",
|
2475
|
+
"output_required": false,
|
2476
|
+
"required": false,
|
2477
|
+
"type": "list",
|
2478
|
+
"value_allowed_null": false
|
2457
2479
|
}
|
2458
2480
|
],
|
2459
2481
|
"usage": "both"
|
@@ -3569,6 +3591,56 @@
|
|
3569
3591
|
],
|
3570
3592
|
"usage": "out"
|
3571
3593
|
},
|
3594
|
+
"TaskTarget": {
|
3595
|
+
"document": "演练目标",
|
3596
|
+
"members": [
|
3597
|
+
{
|
3598
|
+
"disabled": false,
|
3599
|
+
"document": "目标标签ID",
|
3600
|
+
"example": "1",
|
3601
|
+
"member": "int64",
|
3602
|
+
"name": "TargetId",
|
3603
|
+
"output_required": true,
|
3604
|
+
"required": false,
|
3605
|
+
"type": "int",
|
3606
|
+
"value_allowed_null": false
|
3607
|
+
},
|
3608
|
+
{
|
3609
|
+
"disabled": false,
|
3610
|
+
"document": "目标描述",
|
3611
|
+
"example": "迁移上云",
|
3612
|
+
"member": "string",
|
3613
|
+
"name": "TargetDesc",
|
3614
|
+
"output_required": false,
|
3615
|
+
"required": false,
|
3616
|
+
"type": "string",
|
3617
|
+
"value_allowed_null": false
|
3618
|
+
},
|
3619
|
+
{
|
3620
|
+
"disabled": false,
|
3621
|
+
"document": "1:演练场景\n2:演练目标",
|
3622
|
+
"example": "1",
|
3623
|
+
"member": "int64",
|
3624
|
+
"name": "Type",
|
3625
|
+
"output_required": false,
|
3626
|
+
"required": false,
|
3627
|
+
"type": "int",
|
3628
|
+
"value_allowed_null": false
|
3629
|
+
},
|
3630
|
+
{
|
3631
|
+
"disabled": false,
|
3632
|
+
"document": "1:平台 2:用户个人",
|
3633
|
+
"example": "1",
|
3634
|
+
"member": "int64",
|
3635
|
+
"name": "Source",
|
3636
|
+
"output_required": false,
|
3637
|
+
"required": false,
|
3638
|
+
"type": "int",
|
3639
|
+
"value_allowed_null": false
|
3640
|
+
}
|
3641
|
+
],
|
3642
|
+
"usage": "both"
|
3643
|
+
},
|
3572
3644
|
"Template": {
|
3573
3645
|
"document": "经验库",
|
3574
3646
|
"members": [
|
@@ -4600,7 +4600,7 @@
|
|
4600
4600
|
},
|
4601
4601
|
{
|
4602
4602
|
"disabled": false,
|
4603
|
-
"document": "
|
4603
|
+
"document": "只能包含字母、数字、下划线、“-”、“.”",
|
4604
4604
|
"example": "topic-test",
|
4605
4605
|
"member": "string",
|
4606
4606
|
"name": "TopicName",
|
@@ -7387,6 +7387,26 @@
|
|
7387
7387
|
"output_required": true,
|
7388
7388
|
"type": "list",
|
7389
7389
|
"value_allowed_null": false
|
7390
|
+
},
|
7391
|
+
{
|
7392
|
+
"disabled": false,
|
7393
|
+
"document": "任务描述信息\t",
|
7394
|
+
"example": "任务描述信息\t",
|
7395
|
+
"member": "string",
|
7396
|
+
"name": "Description",
|
7397
|
+
"output_required": false,
|
7398
|
+
"type": "string",
|
7399
|
+
"value_allowed_null": false
|
7400
|
+
},
|
7401
|
+
{
|
7402
|
+
"disabled": false,
|
7403
|
+
"document": "1:正常 2:隔离中",
|
7404
|
+
"example": "1",
|
7405
|
+
"member": "int64",
|
7406
|
+
"name": "IsolateStatus",
|
7407
|
+
"output_required": false,
|
7408
|
+
"type": "int",
|
7409
|
+
"value_allowed_null": false
|
7390
7410
|
}
|
7391
7411
|
],
|
7392
7412
|
"usage": "out"
|
@@ -1213,7 +1213,7 @@ def doDescribeCFWAssetStatistics(args, parsed_globals):
|
|
1213
1213
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1214
1214
|
|
1215
1215
|
|
1216
|
-
def
|
1216
|
+
def doDescribeCallRecord(args, parsed_globals):
|
1217
1217
|
g_param = parse_global_arg(parsed_globals)
|
1218
1218
|
|
1219
1219
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1242,11 +1242,11 @@ def doDescribeAssetViewVulRiskList(args, parsed_globals):
|
|
1242
1242
|
client = mod.CsipClient(cred, g_param[OptionsDefine.Region], profile)
|
1243
1243
|
client._sdkVersion += ("_CLI_" + __version__)
|
1244
1244
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1245
|
-
model = models.
|
1245
|
+
model = models.DescribeCallRecordRequest()
|
1246
1246
|
model.from_json_string(json.dumps(args))
|
1247
1247
|
start_time = time.time()
|
1248
1248
|
while True:
|
1249
|
-
rsp = client.
|
1249
|
+
rsp = client.DescribeCallRecord(model)
|
1250
1250
|
result = rsp.to_json_string()
|
1251
1251
|
try:
|
1252
1252
|
json_obj = json.loads(result)
|
@@ -1525,7 +1525,7 @@ def doStopRiskCenterTask(args, parsed_globals):
|
|
1525
1525
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1526
1526
|
|
1527
1527
|
|
1528
|
-
def
|
1528
|
+
def doDescribeVulRiskList(args, parsed_globals):
|
1529
1529
|
g_param = parse_global_arg(parsed_globals)
|
1530
1530
|
|
1531
1531
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1554,11 +1554,63 @@ def doDescribeAssetRiskList(args, parsed_globals):
|
|
1554
1554
|
client = mod.CsipClient(cred, g_param[OptionsDefine.Region], profile)
|
1555
1555
|
client._sdkVersion += ("_CLI_" + __version__)
|
1556
1556
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1557
|
-
model = models.
|
1557
|
+
model = models.DescribeVulRiskListRequest()
|
1558
1558
|
model.from_json_string(json.dumps(args))
|
1559
1559
|
start_time = time.time()
|
1560
1560
|
while True:
|
1561
|
-
rsp = client.
|
1561
|
+
rsp = client.DescribeVulRiskList(model)
|
1562
|
+
result = rsp.to_json_string()
|
1563
|
+
try:
|
1564
|
+
json_obj = json.loads(result)
|
1565
|
+
except TypeError as e:
|
1566
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1567
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1568
|
+
break
|
1569
|
+
cur_time = time.time()
|
1570
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1571
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1572
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1573
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1574
|
+
else:
|
1575
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1576
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1577
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1578
|
+
|
1579
|
+
|
1580
|
+
def doDescribeAssetProcessList(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('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1589
|
+
)
|
1590
|
+
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):
|
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.CsipClient(cred, g_param[OptionsDefine.Region], profile)
|
1607
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1608
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1609
|
+
model = models.DescribeAssetProcessListRequest()
|
1610
|
+
model.from_json_string(json.dumps(args))
|
1611
|
+
start_time = time.time()
|
1612
|
+
while True:
|
1613
|
+
rsp = client.DescribeAssetProcessList(model)
|
1562
1614
|
result = rsp.to_json_string()
|
1563
1615
|
try:
|
1564
1616
|
json_obj = json.loads(result)
|
@@ -1785,6 +1837,58 @@ def doDescribeGatewayAssets(args, parsed_globals):
|
|
1785
1837
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1786
1838
|
|
1787
1839
|
|
1840
|
+
def doDescribeAssetRiskList(args, parsed_globals):
|
1841
|
+
g_param = parse_global_arg(parsed_globals)
|
1842
|
+
|
1843
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1844
|
+
cred = credential.CVMRoleCredential()
|
1845
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1846
|
+
cred = credential.STSAssumeRoleCredential(
|
1847
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1848
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1849
|
+
)
|
1850
|
+
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):
|
1851
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1852
|
+
else:
|
1853
|
+
cred = credential.Credential(
|
1854
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1855
|
+
)
|
1856
|
+
http_profile = HttpProfile(
|
1857
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1858
|
+
reqMethod="POST",
|
1859
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
1860
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1861
|
+
)
|
1862
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1863
|
+
if g_param[OptionsDefine.Language]:
|
1864
|
+
profile.language = g_param[OptionsDefine.Language]
|
1865
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1866
|
+
client = mod.CsipClient(cred, g_param[OptionsDefine.Region], profile)
|
1867
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1868
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1869
|
+
model = models.DescribeAssetRiskListRequest()
|
1870
|
+
model.from_json_string(json.dumps(args))
|
1871
|
+
start_time = time.time()
|
1872
|
+
while True:
|
1873
|
+
rsp = client.DescribeAssetRiskList(model)
|
1874
|
+
result = rsp.to_json_string()
|
1875
|
+
try:
|
1876
|
+
json_obj = json.loads(result)
|
1877
|
+
except TypeError as e:
|
1878
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1879
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1880
|
+
break
|
1881
|
+
cur_time = time.time()
|
1882
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1883
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1884
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1885
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1886
|
+
else:
|
1887
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1888
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1889
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1890
|
+
|
1891
|
+
|
1788
1892
|
def doDescribeCSIPRiskStatistics(args, parsed_globals):
|
1789
1893
|
g_param = parse_global_arg(parsed_globals)
|
1790
1894
|
|
@@ -1993,6 +2097,58 @@ def doDescribeVulViewVulRiskList(args, parsed_globals):
|
|
1993
2097
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1994
2098
|
|
1995
2099
|
|
2100
|
+
def doDescribeHighBaseLineRiskList(args, parsed_globals):
|
2101
|
+
g_param = parse_global_arg(parsed_globals)
|
2102
|
+
|
2103
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
2104
|
+
cred = credential.CVMRoleCredential()
|
2105
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2106
|
+
cred = credential.STSAssumeRoleCredential(
|
2107
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2108
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2109
|
+
)
|
2110
|
+
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):
|
2111
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
2112
|
+
else:
|
2113
|
+
cred = credential.Credential(
|
2114
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
2115
|
+
)
|
2116
|
+
http_profile = HttpProfile(
|
2117
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
2118
|
+
reqMethod="POST",
|
2119
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
2120
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
2121
|
+
)
|
2122
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
2123
|
+
if g_param[OptionsDefine.Language]:
|
2124
|
+
profile.language = g_param[OptionsDefine.Language]
|
2125
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
2126
|
+
client = mod.CsipClient(cred, g_param[OptionsDefine.Region], profile)
|
2127
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
2128
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2129
|
+
model = models.DescribeHighBaseLineRiskListRequest()
|
2130
|
+
model.from_json_string(json.dumps(args))
|
2131
|
+
start_time = time.time()
|
2132
|
+
while True:
|
2133
|
+
rsp = client.DescribeHighBaseLineRiskList(model)
|
2134
|
+
result = rsp.to_json_string()
|
2135
|
+
try:
|
2136
|
+
json_obj = json.loads(result)
|
2137
|
+
except TypeError as e:
|
2138
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
2139
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
2140
|
+
break
|
2141
|
+
cur_time = time.time()
|
2142
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
2143
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
2144
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
2145
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
2146
|
+
else:
|
2147
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
2148
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
2149
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2150
|
+
|
2151
|
+
|
1996
2152
|
def doDescribeScanReportList(args, parsed_globals):
|
1997
2153
|
g_param = parse_global_arg(parsed_globals)
|
1998
2154
|
|
@@ -2409,6 +2565,58 @@ def doDescribeScanTaskList(args, parsed_globals):
|
|
2409
2565
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2410
2566
|
|
2411
2567
|
|
2568
|
+
def doDescribeSourceIPAsset(args, parsed_globals):
|
2569
|
+
g_param = parse_global_arg(parsed_globals)
|
2570
|
+
|
2571
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
2572
|
+
cred = credential.CVMRoleCredential()
|
2573
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2574
|
+
cred = credential.STSAssumeRoleCredential(
|
2575
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2576
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2577
|
+
)
|
2578
|
+
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):
|
2579
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
2580
|
+
else:
|
2581
|
+
cred = credential.Credential(
|
2582
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
2583
|
+
)
|
2584
|
+
http_profile = HttpProfile(
|
2585
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
2586
|
+
reqMethod="POST",
|
2587
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
2588
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
2589
|
+
)
|
2590
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
2591
|
+
if g_param[OptionsDefine.Language]:
|
2592
|
+
profile.language = g_param[OptionsDefine.Language]
|
2593
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
2594
|
+
client = mod.CsipClient(cred, g_param[OptionsDefine.Region], profile)
|
2595
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
2596
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2597
|
+
model = models.DescribeSourceIPAssetRequest()
|
2598
|
+
model.from_json_string(json.dumps(args))
|
2599
|
+
start_time = time.time()
|
2600
|
+
while True:
|
2601
|
+
rsp = client.DescribeSourceIPAsset(model)
|
2602
|
+
result = rsp.to_json_string()
|
2603
|
+
try:
|
2604
|
+
json_obj = json.loads(result)
|
2605
|
+
except TypeError as e:
|
2606
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
2607
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
2608
|
+
break
|
2609
|
+
cur_time = time.time()
|
2610
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
2611
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
2612
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
2613
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
2614
|
+
else:
|
2615
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
2616
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
2617
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2618
|
+
|
2619
|
+
|
2412
2620
|
def doCreateRiskCenterScanTask(args, parsed_globals):
|
2413
2621
|
g_param = parse_global_arg(parsed_globals)
|
2414
2622
|
|
@@ -3137,6 +3345,110 @@ def doDescribeRepositoryImageAssets(args, parsed_globals):
|
|
3137
3345
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3138
3346
|
|
3139
3347
|
|
3348
|
+
def doDescribeAccessKeyAsset(args, parsed_globals):
|
3349
|
+
g_param = parse_global_arg(parsed_globals)
|
3350
|
+
|
3351
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
3352
|
+
cred = credential.CVMRoleCredential()
|
3353
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3354
|
+
cred = credential.STSAssumeRoleCredential(
|
3355
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3356
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3357
|
+
)
|
3358
|
+
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):
|
3359
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
3360
|
+
else:
|
3361
|
+
cred = credential.Credential(
|
3362
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
3363
|
+
)
|
3364
|
+
http_profile = HttpProfile(
|
3365
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
3366
|
+
reqMethod="POST",
|
3367
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
3368
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
3369
|
+
)
|
3370
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
3371
|
+
if g_param[OptionsDefine.Language]:
|
3372
|
+
profile.language = g_param[OptionsDefine.Language]
|
3373
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
3374
|
+
client = mod.CsipClient(cred, g_param[OptionsDefine.Region], profile)
|
3375
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
3376
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3377
|
+
model = models.DescribeAccessKeyAssetRequest()
|
3378
|
+
model.from_json_string(json.dumps(args))
|
3379
|
+
start_time = time.time()
|
3380
|
+
while True:
|
3381
|
+
rsp = client.DescribeAccessKeyAsset(model)
|
3382
|
+
result = rsp.to_json_string()
|
3383
|
+
try:
|
3384
|
+
json_obj = json.loads(result)
|
3385
|
+
except TypeError as e:
|
3386
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
3387
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
3388
|
+
break
|
3389
|
+
cur_time = time.time()
|
3390
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
3391
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
3392
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
3393
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
3394
|
+
else:
|
3395
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
3396
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
3397
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3398
|
+
|
3399
|
+
|
3400
|
+
def doDescribeAssetViewVulRiskList(args, parsed_globals):
|
3401
|
+
g_param = parse_global_arg(parsed_globals)
|
3402
|
+
|
3403
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
3404
|
+
cred = credential.CVMRoleCredential()
|
3405
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3406
|
+
cred = credential.STSAssumeRoleCredential(
|
3407
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3408
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3409
|
+
)
|
3410
|
+
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):
|
3411
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
3412
|
+
else:
|
3413
|
+
cred = credential.Credential(
|
3414
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
3415
|
+
)
|
3416
|
+
http_profile = HttpProfile(
|
3417
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
3418
|
+
reqMethod="POST",
|
3419
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
3420
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
3421
|
+
)
|
3422
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
3423
|
+
if g_param[OptionsDefine.Language]:
|
3424
|
+
profile.language = g_param[OptionsDefine.Language]
|
3425
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
3426
|
+
client = mod.CsipClient(cred, g_param[OptionsDefine.Region], profile)
|
3427
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
3428
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3429
|
+
model = models.DescribeAssetViewVulRiskListRequest()
|
3430
|
+
model.from_json_string(json.dumps(args))
|
3431
|
+
start_time = time.time()
|
3432
|
+
while True:
|
3433
|
+
rsp = client.DescribeAssetViewVulRiskList(model)
|
3434
|
+
result = rsp.to_json_string()
|
3435
|
+
try:
|
3436
|
+
json_obj = json.loads(result)
|
3437
|
+
except TypeError as e:
|
3438
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
3439
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
3440
|
+
break
|
3441
|
+
cur_time = time.time()
|
3442
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
3443
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
3444
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
3445
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
3446
|
+
else:
|
3447
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
3448
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
3449
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3450
|
+
|
3451
|
+
|
3140
3452
|
def doDescribeDbAssets(args, parsed_globals):
|
3141
3453
|
g_param = parse_global_arg(parsed_globals)
|
3142
3454
|
|
@@ -3275,21 +3587,24 @@ ACTION_MAP = {
|
|
3275
3587
|
"DescribeCVMAssets": doDescribeCVMAssets,
|
3276
3588
|
"ModifyRiskCenterScanTask": doModifyRiskCenterScanTask,
|
3277
3589
|
"DescribeCFWAssetStatistics": doDescribeCFWAssetStatistics,
|
3278
|
-
"
|
3590
|
+
"DescribeCallRecord": doDescribeCallRecord,
|
3279
3591
|
"DescribeVULRiskDetail": doDescribeVULRiskDetail,
|
3280
3592
|
"DescribeCheckViewRisks": doDescribeCheckViewRisks,
|
3281
3593
|
"DescribeRiskCenterWebsiteRiskList": doDescribeRiskCenterWebsiteRiskList,
|
3282
3594
|
"DescribeOrganizationInfo": doDescribeOrganizationInfo,
|
3283
3595
|
"StopRiskCenterTask": doStopRiskCenterTask,
|
3284
|
-
"
|
3596
|
+
"DescribeVulRiskList": doDescribeVulRiskList,
|
3597
|
+
"DescribeAssetProcessList": doDescribeAssetProcessList,
|
3285
3598
|
"ModifyUebaRuleSwitch": doModifyUebaRuleSwitch,
|
3286
3599
|
"DescribeRiskRules": doDescribeRiskRules,
|
3287
3600
|
"DescribeExposePath": doDescribeExposePath,
|
3288
3601
|
"DescribeGatewayAssets": doDescribeGatewayAssets,
|
3602
|
+
"DescribeAssetRiskList": doDescribeAssetRiskList,
|
3289
3603
|
"DescribeCSIPRiskStatistics": doDescribeCSIPRiskStatistics,
|
3290
3604
|
"DescribeSearchBugInfo": doDescribeSearchBugInfo,
|
3291
3605
|
"DescribeRiskCenterAssetViewWeakPasswordRiskList": doDescribeRiskCenterAssetViewWeakPasswordRiskList,
|
3292
3606
|
"DescribeVulViewVulRiskList": doDescribeVulViewVulRiskList,
|
3607
|
+
"DescribeHighBaseLineRiskList": doDescribeHighBaseLineRiskList,
|
3293
3608
|
"DescribeScanReportList": doDescribeScanReportList,
|
3294
3609
|
"DescribeSubUserInfo": doDescribeSubUserInfo,
|
3295
3610
|
"DescribeAlertList": doDescribeAlertList,
|
@@ -3298,6 +3613,7 @@ ACTION_MAP = {
|
|
3298
3613
|
"DescribeScanStatistic": doDescribeScanStatistic,
|
3299
3614
|
"DescribeExposeAssetCategory": doDescribeExposeAssetCategory,
|
3300
3615
|
"DescribeScanTaskList": doDescribeScanTaskList,
|
3616
|
+
"DescribeSourceIPAsset": doDescribeSourceIPAsset,
|
3301
3617
|
"CreateRiskCenterScanTask": doCreateRiskCenterScanTask,
|
3302
3618
|
"DescribeRiskCenterPortViewPortRiskList": doDescribeRiskCenterPortViewPortRiskList,
|
3303
3619
|
"DescribeRiskCenterAssetViewPortRiskList": doDescribeRiskCenterAssetViewPortRiskList,
|
@@ -3312,6 +3628,8 @@ ACTION_MAP = {
|
|
3312
3628
|
"DescribeClusterAssets": doDescribeClusterAssets,
|
3313
3629
|
"DescribeTaskLogURL": doDescribeTaskLogURL,
|
3314
3630
|
"DescribeRepositoryImageAssets": doDescribeRepositoryImageAssets,
|
3631
|
+
"DescribeAccessKeyAsset": doDescribeAccessKeyAsset,
|
3632
|
+
"DescribeAssetViewVulRiskList": doDescribeAssetViewVulRiskList,
|
3315
3633
|
"DescribeDbAssets": doDescribeDbAssets,
|
3316
3634
|
"DescribeCVMAssetInfo": doDescribeCVMAssetInfo,
|
3317
3635
|
|