getDatasetContent method

Future<GetDatasetContentResponse> getDatasetContent({
  1. required String datasetName,
  2. String? versionId,
})

Retrieves the contents of a data set as presigned URIs.

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

Parameter datasetName : The name of the data set whose contents are retrieved.

Parameter versionId : The version of the data set whose contents are retrieved. You can also use the strings "$LATEST" or "$LATEST_SUCCEEDED" to retrieve the contents of the latest or latest successfully completed data set. If not specified, "$LATEST_SUCCEEDED" is the default.

Implementation

Future<GetDatasetContentResponse> getDatasetContent({
  required String datasetName,
  String? versionId,
}) async {
  ArgumentError.checkNotNull(datasetName, 'datasetName');
  _s.validateStringLength(
    'datasetName',
    datasetName,
    1,
    128,
    isRequired: true,
  );
  _s.validateStringLength(
    'versionId',
    versionId,
    7,
    36,
  );
  final $query = <String, List<String>>{
    if (versionId != null) 'versionId': [versionId],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/datasets/${Uri.encodeComponent(datasetName)}/content',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return GetDatasetContentResponse.fromJson(response);
}