deleteDatasetContent method
Deletes the content of the specified dataset.
May throw InvalidRequestException. May throw ResourceNotFoundException. May throw InternalFailureException. May throw ServiceUnavailableException. May throw ThrottlingException.
Parameter datasetName
:
The name of the dataset whose content is deleted.
Parameter versionId
:
The version of the dataset whose content is deleted. You can also use the
strings "$LATEST" or "$LATEST_SUCCEEDED" to delete the latest or latest
successfully completed data set. If not specified, "$LATEST_SUCCEEDED" is
the default.
Implementation
Future<void> deleteDatasetContent({
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],
};
await _protocol.send(
payload: null,
method: 'DELETE',
requestUri: '/datasets/${Uri.encodeComponent(datasetName)}/content',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
}