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.PurchaseHostReservation

Contents

Description

Purchase a reservation with configurations that match those of your Dedicated Host. You must have active Dedicated Hosts in your account before you purchase a reservation. This action results in the specified reservation being purchased and charged to your account.

Synopsis

Creating a Request

purchaseHostReservation #

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

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

  • phrCurrencyCode - The currency in which the totalUpfrontPrice , LimitPrice , and totalHourlyPrice amounts are specified. At this time, the only supported currency is USD .
  • phrClientToken - Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see How to Ensure Idempotency in the Amazon Elastic Compute Cloud User Guide .
  • phrLimitPrice - The specified limit is checked against the total upfront cost of the reservation (calculated as the offering's upfront cost multiplied by the host count). If the total upfront cost is greater than the specified price limit, the request will fail. This is used to ensure that the purchase does not exceed the expected upfront cost of the purchase. At this time, the only supported currency is USD . For example, to indicate a limit price of USD 100, specify 100.00.
  • phrOfferingId - The ID of the offering.
  • phrHostIdSet - The IDs of the Dedicated Hosts that the reservation will be associated with.

data PurchaseHostReservation #

See: purchaseHostReservation smart constructor.

Instances

Eq PurchaseHostReservation # 
Data PurchaseHostReservation # 

Methods

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

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

toConstr :: PurchaseHostReservation -> Constr #

dataTypeOf :: PurchaseHostReservation -> DataType #

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

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

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

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

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

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

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

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

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

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

Read PurchaseHostReservation # 
Show PurchaseHostReservation # 
Generic PurchaseHostReservation # 
Hashable PurchaseHostReservation # 
NFData PurchaseHostReservation # 

Methods

rnf :: PurchaseHostReservation -> () #

AWSRequest PurchaseHostReservation # 
ToQuery PurchaseHostReservation # 
ToPath PurchaseHostReservation # 
ToHeaders PurchaseHostReservation # 
type Rep PurchaseHostReservation # 
type Rep PurchaseHostReservation = D1 (MetaData "PurchaseHostReservation" "Network.AWS.EC2.PurchaseHostReservation" "amazonka-ec2-1.4.5-C4CR35JggG2GhWFrIiKGhu" False) (C1 (MetaCons "PurchaseHostReservation'" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_phrCurrencyCode") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe CurrencyCodeValues))) (S1 (MetaSel (Just Symbol "_phrClientToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)))) ((:*:) (S1 (MetaSel (Just Symbol "_phrLimitPrice") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) ((:*:) (S1 (MetaSel (Just Symbol "_phrOfferingId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)) (S1 (MetaSel (Just Symbol "_phrHostIdSet") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 [Text]))))))
type Rs PurchaseHostReservation # 

Request Lenses

phrCurrencyCode :: Lens' PurchaseHostReservation (Maybe CurrencyCodeValues) #

The currency in which the totalUpfrontPrice , LimitPrice , and totalHourlyPrice amounts are specified. At this time, the only supported currency is USD .

phrClientToken :: Lens' PurchaseHostReservation (Maybe Text) #

Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see How to Ensure Idempotency in the Amazon Elastic Compute Cloud User Guide .

phrLimitPrice :: Lens' PurchaseHostReservation (Maybe Text) #

The specified limit is checked against the total upfront cost of the reservation (calculated as the offering's upfront cost multiplied by the host count). If the total upfront cost is greater than the specified price limit, the request will fail. This is used to ensure that the purchase does not exceed the expected upfront cost of the purchase. At this time, the only supported currency is USD . For example, to indicate a limit price of USD 100, specify 100.00.

phrHostIdSet :: Lens' PurchaseHostReservation [Text] #

The IDs of the Dedicated Hosts that the reservation will be associated with.

Destructuring the Response

purchaseHostReservationResponse #

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

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

data PurchaseHostReservationResponse #

See: purchaseHostReservationResponse smart constructor.

Instances

Eq PurchaseHostReservationResponse # 
Data PurchaseHostReservationResponse # 

Methods

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

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

toConstr :: PurchaseHostReservationResponse -> Constr #

dataTypeOf :: PurchaseHostReservationResponse -> DataType #

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

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

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

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

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

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

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

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

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

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

Read PurchaseHostReservationResponse # 
Show PurchaseHostReservationResponse # 
Generic PurchaseHostReservationResponse # 
NFData PurchaseHostReservationResponse # 
type Rep PurchaseHostReservationResponse # 
type Rep PurchaseHostReservationResponse = D1 (MetaData "PurchaseHostReservationResponse" "Network.AWS.EC2.PurchaseHostReservation" "amazonka-ec2-1.4.5-C4CR35JggG2GhWFrIiKGhu" False) (C1 (MetaCons "PurchaseHostReservationResponse'" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_phrrsCurrencyCode") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe CurrencyCodeValues))) ((:*:) (S1 (MetaSel (Just Symbol "_phrrsClientToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_phrrsTotalHourlyPrice") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))))) ((:*:) (S1 (MetaSel (Just Symbol "_phrrsTotalUpfrontPrice") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) ((:*:) (S1 (MetaSel (Just Symbol "_phrrsPurchase") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe [Purchase]))) (S1 (MetaSel (Just Symbol "_phrrsResponseStatus") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Int))))))

Response Lenses

phrrsCurrencyCode :: Lens' PurchaseHostReservationResponse (Maybe CurrencyCodeValues) #

The currency in which the totalUpfrontPrice and totalHourlyPrice amounts are specified. At this time, the only supported currency is USD .

phrrsClientToken :: Lens' PurchaseHostReservationResponse (Maybe Text) #

Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see How to Ensure Idempotency in the Amazon Elastic Compute Cloud User Guide

phrrsTotalHourlyPrice :: Lens' PurchaseHostReservationResponse (Maybe Text) #

The total hourly price of the reservation calculated per hour.

phrrsTotalUpfrontPrice :: Lens' PurchaseHostReservationResponse (Maybe Text) #

The total amount that will be charged to your account when you purchase the reservation.

phrrsPurchase :: Lens' PurchaseHostReservationResponse [Purchase] #

Describes the details of the purchase.