GetSavingsPlansPurchaseRecommendation - AWS Cost Explorer Service

GetSavingsPlansPurchaseRecommendation

Retrieves your request parameters, Savings Plan Recommendations Summary and Details.

Request Syntax

{ "AccountScope": "string", "Filter": { "And": [ "Expression" ], "CostCategories": { "Key": "string", "MatchOptions": [ "string" ], "Values": [ "string" ] }, "Dimensions": { "Key": "string", "MatchOptions": [ "string" ], "Values": [ "string" ] }, "Not": "Expression", "Or": [ "Expression" ], "Tags": { "Key": "string", "MatchOptions": [ "string" ], "Values": [ "string" ] } }, "LookbackPeriodInDays": "string", "NextPageToken": "string", "PageSize": number, "PaymentOption": "string", "SavingsPlansType": "string", "TermInYears": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

AccountScope

The account scope that you want your recommendations for. Amazon Web Services calculates recommendations including the management account and member accounts if the value is set to PAYER. If the value is LINKED, recommendations are calculated for individual member accounts only.

Type: String

Valid Values: PAYER | LINKED

Required: No

Filter

You can filter your recommendations by Account ID with the LINKED_ACCOUNT dimension. To filter your recommendations by Account ID, specify Key as LINKED_ACCOUNT and Value as the comma-separated Acount ID(s) for which you want to see Savings Plans purchase recommendations.

For GetSavingsPlansPurchaseRecommendation, the Filter does not include CostCategories or Tags. It only includes Dimensions. With Dimensions, Key must be LINKED_ACCOUNT and Value can be a single Account ID or multiple comma-separated Account IDs for which you want to see Savings Plans Purchase Recommendations. AND and OR operators are not supported.

Type: Expression object

Required: No

LookbackPeriodInDays

The lookback period used to generate the recommendation.

Type: String

Valid Values: SEVEN_DAYS | THIRTY_DAYS | SIXTY_DAYS

Required: Yes

NextPageToken

The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 8192.

Pattern: [\S\s]*

Required: No

PageSize

The number of recommendations that you want returned in a single response object.

Type: Integer

Valid Range: Minimum value of 0.

Required: No

PaymentOption

The payment option used to generate these recommendations.

Type: String

Valid Values: NO_UPFRONT | PARTIAL_UPFRONT | ALL_UPFRONT | LIGHT_UTILIZATION | MEDIUM_UTILIZATION | HEAVY_UTILIZATION

Required: Yes

SavingsPlansType

The Savings Plans recommendation type requested.

Type: String

Valid Values: COMPUTE_SP | EC2_INSTANCE_SP

Required: Yes

TermInYears

The savings plan recommendation term used to generate these recommendations.

Type: String

Valid Values: ONE_YEAR | THREE_YEARS

Required: Yes

Response Syntax

{ "Metadata": { "AdditionalMetadata": "string", "GenerationTimestamp": "string", "RecommendationId": "string" }, "NextPageToken": "string", "SavingsPlansPurchaseRecommendation": { "AccountScope": "string", "LookbackPeriodInDays": "string", "PaymentOption": "string", "SavingsPlansPurchaseRecommendationDetails": [ { "AccountId": "string", "CurrencyCode": "string", "CurrentAverageHourlyOnDemandSpend": "string", "CurrentMaximumHourlyOnDemandSpend": "string", "CurrentMinimumHourlyOnDemandSpend": "string", "EstimatedAverageUtilization": "string", "EstimatedMonthlySavingsAmount": "string", "EstimatedOnDemandCost": "string", "EstimatedOnDemandCostWithCurrentCommitment": "string", "EstimatedROI": "string", "EstimatedSavingsAmount": "string", "EstimatedSavingsPercentage": "string", "EstimatedSPCost": "string", "HourlyCommitmentToPurchase": "string", "SavingsPlansDetails": { "InstanceFamily": "string", "OfferingId": "string", "Region": "string" }, "UpfrontCost": "string" } ], "SavingsPlansPurchaseRecommendationSummary": { "CurrencyCode": "string", "CurrentOnDemandSpend": "string", "DailyCommitmentToPurchase": "string", "EstimatedMonthlySavingsAmount": "string", "EstimatedOnDemandCostWithCurrentCommitment": "string", "EstimatedROI": "string", "EstimatedSavingsAmount": "string", "EstimatedSavingsPercentage": "string", "EstimatedTotalCost": "string", "HourlyCommitmentToPurchase": "string", "TotalRecommendationCount": "string" }, "SavingsPlansType": "string", "TermInYears": "string" } }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

Metadata

Information regarding this specific recommendation set.

Type: SavingsPlansPurchaseRecommendationMetadata object

NextPageToken

The token for the next set of retrievable results. AWS provides the token when the response from a previous call has more results than the maximum page size.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 8192.

Pattern: [\S\s]*

SavingsPlansPurchaseRecommendation

Contains your request parameters, Savings Plan Recommendations Summary, and Details.

Type: SavingsPlansPurchaseRecommendation object

Errors

For information about the errors that are common to all actions, see Common Errors.

InvalidNextTokenException

The pagination token is invalid. Try again without a pagination token.

HTTP Status Code: 400

LimitExceededException

You made too many calls in a short period of time. Try again later.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: