describeAggregateComplianceByConformancePacks method

Future<DescribeAggregateComplianceByConformancePacksResponse> describeAggregateComplianceByConformancePacks({
  1. required String configurationAggregatorName,
  2. AggregateConformancePackComplianceFilters? filters,
  3. int? limit,
  4. String? nextToken,
})

Returns a list of the existing and deleted conformance packs and their associated compliance status with the count of compliant and noncompliant Config rules within each conformance pack. Also returns the total rule count which includes compliant rules, noncompliant rules, and rules that cannot be evaluated due to insufficient data.

May throw InvalidLimitException. May throw InvalidNextTokenException. May throw NoSuchConfigurationAggregatorException. May throw ValidationException.

Parameter configurationAggregatorName : The name of the configuration aggregator.

Parameter filters : Filters the result by AggregateConformancePackComplianceFilters object.

Parameter limit : The maximum number of conformance packs compliance details returned on each page. The default is maximum. If you specify 0, Config uses the default.

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<DescribeAggregateComplianceByConformancePacksResponse>
    describeAggregateComplianceByConformancePacks({
  required String configurationAggregatorName,
  AggregateConformancePackComplianceFilters? filters,
  int? limit,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'limit',
    limit,
    0,
    100,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target':
        'StarlingDoveService.DescribeAggregateComplianceByConformancePacks'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ConfigurationAggregatorName': configurationAggregatorName,
      if (filters != null) 'Filters': filters,
      if (limit != null) 'Limit': limit,
      if (nextToken != null) 'NextToken': nextToken,
    },
  );

  return DescribeAggregateComplianceByConformancePacksResponse.fromJson(
      jsonResponse.body);
}