updateAssessmentControl method
Updates a control within an assessment in Audit Manager.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ValidationException.
Parameter assessmentId :
The unique identifier for the assessment.
Parameter controlId :
The unique identifier for the control.
Parameter controlSetId :
The unique identifier for the control set.
Parameter commentBody :
The comment body text for the control.
Parameter controlStatus :
The status of the control.
Implementation
Future<UpdateAssessmentControlResponse> updateAssessmentControl({
required String assessmentId,
required String controlId,
required String controlSetId,
String? commentBody,
ControlStatus? controlStatus,
}) async {
final $payload = <String, dynamic>{
if (commentBody != null) 'commentBody': commentBody,
if (controlStatus != null) 'controlStatus': controlStatus.value,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri:
'/assessments/${Uri.encodeComponent(assessmentId)}/controlSets/${Uri.encodeComponent(controlSetId)}/controls/${Uri.encodeComponent(controlId)}',
exceptionFnMap: _exceptionFns,
);
return UpdateAssessmentControlResponse.fromJson(response);
}