listDatasetContents method

Future<ListDatasetContentsResponse> listDatasetContents({
  1. required String datasetName,
  2. int? maxResults,
  3. String? nextToken,
  4. DateTime? scheduledBefore,
  5. DateTime? scheduledOnOrAfter,
})

Lists information about data set contents that have been created.

May throw InvalidRequestException. May throw InternalFailureException. May throw ServiceUnavailableException. May throw ThrottlingException. May throw ResourceNotFoundException.

Parameter datasetName : The name of the data set whose contents information you want to list.

Parameter maxResults : The maximum number of results to return in this request.

Parameter nextToken : The token for the next set of results.

Parameter scheduledBefore : A filter to limit results to those data set contents whose creation is scheduled before the given time. See the field triggers.schedule in the CreateDataset request. (timestamp)

Parameter scheduledOnOrAfter : A filter to limit results to those data set contents whose creation is scheduled on or after the given time. See the field triggers.schedule in the CreateDataset request. (timestamp)

Implementation

Future<ListDatasetContentsResponse> listDatasetContents({
  required String datasetName,
  int? maxResults,
  String? nextToken,
  DateTime? scheduledBefore,
  DateTime? scheduledOnOrAfter,
}) async {
  ArgumentError.checkNotNull(datasetName, 'datasetName');
  _s.validateStringLength(
    'datasetName',
    datasetName,
    1,
    128,
    isRequired: true,
  );
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    250,
  );
  final $query = <String, List<String>>{
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
    if (scheduledBefore != null)
      'scheduledBefore': [_s.iso8601ToJson(scheduledBefore).toString()],
    if (scheduledOnOrAfter != null)
      'scheduledOnOrAfter': [_s.iso8601ToJson(scheduledOnOrAfter).toString()],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/datasets/${Uri.encodeComponent(datasetName)}/contents',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListDatasetContentsResponse.fromJson(response);
}