amazonka-ec2-2.0: Amazon Elastic Compute Cloud SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.EC2.DeleteFleets

Description

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.

Synopsis

Creating a Request

data DeleteFleets Source #

See: newDeleteFleets smart constructor.

Constructors

DeleteFleets' 

Fields

  • dryRun :: Maybe Bool

    Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

  • fleetIds :: [Text]

    The IDs of the EC2 Fleets.

  • terminateInstances :: Bool

    Indicates whether to terminate the instances when the EC2 Fleet is deleted. The default is to terminate the instances.

    To let the instances continue to run after the EC2 Fleet is deleted, specify NoTerminateInstances. Supported only for fleets of type maintain and request.

    For instant fleets, you cannot specify NoTerminateInstances. A deleted instant fleet with running instances is not supported.

Instances

Instances details
ToHeaders DeleteFleets Source # 
Instance details

Defined in Amazonka.EC2.DeleteFleets

ToPath DeleteFleets Source # 
Instance details

Defined in Amazonka.EC2.DeleteFleets

ToQuery DeleteFleets Source # 
Instance details

Defined in Amazonka.EC2.DeleteFleets

AWSRequest DeleteFleets Source # 
Instance details

Defined in Amazonka.EC2.DeleteFleets

Associated Types

type AWSResponse DeleteFleets #

Generic DeleteFleets Source # 
Instance details

Defined in Amazonka.EC2.DeleteFleets

Associated Types

type Rep DeleteFleets :: Type -> Type #

Read DeleteFleets Source # 
Instance details

Defined in Amazonka.EC2.DeleteFleets

Show DeleteFleets Source # 
Instance details

Defined in Amazonka.EC2.DeleteFleets

NFData DeleteFleets Source # 
Instance details

Defined in Amazonka.EC2.DeleteFleets

Methods

rnf :: DeleteFleets -> () #

Eq DeleteFleets Source # 
Instance details

Defined in Amazonka.EC2.DeleteFleets

Hashable DeleteFleets Source # 
Instance details

Defined in Amazonka.EC2.DeleteFleets

type AWSResponse DeleteFleets Source # 
Instance details

Defined in Amazonka.EC2.DeleteFleets

type Rep DeleteFleets Source # 
Instance details

Defined in Amazonka.EC2.DeleteFleets

type Rep DeleteFleets = D1 ('MetaData "DeleteFleets" "Amazonka.EC2.DeleteFleets" "amazonka-ec2-2.0-48L9RAJvmvzAdBkRegqWCL" 'False) (C1 ('MetaCons "DeleteFleets'" 'PrefixI 'True) (S1 ('MetaSel ('Just "dryRun") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: (S1 ('MetaSel ('Just "fleetIds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [Text]) :*: S1 ('MetaSel ('Just "terminateInstances") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool))))

newDeleteFleets Source #

Create a value of DeleteFleets with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:dryRun:DeleteFleets', deleteFleets_dryRun - Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

$sel:fleetIds:DeleteFleets', deleteFleets_fleetIds - The IDs of the EC2 Fleets.

$sel:terminateInstances:DeleteFleets', deleteFleets_terminateInstances - Indicates whether to terminate the instances when the EC2 Fleet is deleted. The default is to terminate the instances.

To let the instances continue to run after the EC2 Fleet is deleted, specify NoTerminateInstances. Supported only for fleets of type maintain and request.

For instant fleets, you cannot specify NoTerminateInstances. A deleted instant fleet with running instances is not supported.

Request Lenses

deleteFleets_dryRun :: Lens' DeleteFleets (Maybe Bool) Source #

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

deleteFleets_fleetIds :: Lens' DeleteFleets [Text] Source #

The IDs of the EC2 Fleets.

deleteFleets_terminateInstances :: Lens' DeleteFleets Bool Source #

Indicates whether to terminate the instances when the EC2 Fleet is deleted. The default is to terminate the instances.

To let the instances continue to run after the EC2 Fleet is deleted, specify NoTerminateInstances. Supported only for fleets of type maintain and request.

For instant fleets, you cannot specify NoTerminateInstances. A deleted instant fleet with running instances is not supported.

Destructuring the Response

data DeleteFleetsResponse Source #

See: newDeleteFleetsResponse smart constructor.

Constructors

DeleteFleetsResponse' 

Fields

Instances

Instances details
Generic DeleteFleetsResponse Source # 
Instance details

Defined in Amazonka.EC2.DeleteFleets

Associated Types

type Rep DeleteFleetsResponse :: Type -> Type #

Read DeleteFleetsResponse Source # 
Instance details

Defined in Amazonka.EC2.DeleteFleets

Show DeleteFleetsResponse Source # 
Instance details

Defined in Amazonka.EC2.DeleteFleets

NFData DeleteFleetsResponse Source # 
Instance details

Defined in Amazonka.EC2.DeleteFleets

Methods

rnf :: DeleteFleetsResponse -> () #

Eq DeleteFleetsResponse Source # 
Instance details

Defined in Amazonka.EC2.DeleteFleets

type Rep DeleteFleetsResponse Source # 
Instance details

Defined in Amazonka.EC2.DeleteFleets

type Rep DeleteFleetsResponse = D1 ('MetaData "DeleteFleetsResponse" "Amazonka.EC2.DeleteFleets" "amazonka-ec2-2.0-48L9RAJvmvzAdBkRegqWCL" 'False) (C1 ('MetaCons "DeleteFleetsResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "successfulFleetDeletions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [DeleteFleetSuccessItem])) :*: (S1 ('MetaSel ('Just "unsuccessfulFleetDeletions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [DeleteFleetErrorItem])) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

newDeleteFleetsResponse Source #

Create a value of DeleteFleetsResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:successfulFleetDeletions:DeleteFleetsResponse', deleteFleetsResponse_successfulFleetDeletions - Information about the EC2 Fleets that are successfully deleted.

$sel:unsuccessfulFleetDeletions:DeleteFleetsResponse', deleteFleetsResponse_unsuccessfulFleetDeletions - Information about the EC2 Fleets that are not successfully deleted.

$sel:httpStatus:DeleteFleetsResponse', deleteFleetsResponse_httpStatus - The response's http status code.

Response Lenses

deleteFleetsResponse_successfulFleetDeletions :: Lens' DeleteFleetsResponse (Maybe [DeleteFleetSuccessItem]) Source #

Information about the EC2 Fleets that are successfully deleted.

deleteFleetsResponse_unsuccessfulFleetDeletions :: Lens' DeleteFleetsResponse (Maybe [DeleteFleetErrorItem]) Source #

Information about the EC2 Fleets that are not successfully deleted.