listReportPlans method

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

Returns a list of your report plans. For detailed information about a single report plan, use DescribeReportPlan.

May throw InvalidParameterValueException. May throw ServiceUnavailableException.

Parameter maxResults : The number of desired results from 1 to 1000. Optional. If unspecified, the query will return 1 MB of data.

Parameter nextToken : An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

Implementation

Future<ListReportPlansOutput> listReportPlans({
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    1000,
  );
  final $query = <String, List<String>>{
    if (maxResults != null) 'MaxResults': [maxResults.toString()],
    if (nextToken != null) 'NextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/audit/report-plans',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListReportPlansOutput.fromJson(response);
}