listBusinessReportSchedules method

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

Lists the details of the schedules that a user configured. A download URL of the report associated with each schedule is returned every time this action is called. A new download URL is returned each time, and is valid for 24 hours.

Parameter maxResults : The maximum number of schedules listed in the call.

Parameter nextToken : The token used to list the remaining schedules from the previous API call.

Implementation

Future<ListBusinessReportSchedulesResponse> listBusinessReportSchedules({
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    50,
  );
  _s.validateStringLength(
    'nextToken',
    nextToken,
    1,
    1100,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AlexaForBusiness.ListBusinessReportSchedules'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (maxResults != null) 'MaxResults': maxResults,
      if (nextToken != null) 'NextToken': nextToken,
    },
  );

  return ListBusinessReportSchedulesResponse.fromJson(jsonResponse.body);
}