amazonka-ec2-1.6.0: Amazon Elastic Compute Cloud SDK.

Copyright(c) 2013-2018 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.EC2.CreateFleet

Contents

Description

Launches an EC2 Fleet.

You can create a single EC2 Fleet that includes multiple launch specifications that vary by instance type, AMI, Availability Zone, or subnet.

For more information, see Launching an EC2 Fleet in the Amazon Elastic Compute Cloud User Guide .

Synopsis

Creating a Request

createFleet Source #

Creates a value of CreateFleet with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • cfClientToken - Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency .
  • cfSpotOptions - Includes SpotAllocationStrategy and SpotInstanceInterruptionBehavior inside this structure.
  • cfExcessCapacityTerminationPolicy - Indicates whether running instances should be terminated if the total target capacity of the EC2 Fleet is decreased below the current size of the EC2 Fleet.
  • cfTagSpecifications - The tags for an EC2 Fleet resource.
  • cfValidUntil - The end date and time of the request, in UTC format (for example, YYYY -MM -DD THH :MM :SS Z). At this point, no new EC2 Fleet requests are placed or able to fulfill the request. The default end date is 7 days from the current date.
  • cfTerminateInstancesWithExpiration - Indicates whether running instances should be terminated when the EC2 Fleet expires.
  • cfType - The type of request. Indicates whether the EC2 Fleet only requests the target capacity, or also attempts to maintain it. If you request a certain target capacity, EC2 Fleet only places the required requests. It does not attempt to replenish instances if capacity is diminished, and does not submit requests in alternative capacity pools if capacity is unavailable. To maintain a certain target capacity, EC2 Fleet places the required requests to meet this target capacity. It also automatically replenishes any interrupted Spot Instances. Default: maintain .
  • cfValidFrom - The start date and time of the request, in UTC format (for example, YYYY -MM -DD THH :MM :SS Z). The default is to start fulfilling the request immediately.
  • cfReplaceUnhealthyInstances - Indicates whether EC2 Fleet should replace unhealthy instances.
  • cfDryRun - 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 .
  • cfLaunchTemplateConfigs - The configuration for the EC2 Fleet.
  • cfTargetCapacitySpecification - The TotalTargetCapacity , OnDemandTargetCapacity , SpotTargetCapacity , and DefaultCapacityType structure.

data CreateFleet Source #

See: createFleet smart constructor.

Instances

Eq CreateFleet Source # 
Data CreateFleet Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CreateFleet -> c CreateFleet #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CreateFleet #

toConstr :: CreateFleet -> Constr #

dataTypeOf :: CreateFleet -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c CreateFleet) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CreateFleet) #

gmapT :: (forall b. Data b => b -> b) -> CreateFleet -> CreateFleet #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CreateFleet -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CreateFleet -> r #

gmapQ :: (forall d. Data d => d -> u) -> CreateFleet -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CreateFleet -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CreateFleet -> m CreateFleet #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateFleet -> m CreateFleet #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateFleet -> m CreateFleet #

Read CreateFleet Source # 
Show CreateFleet Source # 
Generic CreateFleet Source # 

Associated Types

type Rep CreateFleet :: * -> * #

Hashable CreateFleet Source # 
NFData CreateFleet Source # 

Methods

rnf :: CreateFleet -> () #

AWSRequest CreateFleet Source # 
ToHeaders CreateFleet Source # 

Methods

toHeaders :: CreateFleet -> [Header] #

