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 |
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
- data PurchaseReservedInstancesOffering = PurchaseReservedInstancesOffering' {}
- newPurchaseReservedInstancesOffering :: Int -> Text -> PurchaseReservedInstancesOffering
- purchaseReservedInstancesOffering_dryRun :: Lens' PurchaseReservedInstancesOffering (Maybe Bool)
- purchaseReservedInstancesOffering_limitPrice :: Lens' PurchaseReservedInstancesOffering (Maybe ReservedInstanceLimitPrice)
- purchaseReservedInstancesOffering_purchaseTime :: Lens' PurchaseReservedInstancesOffering (Maybe UTCTime)
- purchaseReservedInstancesOffering_instanceCount :: Lens' PurchaseReservedInstancesOffering Int
- purchaseReservedInstancesOffering_reservedInstancesOfferingId :: Lens' PurchaseReservedInstancesOffering Text
- data PurchaseReservedInstancesOfferingResponse = PurchaseReservedInstancesOfferingResponse' {}
- newPurchaseReservedInstancesOfferingResponse :: Int -> PurchaseReservedInstancesOfferingResponse
- purchaseReservedInstancesOfferingResponse_reservedInstancesId :: Lens' PurchaseReservedInstancesOfferingResponse (Maybe Text)
- purchaseReservedInstancesOfferingResponse_httpStatus :: Lens' PurchaseReservedInstancesOfferingResponse Int
Creating a Request
data PurchaseReservedInstancesOffering Source #
Contains the parameters for PurchaseReservedInstancesOffering.
See: newPurchaseReservedInstancesOffering
smart constructor.
PurchaseReservedInstancesOffering' | |
|
Instances
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).
purchaseReservedInstancesOffering_instanceCount :: Lens' PurchaseReservedInstancesOffering Int Source #
The number of Reserved Instances to purchase.
purchaseReservedInstancesOffering_reservedInstancesOfferingId :: Lens' PurchaseReservedInstancesOffering Text Source #
The ID of the Reserved Instance offering to purchase.
Destructuring the Response
data PurchaseReservedInstancesOfferingResponse Source #
Contains the output of PurchaseReservedInstancesOffering.
See: newPurchaseReservedInstancesOfferingResponse
smart constructor.
PurchaseReservedInstancesOfferingResponse' | |
|
Instances
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.
purchaseReservedInstancesOfferingResponse_httpStatus :: Lens' PurchaseReservedInstancesOfferingResponse Int Source #
The response's http status code.