deleteCluster method

Future<DeleteClusterResponse> deleteCluster({
  1. required String name,
})

Deletes an Amazon EKS cluster control plane.

If you have active services and ingress resources in your cluster that are associated with a load balancer, you must delete those services before deleting the cluster so that the load balancers are deleted properly. Otherwise, you can have orphaned resources in your VPC that prevent you from being able to delete the VPC. For more information, see Deleting a cluster in the Amazon EKS User Guide.

If you have managed node groups or Fargate profiles attached to the cluster, you must delete them first. For more information, see DeleteNodgroup and DeleteFargateProfile.

May throw ClientException. May throw InvalidRequestException. May throw ResourceInUseException. May throw ResourceNotFoundException. May throw ServerException. May throw ServiceUnavailableException.

Parameter name : The name of the cluster to delete.

Implementation

Future<DeleteClusterResponse> deleteCluster({
  required String name,
}) async {
  final response = await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri: '/clusters/${Uri.encodeComponent(name)}',
    exceptionFnMap: _exceptionFns,
  );
  return DeleteClusterResponse.fromJson(response);
}