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

Description

Purchases a Reserved Instance for use with your account. With Reserved Instances, you pay a lower hourly rate compared to On-Demand instance pricing.

Use DescribeReservedInstancesOfferings to get a list of Reserved Instance offerings that match your specifications. After you've purchased a Reserved Instance, you can check for your new Reserved Instance with DescribeReservedInstances.

To queue a purchase for a future date and time, specify a purchase time. If you do not specify a purchase time, the default is the current time.

For more information, see Reserved Instances and Reserved Instance Marketplace in the Amazon EC2 User Guide.

We are retiring EC2-Classic. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide.

Synopsis

Creating a Request

data PurchaseReservedInstancesOffering Source #

Contains the parameters for PurchaseReservedInstancesOffering.

See: newPurchaseReservedInstancesOffering smart constructor.

Constructors

PurchaseReservedInstancesOffering' 

Fields

  • dryRun :: Maybe Bool

    Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

  • limitPrice :: Maybe ReservedInstanceLimitPrice

    Specified for Reserved Instance Marketplace offerings to limit the total order and ensure that the Reserved Instances are not purchased at unexpected prices.

  • purchaseTime :: Maybe ISO8601

    The time at which to purchase the Reserved Instance, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).

  • instanceCount :: Int

    The number of Reserved Instances to purchase.

  • reservedInstancesOfferingId :: Text

    The ID of the Reserved Instance offering to purchase.

Instances

Instances details
ToHeaders PurchaseReservedInstancesOffering Source # 
Instance details

Defined in Amazonka.EC2.PurchaseReservedInstancesOffering

ToPath PurchaseReservedInstancesOffering Source # 
Instance details

Defined in Amazonka.EC2.PurchaseReservedInstancesOffering

ToQuery PurchaseReservedInstancesOffering Source # 
Instance details

Defined in Amazonka.EC2.PurchaseReservedInstancesOffering

AWSRequest PurchaseReservedInstancesOffering Source # 
Instance details

Defined in Amazonka.EC2.PurchaseReservedInstancesOffering

Generic PurchaseReservedInstancesOffering Source # 
Instance details

Defined in Amazonka.EC2.PurchaseReservedInstancesOffering

Associated Types

type Rep PurchaseReservedInstancesOffering :: Type -> Type #

Read PurchaseReservedInstancesOffering Source # 
Instance details

Defined in Amazonka.EC2.PurchaseReservedInstancesOffering

Show PurchaseReservedInstancesOffering Source # 
Instance details

Defined in Amazonka.EC2.PurchaseReservedInstancesOffering

NFData PurchaseReservedInstancesOffering Source # 
Instance details

Defined in Amazonka.EC2.PurchaseReservedInstancesOffering

Eq PurchaseReservedInstancesOffering Source # 
Instance details

Defined in Amazonka.EC2.PurchaseReservedInstancesOffering

Hashable PurchaseReservedInstancesOffering Source # 
Instance details

Defined in Amazonka.EC2.PurchaseReservedInstancesOffering

type AWSResponse PurchaseReservedInstancesOffering Source # 
Instance details

Defined in Amazonka.EC2.PurchaseReservedInstancesOffering

type Rep PurchaseReservedInstancesOffering Source # 
Instance details

Defined in Amazonka.EC2.PurchaseReservedInstancesOffering

