deleteCluster
inline suspend fun EcsClient.deleteCluster(crossinline block: DeleteClusterRequest.Builder.() -> Unit): DeleteClusterResponse
Deletes the specified cluster. The cluster transitions to the INACTIVE
state. Clusters with an INACTIVE
status might remain discoverable in your account for a period of time. However, this behavior is subject to change in the future. We don't recommend that you rely on INACTIVE
clusters persisting.
You must deregister all container instances from this cluster before you may delete it. You can list the container instances in a cluster with ListContainerInstances and deregister them with DeregisterContainerInstance.
Samples
fun main() {
//sampleStart
// This example deletes an empty cluster in your default region.
val resp = ecsClient.deleteCluster {
cluster = "my_cluster"
}
//sampleEnd
}