getConformancePackComplianceDetails method

Future<GetConformancePackComplianceDetailsResponse> getConformancePackComplianceDetails({
  1. required String conformancePackName,
  2. ConformancePackEvaluationFilters? filters,
  3. int? limit,
  4. String? nextToken,
})

Returns compliance details of a conformance pack for all AWS resources that are monitered by conformance pack.

May throw InvalidLimitException. May throw InvalidNextTokenException. May throw NoSuchConformancePackException. May throw NoSuchConfigRuleInConformancePackException. May throw InvalidParameterValueException.

Parameter conformancePackName : Name of the conformance pack.

Parameter filters : A ConformancePackEvaluationFilters object.

Parameter limit : The maximum number of evaluation results returned on each page. If you do no specify a number, AWS Config uses the default. The default is 100.

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

Implementation

Future<GetConformancePackComplianceDetailsResponse>
    getConformancePackComplianceDetails({
  required String conformancePackName,
  ConformancePackEvaluationFilters? filters,
  int? limit,
  String? nextToken,
}) async {
  ArgumentError.checkNotNull(conformancePackName, 'conformancePackName');
  _s.validateStringLength(
    'conformancePackName',
    conformancePackName,
    1,
    256,
    isRequired: true,
  );
  _s.validateNumRange(
    'limit',
    limit,
    0,
    100,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'StarlingDoveService.GetConformancePackComplianceDetails'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ConformancePackName': conformancePackName,
      if (filters != null) 'Filters': filters,
      if (limit != null) 'Limit': limit,
      if (nextToken != null) 'NextToken': nextToken,
    },
  );

  return GetConformancePackComplianceDetailsResponse.fromJson(
      jsonResponse.body);
}