tccli 3.0.1130.1__py2.py3-none-any.whl → 3.0.1132.1__py2.py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/cdb/v20170320/api.json +2 -2
  3. tccli/services/cds/cds_client.py +11 -64
  4. tccli/services/cds/v20180420/api.json +0 -42
  5. tccli/services/cds/v20180420/examples.json +0 -8
  6. tccli/services/cdwch/v20200915/api.json +30 -0
  7. tccli/services/ckafka/v20190819/api.json +3 -2
  8. tccli/services/csip/csip_client.py +106 -0
  9. tccli/services/csip/v20221121/api.json +657 -19
  10. tccli/services/csip/v20221121/examples.json +16 -0
  11. tccli/services/cynosdb/v20190107/api.json +47 -2
  12. tccli/services/domain/v20180808/api.json +39 -39
  13. tccli/services/ess/v20201111/api.json +5 -5
  14. tccli/services/essbasic/v20210526/api.json +4 -4
  15. tccli/services/gaap/v20180529/api.json +20 -0
  16. tccli/services/lighthouse/v20200324/api.json +15 -15
  17. tccli/services/mongodb/v20190725/api.json +50 -20
  18. tccli/services/mongodb/v20190725/examples.json +1 -1
  19. tccli/services/ocr/v20181119/api.json +2 -2
  20. tccli/services/ocr/v20181119/examples.json +2 -2
  21. tccli/services/privatedns/v20201028/api.json +5 -5
  22. tccli/services/privatedns/v20201028/examples.json +1 -1
  23. tccli/services/redis/v20180412/api.json +64 -49
  24. tccli/services/redis/v20180412/examples.json +8 -8
  25. tccli/services/ssl/v20191205/api.json +3 -0
  26. tccli/services/tcaplusdb/v20190823/api.json +147 -75
  27. tccli/services/tcaplusdb/v20190823/examples.json +10 -10
  28. tccli/services/tcbr/v20220217/api.json +2 -2
  29. tccli/services/tcbr/v20220217/examples.json +1 -1
  30. tccli/services/tcm/v20210413/api.json +10 -10
  31. tccli/services/tcm/v20210413/examples.json +1 -1
  32. tccli/services/tke/v20180525/api.json +0 -1
  33. tccli/services/trtc/v20190722/api.json +3 -3
  34. tccli/services/tse/v20201207/api.json +102 -0
  35. tccli/services/tse/v20201207/examples.json +1 -1
  36. tccli/services/tsf/v20180326/api.json +112 -62
  37. tccli/services/wedata/v20210820/api.json +81 -1
  38. tccli/services/wedata/v20210820/examples.json +8 -0
  39. tccli/services/wedata/wedata_client.py +53 -0
  40. {tccli-3.0.1130.1.dist-info → tccli-3.0.1132.1.dist-info}/METADATA +2 -2
  41. {tccli-3.0.1130.1.dist-info → tccli-3.0.1132.1.dist-info}/RECORD +44 -44
  42. {tccli-3.0.1130.1.dist-info → tccli-3.0.1132.1.dist-info}/WHEEL +0 -0
  43. {tccli-3.0.1130.1.dist-info → tccli-3.0.1132.1.dist-info}/entry_points.txt +0 -0
  44. {tccli-3.0.1130.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.1130.1'
1
+ __version__ = '3.0.1132.1'
@@ -5457,7 +5457,7 @@
5457
5457
  },
5458
5458
  {
5459
5459
  "disabled": false,
5460
- "document": "MySQL 版本,值包括:5.5、5.6 、5.7 、8.0,请使用 [获取云数据库可售卖规格](https://cloud.tencent.com/document/api/236/17229) 接口获取可创建的实例版本。",
5460
+ "document": "MySQL 版本,值包括:5.5、5.6、5.7、8.0,请使用 [获取云数据库可售卖规格](https://cloud.tencent.com/document/api/236/17229) 接口获取可创建的实例版本。\n说明:若此参数不填,则默认值为5.6。",
5461
5461
  "example": "5.7",
5462
5462
  "member": "string",
5463
5463
  "name": "EngineVersion",
@@ -5900,7 +5900,7 @@
5900
5900
  },
