updateFailureModeFinding method

Future<UpdateFailureModeFindingResponse> updateFailureModeFinding({
  1. required String findingId,
  2. required String serviceArn,
  3. required FindingStatus status,
  4. String? comment,
})

Updates an existing finding.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ValidationException.

Parameter findingId : The identifier of the finding to update.

Parameter status : The new status for the finding.

Parameter comment : A comment about the finding update.

Implementation

Future<UpdateFailureModeFindingResponse> updateFailureModeFinding({
  required String findingId,
  required String serviceArn,
  required FindingStatus status,
  String? comment,
}) async {
  final $payload = <String, dynamic>{
    'findingId': findingId,
    'serviceArn': serviceArn,
    'status': status.value,
    if (comment != null) 'comment': comment,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/v2/update-failure-mode-finding',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateFailureModeFindingResponse.fromJson(response);
}