updateAssessment method
Edits an Audit Manager assessment.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter assessmentId :
The unique identifier for the assessment.
Parameter scope :
The scope of the assessment.
Parameter assessmentDescription :
The description of the assessment.
Parameter assessmentName :
The name of the assessment to be updated.
Parameter assessmentReportsDestination :
The assessment report storage destination for the assessment that's being
updated.
Parameter roles :
The list of roles for the assessment.
Implementation
Future<UpdateAssessmentResponse> updateAssessment({
required String assessmentId,
required Scope scope,
String? assessmentDescription,
String? assessmentName,
AssessmentReportsDestination? assessmentReportsDestination,
List<Role>? roles,
}) async {
final $payload = <String, dynamic>{
'scope': scope,
if (assessmentDescription != null)
'assessmentDescription': assessmentDescription,
if (assessmentName != null) 'assessmentName': assessmentName,
if (assessmentReportsDestination != null)
'assessmentReportsDestination': assessmentReportsDestination,
if (roles != null) 'roles': roles,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri: '/assessments/${Uri.encodeComponent(assessmentId)}',
exceptionFnMap: _exceptionFns,
);
return UpdateAssessmentResponse.fromJson(response);
}