tccli 3.0.1234.1__py2.py3-none-any.whl → 3.0.1236.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 (38) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/cdb/v20170320/api.json +15 -15
  3. tccli/services/cls/v20201016/api.json +4 -4
  4. tccli/services/cwp/cwp_client.py +326 -8
  5. tccli/services/cwp/v20180228/api.json +488 -1
  6. tccli/services/cwp/v20180228/examples.json +48 -0
  7. tccli/services/essbasic/v20210526/api.json +10 -0
  8. tccli/services/faceid/v20180301/api.json +19 -0
  9. tccli/services/hunyuan/v20230901/api.json +12 -3
  10. tccli/services/iotexplorer/iotexplorer_client.py +159 -0
  11. tccli/services/iotexplorer/v20190423/api.json +298 -4
  12. tccli/services/iotexplorer/v20190423/examples.json +30 -0
  13. tccli/services/iotvideo/iotvideo_client.py +106 -0
  14. tccli/services/iotvideo/v20211125/api.json +169 -0
  15. tccli/services/iotvideo/v20211125/examples.json +16 -0
  16. tccli/services/ocr/v20181119/api.json +5 -5
  17. tccli/services/ocr/v20181119/examples.json +7 -7
  18. tccli/services/privatedns/v20201028/api.json +8 -8
  19. tccli/services/smh/v20210712/api.json +7 -7
  20. tccli/services/smh/v20210712/examples.json +1 -1
  21. tccli/services/sms/v20210111/api.json +1 -1
  22. tccli/services/ssl/v20191205/api.json +46 -33
  23. tccli/services/ssl/v20191205/examples.json +13 -13
  24. tccli/services/tcbr/v20220217/api.json +71 -71
  25. tccli/services/tcbr/v20220217/examples.json +13 -31
  26. tccli/services/teo/v20220901/api.json +1 -1
  27. tccli/services/trocket/v20230308/api.json +19 -0
  28. tccli/services/tsf/v20180326/api.json +1577 -1408
  29. tccli/services/tsf/v20180326/examples.json +55 -61
  30. tccli/services/vrs/v20200824/api.json +68 -6
  31. tccli/services/vrs/v20200824/examples.json +8 -0
  32. tccli/services/vrs/vrs_client.py +53 -0
  33. tccli/services/wedata/v20210820/api.json +76 -0
  34. {tccli-3.0.1234.1.dist-info → tccli-3.0.1236.1.dist-info}/METADATA +2 -2
  35. {tccli-3.0.1234.1.dist-info → tccli-3.0.1236.1.dist-info}/RECORD +38 -38
  36. {tccli-3.0.1234.1.dist-info → tccli-3.0.1236.1.dist-info}/WHEEL +0 -0
  37. {tccli-3.0.1234.1.dist-info → tccli-3.0.1236.1.dist-info}/entry_points.txt +0 -0
  38. {tccli-3.0.1234.1.dist-info → tccli-3.0.1236.1.dist-info}/license_files/LICENSE +0 -0
