describeConfigRuleEvaluationStatus method

Future<DescribeConfigRuleEvaluationStatusResponse> describeConfigRuleEvaluationStatus({
  1. List<String>? configRuleNames,
  2. int? limit,
  3. String? nextToken,
})

Returns status information for each of your Config managed rules. The status includes information such as the last time Config invoked the rule, the last time Config failed to invoke the rule, and the related error for the last failure.

May throw InvalidNextTokenException. May throw InvalidParameterValueException. May throw NoSuchConfigRuleException.

Parameter configRuleNames : The name of the Config managed rules for which you want status information. If you do not specify any names, Config returns status information for all Config managed rules that you use.

Parameter limit : The number of rule evaluation results that you want returned.

This parameter is required if the rule limit for your account is more than the default of 1000 rules.

For information about requesting a rule limit increase, see Config Limits in the Amazon Web Services General Reference Guide.

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<DescribeConfigRuleEvaluationStatusResponse>
    describeConfigRuleEvaluationStatus({
  List<String>? configRuleNames,
  int? limit,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'limit',
    limit,
    0,
    50,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'StarlingDoveService.DescribeConfigRuleEvaluationStatus'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (configRuleNames != null) 'ConfigRuleNames': configRuleNames,
      if (limit != null) 'Limit': limit,
      if (nextToken != null) 'NextToken': nextToken,
    },
  );

  return DescribeConfigRuleEvaluationStatusResponse.fromJson(
      jsonResponse.body);
}