Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
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.
Synopsis
- data PurchaseHostReservation = PurchaseHostReservation' {}
- newPurchaseHostReservation :: Text -> PurchaseHostReservation
- purchaseHostReservation_clientToken :: Lens' PurchaseHostReservation (Maybe Text)
- purchaseHostReservation_currencyCode :: Lens' PurchaseHostReservation (Maybe CurrencyCodeValues)
- purchaseHostReservation_limitPrice :: Lens' PurchaseHostReservation (Maybe Text)
- purchaseHostReservation_tagSpecifications :: Lens' PurchaseHostReservation (Maybe [TagSpecification])
- purchaseHostReservation_hostIdSet :: Lens' PurchaseHostReservation [Text]
- purchaseHostReservation_offeringId :: Lens' PurchaseHostReservation Text
- data PurchaseHostReservationResponse = PurchaseHostReservationResponse' {}
- newPurchaseHostReservationResponse :: Int -> PurchaseHostReservationResponse
- purchaseHostReservationResponse_clientToken :: Lens' PurchaseHostReservationResponse (Maybe Text)
- purchaseHostReservationResponse_currencyCode :: Lens' PurchaseHostReservationResponse (Maybe CurrencyCodeValues)
- purchaseHostReservationResponse_purchase :: Lens' PurchaseHostReservationResponse (Maybe [Purchase])
- purchaseHostReservationResponse_totalHourlyPrice :: Lens' PurchaseHostReservationResponse (Maybe Text)
- purchaseHostReservationResponse_totalUpfrontPrice :: Lens' PurchaseHostReservationResponse (Maybe Text)
- purchaseHostReservationResponse_httpStatus :: Lens' PurchaseHostReservationResponse Int
Creating a Request
data PurchaseHostReservation Source #
See: newPurchaseHostReservation
smart constructor.
PurchaseHostReservation' | |
|
Instances
newPurchaseHostReservation Source #
Create a value of PurchaseHostReservation
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
PurchaseHostReservation
, purchaseHostReservation_clientToken
- Unique, case-sensitive identifier that you provide to ensure the
idempotency of the request. For more information, see
Ensuring Idempotency.
PurchaseHostReservation
, purchaseHostReservation_currencyCode
- The currency in which the totalUpfrontPrice
, LimitPrice
, and
totalHourlyPrice
amounts are specified. At this time, the only
supported currency is USD
.
$sel:limitPrice:PurchaseHostReservation'
, purchaseHostReservation_limitPrice
- 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 fails. 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.
PurchaseHostReservation
, purchaseHostReservation_tagSpecifications
- The tags to apply to the Dedicated Host Reservation during purchase.
PurchaseHostReservation
, purchaseHostReservation_hostIdSet
- The IDs of the Dedicated Hosts with which the reservation will be
associated.
PurchaseHostReservation
, purchaseHostReservation_offeringId
- The ID of the offering.
Request Lenses
purchaseHostReservation_clientToken :: Lens' PurchaseHostReservation (Maybe Text) Source #
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency.
purchaseHostReservation_currencyCode :: 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
.
purchaseHostReservation_limitPrice :: 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 fails. 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.
purchaseHostReservation_tagSpecifications :: Lens' PurchaseHostReservation (Maybe [TagSpecification]) Source #
The tags to apply to the Dedicated Host Reservation during purchase.
purchaseHostReservation_hostIdSet :: Lens' PurchaseHostReservation [Text] Source #
The IDs of the Dedicated Hosts with which the reservation will be associated.
purchaseHostReservation_offeringId :: Lens' PurchaseHostReservation Text Source #
The ID of the offering.
Destructuring the Response
data PurchaseHostReservationResponse Source #
See: newPurchaseHostReservationResponse
smart constructor.
PurchaseHostReservationResponse' | |
|
Instances
newPurchaseHostReservationResponse Source #
Create a value of PurchaseHostReservationResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
PurchaseHostReservation
, purchaseHostReservationResponse_clientToken
- Unique, case-sensitive identifier that you provide to ensure the
idempotency of the request. For more information, see
Ensuring Idempotency.
PurchaseHostReservation
, purchaseHostReservationResponse_currencyCode
- The currency in which the totalUpfrontPrice
and totalHourlyPrice
amounts are specified. At this time, the only supported currency is
USD
.
$sel:purchase:PurchaseHostReservationResponse'
, purchaseHostReservationResponse_purchase
- Describes the details of the purchase.
$sel:totalHourlyPrice:PurchaseHostReservationResponse'
, purchaseHostReservationResponse_totalHourlyPrice
- The total hourly price of the reservation calculated per hour.
$sel:totalUpfrontPrice:PurchaseHostReservationResponse'
, purchaseHostReservationResponse_totalUpfrontPrice
- The total amount charged to your account when you purchase the
reservation.
$sel:httpStatus:PurchaseHostReservationResponse'
, purchaseHostReservationResponse_httpStatus
- The response's http status code.
Response Lenses
purchaseHostReservationResponse_clientToken :: Lens' PurchaseHostReservationResponse (Maybe Text) Source #
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency.
purchaseHostReservationResponse_currencyCode :: 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
.
purchaseHostReservationResponse_purchase :: Lens' PurchaseHostReservationResponse (Maybe [Purchase]) Source #
Describes the details of the purchase.
purchaseHostReservationResponse_totalHourlyPrice :: Lens' PurchaseHostReservationResponse (Maybe Text) Source #
The total hourly price of the reservation calculated per hour.
purchaseHostReservationResponse_totalUpfrontPrice :: Lens' PurchaseHostReservationResponse (Maybe Text) Source #
The total amount charged to your account when you purchase the reservation.
purchaseHostReservationResponse_httpStatus :: Lens' PurchaseHostReservationResponse Int Source #
The response's http status code.