amazonka-ec2-1.4.4: 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 Source #

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:

data PurchaseHostReservation Source #

See: purchaseHostReservation smart constructor.

Instances

Eq PurchaseHostReservation Source # 
Data PurchaseHostReservation Source # 

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 Source # 
Show PurchaseHostReservation Source # 
Generic PurchaseHostReservation Source # 
Hashable PurchaseHostReservation Source # 
NFData PurchaseHostReservation Source # 

Methods

rnf :: PurchaseHostReservation -> () #

AWSRequest PurchaseHostReservation Source # 
ToPath PurchaseHostReservation Source # 
ToHeaders PurchaseHostReservation Source # 
ToQuery PurchaseHostReservation Source # 
type Rep PurchaseHostReservation Source # 
type Rep PurchaseHostReservation = D1 (MetaData "PurchaseHostReservation" "Network.AWS.EC2.PurchaseHostReservation" "amazonka-ec2-1.4.4-4aYNmHv73MpJXVQjlVKYjQ" 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 Source # 

Request Lenses

phrCurrencyCode :: Lens' PurchaseHostReservation (Maybe CurrencyCodeValues) Source #

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) Source #

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) Source #

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] Source #

The ID/s of the Dedicated Host/s that the reservation will be associated with.

Destructuring the Response

purchaseHostReservationResponse Source #

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 Source #

See: purchaseHostReservationResponse smart constructor.

Instances

Eq PurchaseHostReservationResponse Source # 
Data PurchaseHostReservationResponse Source # 

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 Source # 
Show PurchaseHostReservationResponse Source # 
Generic PurchaseHostReservationResponse Source # 
NFData PurchaseHostReservationResponse Source # 
type Rep PurchaseHostReservationResponse Source # 
type Rep PurchaseHostReservationResponse = D1 (MetaData "PurchaseHostReservationResponse" "Network.AWS.EC2.PurchaseHostReservation" "amazonka-ec2-1.4.4-4aYNmHv73MpJXVQjlVKYjQ" 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) Source #

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) Source #

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) Source #

The total hourly price of the reservation calculated per hour.

phrrsTotalUpfrontPrice :: Lens' PurchaseHostReservationResponse (Maybe Text) Source #

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

phrrsPurchase :: Lens' PurchaseHostReservationResponse [Purchase] Source #

Describes the details of the purchase.