getDataset method
Retrieves dataset metadata. Use the datasetVersion query
parameter to retrieve a specific version's metadata. If absent, defaults
to DRAFT. For paginated example content, use
ListDatasetExamples.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter datasetId :
The unique identifier of the dataset to retrieve.
Parameter datasetVersion :
Version to retrieve: "DRAFT" or a version number. Defaults to DRAFT if
absent.
Implementation
Future<GetDatasetResponse> getDataset({
required String datasetId,
String? datasetVersion,
}) async {
final $query = <String, List<String>>{
if (datasetVersion != null) 'datasetVersion': [datasetVersion],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/datasets/${Uri.encodeComponent(datasetId)}',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return GetDatasetResponse.fromJson(response);
}