deleteRepository
inline suspend fun EcrClient.deleteRepository(crossinline block: DeleteRepositoryRequest.Builder.() -> Unit): DeleteRepositoryResponse
Deletes a repository. If the repository isn't empty, you must either delete the contents of the repository or use the force
option to delete the repository and have Amazon ECR delete all of its contents on your behalf.
Samples
fun main() {
//sampleStart
// This example force deletes a repository named ubuntu in the default registry for an account. The
// force parameter is required if the repository contains images.
val resp = ecrClient.deleteRepository {
repositoryName = "ubuntu"
force = true
}
//sampleEnd
}