5901
5901
  {
5902
5902
  "disabled": false,
5903
- "document": "MySQL 版本,值包括:5.5、5.6 、5.7和8.0,请使用 [获取云数据库可售卖规格](https://cloud.tencent.com/document/api/236/17229) 接口获取可创建的实例版本。",
5903
+ "document": "MySQL 版本,值包括:5.5、5.6、5.7和8.0,请使用 [获取云数据库可售卖规格](https://cloud.tencent.com/document/api/236/17229) 接口获取可创建的实例版本。\n说明:若此参数不填,则默认值为5.6。",
5904
5904
  "example": "5.7",
5905
5905
  "member": "string",
5906
5906
  "name": "EngineVersion",
@@ -17,7 +17,7 @@ from tencentcloud.cds.v20180420 import models as models_v20180420
17
17
  from jmespath import search
18
18
  import time
19
19
 
20
- def doDescribeDasbImageIds(args, parsed_globals):
20
+ def doDescribeDbauditInstanceType(args, parsed_globals):
21
21
  g_param = parse_global_arg(parsed_globals)
22
22
 
23
23
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -46,11 +46,11 @@ def doDescribeDasbImageIds(args, parsed_globals):
46
46
  client = mod.CdsClient(cred, g_param[OptionsDefine.Region], profile)
47
47
  client._sdkVersion += ("_CLI_" + __version__)
48
48
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
49
- model = models.DescribeDasbImageIdsRequest()
49
+ model = models.DescribeDbauditInstanceTypeRequest()
50
50
  model.from_json_string(json.dumps(args))
51
51
  start_time = time.time()
52
52
  while True:
53
- rsp = client.DescribeDasbImageIds(model)
53
+ rsp = client.DescribeDbauditInstanceType(model)
54
54
  result = rsp.to_json_string()
55
55
  try:
56
56
  json_obj = json.loads(result)
@@ -69,7 +69,7 @@ def doDescribeDasbImageIds(args, parsed_globals):
69
69
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
70
70
 
71
71
 
72
- def doModifyDbauditInstancesRenewFlag(args, parsed_globals):
72
+ def doDescribeDbauditInstances(args, parsed_globals):
73
73
  g_param = parse_global_arg(parsed_globals)
74
74
 
75
75
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -98,11 +98,11 @@ def doModifyDbauditInstancesRenewFlag(args, parsed_globals):
98
98
  client = mod.CdsClient(cred, g_param[OptionsDefine.Region], profile)
99
99
  client._sdkVersion += ("_CLI_" + __version__)
100
100
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
101
- model = models.ModifyDbauditInstancesRenewFlagRequest()
101
+ model = models.DescribeDbauditInstancesRequest()
102
102
  model.from_json_string(json.dumps(args))
103
103
  start_time = time.time()
104
104
  while True:
105
- rsp = client.ModifyDbauditInstancesRenewFlag(model)
105
+ rsp = client.DescribeDbauditInstances(model)
106
106
  result = rsp.to_json_string()
107
107
  try:
108
108
  json_obj = json.loads(result)
@@ -121,7 +121,7 @@ def doModifyDbauditInstancesRenewFlag(args, parsed_globals):
121
121
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
122
122
 
123
123
 
124
- def doDescribeDbauditInstances(args, parsed_globals):
124
+ def doModifyDbauditInstancesRenewFlag(args, parsed_globals):
125
125
  g_param = parse_global_arg(parsed_globals)
126
126
 
127
127
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -150,11 +150,11 @@ def doDescribeDbauditInstances(args, parsed_globals):
150
150
  client = mod.CdsClient(cred, g_param[OptionsDefine.Region], profile)
151
151
  client._sdkVersion += ("_CLI_" + __version__)
152
152
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
153
- model = models.DescribeDbauditInstancesRequest()
153
+ model = models.ModifyDbauditInstancesRenewFlagRequest()
154
154
  model.from_json_string(json.dumps(args))
155
155
  start_time = time.time()
156
156
  while True:
157
- rsp = client.DescribeDbauditInstances(model)
157
+ rsp = client.ModifyDbauditInstancesRenewFlag(model)
158
158
  result = rsp.to_json_string()
159
159
  try:
160
160
  json_obj = json.loads(result)
@@ -277,58 +277,6 @@ def doDescribeDbauditUsedRegions(args, parsed_globals):
277
277
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
278
278
 
279
279
 
280
- def doDescribeDbauditInstanceType(args, parsed_globals):
281
- g_param = parse_global_arg(parsed_globals)
282
-
283
- if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
284
- cred = credential.CVMRoleCredential()
285
- elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
286
- cred = credential.STSAssumeRoleCredential(
287
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
288
- g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
289
- )
290
- 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):
291
- cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
292
- else:
293
- cred = credential.Credential(
294
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
295
- )
296
- http_profile = HttpProfile(
297
- reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
298
- reqMethod="POST",
299
- endpoint=g_param[OptionsDefine.Endpoint],
300
- proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
301
- )
302
- profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
303
- if g_param[OptionsDefine.Language]:
304
- profile.language = g_param[OptionsDefine.Language]
305
- mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
306
- client = mod.CdsClient(cred, g_param[OptionsDefine.Region], profile)
307
- client._sdkVersion += ("_CLI_" + __version__)
308
- models = MODELS_MAP[g_param[OptionsDefine.Version]]
309
- model = models.DescribeDbauditInstanceTypeRequest()
310
- model.from_json_string(json.dumps(args))
311
- start_time = time.time()
312
- while True:
313
- rsp = client.DescribeDbauditInstanceType(model)
314
- result = rsp.to_json_string()
315
- try:
316
- json_obj = json.loads(result)
317
- except TypeError as e:
318
- json_obj = json.loads(result.decode('utf-8')) # python3.3
319
- if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
320
- break
321
- cur_time = time.time()
322
- if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
323
- raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
324
- (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
325
- search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
326
- else:
327
- print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
328
- time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
329
- FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
330
-
331
-
332
280
  CLIENT_MAP = {
333
281
  "v20180420": cds_client_v20180420,
334
282
 
@@ -340,12 +288,11 @@ MODELS_MAP = {
340
288
  }
341
289
 
342
290
  ACTION_MAP = {
343
- "DescribeDasbImageIds": doDescribeDasbImageIds,
344
- "ModifyDbauditInstancesRenewFlag": doModifyDbauditInstancesRenewFlag,
291
+ "DescribeDbauditInstanceType": doDescribeDbauditInstanceType,
345
292
  "DescribeDbauditInstances": doDescribeDbauditInstances,
293
+ "ModifyDbauditInstancesRenewFlag": doModifyDbauditInstancesRenewFlag,
346
294
  "InquiryPriceDbauditInstance": doInquiryPriceDbauditInstance,
347
295
  "DescribeDbauditUsedRegions": doDescribeDbauditUsedRegions,
348
- "DescribeDbauditInstanceType": doDescribeDbauditInstanceType,
349
296
 
350
297
  }
351
298
 
@@ -1,12 +1,5 @@
1
1
  {
2
2
  "actions": {
3
- "DescribeDasbImageIds": {
4
- "document": "这些接口是传统版堡垒机接口.数审未用到,堡垒机的已全部迁移到dasb下,cds这边预下线\n\n获取镜像列表",
5
- "input": "DescribeDasbImageIdsRequest",
6
- "name": "数盾-DASB-获取镜像列表",
7
- "output": "DescribeDasbImageIdsResponse",
8
- "status": "deprecated"
9
- },
10
3
  "DescribeDbauditInstanceType": {
11
4
  "document": "本接口 (DescribeDbauditInstanceType) 用于查询可售卖的产品规格列表。",
12
5
  "input": "DescribeDbauditInstanceTypeRequest",
@@ -292,41 +285,6 @@
292
285
  ],
293
286
  "usage": "out"
294
287
  },
295
- "DescribeDasbImageIdsRequest": {
296
- "document": "DescribeDasbImageIds请求参数结构体",
297
- "members": [],
298
- "type": "object"
299
- },
300
- "DescribeDasbImageIdsResponse": {
301
- "document": "DescribeDasbImageIds返回参数结构体",
302
- "members": [
303
- {
304
- "disabled": false,
305
- "document": "基础镜像ID",
306
- "example": "",
307
- "member": "string",
308
- "name": "BaseImageId",
309
- "type": "string",
310
- "value_allowed_null": false
311
- },
312
- {
313
- "disabled": false,
314
- "document": "AI镜像ID",
315
- "example": "",
316
- "member": "string",
317
- "name": "AiImageId",
318
- "type": "string",
319
- "value_allowed_null": false
320
- },
321
- {
322
- "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
323
- "member": "string",
324
- "name": "RequestId",
325
- "type": "string"
326
- }
327
- ],
328
- "type": "object"
329
- },
330
288
  "DescribeDbauditInstanceTypeRequest": {
331
289
  "document": "DescribeDbauditInstanceType请求参数结构体",
332
290
  "members": [],
@@ -1,13 +1,5 @@
1
1
  {
2
2
  "actions": {
3
- "DescribeDasbImageIds": [
4
- {
5
- "document": "",
6
- "input": "https://cds.tencentcloudapi.com/?Action=DescribeDasbImageIds\n&<公共请求参数>",
7
- "output": "{\n \"Response\": {\n \"BaseImageId\": \"SDFEEF\",\n \"AiImageId\": \"XXXXX\",\n \"RequestId\": \"eac6b301-a322-493a-8e36-83b295459397\"\n }\n}",
8
- "title": "获取镜像列表"
9
- }
10
- ],
11
3
  "DescribeDbauditInstanceType": [
12
4
  {
13
5
  "document": "本示例用于查询数据安全审计产品规格信息列表",
@@ -2675,6 +2675,36 @@
2675
2675
  "output_required": false,
2676
2676
  "type": "bool",
2677
2677
  "value_allowed_null": true
2678
+ },
2679
+ {
2680
+ "disabled": false,
2681
+ "document": "true\n注意:此字段可能返回 null,表示取不到有效值。",
2682
+ "example": "无",
2683
+ "member": "bool",
2684
+ "name": "IsSecondaryZone",
2685
+ "output_required": false,
2686
+ "type": "bool",
2687
+ "value_allowed_null": true
2688
+ },
2689
+ {
2690
+ "disabled": false,
2691
+ "document": "desc\n注意:此字段可能返回 null,表示取不到有效值。",
2692
+ "example": "无",
2693
+ "member": "string",
2694
+ "name": "SecondaryZoneInfo",
2695
+ "output_required": false,
2696
+ "type": "string",
2697
+ "value_allowed_null": true
2698
+ },
2699
+ {
2700
+ "disabled": false,
2701
+ "document": "是否clickhouse-keeper\n注意:此字段可能返回 null,表示取不到有效值。",
2702
+ "example": "false",
2703
+ "member": "bool",
2704
+ "name": "ClickHouseKeeper",
2705
+ "output_required": false,
2706
+ "type": "bool",
2707
+ "value_allowed_null": true
2678
2708
  }
2679
2709
  ],
2680
2710
  "usage": "out"
@@ -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,