updateFindings method

Future<void> updateFindings({
  1. required String analyzerArn,
  2. required FindingStatusUpdate status,
  3. String? clientToken,
  4. List<String>? ids,
  5. String? resourceArn,
})

Updates the status for the specified findings.

May throw ResourceNotFoundException. May throw ValidationException. May throw InternalServerException. May throw ThrottlingException. May throw AccessDeniedException.

Parameter analyzerArn : The ARN of the analyzer that generated the findings to update.

Parameter status : The state represents the action to take to update the finding Status. Use ARCHIVE to change an Active finding to an Archived finding. Use ACTIVE to change an Archived finding to an Active finding.

Parameter clientToken : A client token.

Parameter ids : The IDs of the findings to update.

Parameter resourceArn : The ARN of the resource identified in the finding.

Implementation

Future<void> updateFindings({
  required String analyzerArn,
  required FindingStatusUpdate status,
  String? clientToken,
  List<String>? ids,
  String? resourceArn,
}) async {
  ArgumentError.checkNotNull(analyzerArn, 'analyzerArn');
  ArgumentError.checkNotNull(status, 'status');
  final $payload = <String, dynamic>{
    'analyzerArn': analyzerArn,
    'status': status.toValue(),
    'clientToken': clientToken ?? _s.generateIdempotencyToken(),
    if (ids != null) 'ids': ids,
    if (resourceArn != null) 'resourceArn': resourceArn,
  };
  await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/finding',
    exceptionFnMap: _exceptionFns,
  );
}