ToPath CreateFleet Source # 
ToQuery CreateFleet Source # 
type Rep CreateFleet Source # 
type Rep CreateFleet = D1 * (MetaData "CreateFleet" "Network.AWS.EC2.CreateFleet" "amazonka-ec2-1.6.0-Kkew7Kpgof6EYi20Z0WOzs" False) (C1 * (MetaCons "CreateFleet'" PrefixI True) ((:*:) * ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "_cfClientToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text))) ((:*:) * (S1 * (MetaSel (Just Symbol "_cfSpotOptions") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe SpotOptionsRequest))) (S1 * (MetaSel (Just Symbol "_cfExcessCapacityTerminationPolicy") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe FleetExcessCapacityTerminationPolicy))))) ((:*:) * (S1 * (MetaSel (Just Symbol "_cfTagSpecifications") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe [TagSpecification]))) ((:*:) * (S1 * (MetaSel (Just Symbol "_cfValidUntil") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe ISO8601))) (S1 * (MetaSel (Just Symbol "_cfTerminateInstancesWithExpiration") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Bool)))))) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "_cfType") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe FleetType))) ((:*:) * (S1 * (MetaSel (Just Symbol "_cfValidFrom") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe ISO8601))) (S1 * (MetaSel (Just Symbol "_cfReplaceUnhealthyInstances") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Bool))))) ((:*:) * (S1 * (MetaSel (Just Symbol "_cfDryRun") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Bool))) ((:*:) * (S1 * (MetaSel (Just Symbol "_cfLaunchTemplateConfigs") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * [FleetLaunchTemplateConfigRequest])) (S1 * (MetaSel (Just Symbol "_cfTargetCapacitySpecification") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * TargetCapacitySpecificationRequest)))))))
type Rs CreateFleet Source # 

Request Lenses

cfClientToken :: Lens' CreateFleet (Maybe Text) Source #

Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency .

cfSpotOptions :: Lens' CreateFleet (Maybe SpotOptionsRequest) Source #

Includes SpotAllocationStrategy and SpotInstanceInterruptionBehavior inside this structure.

cfExcessCapacityTerminationPolicy :: Lens' CreateFleet (Maybe FleetExcessCapacityTerminationPolicy) Source #

Indicates whether running instances should be terminated if the total target capacity of the EC2 Fleet is decreased below the current size of the EC2 Fleet.

cfTagSpecifications :: Lens' CreateFleet [TagSpecification] Source #

The tags for an EC2 Fleet resource.

cfValidUntil :: Lens' CreateFleet (Maybe UTCTime) Source #

The end date and time of the request, in UTC format (for example, YYYY -MM -DD THH :MM :SS Z). At this point, no new EC2 Fleet requests are placed or able to fulfill the request. The default end date is 7 days from the current date.

cfTerminateInstancesWithExpiration :: Lens' CreateFleet (Maybe Bool) Source #

Indicates whether running instances should be terminated when the EC2 Fleet expires.

cfType :: Lens' CreateFleet (Maybe FleetType) Source #

The type of request. Indicates whether the EC2 Fleet only requests the target capacity, or also attempts to maintain it. If you request a certain target capacity, EC2 Fleet only places the required requests. It does not attempt to replenish instances if capacity is diminished, and does not submit requests in alternative capacity pools if capacity is unavailable. To maintain a certain target capacity, EC2 Fleet places the required requests to meet this target capacity. It also automatically replenishes any interrupted Spot Instances. Default: maintain .

cfValidFrom :: Lens' CreateFleet (Maybe UTCTime) Source #

The start date and time of the request, in UTC format (for example, YYYY -MM -DD THH :MM :SS Z). The default is to start fulfilling the request immediately.

cfReplaceUnhealthyInstances :: Lens' CreateFleet (Maybe Bool) Source #

Indicates whether EC2 Fleet should replace unhealthy instances.

cfDryRun :: Lens' CreateFleet (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 .

cfTargetCapacitySpecification :: Lens' CreateFleet TargetCapacitySpecificationRequest Source #

The TotalTargetCapacity , OnDemandTargetCapacity , SpotTargetCapacity , and DefaultCapacityType structure.

Destructuring the Response

createFleetResponse Source #

Creates a value of CreateFleetResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

data CreateFleetResponse Source #

See: createFleetResponse smart constructor.

Instances

Eq CreateFleetResponse Source # 
Data CreateFleetResponse Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CreateFleetResponse -> c CreateFleetResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CreateFleetResponse #

toConstr :: CreateFleetResponse -> Constr #

dataTypeOf :: CreateFleetResponse -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c CreateFleetResponse) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CreateFleetResponse) #

gmapT :: (forall b. Data b => b -> b) -> CreateFleetResponse -> CreateFleetResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CreateFleetResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CreateFleetResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> CreateFleetResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CreateFleetResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CreateFleetResponse -> m CreateFleetResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateFleetResponse -> m CreateFleetResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateFleetResponse -> m CreateFleetResponse #

Read CreateFleetResponse Source # 
Show CreateFleetResponse Source # 
Generic CreateFleetResponse Source # 
NFData CreateFleetResponse Source # 

Methods

rnf :: CreateFleetResponse -> () #

type Rep CreateFleetResponse Source # 
type Rep CreateFleetResponse = D1 * (MetaData "CreateFleetResponse" "Network.AWS.EC2.CreateFleet" "amazonka-ec2-1.6.0-Kkew7Kpgof6EYi20Z0WOzs" False) (C1 * (MetaCons "CreateFleetResponse'" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "_cfrsFleetId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text))) (S1 * (MetaSel (Just Symbol "_cfrsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Int))))

Response Lenses

cfrsFleetId :: Lens' CreateFleetResponse (Maybe Text) Source #

The ID of the EC2 Fleet.

cfrsResponseStatus :: Lens' CreateFleetResponse Int Source #

  • - | The response status code.