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 |
Gets recommendations for which reservations to purchase. These recommendations could help you reduce your costs. Reservations provide a discounted hourly rate (up to 75%) compared to On-Demand pricing.
AWS generates your recommendations by identifying your On-Demand usage during a specific time period and collecting your usage into categories that are eligible for a reservation. After AWS has these categories, it simulates every combination of reservations in each category of usage to identify the best number of each type of RI to purchase to maximize your estimated savings.
For example, AWS automatically aggregates your EC2 Linux, shared tenancy, and c4 family usage in the US West (Oregon) Region and recommends that you buy size-flexible regional reservations to apply to the c4 family usage. AWS recommends the smallest size instance in an instance family. This makes it easier to purchase a size-flexible RI. AWS also shows the equal number of normalized units so that you can purchase any instance size that you want. For this example, your RI recommendation would be for c4.large
, because that is the smallest size instance in the c4 instance family.
- getReservationPurchaseRecommendation :: Text -> GetReservationPurchaseRecommendation
- data GetReservationPurchaseRecommendation
- grprNextPageToken :: Lens' GetReservationPurchaseRecommendation (Maybe Text)
- grprTermInYears :: Lens' GetReservationPurchaseRecommendation (Maybe TermInYears)
- grprServiceSpecification :: Lens' GetReservationPurchaseRecommendation (Maybe ServiceSpecification)
- grprAccountScope :: Lens' GetReservationPurchaseRecommendation (Maybe AccountScope)
- grprAccountId :: Lens' GetReservationPurchaseRecommendation (Maybe Text)
- grprPageSize :: Lens' GetReservationPurchaseRecommendation (Maybe Natural)
- grprLookbackPeriodInDays :: Lens' GetReservationPurchaseRecommendation (Maybe LookbackPeriodInDays)
- grprPaymentOption :: Lens' GetReservationPurchaseRecommendation (Maybe PaymentOption)
- grprService :: Lens' GetReservationPurchaseRecommendation Text
- getReservationPurchaseRecommendationResponse :: Int -> GetReservationPurchaseRecommendationResponse
- data GetReservationPurchaseRecommendationResponse
- grprrsNextPageToken :: Lens' GetReservationPurchaseRecommendationResponse (Maybe Text)
- grprrsRecommendations :: Lens' GetReservationPurchaseRecommendationResponse [ReservationPurchaseRecommendation]
- grprrsMetadata :: Lens' GetReservationPurchaseRecommendationResponse (Maybe ReservationPurchaseRecommendationMetadata)
- grprrsResponseStatus :: Lens' GetReservationPurchaseRecommendationResponse Int
Creating a Request
getReservationPurchaseRecommendation Source #
Creates a value of GetReservationPurchaseRecommendation
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
grprNextPageToken
- The pagination token that indicates the next set of results that you want to retrieve.grprTermInYears
- The reservation term that you want recommendations for.grprServiceSpecification
- The hardware specifications for the service instances that you want recommendations for, such as standard or convertible EC2 instances.grprAccountScope
- The account scope that you want recommendations for. The only valid value isPayer
. This means that AWS includes the master account and any member accounts when it calculates its recommendations.grprAccountId
- The account ID that is associated with the recommendation.grprPageSize
- The number of recommendations that you want returned in a single response object.grprLookbackPeriodInDays
- The number of previous days that you want AWS to consider when it calculates your recommendations.grprPaymentOption
- The reservation purchase option that you want recommendations for.grprService
- The specific service that you want recommendations for.
data GetReservationPurchaseRecommendation Source #
See: getReservationPurchaseRecommendation
smart constructor.
Request Lenses
grprNextPageToken :: Lens' GetReservationPurchaseRecommendation (Maybe Text) Source #
The pagination token that indicates the next set of results that you want to retrieve.
grprTermInYears :: Lens' GetReservationPurchaseRecommendation (Maybe TermInYears) Source #
The reservation term that you want recommendations for.
grprServiceSpecification :: Lens' GetReservationPurchaseRecommendation (Maybe ServiceSpecification) Source #
The hardware specifications for the service instances that you want recommendations for, such as standard or convertible EC2 instances.
grprAccountScope :: Lens' GetReservationPurchaseRecommendation (Maybe AccountScope) Source #
The account scope that you want recommendations for. The only valid value is Payer
. This means that AWS includes the master account and any member accounts when it calculates its recommendations.
grprAccountId :: Lens' GetReservationPurchaseRecommendation (Maybe Text) Source #
The account ID that is associated with the recommendation.
grprPageSize :: Lens' GetReservationPurchaseRecommendation (Maybe Natural) Source #
The number of recommendations that you want returned in a single response object.
grprLookbackPeriodInDays :: Lens' GetReservationPurchaseRecommendation (Maybe LookbackPeriodInDays) Source #
The number of previous days that you want AWS to consider when it calculates your recommendations.
grprPaymentOption :: Lens' GetReservationPurchaseRecommendation (Maybe PaymentOption) Source #
The reservation purchase option that you want recommendations for.
grprService :: Lens' GetReservationPurchaseRecommendation Text Source #
The specific service that you want recommendations for.
Destructuring the Response
getReservationPurchaseRecommendationResponse Source #
Creates a value of GetReservationPurchaseRecommendationResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
grprrsNextPageToken
- The pagination token for the next set of retrievable results.grprrsRecommendations
- Recommendations for reservations to purchase.grprrsMetadata
- Information about this specific recommendation call, such as the time stamp for when Cost Explorer generated this recommendation.grprrsResponseStatus
- -- | The response status code.
data GetReservationPurchaseRecommendationResponse Source #
See: getReservationPurchaseRecommendationResponse
smart constructor.
Response Lenses
grprrsNextPageToken :: Lens' GetReservationPurchaseRecommendationResponse (Maybe Text) Source #
The pagination token for the next set of retrievable results.
grprrsRecommendations :: Lens' GetReservationPurchaseRecommendationResponse [ReservationPurchaseRecommendation] Source #
Recommendations for reservations to purchase.
grprrsMetadata :: Lens' GetReservationPurchaseRecommendationResponse (Maybe ReservationPurchaseRecommendationMetadata) Source #
Information about this specific recommendation call, such as the time stamp for when Cost Explorer generated this recommendation.
grprrsResponseStatus :: Lens' GetReservationPurchaseRecommendationResponse Int Source #
- - | The response status code.