listFindings method

Future<ListFindingsOutput> listFindings({
  1. required String agentSpaceId,
  2. String? codeReviewJobId,
  3. ConfidenceLevel? confidence,
  4. int? maxResults,
  5. String? name,
  6. String? nextToken,
  7. String? pentestJobId,
  8. RiskLevel? riskLevel,
  9. String? riskType,
  10. FindingStatus? status,
})

Lists the security findings for a pentest job.

Parameter agentSpaceId : The unique identifier of the agent space.

Parameter codeReviewJobId : The unique identifier of the code review job to list findings for. Mutually exclusive with pentestJobId.

Parameter confidence : Filter findings by confidence level.

Parameter maxResults : The maximum number of results to return in a single call.

Parameter name : Filter findings by name.

Parameter nextToken : A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request. For subsequent calls, use the nextToken value returned from the previous request.

Parameter pentestJobId : The unique identifier of the pentest job to list findings for.

Parameter riskLevel : Filter findings by risk level.

Parameter riskType : Filter findings by risk type.

Parameter status : Filter findings by status.

Implementation

Future<ListFindingsOutput> listFindings({
  required String agentSpaceId,
  String? codeReviewJobId,
  ConfidenceLevel? confidence,
  int? maxResults,
  String? name,
  String? nextToken,
  String? pentestJobId,
  RiskLevel? riskLevel,
  String? riskType,
  FindingStatus? status,
}) async {
  final $payload = <String, dynamic>{
    'agentSpaceId': agentSpaceId,
    if (codeReviewJobId != null) 'codeReviewJobId': codeReviewJobId,
    if (confidence != null) 'confidence': confidence.value,
    if (maxResults != null) 'maxResults': maxResults,
    if (name != null) 'name': name,
    if (nextToken != null) 'nextToken': nextToken,
    if (pentestJobId != null) 'pentestJobId': pentestJobId,
    if (riskLevel != null) 'riskLevel': riskLevel.value,
    if (riskType != null) 'riskType': riskType,
    if (status != null) 'status': status.value,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/ListFindings',
    exceptionFnMap: _exceptionFns,
  );
  return ListFindingsOutput.fromJson(response);
}