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.

Container for the parameters to the DeleteCluster operation. 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.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceRequest
    Amazon.ECS.AmazonECSRequest
      Amazon.ECS.Model.DeleteClusterRequest

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

Syntax

C#
public class DeleteClusterRequest : AmazonECSRequest
         IAmazonWebServiceRequest

The DeleteClusterRequest type exposes the following members

Constructors

NameDescription
Public Method DeleteClusterRequest()

Properties

NameTypeDescription
Public Property Cluster System.String

Gets and sets the property Cluster.

The short name or full Amazon Resource Name (ARN) of the cluster to delete.

Examples

This example deletes an empty cluster in your default region.

To delete an empty cluster


var client = new AmazonECSClient();
var response = client.DeleteCluster(new DeleteClusterRequest 
{
    Cluster = "my_cluster"
});

Cluster cluster = response.Cluster;

            

Version Information

.NET Core App:
Supported in: 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.5, 4.0, 3.5