deleteDataset
inline suspend fun RekognitionClient.deleteDataset(crossinline block: DeleteDatasetRequest.Builder.() -> Unit): DeleteDatasetResponse
This operation applies only to Amazon Rekognition Custom Labels.
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.
Samples
fun main() {
//sampleStart
// Deletes an Amazon Rekognition Custom Labels dataset.
val resp = rekognitionClient.deleteDataset {
datasetArn = "arn:aws:rekognition:us-east-1:111122223333:project/my-project/dataset/test/1690556733321"
}
//sampleEnd
}