AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Deletes an Amazon EKS cluster control plane.

If you have active services 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.

Note:

This is an asynchronous operation using the standard naming convention for .NET 4.5 or higher. For .NET 3.5 the operation is implemented as a pair of methods using the standard naming convention of BeginDeleteCluster and EndDeleteCluster.

Namespace: Amazon.EKS
Assembly: AWSSDK.EKS.dll
Version: 3.x.y.z

Syntax

C#
public virtual Task<DeleteClusterResponse> DeleteClusterAsync(
         DeleteClusterRequest request,
         CancellationToken cancellationToken
)

Parameters

request
Type: Amazon.EKS.Model.DeleteClusterRequest

Container for the necessary parameters to execute the DeleteCluster service method.

cancellationToken
Type: System.Threading.CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Return Value


The response from the DeleteCluster service method, as returned by EKS.

Exceptions

ExceptionCondition
ClientException These errors are usually caused by a client action. Actions can include using an action or resource on behalf of an IAM principal that doesn't have permissions to use the action or resource or specifying an identifier that is not valid.
ResourceInUseException The specified resource is in use.
ResourceNotFoundException The specified resource could not be found. You can view your available clusters with ListClusters. You can view your available managed node groups with ListNodegroups. Amazon EKS clusters and node groups are Amazon Web Services Region specific.
ServerException These errors are usually caused by a server-side issue.
ServiceUnavailableException The service is unavailable. Back off and retry the operation.

Version Information

.NET:
Supported in: 8.0 and newer, Core 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.5 and newer

See Also