describeConfigRules method

Future<DescribeConfigRulesResponse> describeConfigRules({
  1. List<String>? configRuleNames,
  2. String? nextToken,
})

Returns details about your AWS Config rules.

May throw NoSuchConfigRuleException. May throw InvalidNextTokenException.

Parameter configRuleNames : The names of the AWS Config rules for which you want details. If you do not specify any names, AWS Config returns details for all your rules.

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

  return DescribeConfigRulesResponse.fromJson(jsonResponse.body);
}