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 the specified EC2 Fleets.

After you delete an EC2 Fleet, it launches no new instances.

You must also specify whether a deleted EC2 Fleet should terminate its instances. If you choose to terminate the instances, the EC2 Fleet enters the deleted_terminating state. Otherwise, the EC2 Fleet enters the deleted_running state, and the instances continue to run until they are interrupted or you terminate them manually.

For instant fleets, EC2 Fleet must terminate the instances when the fleet is deleted. Up to 1000 instances can be terminated in a single request to delete instant fleets. A deleted instant fleet with running instances is not supported.

Restrictions

For more information, see Delete an EC2 Fleet in the Amazon EC2 User Guide.

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 BeginDeleteFleets and EndDeleteFleets.

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

Syntax

C#
public abstract Task<DeleteFleetsResponse> DeleteFleetsAsync(
         DeleteFleetsRequest request,
         CancellationToken cancellationToken
)

Parameters

request
Type: Amazon.EC2.Model.DeleteFleetsRequest

Container for the necessary parameters to execute the DeleteFleets 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 DeleteFleets service method, as returned by EC2.

Version Information

.NET Core App:
Supported in: 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.5

See Also