describeInsightRules method

Future<DescribeInsightRulesOutput> describeInsightRules({
  1. int? maxResults,
  2. String? nextToken,
})

Returns a list of all the Contributor Insights rules in your account.

For more information about Contributor Insights, see Using Contributor Insights to Analyze High-Cardinality Data.

May throw InvalidNextToken.

Parameter maxResults : The maximum number of results to return in one operation. If you omit this parameter, the default of 500 is used.

Parameter nextToken : Include this value, if it was returned by the previous operation, to get the next set of rules.

Implementation

Future<DescribeInsightRulesOutput> describeInsightRules({
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    500,
  );
  final $request = <String, dynamic>{};
  maxResults?.also((arg) => $request['MaxResults'] = arg);
  nextToken?.also((arg) => $request['NextToken'] = arg);
  final $result = await _protocol.send(
    $request,
    action: 'DescribeInsightRules',
    version: '2010-08-01',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['DescribeInsightRulesInput'],
    shapes: shapes,
    resultWrapper: 'DescribeInsightRulesResult',
  );
  return DescribeInsightRulesOutput.fromXml($result);
}