create_filter
¶
create_filter(
action: FilterAction,
filter_criteria: FilterCriteria,
name: FilterName,
*,
config_overrides: Optional[Inspector2ClientConfig] = None,
description: Optional[FilterDescription] = None,
tags: Optional[TagMap] = None,
reason: Optional[FilterReason] = None,
) -> CreateFilterResponse
Creates a filter resource using specified filter criteria. When the filter action is set to SUPPRESS this action creates a suppression rule.
Parameters:
-
action(FilterAction) –Defines the action that is to be applied to the findings that match the filter.
-
description(Optional[FilterDescription], default:None) –A description of the filter.
-
filter_criteria(FilterCriteria) –Defines the criteria to be used in the filter for querying findings.
-
name(FilterName) –The name of the filter. Minimum length of 3. Maximum length of 64. Valid characters include alphanumeric characters, dot (.), underscore (_), and dash (-). Spaces are not allowed.
-
tags(Optional[TagMap], default:None) –A list of tags for the filter.
-
reason(Optional[FilterReason], default:None) –The reason for creating the filter.
Raises:
-
AccessDeniedException–You do not have sufficient access to perform this action.
For
Enable, you receive this error if you attempt to use a feature in an unsupported Amazon Web Services Region. -
BadRequestException–One or more tags submitted as part of the request is not valid.
-
InternalServerException–The request has failed due to an internal failure of the Amazon Inspector service.
-
ServiceQuotaExceededException–You have exceeded your service quota. To perform the requested action, remove some of the relevant resources, or use Service Quotas to request a service quota increase.
-
ThrottlingException–The limit on the number of requests per second was exceeded.
-
ValidationException–The request has failed validation due to missing required fields or having invalid inputs.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_inspector2/_services/inspector2.py
1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 | |