deleteDataset method
Deletes an existing Amazon Rekognition Custom Labels dataset. Deleting a
dataset might take while. Use DescribeDataset to check the current
status. The dataset is still deleting if the value of
Status
is DELETE_IN_PROGRESS. If you try to access the dataset after
it is deleted, you get a ResourceNotFoundException exception.
You can't delete a dataset while it is creating (Status =
CREATE_IN_PROGRESS) or if the dataset is updating
(Status = UPDATE_IN_PROGRESS).
This operation requires permissions to perform the
rekognition:DeleteDataset action.
May throw AccessDeniedException.
May throw InternalServerError.
May throw InvalidParameterException.
May throw LimitExceededException.
May throw ProvisionedThroughputExceededException.
May throw ResourceInUseException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
Parameter datasetArn :
The ARN of the Amazon Rekognition Custom Labels dataset that you want to
delete.
Implementation
Future<void> deleteDataset({
required String datasetArn,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'RekognitionService.DeleteDataset'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'DatasetArn': datasetArn,
},
);
}