getConformancePackComplianceSummary method

Future<GetConformancePackComplianceSummaryResponse> getConformancePackComplianceSummary({
  1. required List<String> conformancePackNames,
  2. int? limit,
  3. String? nextToken,
})

Returns compliance details for the conformance pack based on the cumulative compliance results of all the rules in that conformance pack.

May throw NoSuchConformancePackException. May throw InvalidLimitException. May throw InvalidNextTokenException.

Parameter conformancePackNames : Names of conformance packs.

Parameter limit : The maximum number of conformance packs returned on each page.

Parameter nextToken : The nextToken string returned on a previous page that you use to get the next page of results in a paginated response.

Implementation

Future<GetConformancePackComplianceSummaryResponse>
    getConformancePackComplianceSummary({
  required List<String> conformancePackNames,
  int? limit,
  String? nextToken,
}) async {
  ArgumentError.checkNotNull(conformancePackNames, 'conformancePackNames');
  _s.validateNumRange(
    'limit',
    limit,
    0,
    20,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'StarlingDoveService.GetConformancePackComplianceSummary'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ConformancePackNames': conformancePackNames,
      if (limit != null) 'Limit': limit,
      if (nextToken != null) 'NextToken': nextToken,
    },
  );

  return GetConformancePackComplianceSummaryResponse.fromJson(
      jsonResponse.body);
}