tccli/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = '3.0.1234.1'
1
+ __version__ = '3.0.1236.1'
@@ -5804,7 +5804,7 @@
5804
5804
  {
5805
5805
  "disabled": false,
5806
5806
  "document": "参数列表,参数格式如 ParamList.0.Name=auto_increment&ParamList.0.Value=1。可通过 [查询默认的可设置参数列表](https://cloud.tencent.com/document/api/236/32662) 查询支持设置的参数。",
5807
- "example": "[]",
5807
+ "example": "[{\"Name\": \"auto_increment_increment\",\"Value\": \"1\"}]",
5808
5808
  "member": "ParamInfo",
5809
5809
  "name": "ParamList",
5810
5810
  "required": false,
@@ -5849,7 +5849,7 @@
5849
5849
  {
5850
5850
  "disabled": false,
5851
5851
  "document": "安全组参数,可使用 [查询项目安全组信息](https://cloud.tencent.com/document/api/236/15850) 接口查询某个项目的安全组详情。",
5852
- "example": "[]",
5852
+ "example": "[\"sg-9stjvjn1\"]",
5853
5853
  "member": "string",
5854
5854
  "name": "SecurityGroup",
5855
5855
  "required": false,
@@ -5885,7 +5885,7 @@
5885
5885
  {
5886
5886
  "disabled": false,
5887
5887
  "document": "实例标签信息。",
5888
- "example": "[]",
5888
+ "example": "[{\"TagKey\": \"march\",\"TagValue\": [\"march1\"]}]",
5889
5889
  "member": "TagInfo",
5890
5890
  "name": "ResourceTags",
5891
5891
  "required": false,
@@ -5930,7 +5930,7 @@
5930
5930
  {
5931
5931
  "disabled": false,
5932
5932
  "document": "告警策略id数组。腾讯云可观测平台DescribeAlarmPolicy接口返回的OriginId。",
5933
- "example": "[]",
5933
+ "example": "[7957756]",
5934
5934
  "member": "int64",
5935
5935
  "name": "AlarmPolicyList",
5936
5936
  "required": false,
@@ -5984,7 +5984,7 @@
5984
5984
  {
5985
5985
  "disabled": false,
5986
5986
  "document": "告警策略名数组,例如:[\"policy-uyoee9wg\"],AlarmPolicyList不为空时该参数无效。",
5987
- "example": "[]",
5987
+ "example": "[\"policy-uyoee9wg\"]",
5988
5988
  "member": "string",
5989
5989
  "name": "AlarmPolicyIdList",
5990
5990
  "required": false,
@@ -6011,7 +6011,7 @@
6011
6011
  {
6012
6012
  "disabled": false,
6013
6013
  "document": "指定实例的IP列表。仅支持主实例指定,按实例顺序,不足则按未指定处理。",
6014
- "example": "[]",
6014
+ "example": "[\"172.1.1.1\"]",
6015
6015
  "member": "string",
6016
6016
  "name": "Vips",
6017
6017
  "required": false,
@@ -6037,7 +6037,7 @@
6037
6037
  },
6038
6038
  {
6039
6039
  "disabled": false,
6040
- "document": "磁盘类型,基础版或者集群版实例可以指定此参数。CLOUD_SSD 表示 SSD 云硬盘,CLOUD_HSSD 表示增强型 SSD 云硬盘。",
6040
+ "document": "硬盘类型,单节点(云盘版)或者集群版实例可以指定此参数。CLOUD_SSD 表示 SSD 云硬盘,CLOUD_HSSD 表示增强型 SSD 云硬盘。\n说明:单节点(云盘版)、集群版实例硬盘类型所支持的地域略有不同,具体支持情况请参考 [地域和可用区](https://cloud.tencent.com/document/product/236/8458)。",
6041
6041
  "example": "CLOUD_SSD",
6042
6042
  "member": "string",
6043
6043
  "name": "DiskType",
@@ -6238,7 +6238,7 @@
6238
6238
  {
6239
6239
  "disabled": false,
6240
6240
  "document": "参数列表,参数格式如 ParamList.0.Name=auto_increment&ParamList.0.Value=1。可通过 [查询默认的可设置参数列表](https://cloud.tencent.com/document/api/236/32662) 查询支持设置的参数。",
6241
- "example": "[]",
6241
+ "example": "[{\"Name\": \"auto_increment_increment\",\"Value\": \"1\"}]",
6242
6242
  "member": "ParamInfo",
6243
6243
  "name": "ParamList",
6244
6244
  "required": false,
@@ -6274,7 +6274,7 @@
6274
6274
  {
6275
6275
  "disabled": false,
6276
6276
  "document": "安全组参数,可使用 [查询项目安全组信息](https://cloud.tencent.com/document/api/236/15850) 接口查询某个项目的安全组详情。",
6277
- "example": "[]",
6277
+ "example": "[\"sg-9stjvjn1\"]",
6278
6278
  "member": "string",
6279
6279
  "name": "SecurityGroup",
6280
6280
  "required": false,
@@ -6283,7 +6283,7 @@
6283
6283
  {
6284
6284
  "disabled": false,
6285
6285
  "document": "只读实例参数。购买只读实例时,该参数必传。",
6286
- "example": "{}",
6286
+ "example": "{\"RoGroupMode\": \"allinone\",\"RoGroupName\": \"jersey\",\"RoMaxDelayTime\": \"5\",\"MinRoInGroup\": \"1\",\"RoOfflineDelay\": \"1\"}",
6287
6287
  "member": "RoGroup",
6288
6288
  "name": "RoGroup",
6289
6289
  "required": false,
@@ -6301,7 +6301,7 @@
6301
6301
  {
6302
6302
  "disabled": false,
6303
6303
  "document": "实例标签信息。",
6304
- "example": "[]",
6304
+ "example": "[{\"TagKey\": \"march\",\"TagValue\": [\"march1\"]}]",
6305
6305
  "member": "TagInfo",
6306
6306
  "name": "ResourceTags",
6307
6307
  "required": false,
@@ -6346,7 +6346,7 @@
6346
6346
  {
6347
6347
  "disabled": false,
6348
6348
  "document": "告警策略id数组。腾讯云可观测平台DescribeAlarmPolicy接口返回的OriginId。",
6349
- "example": "[]",
6349
+ "example": "[7957756]",
6350
6350
  "member": "int64",
6351
6351
  "name": "AlarmPolicyList",
6352
6352
  "required": false,
@@ -6400,7 +6400,7 @@
6400
6400
  {
6401
6401
  "disabled": false,
6402
6402
  "document": "告警策略名数组,例如:[\"policy-uyoee9wg\"],AlarmPolicyList不为空时该参数无效。",
6403
- "example": "[]",
6403
+ "example": "[\"policy-uyoee9wg\"]",
6404
6404
  "member": "string",
6405
6405
  "name": "AlarmPolicyIdList",
6406
6406
  "required": false,
@@ -6427,7 +6427,7 @@
6427
6427
  {
6428
6428
  "disabled": false,
6429
6429
  "document": "指定实例的IP列表。仅支持主实例指定,按实例顺序,不足则按未指定处理。",
6430
- "example": "[]",
6430
+ "example": "[\"172.1.1.1\"]",
6431
6431
  "member": "string",
6432
6432
  "name": "Vips",
6433
6433
  "required": false,
@@ -6453,7 +6453,7 @@
6453
6453
  },
6454
6454
  {
6455
6455
  "disabled": false,
6456
- "document": "磁盘类型,基础版或者集群版实例可以指定此参数。CLOUD_SSD 表示 SSD 云硬盘,CLOUD_HSSD 表示增强型 SSD 云硬盘。",
6456
+ "document": "磁盘类型,单节点(云盘版)或者集群版实例可以指定此参数。CLOUD_SSD 表示 SSD 云硬盘,CLOUD_HSSD 表示增强型 SSD 云硬盘。\n说明:单节点(云盘版)、集群版实例硬盘类型所支持的地域略有不同,具体支持情况请参考 [地域和可用区](https://cloud.tencent.com/document/product/236/8458)。",
6457
6457
  "example": "CLOUD_SSD",
6458
6458
  "member": "string",
6459
6459
  "name": "DiskType",
@@ -10012,7 +10012,7 @@
10012
10012
  {
10013
10013
  "disabled": false,
10014
10014
  "document": "协议类型,支持的协议类型包括 plaintext、sasl_plaintext 或 sasl_ssl。建议使用 sasl_ssl,此协议会进行连接加密同时需要用户认证。\n入参必填\n注意:此字段可能返回 null,表示取不到有效值。",
10015
- "example": "sasl_plaintext",
10015
+ "example": "sasl_ssl",
10016
10016
  "member": "string",
10017
10017
  "name": "Protocol",
10018
10018
  "output_required": true,
@@ -10023,7 +10023,7 @@
10023
10023
  {
10024
10024
  "disabled": false,
10025
10025
  "document": "加密类型,支持 PLAIN、SCRAM-SHA-256 或 SCRAM-SHA-512。\n当Protocol为sasl_plaintext或sasl_ssl时必填\n注意:此字段可能返回 null,表示取不到有效值。",
10026
- "example": "",
10026
+ "example": "PLAIN",
10027
10027
  "member": "string",
10028
10028
  "name": "Mechanism",
10029
10029
  "output_required": true,
@@ -10034,7 +10034,7 @@
10034
10034
  {
10035
10035
  "disabled": false,
10036
10036
  "document": "用户名。\n当Protocol为sasl_plaintext或sasl_ssl时必填\n注意:此字段可能返回 null,表示取不到有效值。",
10037
- "example": "",
10037
+ "example": "name",
10038
10038
  "member": "string",
10039
10039
  "name": "UserName",
10040
10040
  "output_required": true,
@@ -10045,7 +10045,7 @@
10045
10045
  {
10046
10046
  "disabled": false,
10047
10047
  "document": "用户密码。\n当Protocol为sasl_plaintext或sasl_ssl时必填\n注意:此字段可能返回 null,表示取不到有效值。",
10048
- "example": "",
10048
+ "example": "axxxxxx",
10049
10049
  "member": "string",
10050
10050
  "name": "Password",
10051
10051
  "output_required": true,
@@ -2461,6 +2461,58 @@ def doDescribeBaselineRuleDetectList(args, parsed_globals):
2461
2461
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2462
2462
 
2463
2463
 
2464
+ def doModifyRaspMaxCpu(args, parsed_globals):
2465
+ g_param = parse_global_arg(parsed_globals)
2466
+
2467
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
2468
+ cred = credential.CVMRoleCredential()
2469
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
2470
+ cred = credential.STSAssumeRoleCredential(
2471
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
2472
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
2473
+ )
2474
+ 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):
2475
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
2476
+ else:
2477
+ cred = credential.Credential(
2478
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
2479
+ )
2480
+ http_profile = HttpProfile(
2481
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
2482
+ reqMethod="POST",
2483
+ endpoint=g_param[OptionsDefine.Endpoint],
2484
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
2485
+ )
2486
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
2487
+ if g_param[OptionsDefine.Language]:
2488
+ profile.language = g_param[OptionsDefine.Language]
2489
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
2490
+ client = mod.CwpClient(cred, g_param[OptionsDefine.Region], profile)
2491
+ client._sdkVersion += ("_CLI_" + __version__)
2492
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
2493
+ model = models.ModifyRaspMaxCpuRequest()
2494
+ model.from_json_string(json.dumps(args))
2495
+ start_time = time.time()
2496
+ while True:
2497
+ rsp = client.ModifyRaspMaxCpu(model)
2498
+ result = rsp.to_json_string()
2499
+ try:
2500
+ json_obj = json.loads(result)
2501
+ except TypeError as e:
2502
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
2503
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
2504
+ break
2505
+ cur_time = time.time()
2506
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
2507
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
2508
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
2509
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
2510
+ else:
2511
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
2512
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
2513
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2514
+
2515
+
2464
2516
  def doDeleteTags(args, parsed_globals):
2465
2517
  g_param = parse_global_arg(parsed_globals)
2466
2518
 
@@ -5789,6 +5841,58 @@ def doDescribeAssetTypeTop(args, parsed_globals):
5789
5841
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
5790
5842
 
5791
5843
 
5844
+ def doDescribeRaspRuleVuls(args, parsed_globals):
5845
+ g_param = parse_global_arg(parsed_globals)
5846
+
5847
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
5848
+ cred = credential.CVMRoleCredential()
5849
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
5850
+ cred = credential.STSAssumeRoleCredential(
5851
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
5852
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
5853
+ )
5854
+ 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):
5855
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
5856
+ else:
5857
+ cred = credential.Credential(
5858
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
5859
+ )
5860
+ http_profile = HttpProfile(
5861
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
5862
+ reqMethod="POST",
5863
+ endpoint=g_param[OptionsDefine.Endpoint],
5864
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
5865
+ )
5866
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
5867
+ if g_param[OptionsDefine.Language]:
5868
+ profile.language = g_param[OptionsDefine.Language]
5869
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
5870
+ client = mod.CwpClient(cred, g_param[OptionsDefine.Region], profile)
5871
+ client._sdkVersion += ("_CLI_" + __version__)
5872
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
5873
+ model = models.DescribeRaspRuleVulsRequest()
5874
+ model.from_json_string(json.dumps(args))
5875
+ start_time = time.time()
5876
+ while True:
5877
+ rsp = client.DescribeRaspRuleVuls(model)
5878
+ result = rsp.to_json_string()
5879
+ try:
5880
+ json_obj = json.loads(result)
5881
+ except TypeError as e:
5882
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
5883
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
5884
+ break
5885
+ cur_time = time.time()
5886
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
5887
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
5888
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
5889
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
5890
+ else:
5891
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
5892
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
5893
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
5894
+
5895
+
5792
5896
  def doExportRansomDefenseStrategyMachines(args, parsed_globals):
5793
5897
  g_param = parse_global_arg(parsed_globals)
5794
5898
 
@@ -8181,7 +8285,7 @@ def doExportBaselineWeakPasswordList(args, parsed_globals):
8181
8285
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
8182
8286
 
8183
8287
 
8184
- def doDescribeAssetUserKeyList(args, parsed_globals):
8288
+ def doDescribeBaselineStrategyList(args, parsed_globals):
8185
8289
  g_param = parse_global_arg(parsed_globals)
8186
8290
 
8187
8291
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -8210,11 +8314,11 @@ def doDescribeAssetUserKeyList(args, parsed_globals):
8210
8314
  client = mod.CwpClient(cred, g_param[OptionsDefine.Region], profile)
8211
8315
  client._sdkVersion += ("_CLI_" + __version__)
8212
8316
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
8213
- model = models.DescribeAssetUserKeyListRequest()
8317
+ model = models.DescribeBaselineStrategyListRequest()
8214
8318
  model.from_json_string(json.dumps(args))
8215
8319
  start_time = time.time()
8216
8320
  while True:
8217
- rsp = client.DescribeAssetUserKeyList(model)
8321
+ rsp = client.DescribeBaselineStrategyList(model)
8218
8322
  result = rsp.to_json_string()
8219
8323
  try:
8220
8324
  json_obj = json.loads(result)
@@ -11665,6 +11769,58 @@ def doEditTags(args, parsed_globals):
11665
11769
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
11666
11770
 
11667
11771
 
11772
+ def doDescribeRaspRules(args, parsed_globals):
11773
+ g_param = parse_global_arg(parsed_globals)
11774
+
11775
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
11776
+ cred = credential.CVMRoleCredential()
11777
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
11778
+ cred = credential.STSAssumeRoleCredential(
11779
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
11780
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
11781
+ )
11782
+ 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):
11783
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
11784
+ else:
11785
+ cred = credential.Credential(
11786
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
11787
+ )
11788
+ http_profile = HttpProfile(
11789
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
11790
+ reqMethod="POST",
11791
+ endpoint=g_param[OptionsDefine.Endpoint],
11792
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
11793
+ )
11794
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
11795
+ if g_param[OptionsDefine.Language]:
11796
+ profile.language = g_param[OptionsDefine.Language]
11797
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
11798
+ client = mod.CwpClient(cred, g_param[OptionsDefine.Region], profile)
11799
+ client._sdkVersion += ("_CLI_" + __version__)
11800
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
11801
+ model = models.DescribeRaspRulesRequest()
11802
+ model.from_json_string(json.dumps(args))
11803
+ start_time = time.time()
11804
+ while True:
11805
+ rsp = client.DescribeRaspRules(model)
11806
+ result = rsp.to_json_string()
11807
+ try:
11808
+ json_obj = json.loads(result)
11809
+ except TypeError as e:
11810
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
11811
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
11812
+ break
11813
+ cur_time = time.time()
11814
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
11815
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
11816
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
11817
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
11818
+ else:
11819
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
11820
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
11821
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
11822
+
11823
+
11668
11824
  def doCreateLogExport(args, parsed_globals):
11669
11825
  g_param = parse_global_arg(parsed_globals)
11670
11826
 
@@ -16501,6 +16657,58 @@ def doDescribeAssetDatabaseCount(args, parsed_globals):
16501
16657
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
16502
16658
 
16503
16659
 
16660
+ def doDescribeRaspMaxCpu(args, parsed_globals):
16661
+ g_param = parse_global_arg(parsed_globals)
16662
+
16663
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
16664
+ cred = credential.CVMRoleCredential()
16665
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
16666
+ cred = credential.STSAssumeRoleCredential(
16667
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
16668
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
16669
+ )
16670
+ 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):
16671
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
16672
+ else:
16673
+ cred = credential.Credential(
16674
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
16675
+ )
16676
+ http_profile = HttpProfile(
16677
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
16678
+ reqMethod="POST",
16679
+ endpoint=g_param[OptionsDefine.Endpoint],
16680
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
16681
+ )
16682
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
16683
+ if g_param[OptionsDefine.Language]:
16684
+ profile.language = g_param[OptionsDefine.Language]
16685
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
16686
+ client = mod.CwpClient(cred, g_param[OptionsDefine.Region], profile)
16687
+ client._sdkVersion += ("_CLI_" + __version__)
16688
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
16689
+ model = models.DescribeRaspMaxCpuRequest()
16690
+ model.from_json_string(json.dumps(args))
16691
+ start_time = time.time()
16692
+ while True:
16693
+ rsp = client.DescribeRaspMaxCpu(model)
16694
+ result = rsp.to_json_string()
16695
+ try:
16696
+ json_obj = json.loads(result)
16697
+ except TypeError as e:
16698
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
16699
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
16700
+ break
16701
+ cur_time = time.time()
16702
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
16703
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
16704
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
16705
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
16706
+ else:
16707
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
16708
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
16709
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
16710
+
16711
+
16504
16712
  def doDescribeLogHistogram(args, parsed_globals):
16505
16713
  g_param = parse_global_arg(parsed_globals)
16506
16714
 
@@ -17697,7 +17905,7 @@ def doDescribeAttackStatistics(args, parsed_globals):
17697
17905
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
17698
17906
 
17699
17907
 
17700
- def doDescribeBaselineStrategyList(args, parsed_globals):
17908
+ def doDescribeAssetUserKeyList(args, parsed_globals):
17701
17909
  g_param = parse_global_arg(parsed_globals)
17702
17910
 
17703
17911
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -17726,11 +17934,11 @@ def doDescribeBaselineStrategyList(args, parsed_globals):
17726
17934
  client = mod.CwpClient(cred, g_param[OptionsDefine.Region], profile)
17727
17935
  client._sdkVersion += ("_CLI_" + __version__)
17728
17936
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
17729
- model = models.DescribeBaselineStrategyListRequest()
17937
+ model = models.DescribeAssetUserKeyListRequest()
17730
17938
  model.from_json_string(json.dumps(args))
17731
17939
  start_time = time.time()
17732
17940
  while True:
17733
- rsp = client.DescribeBaselineStrategyList(model)
17941
+ rsp = client.DescribeAssetUserKeyList(model)
17734
17942
  result = rsp.to_json_string()
17735
17943
  try:
17736
17944
  json_obj = json.loads(result)
@@ -18009,6 +18217,58 @@ def doDeleteBashRules(args, parsed_globals):
18009
18217
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
18010
18218
 
18011
18219
 
18220
+ def doModifyRaspRules(args, parsed_globals):
18221
+ g_param = parse_global_arg(parsed_globals)
18222
+
18223
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
18224
+ cred = credential.CVMRoleCredential()
18225
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
18226
+ cred = credential.STSAssumeRoleCredential(
18227
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
18228
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
18229
+ )
18230
+ 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):
18231
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
18232
+ else:
18233
+ cred = credential.Credential(
18234
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
18235
+ )
18236
+ http_profile = HttpProfile(
18237
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
18238
+ reqMethod="POST",
18239
+ endpoint=g_param[OptionsDefine.Endpoint],
18240
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
18241
+ )
18242
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
18243
+ if g_param[OptionsDefine.Language]:
18244
+ profile.language = g_param[OptionsDefine.Language]
18245
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
18246
+ client = mod.CwpClient(cred, g_param[OptionsDefine.Region], profile)
18247
+ client._sdkVersion += ("_CLI_" + __version__)
18248
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
18249
+ model = models.ModifyRaspRulesRequest()
18250
+ model.from_json_string(json.dumps(args))
18251
+ start_time = time.time()
18252
+ while True:
18253
+ rsp = client.ModifyRaspRules(model)
18254
+ result = rsp.to_json_string()
18255
+ try:
18256
+ json_obj = json.loads(result)
18257
+ except TypeError as e:
18258
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
18259
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
18260
+ break
18261
+ cur_time = time.time()
18262
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
18263
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
18264
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
18265
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
18266
+ else:
18267
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
18268
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
18269
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
18270
+
18271
+
18012
18272
  def doSyncAssetScan(args, parsed_globals):
18013
18273
  g_param = parse_global_arg(parsed_globals)
18014
18274
 
@@ -22741,6 +23001,58 @@ def doDescribeAssetUserInfo(args, parsed_globals):
22741
23001
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
22742
23002
 
22743
23003
 
23004
+ def doDeleteRaspRules(args, parsed_globals):
23005
+ g_param = parse_global_arg(parsed_globals)
23006
+
23007
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
23008
+ cred = credential.CVMRoleCredential()
23009
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
23010
+ cred = credential.STSAssumeRoleCredential(
23011
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
23012
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
23013
+ )
23014
+ 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):
23015
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
23016
+ else:
23017
+ cred = credential.Credential(
23018
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
23019
+ )
23020
+ http_profile = HttpProfile(
23021
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
23022
+ reqMethod="POST",
23023
+ endpoint=g_param[OptionsDefine.Endpoint],
23024
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
23025
+ )
23026
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
23027
+ if g_param[OptionsDefine.Language]:
23028
+ profile.language = g_param[OptionsDefine.Language]
23029
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
23030
+ client = mod.CwpClient(cred, g_param[OptionsDefine.Region], profile)
23031
+ client._sdkVersion += ("_CLI_" + __version__)
23032
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
23033
+ model = models.DeleteRaspRulesRequest()
23034
+ model.from_json_string(json.dumps(args))
23035
+ start_time = time.time()
23036
+ while True:
23037
+ rsp = client.DeleteRaspRules(model)
23038
+ result = rsp.to_json_string()
23039
+ try:
23040
+ json_obj = json.loads(result)
23041
+ except TypeError as e:
23042
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
23043
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
23044
+ break
23045
+ cur_time = time.time()
23046
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
23047
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
23048
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
23049
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
23050
+ else:
23051
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
23052
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
23053
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
23054
+
23055
+
22744
23056
  def doDeleteMalwares(args, parsed_globals):
22745
23057
  g_param = parse_global_arg(parsed_globals)
22746
23058
 
@@ -26803,6 +27115,7 @@ ACTION_MAP = {
26803
27115
  "DescribeAssetLoadInfo": doDescribeAssetLoadInfo,
26804
27116
  "FixBaselineDetect": doFixBaselineDetect,
26805
27117
  "DescribeBaselineRuleDetectList": doDescribeBaselineRuleDetectList,
27118
+ "ModifyRaspMaxCpu": doModifyRaspMaxCpu,
26806
27119
  "DeleteTags": doDeleteTags,
26807
27120
  "DeleteLicenseRecordAll": doDeleteLicenseRecordAll,
26808
27121
  "DescribeOverviewStatistics": doDescribeOverviewStatistics,
@@ -26867,6 +27180,7 @@ ACTION_MAP = {
26867
27180
  "DescribePrivilegeEvents": doDescribePrivilegeEvents,
26868
27181
  "DescribeMachineInfo": doDescribeMachineInfo,
26869
27182
  "DescribeAssetTypeTop": doDescribeAssetTypeTop,
27183
+ "DescribeRaspRuleVuls": doDescribeRaspRuleVuls,
26870
27184
  "ExportRansomDefenseStrategyMachines": doExportRansomDefenseStrategyMachines,
26871
27185
  "DescribeLogStorageStatistic": doDescribeLogStorageStatistic,
26872
27186
  "DescribeIgnoreHostAndItemConfig": doDescribeIgnoreHostAndItemConfig,
@@ -26913,7 +27227,7 @@ ACTION_MAP = {
26913
27227
  "DescribeBaselineItemRiskTop": doDescribeBaselineItemRiskTop,
26914
27228
  "ExportAssetAppList": doExportAssetAppList,
26915
27229
  "ExportBaselineWeakPasswordList": doExportBaselineWeakPasswordList,
26916
- "DescribeAssetUserKeyList": doDescribeAssetUserKeyList,
27230
+ "DescribeBaselineStrategyList": doDescribeBaselineStrategyList,
26917
27231
  "ExportAssetPortInfoList": doExportAssetPortInfoList,
26918
27232
  "ExportAssetMachineList": doExportAssetMachineList,
26919
27233
  "DescribeLogStorageRecord": doDescribeLogStorageRecord,
@@ -26980,6 +27294,7 @@ ACTION_MAP = {
26980
27294
  "DescribeScreenMachineRegions": doDescribeScreenMachineRegions,
26981
27295
  "DescribeBaselineHostIgnoreList": doDescribeBaselineHostIgnoreList,
26982
27296
  "EditTags": doEditTags,
27297
+ "DescribeRaspRules": doDescribeRaspRules,
26983
27298
  "CreateLogExport": doCreateLogExport,
26984
27299
  "DescribeLoginWhiteCombinedList": doDescribeLoginWhiteCombinedList,
26985
27300
  "ExportNonlocalLoginPlaces": doExportNonlocalLoginPlaces,
@@ -27073,6 +27388,7 @@ ACTION_MAP = {
27073
27388
  "DeleteLicenseRecord": doDeleteLicenseRecord,
27074
27389
  "DescribeSecurityDynamics": doDescribeSecurityDynamics,
27075
27390
  "DescribeAssetDatabaseCount": doDescribeAssetDatabaseCount,
27391
+ "DescribeRaspMaxCpu": doDescribeRaspMaxCpu,
27076
27392
  "DescribeLogHistogram": doDescribeLogHistogram,
27077
27393
  "DescribeMachineFileTamperRules": doDescribeMachineFileTamperRules,
27078
27394
  "ModifyLicenseOrder": doModifyLicenseOrder,
@@ -27096,12 +27412,13 @@ ACTION_MAP = {
27096
27412
  "ModifyWebPageProtectSetting": doModifyWebPageProtectSetting,
27097
27413
  "DescribeBashRules": doDescribeBashRules,
27098
27414
  "DescribeAttackStatistics": doDescribeAttackStatistics,
27099
- "DescribeBaselineStrategyList": doDescribeBaselineStrategyList,
27415
+ "DescribeAssetUserKeyList": doDescribeAssetUserKeyList,
27100
27416
  "ModifyBaselineRuleIgnore": doModifyBaselineRuleIgnore,
27101
27417
  "ModifyMalwareWhiteList": doModifyMalwareWhiteList,
27102
27418
  "DescribeWebHookRule": doDescribeWebHookRule,
27103
27419
  "RetryVulFix": doRetryVulFix,
27104
27420
  "DeleteBashRules": doDeleteBashRules,
27421
+ "ModifyRaspRules": doModifyRaspRules,
27105
27422
  "SyncAssetScan": doSyncAssetScan,
27106
27423
  "DescribeAssetRecentMachineInfo": doDescribeAssetRecentMachineInfo,
27107
27424
  "DescribeVulEffectModules": doDescribeVulEffectModules,
@@ -27193,6 +27510,7 @@ ACTION_MAP = {
27193
27510
  "ExportPrivilegeEvents": doExportPrivilegeEvents,
27194
27511
  "ModifyRiskEventsStatus": doModifyRiskEventsStatus,
27195
27512
  "DescribeAssetUserInfo": doDescribeAssetUserInfo,
27513
+ "DeleteRaspRules": doDeleteRaspRules,
27196
27514
  "DeleteMalwares": doDeleteMalwares,
27197
27515
  "ExportVulDefencePluginEvent": doExportVulDefencePluginEvent,
27198
27516
  "ScanVulSetting": doScanVulSetting,