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

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

Network.AWS.EC2.PurchaseReservedInstancesOffering

Contents

Description

Purchases a Reserved Instance for use with your account. With Reserved Instances, you pay a lower hourly rate compared to On-Demand instance pricing.

Use DescribeReservedInstancesOfferings to get a list of Reserved Instance offerings that match your specifications. After you've purchased a Reserved Instance, you can check for your new Reserved Instance with DescribeReservedInstances .

For more information, see Reserved Instances and Reserved Instance Marketplace in the Amazon Elastic Compute Cloud User Guide .

Synopsis

Creating a Request

purchaseReservedInstancesOffering #

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

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

  • prioLimitPrice - Specified for Reserved Instance Marketplace offerings to limit the total order and ensure that the Reserved Instances are not purchased at unexpected prices.
  • prioDryRun - 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 .
  • prioReservedInstancesOfferingId - The ID of the Reserved Instance offering to purchase.
  • prioInstanceCount - The number of Reserved Instances to purchase.

data PurchaseReservedInstancesOffering #

Contains the parameters for PurchaseReservedInstancesOffering.

See: purchaseReservedInstancesOffering smart constructor.

Instances

Eq PurchaseReservedInstancesOffering # 
Data PurchaseReservedInstancesOffering # 

Methods

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

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

toConstr :: PurchaseReservedInstancesOffering -> Constr #

dataTypeOf :: PurchaseReservedInstancesOffering -> DataType #

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

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

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

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

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

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

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

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

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

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

Read PurchaseReservedInstancesOffering # 
Show PurchaseReservedInstancesOffering # 
Generic PurchaseReservedInstancesOffering # 
Hashable PurchaseReservedInstancesOffering # 
NFData PurchaseReservedInstancesOffering # 
AWSRequest PurchaseReservedInstancesOffering # 
ToQuery PurchaseReservedInstancesOffering # 
ToPath PurchaseReservedInstancesOffering # 
ToHeaders PurchaseReservedInstancesOffering # 
type Rep PurchaseReservedInstancesOffering # 
type Rep PurchaseReservedInstancesOffering = D1 (MetaData "PurchaseReservedInstancesOffering" "Network.AWS.EC2.PurchaseReservedInstancesOffering" "amazonka-ec2-1.4.5-C4CR35JggG2GhWFrIiKGhu" False) (C1 (MetaCons "PurchaseReservedInstancesOffering'" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_prioLimitPrice") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe ReservedInstanceLimitPrice))) (S1 (MetaSel (Just Symbol "_prioDryRun") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Bool)))) ((:*:) (S1 (MetaSel (Just Symbol "_prioReservedInstancesOfferingId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)) (S1 (MetaSel (Just Symbol "_prioInstanceCount") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Int)))))
type Rs PurchaseReservedInstancesOffering # 

Request Lenses

prioLimitPrice :: Lens' PurchaseReservedInstancesOffering (Maybe ReservedInstanceLimitPrice) #

Specified for Reserved Instance Marketplace offerings to limit the total order and ensure that the Reserved Instances are not purchased at unexpected prices.

prioDryRun :: Lens' PurchaseReservedInstancesOffering (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 .

prioReservedInstancesOfferingId :: Lens' PurchaseReservedInstancesOffering Text #

The ID of the Reserved Instance offering to purchase.

prioInstanceCount :: Lens' PurchaseReservedInstancesOffering Int #

The number of Reserved Instances to purchase.

Destructuring the Response

purchaseReservedInstancesOfferingResponse #

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

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

data PurchaseReservedInstancesOfferingResponse #

Contains the output of PurchaseReservedInstancesOffering.

See: purchaseReservedInstancesOfferingResponse smart constructor.

Instances

Eq PurchaseReservedInstancesOfferingResponse # 
Data PurchaseReservedInstancesOfferingResponse # 

Methods

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

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

toConstr :: PurchaseReservedInstancesOfferingResponse -> Constr #

dataTypeOf :: PurchaseReservedInstancesOfferingResponse -> DataType #

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

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

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

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

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

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

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

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

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

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

Read PurchaseReservedInstancesOfferingResponse # 
Show PurchaseReservedInstancesOfferingResponse # 
Generic PurchaseReservedInstancesOfferingResponse # 
NFData PurchaseReservedInstancesOfferingResponse # 
type Rep PurchaseReservedInstancesOfferingResponse # 
type Rep PurchaseReservedInstancesOfferingResponse = D1 (MetaData "PurchaseReservedInstancesOfferingResponse" "Network.AWS.EC2.PurchaseReservedInstancesOffering" "amazonka-ec2-1.4.5-C4CR35JggG2GhWFrIiKGhu" False) (C1 (MetaCons "PurchaseReservedInstancesOfferingResponse'" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_priorsReservedInstancesId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_priorsResponseStatus") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Int))))

Response Lenses

priorsReservedInstancesId :: Lens' PurchaseReservedInstancesOfferingResponse (Maybe Text) #

The IDs of the purchased Reserved Instances.