Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DeleteFleetsCommand

Deletes the specified EC2 Fleet.

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

You must specify whether a deleted EC2 Fleet should also 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. A deleted instant fleet with running instances is not supported.

Restrictions

  • You can delete up to 25 instant fleets in a single request. If you exceed this number, no instant fleets are deleted and an error is returned. There is no restriction on the number of fleets of type maintain or request that can be deleted in a single request.

  • Up to 1000 instances can be terminated in a single request to delete instant fleets.

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

example

Use a bare-bones client and the command you need to make an API call.

import { EC2Client, DeleteFleetsCommand } from "@aws-sdk/client-ec2"; // ES Modules import
// const { EC2Client, DeleteFleetsCommand } = require("@aws-sdk/client-ec2"); // CommonJS import
const client = new EC2Client(config);
const command = new DeleteFleetsCommand(input);
const response = await client.send(command);
see

DeleteFleetsCommandInput for command's input shape.

see

DeleteFleetsCommandOutput for command's response shape.

see

config for EC2Client's config shape.

Hierarchy

Implements

Index

Constructors

constructor

Properties

Readonly input

input: DeleteFleetsCommandInput

Readonly middlewareStack

middlewareStack: IMiddlewareStack<DeleteFleetsCommandInput, DeleteFleetsCommandOutput>

Methods

Static getEndpointParameterInstructions