listControlDomainInsightsByAssessment method

Future<ListControlDomainInsightsByAssessmentResponse> listControlDomainInsightsByAssessment({
  1. required String assessmentId,
  2. int? maxResults,
  3. String? nextToken,
})

Lists analytics data for control domains within a specified active assessment.

Audit Manager supports the control domains that are provided by Amazon Web Services Control Catalog. For information about how to find a list of available control domains, see ListDomains in the Amazon Web Services Control Catalog API Reference.

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

Parameter assessmentId : The unique identifier for the active assessment.

Parameter maxResults : Represents the maximum number of results on a page or for an API request call.

Parameter nextToken : The pagination token that's used to fetch the next set of results.

Implementation

Future<ListControlDomainInsightsByAssessmentResponse>
    listControlDomainInsightsByAssessment({
  required String assessmentId,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    1000,
  );
  final $query = <String, List<String>>{
    'assessmentId': [assessmentId],
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/insights/control-domains-by-assessment',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListControlDomainInsightsByAssessmentResponse.fromJson(response);
}