amazonka-ec2-2.0: Amazon Elastic Compute Cloud SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.EC2.PurchaseHostReservation

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

data PurchaseHostReservation Source #

See: newPurchaseHostReservation smart constructor.

Constructors

PurchaseHostReservation' 

Fields

  • clientToken :: Maybe Text

    Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency.

  • currencyCode :: Maybe CurrencyCodeValues

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

  • limitPrice :: 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 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.

  • tagSpecifications :: Maybe [TagSpecification]

    The tags to apply to the Dedicated Host Reservation during purchase.

  • hostIdSet :: [Text]

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

  • offeringId :: Text

    The ID of the offering.

Instances

Instances details
ToHeaders PurchaseHostReservation Source # 
Instance details

Defined in Amazonka.EC2.PurchaseHostReservation

ToPath PurchaseHostReservation Source # 
Instance details

Defined in Amazonka.EC2.PurchaseHostReservation

ToQuery PurchaseHostReservation Source # 
Instance details

Defined in Amazonka.EC2.PurchaseHostReservation

AWSRequest PurchaseHostReservation Source # 
Instance details

Defined in Amazonka.EC2.PurchaseHostReservation

Generic PurchaseHostReservation Source # 
Instance details

Defined in Amazonka.EC2.PurchaseHostReservation

Associated Types

type Rep PurchaseHostReservation :: Type -> Type #

Read PurchaseHostReservation Source # 
Instance details

Defined in Amazonka.EC2.PurchaseHostReservation

Show PurchaseHostReservation Source # 
Instance details

Defined in Amazonka.EC2.PurchaseHostReservation

NFData PurchaseHostReservation Source # 
Instance details

Defined in Amazonka.EC2.PurchaseHostReservation

Methods

rnf :: PurchaseHostReservation -> () #

Eq PurchaseHostReservation Source # 
Instance details

Defined in Amazonka.EC2.PurchaseHostReservation

Hashable PurchaseHostReservation Source # 
Instance details

Defined in Amazonka.EC2.PurchaseHostReservation

type AWSResponse PurchaseHostReservation Source # 
Instance details

Defined in Amazonka.EC2.PurchaseHostReservation

type Rep PurchaseHostReservation Source # 
Instance details

Defined in Amazonka.EC2.PurchaseHostReservation

type Rep PurchaseHostReservation = D1 ('MetaData "PurchaseHostReservation" "Amazonka.EC2.PurchaseHostReservation" "amazonka-ec2-2.0-48L9RAJvmvzAdBkRegqWCL" 'False) (C1 ('MetaCons "PurchaseHostReservation'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "clientToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "currencyCode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe CurrencyCodeValues)) :*: S1 ('MetaSel ('Just "limitPrice") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))) :*: (S1 ('MetaSel ('Just "tagSpecifications") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [TagSpecification])) :*: (S1 ('MetaSel ('Just "hostIdSet") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [Text]) :*: S1 ('MetaSel ('Just "offeringId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))))

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.

Destructuring the Response

data PurchaseHostReservationResponse Source #

See: newPurchaseHostReservationResponse smart constructor.

Constructors

PurchaseHostReservationResponse' 

Fields

Instances

Instances details
Generic PurchaseHostReservationResponse Source # 
Instance details

Defined in Amazonka.EC2.PurchaseHostReservation

Associated Types

type Rep PurchaseHostReservationResponse :: Type -> Type #

Read PurchaseHostReservationResponse Source # 
Instance details

Defined in Amazonka.EC2.PurchaseHostReservation

Show PurchaseHostReservationResponse Source # 
Instance details

Defined in Amazonka.EC2.PurchaseHostReservation

NFData PurchaseHostReservationResponse Source # 
Instance details

Defined in Amazonka.EC2.PurchaseHostReservation

Eq PurchaseHostReservationResponse Source # 
Instance details

Defined in Amazonka.EC2.PurchaseHostReservation

type Rep PurchaseHostReservationResponse Source # 
Instance details

Defined in Amazonka.EC2.PurchaseHostReservation

type Rep PurchaseHostReservationResponse = D1 ('MetaData "PurchaseHostReservationResponse" "Amazonka.EC2.PurchaseHostReservation" "amazonka-ec2-2.0-48L9RAJvmvzAdBkRegqWCL" 'False) (C1 ('MetaCons "PurchaseHostReservationResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "clientToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "currencyCode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe CurrencyCodeValues)) :*: S1 ('MetaSel ('Just "purchase") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Purchase])))) :*: (S1 ('MetaSel ('Just "totalHourlyPrice") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "totalUpfrontPrice") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))))

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