describeConfigRuleEvaluationStatus method

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

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

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

Parameter configRuleNames : The name of the AWS managed Config rules for which you want status information. If you do not specify any names, AWS Config returns status information for all AWS managed Config 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 150 rules.

For information about requesting a rule limit increase, see AWS Config Limits in the AWS 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);
}