listConformancePackComplianceScores method

Future<ListConformancePackComplianceScoresResponse> listConformancePackComplianceScores({
  1. ConformancePackComplianceScoresFilters? filters,
  2. int? limit,
  3. String? nextToken,
  4. SortBy? sortBy,
  5. SortOrder? sortOrder,
})

Returns a list of conformance pack compliance scores. A compliance score is the percentage of the number of compliant rule-resource combinations in a conformance pack compared to the number of total possible rule-resource combinations in the conformance pack. This metric provides you with a high-level view of the compliance state of your conformance packs. You can use it to identify, investigate, and understand the level of compliance in your conformance packs.

May throw InvalidLimitException. May throw InvalidNextTokenException. May throw InvalidParameterValueException.

Parameter filters : Filters the results based on the ConformancePackComplianceScoresFilters.

Parameter limit : The maximum number of conformance pack compliance scores returned on each page.

Parameter nextToken : The nextToken string in a prior request that you can use to get the paginated response for the next set of conformance pack compliance scores.

Parameter sortBy : Sorts your conformance pack compliance scores in either ascending or descending order, depending on SortOrder.

By default, conformance pack compliance scores are sorted in alphabetical order by name of the conformance pack. Enter SCORE, to sort conformance pack compliance scores by the numerical value of the compliance score.

Parameter sortOrder : Determines the order in which conformance pack compliance scores are sorted. Either in ascending or descending order.

By default, conformance pack compliance scores are sorted in alphabetical order by name of the conformance pack. Conformance pack compliance scores are sorted in reverse alphabetical order if you enter DESCENDING.

You can sort conformance pack compliance scores by the numerical value of the compliance score by entering SCORE in the SortBy action. When compliance scores are sorted by SCORE, conformance packs with a compliance score of INSUFFICIENT_DATA will be last when sorting by ascending order and first when sorting by descending order.

Implementation

Future<ListConformancePackComplianceScoresResponse>
    listConformancePackComplianceScores({
  ConformancePackComplianceScoresFilters? filters,
  int? limit,
  String? nextToken,
  SortBy? sortBy,
  SortOrder? sortOrder,
}) async {
  _s.validateNumRange(
    'limit',
    limit,
    0,
    20,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'StarlingDoveService.ListConformancePackComplianceScores'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (filters != null) 'Filters': filters,
      if (limit != null) 'Limit': limit,
      if (nextToken != null) 'NextToken': nextToken,
      if (sortBy != null) 'SortBy': sortBy.value,
      if (sortOrder != null) 'SortOrder': sortOrder.value,
    },
  );

  return ListConformancePackComplianceScoresResponse.fromJson(
      jsonResponse.body);
}