tccli 3.0.1131.1__py2.py3-none-any.whl → 3.0.1132.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/ckafka/v20190819/api.json +3 -2
- tccli/services/csip/csip_client.py +106 -0
- tccli/services/csip/v20221121/api.json +657 -19
- tccli/services/csip/v20221121/examples.json +16 -0
- tccli/services/ess/v20201111/api.json +3 -3
- tccli/services/essbasic/v20210526/api.json +4 -4
- tccli/services/gaap/v20180529/api.json +20 -0
- tccli/services/ocr/v20181119/api.json +2 -2
- tccli/services/ocr/v20181119/examples.json +2 -2
- tccli/services/redis/v20180412/api.json +33 -29
- tccli/services/redis/v20180412/examples.json +8 -8
- tccli/services/wedata/v20210820/api.json +81 -1
- tccli/services/wedata/v20210820/examples.json +8 -0
- tccli/services/wedata/wedata_client.py +53 -0
- {tccli-3.0.1131.1.dist-info → tccli-3.0.1132.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1131.1.dist-info → tccli-3.0.1132.1.dist-info}/RECORD +20 -20
- {tccli-3.0.1131.1.dist-info → tccli-3.0.1132.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1131.1.dist-info → tccli-3.0.1132.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1131.1.dist-info → tccli-3.0.1132.1.dist-info}/license_files/LICENSE +0 -0
tccli/__init__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = '3.0.
|
1
|
+
__version__ = '3.0.1132.1'
|
@@ -8142,7 +8142,7 @@
|
|
8142
8142
|
{
|
8143
8143
|
"disabled": false,
|
8144
8144
|
"document": "任务唯一标记",
|
8145
|
-
"example": "",
|
8145
|
+
"example": "无",
|
8146
8146
|
"member": "int64",
|
8147
8147
|
"name": "FlowId",
|
8148
8148
|
"required": true,
|
@@ -8157,9 +8157,10 @@
|
|
8157
8157
|
{
|
8158
8158
|
"disabled": false,
|
8159
8159
|
"document": "返回结果",
|
8160
|
-
"example": "",
|
8160
|
+
"example": "无",
|
8161
8161
|
"member": "TaskStatusResponse",
|
8162
8162
|
"name": "Result",
|
8163
|
+
"output_required": true,
|
8163
8164
|
"type": "object",
|
8164
8165
|
"value_allowed_null": false
|
8165
8166
|
},
|
@@ -1057,6 +1057,58 @@ def doDescribeAssetViewVulRiskList(args, parsed_globals):
|
|
1057
1057
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1058
1058
|
|
1059
1059
|
|
1060
|
+
def doDescribeVULRiskDetail(args, parsed_globals):
|
1061
|
+
g_param = parse_global_arg(parsed_globals)
|
1062
|
+
|
1063
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1064
|
+
cred = credential.CVMRoleCredential()
|
1065
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1066
|
+
cred = credential.STSAssumeRoleCredential(
|
1067
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1068
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1069
|
+
)
|
1070
|
+
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):
|
1071
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1072
|
+
else:
|
1073
|
+
cred = credential.Credential(
|
1074
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1075
|
+
)
|
1076
|
+
http_profile = HttpProfile(
|
1077
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1078
|
+
reqMethod="POST",
|
1079
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
1080
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1081
|
+
)
|
1082
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1083
|
+
if g_param[OptionsDefine.Language]:
|
1084
|
+
profile.language = g_param[OptionsDefine.Language]
|
1085
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1086
|
+
client = mod.CsipClient(cred, g_param[OptionsDefine.Region], profile)
|
1087
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1088
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1089
|
+
model = models.DescribeVULRiskDetailRequest()
|
1090
|
+
model.from_json_string(json.dumps(args))
|
1091
|
+
start_time = time.time()
|
1092
|
+
while True:
|
1093
|
+
rsp = client.DescribeVULRiskDetail(model)
|
1094
|
+
result = rsp.to_json_string()
|
1095
|
+
try:
|
1096
|
+
json_obj = json.loads(result)
|
1097
|
+
except TypeError as e:
|
1098
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1099
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1100
|
+
break
|
1101
|
+
cur_time = time.time()
|
1102
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1103
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1104
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1105
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1106
|
+
else:
|
1107
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1108
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1109
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1110
|
+
|
1111
|
+
|
1060
1112
|
def doDescribeRiskCenterWebsiteRiskList(args, parsed_globals):
|
1061
1113
|
g_param = parse_global_arg(parsed_globals)
|
1062
1114
|
|
@@ -1369,6 +1421,58 @@ def doDescribeTaskLogList(args, parsed_globals):
|
|
1369
1421
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1370
1422
|
|
1371
1423
|
|
1424
|
+
def doDescribeVulViewVulRiskList(args, parsed_globals):
|
1425
|
+
g_param = parse_global_arg(parsed_globals)
|
1426
|
+
|
1427
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1428
|
+
cred = credential.CVMRoleCredential()
|
1429
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1430
|
+
cred = credential.STSAssumeRoleCredential(
|
1431
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1432
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1433
|
+
)
|
1434
|
+
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):
|
1435
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1436
|
+
else:
|
1437
|
+
cred = credential.Credential(
|
1438
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1439
|
+
)
|
1440
|
+
http_profile = HttpProfile(
|
1441
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1442
|
+
reqMethod="POST",
|
1443
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
1444
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1445
|
+
)
|
1446
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1447
|
+
if g_param[OptionsDefine.Language]:
|
1448
|
+
profile.language = g_param[OptionsDefine.Language]
|
1449
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1450
|
+
client = mod.CsipClient(cred, g_param[OptionsDefine.Region], profile)
|
1451
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1452
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1453
|
+
model = models.DescribeVulViewVulRiskListRequest()
|
1454
|
+
model.from_json_string(json.dumps(args))
|
1455
|
+
start_time = time.time()
|
1456
|
+
while True:
|
1457
|
+
rsp = client.DescribeVulViewVulRiskList(model)
|
1458
|
+
result = rsp.to_json_string()
|
1459
|
+
try:
|
1460
|
+
json_obj = json.loads(result)
|
1461
|
+
except TypeError as e:
|
1462
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1463
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1464
|
+
break
|
1465
|
+
cur_time = time.time()
|
1466
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1467
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1468
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1469
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1470
|
+
else:
|
1471
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1472
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1473
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1474
|
+
|
1475
|
+
|
1372
1476
|
def doDescribeScanReportList(args, parsed_globals):
|
1373
1477
|
g_param = parse_global_arg(parsed_globals)
|
1374
1478
|
|
@@ -2128,12 +2232,14 @@ ACTION_MAP = {
|
|
2128
2232
|
"DescribeCVMAssets": doDescribeCVMAssets,
|
2129
2233
|
"ModifyRiskCenterScanTask": doModifyRiskCenterScanTask,
|
2130
2234
|
"DescribeAssetViewVulRiskList": doDescribeAssetViewVulRiskList,
|
2235
|
+
"DescribeVULRiskDetail": doDescribeVULRiskDetail,
|
2131
2236
|
"DescribeRiskCenterWebsiteRiskList": doDescribeRiskCenterWebsiteRiskList,
|
2132
2237
|
"StopRiskCenterTask": doStopRiskCenterTask,
|
2133
2238
|
"CreateRiskCenterScanTask": doCreateRiskCenterScanTask,
|
2134
2239
|
"DescribeGatewayAssets": doDescribeGatewayAssets,
|
2135
2240
|
"DescribeSearchBugInfo": doDescribeSearchBugInfo,
|
2136
2241
|
"DescribeTaskLogList": doDescribeTaskLogList,
|
2242
|
+
"DescribeVulViewVulRiskList": doDescribeVulViewVulRiskList,
|
2137
2243
|
"DescribeScanReportList": doDescribeScanReportList,
|
2138
2244
|
"CreateDomainAndIp": doCreateDomainAndIp,
|
2139
2245
|
"DescribeAlertList": doDescribeAlertList,
|