batchImportFindings method
- required List<
AwsSecurityFinding> findings,
Imports security findings generated from an integrated third-party product into Security Hub. This action is requested by the integrated product to import its findings into Security Hub.
The maximum allowed size for a finding is 240 Kb. An error is returned for any finding larger than 240 Kb.
After a finding is created, BatchImportFindings
cannot be
used to update the following finding fields and objects, which Security
Hub customers use to manage their investigation workflow.
-
Note
-
UserDefinedFields
-
VerificationState
-
Workflow
BatchImportFindings
can be used to update the following
finding fields and objects only if they have not been updated using
BatchUpdateFindings
. After they are updated using
BatchUpdateFindings
, these fields cannot be updated using
BatchImportFindings
.
-
Confidence
-
Criticality
-
RelatedFindings
-
Severity
-
Types
May throw InternalException. May throw InvalidInputException. May throw LimitExceededException. May throw InvalidAccessException.
Parameter findings
:
A list of findings to import. To successfully import a finding, it must
follow the AWS
Security Finding Format. Maximum of 100 findings per request.
Implementation
Future<BatchImportFindingsResponse> batchImportFindings({
required List<AwsSecurityFinding> findings,
}) async {
ArgumentError.checkNotNull(findings, 'findings');
final $payload = <String, dynamic>{
'Findings': findings,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/findings/import',
exceptionFnMap: _exceptionFns,
);
return BatchImportFindingsResponse.fromJson(response);
}