Copyright | (c) 2013-2018 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
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.
- purchaseHostReservation :: Text -> PurchaseHostReservation
- data PurchaseHostReservation
- phrCurrencyCode :: Lens' PurchaseHostReservation (Maybe CurrencyCodeValues)
- phrClientToken :: Lens' PurchaseHostReservation (Maybe Text)
- phrLimitPrice :: Lens' PurchaseHostReservation (Maybe Text)
- phrHostIdSet :: Lens' PurchaseHostReservation [Text]
- phrOfferingId :: Lens' PurchaseHostReservation Text
- purchaseHostReservationResponse :: Int -> PurchaseHostReservationResponse
- data PurchaseHostReservationResponse
- phrrsCurrencyCode :: Lens' PurchaseHostReservationResponse (Maybe CurrencyCodeValues)
- phrrsClientToken :: Lens' PurchaseHostReservationResponse (Maybe Text)
- phrrsTotalHourlyPrice :: Lens' PurchaseHostReservationResponse (Maybe Text)
- phrrsTotalUpfrontPrice :: Lens' PurchaseHostReservationResponse (Maybe Text)
- phrrsPurchase :: Lens' PurchaseHostReservationResponse [Purchase]
- phrrsResponseStatus :: Lens' PurchaseHostReservationResponse Int
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 thetotalUpfrontPrice
,LimitPrice
, andtotalHourlyPrice
amounts are specified. At this time, the only supported currency isUSD
.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 isUSD
. 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.
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.
phrOfferingId :: Lens' PurchaseHostReservation Text Source #
The ID of the offering.
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:
phrrsCurrencyCode
- The currency in which thetotalUpfrontPrice
andtotalHourlyPrice
amounts are specified. At this time, the only supported currency isUSD
.phrrsClientToken
- 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 GuidephrrsTotalHourlyPrice
- The total hourly price of the reservation calculated per hour.phrrsTotalUpfrontPrice
- The total amount that will be charged to your account when you purchase the reservation.phrrsPurchase
- Describes the details of the purchase.phrrsResponseStatus
- -- | The response status code.
data PurchaseHostReservationResponse Source #
See: purchaseHostReservationResponse
smart constructor.
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.
phrrsResponseStatus :: Lens' PurchaseHostReservationResponse Int Source #
- - | The response status code.