amazonka-ec2-1.6.1: 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.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:

  • 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.
  • phrHostIdSet - The IDs of the Dedicated Hosts that the reservation will be associated with.
  • phrOfferingId - The ID of the offering.

data PurchaseHostReservation Source #

See: purchaseHostReservation smart constructor.

Instances
Eq PurchaseHostReservation Source # 
Instance details

Defined in Network.AWS.EC2.PurchaseHostReservation

Data PurchaseHostReservation Source # 
Instance details

Defined in Network.AWS.EC2.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 Source # 
Instance details

Defined in Network.AWS.EC2.PurchaseHostReservation

Show PurchaseHostReservation Source # 
Instance details

Defined in Network.AWS.EC2.PurchaseHostReservation

Generic PurchaseHostReservation Source # 
Instance details

Defined in Network.AWS.EC2.PurchaseHostReservation

Associated Types

type Rep PurchaseHostReservation :: Type -> Type #

Hashable PurchaseHostReservation Source # 
Instance details

Defined in Network.AWS.EC2.PurchaseHostReservation

AWSRequest PurchaseHostReservation Source # 
Instance details

Defined in Network.AWS.EC2.PurchaseHostReservation

Associated Types

type Rs PurchaseHostReservation :: Type #

ToHeaders PurchaseHostReservation Source # 
Instance details

Defined in Network.AWS.EC2.PurchaseHostReservation

ToPath PurchaseHostReservation Source # 
Instance details

Defined in Network.AWS.EC2.PurchaseHostReservation

ToQuery PurchaseHostReservation Source # 
Instance details

Defined in Network.AWS.EC2.PurchaseHostReservation

NFData PurchaseHostReservation Source # 
Instance details

Defined in Network.AWS.EC2.PurchaseHostReservation

Methods

rnf :: PurchaseHostReservation -> () #

type Rep PurchaseHostReservation Source # 
Instance details

Defined in Network.AWS.EC2.PurchaseHostReservation

type Rep PurchaseHostReservation = D1 (MetaData "PurchaseHostReservation" "Network.AWS.EC2.PurchaseHostReservation" "amazonka-ec2-1.6.1-GgG1M0FWcBrE5I5IM2QktE" False) (C1 (MetaCons "PurchaseHostReservation'" PrefixI True) ((S1 (MetaSel (Just "_phrCurrencyCode") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe CurrencyCodeValues)) :*: S1 (MetaSel (Just "_phrClientToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 (MetaSel (Just "_phrLimitPrice") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 (MetaSel (Just "_phrHostIdSet") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 [Text]) :*: S1 (MetaSel (Just "_phrOfferingId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)))))
type Rs PurchaseHostReservation Source # 
Instance details

Defined in Network.AWS.EC2.PurchaseHostReservation

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 IDs of the Dedicated Hosts 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 # 
Instance details

Defined in Network.AWS.EC2.PurchaseHostReservation

Data PurchaseHostReservationResponse Source # 
Instance details

Defined in Network.AWS.EC2.PurchaseHostReservation

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 # 
Instance details

Defined in Network.AWS.EC2.PurchaseHostReservation

Show PurchaseHostReservationResponse Source # 
Instance details

Defined in Network.AWS.EC2.PurchaseHostReservation

Generic PurchaseHostReservationResponse Source # 
Instance details

Defined in Network.AWS.EC2.PurchaseHostReservation

Associated Types

type Rep PurchaseHostReservationResponse :: Type -> Type #

NFData PurchaseHostReservationResponse Source # 
Instance details

Defined in Network.AWS.EC2.PurchaseHostReservation

type Rep PurchaseHostReservationResponse Source # 
Instance details

Defined in Network.AWS.EC2.PurchaseHostReservation

type Rep PurchaseHostReservationResponse = D1 (MetaData "PurchaseHostReservationResponse" "Network.AWS.EC2.PurchaseHostReservation" "amazonka-ec2-1.6.1-GgG1M0FWcBrE5I5IM2QktE" False) (C1 (MetaCons "PurchaseHostReservationResponse'" PrefixI True) ((S1 (MetaSel (Just "_phrrsCurrencyCode") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe CurrencyCodeValues)) :*: (S1 (MetaSel (Just "_phrrsClientToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_phrrsTotalHourlyPrice") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)))) :*: (S1 (MetaSel (Just "_phrrsTotalUpfrontPrice") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 (MetaSel (Just "_phrrsPurchase") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe [Purchase])) :*: S1 (MetaSel (Just "_phrrsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (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.