listDatasetDataSegments method
Retrieves a paginated list of data segments associated with a dataset. Use
the nextToken parameter to retrieve additional results.
May throw InternalFailureException.
May throw InvalidRequestException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
Parameter datasetId :
The ID of the dataset.
Parameter workspaceName :
The name of the workspace that contains the dataset.
Parameter datasetVersion :
The version of the dataset to list data segments for.
Parameter maxResults :
The maximum number of results to return for each paginated request.
Default: 50.
Parameter nextToken :
The token to be used for the next set of paginated results.
Implementation
Future<ListDatasetDataSegmentsResponse> listDatasetDataSegments({
required String datasetId,
required String workspaceName,
String? datasetVersion,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
250,
);
final $query = <String, List<String>>{
'workspaceName': [workspaceName],
if (datasetVersion != null) 'datasetVersion': [datasetVersion],
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (nextToken != null) 'nextToken': [nextToken],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/datasets/${Uri.encodeComponent(datasetId)}/data-segments',
queryParams: $query,
hostPrefix: 'api.',
exceptionFnMap: _exceptionFns,
);
return ListDatasetDataSegmentsResponse.fromJson(response);
}