type Rep PurchaseReservedInstancesOffering = D1 ('MetaData "PurchaseReservedInstancesOffering" "Amazonka.EC2.PurchaseReservedInstancesOffering" "amazonka-ec2-2.0-48L9RAJvmvzAdBkRegqWCL" 'False) (C1 ('MetaCons "PurchaseReservedInstancesOffering'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "dryRun") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "limitPrice") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ReservedInstanceLimitPrice))) :*: (S1 ('MetaSel ('Just "purchaseTime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ISO8601)) :*: (S1 ('MetaSel ('Just "instanceCount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "reservedInstancesOfferingId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))))

newPurchaseReservedInstancesOffering Source #

Create a value of PurchaseReservedInstancesOffering 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:

$sel:dryRun:PurchaseReservedInstancesOffering', purchaseReservedInstancesOffering_dryRun - Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

$sel:limitPrice:PurchaseReservedInstancesOffering', purchaseReservedInstancesOffering_limitPrice - Specified for Reserved Instance Marketplace offerings to limit the total order and ensure that the Reserved Instances are not purchased at unexpected prices.

$sel:purchaseTime:PurchaseReservedInstancesOffering', purchaseReservedInstancesOffering_purchaseTime - The time at which to purchase the Reserved Instance, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).

PurchaseReservedInstancesOffering, purchaseReservedInstancesOffering_instanceCount - The number of Reserved Instances to purchase.

PurchaseReservedInstancesOffering, purchaseReservedInstancesOffering_reservedInstancesOfferingId - The ID of the Reserved Instance offering to purchase.

Request Lenses

purchaseReservedInstancesOffering_dryRun :: Lens' PurchaseReservedInstancesOffering (Maybe Bool) Source #

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

purchaseReservedInstancesOffering_limitPrice :: Lens' PurchaseReservedInstancesOffering (Maybe ReservedInstanceLimitPrice) Source #

Specified for Reserved Instance Marketplace offerings to limit the total order and ensure that the Reserved Instances are not purchased at unexpected prices.

purchaseReservedInstancesOffering_purchaseTime :: Lens' PurchaseReservedInstancesOffering (Maybe UTCTime) Source #

The time at which to purchase the Reserved Instance, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).

Destructuring the Response

data PurchaseReservedInstancesOfferingResponse Source #

Contains the output of PurchaseReservedInstancesOffering.

See: newPurchaseReservedInstancesOfferingResponse smart constructor.

Constructors

PurchaseReservedInstancesOfferingResponse' 

Fields

  • reservedInstancesId :: Maybe Text

    The IDs of the purchased Reserved Instances. If your purchase crosses into a discounted pricing tier, the final Reserved Instances IDs might change. For more information, see Crossing pricing tiers in the Amazon Elastic Compute Cloud User Guide.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Generic PurchaseReservedInstancesOfferingResponse Source # 
Instance details

Defined in Amazonka.EC2.PurchaseReservedInstancesOffering

Read PurchaseReservedInstancesOfferingResponse Source # 
Instance details

Defined in Amazonka.EC2.PurchaseReservedInstancesOffering

Show PurchaseReservedInstancesOfferingResponse Source # 
Instance details

Defined in Amazonka.EC2.PurchaseReservedInstancesOffering

NFData PurchaseReservedInstancesOfferingResponse Source # 
Instance details

Defined in Amazonka.EC2.PurchaseReservedInstancesOffering

Eq PurchaseReservedInstancesOfferingResponse Source # 
Instance details

Defined in Amazonka.EC2.PurchaseReservedInstancesOffering

type Rep PurchaseReservedInstancesOfferingResponse Source # 
Instance details

Defined in Amazonka.EC2.PurchaseReservedInstancesOffering

type Rep PurchaseReservedInstancesOfferingResponse = D1 ('MetaData "PurchaseReservedInstancesOfferingResponse" "Amazonka.EC2.PurchaseReservedInstancesOffering" "amazonka-ec2-2.0-48L9RAJvmvzAdBkRegqWCL" 'False) (C1 ('MetaCons "PurchaseReservedInstancesOfferingResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "reservedInstancesId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newPurchaseReservedInstancesOfferingResponse Source #

Create a value of PurchaseReservedInstancesOfferingResponse 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:

PurchaseReservedInstancesOfferingResponse, purchaseReservedInstancesOfferingResponse_reservedInstancesId - The IDs of the purchased Reserved Instances. If your purchase crosses into a discounted pricing tier, the final Reserved Instances IDs might change. For more information, see Crossing pricing tiers in the Amazon Elastic Compute Cloud User Guide.

$sel:httpStatus:PurchaseReservedInstancesOfferingResponse', purchaseReservedInstancesOfferingResponse_httpStatus - The response's http status code.

Response Lenses

purchaseReservedInstancesOfferingResponse_reservedInstancesId :: Lens' PurchaseReservedInstancesOfferingResponse (Maybe Text) Source #

The IDs of the purchased Reserved Instances. If your purchase crosses into a discounted pricing tier, the final Reserved Instances IDs might change. For more information, see Crossing pricing tiers in the Amazon Elastic Compute Cloud User Guide.